Class UsageStatisticsService

Hierarchy

Index

Constructors

constructor

Properties

hostsService

hostsService: HostsService

installerId

installerId: string

serviceName

serviceName: string = this.constructor.name

userService

userService: UserService

Static hasInstance

hasInstance: boolean = false

Static isSingleton

isSingleton: boolean = true

Static serviceAfterInit

serviceAfterInit: Subject<Service> = new Subject<Service>()

lifecycle hook

Accessors

isProduction

  • get isProduction(): boolean

Static instance

  • get instance(): any

Methods

Protected afterInit

  • afterInit(): void
  • calls only once per application life all observers are ready to listen service's events

    Returns void

init

  • init(): void

loadInstallerId

  • loadInstallerId(): void

Protected mounted

  • mounted(): void

recordEvent

  • recordEvent(event: TUsageEvent, metadata?: object): Promise<Response>
  • Record a usage event on our server.

    Parameters

    • event: TUsageEvent

      the event type to record

    • Default value metadata: object = {}

      arbitrary data to store with the event (must be serializable)

    Returns Promise<Response>

Static createInstance

  • createInstance(ServiceClass: any): any

Static getResourceId

  • getResourceId(resource: any): string

Static setupInitFunction

  • setupInitFunction(fn: function): void

Static setupProxy

  • setupProxy(fn: function): void