Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to represent info for a service.

Hierarchy

  • Info

Index

Constructors

constructor

  • new Info(identifier: string, label: string | null, description: string | null, version: string, authors: Author[], createdTimestamp: number, modifiedTimestamp: number, license: string | null, termsOfServiceURL: string | null): Info
  • Constructor for Info.

    Parameters

    • identifier: string

      Service identifier see spec for format.

    • label: string | null

      Service label.

    • description: string | null

      Description of the service.

    • version: string

      Semantic Version.

    • authors: Author[]

      List of Authors.

    • createdTimestamp: number

      Timestamp of service creation.

    • modifiedTimestamp: number

      Timestamp of service last modified.

    • license: string | null

      Valid SPDX license expression.

    • termsOfServiceURL: string | null

      Url for terms of service.

    Returns Info

Properties

authors

authors: Author[]

List of Authors.

Private createdTimestamp

createdTimestamp: number

Timestamp of service creation.

description

description: string | null

Description of the service.

identifier

identifier: string

Service identifier see spec for format.

label

label: string | null

Service label.

license

license: string | null

Valid SPDX license expression.

Private modifiedTimestamp

modifiedTimestamp: number

Timestamp of service last modified.

service

service: Service | null = null

termsOfServiceURL

termsOfServiceURL: string | null

Url for terms of service.

version

version: string

Semantic Version.

versionManager

versionManager: VersionManager

Accessors

created

  • get created(): Date
  • Date object from the created timestamp.

    memberof

    Info

    Returns Date

    Date object.

modified

  • get modified(): Date
  • Date object from the modified timestamp.

    memberof

    Info

    Returns Date

    Date object.

Methods

addAuthor

  • Add an author to the service info.

    function

    addAuthor

    memberof

    Info

    Parameters

    • author: Author

      Author object to be added.

    Returns Author

    Same author given.

createAndAddAuthor

  • createAndAddAuthor(email: string, name: string | null, publicEmail: string | null, url: string | null, alert: string, flags: Set<string>): Author
  • Create and add an author to the service info.

    function

    createAndAddAuthor

    memberof

    Info

    Parameters

    • email: string

      Email of the author (used as an identifier).

    • name: string | null

      Full name of the author.

    • publicEmail: string | null

      Email to display for public use.

    • url: string | null

      URL of the author.

    • alert: string

      String for alert options.

    • flags: Set<string>

      Set of flags for the author.

    Returns Author

    Created author.

getAuthor

  • getAuthor(email: string): Author | null
  • Returns an author with a given email address.

    function

    getAuthor

    memberof

    Info

    Parameters

    • email: string

      Authors email address.

    Returns Author | null

    Results of authors with the leadDev flag.

getAuthorsByFlags

  • getAuthorsByFlags(...flags: string[]): Author[]
  • Returns a list of authors if they have all given flags.

    function

    getAuthorsByFlags

    memberof

    Info

    Parameters

    • Rest ...flags: string[]

      List of flags.

    Returns Author[]

    Results of authors with the given flags.

getContributers

  • Returns a list of authors with the contributer flag.

    function

    getContributers

    memberof

    Info

    Returns Author[]

    Results of authors with the contributer flag.

getDevs

  • Returns a list of authors with the dev flag.

    function

    getDevs

    memberof

    Info

    Returns Author[]

    Results of authors with the dev flag.

getLeadDevs

  • Returns a list of authors with the leadDev flag.

    function

    getLeadDevs

    memberof

    Info

    Returns Author[]

    Results of authors with the leadDev flag.

removeAuthor

  • removeAuthor(email: string): boolean
  • Remove an author with a given email address.

    function

    removeAuthor

    memberof

    Info

    Parameters

    • email: string

      Author's email address.

    Returns boolean

    true if successfully removed.

serialize

Static deserialize

  • Deserialize an object into an Info instance.

    function

    deserialize

    static
    memberof

    Info

    Parameters

    • data: InfoType

      Javascript object of the Info.

    Returns Info

    Info instance.

Generated using TypeDoc