Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Methods

  • addonList(profileID: string): Promise<AddonInfo>
  • auditLogQuery(profileID: string, queryId?: string): Promise<AuditLog>
  • Fetches the information from an auditlog query

    Parameters

    • profileID: string

      Profile identification

    • Optional queryId: string

      auditlog queryId from auditLogCreate

    Returns Promise<AuditLog>

  • create(profileObj: { name: string }, options?: { allocate_free_resources?: boolean }): Promise<{ id: string }>
  • Create a profile.

    If allocate_free_resources is passed as an option, all the free resources available in allocation will be allocated to the new profile.

    Parameters

    • profileObj: { name: string }

      Profile object with data to be created

      • name: string
    • Optional options: { allocate_free_resources?: boolean }

      Options for the created profile.

      • Optional allocate_free_resources?: boolean

    Returns Promise<{ id: string }>

  • delete(profileID: string): Promise<string>
  • removeAddOn(profileId: string, addon: BillingAddOn): Promise<string>
  • Remove an add-on from a profile at the end of the billing cycle.

    throws

    If profile ID is invalid.

    throws

    If profile doesn't have the add-on.

    Parameters

    Returns Promise<string>

    Success message.

  • serviceEdit(profileID: string, serviceObj: object): Promise<string>
  • Sets the information of services for the profile. Services are the main resources in your profile, for example data input, data output, etc...

    Parameters

    • profileID: string

      Profile identification

    • serviceObj: object

    Returns Promise<string>

  • tokenDelete(token: string): Promise<string>
  • transferTokenToAnotherProfile(targetProfileID: string): Promise<string>
  • Transforms the current token to another profile. The current profile will no longer have the current token, as the current token will be acquired by the profile informed. After this call is done, other requests using this token will work solely for the new profile, and no longer for the current profile.

    Parameters

    • targetProfileID: string

      Profile identification

    Returns Promise<string>

  • List all the usage statistics of a profile.

    Usage statistics are cumulative: if a service was not used in a time period, the statistics for that time period will not be in the object.

    example
    [
    { "time": "2022-01-01T00:00:00.000Z", "input": 5 },
    { "time": "2022-01-02T00:00:00.000Z", "input": 5, "output": 10 },
    { "time": "2022-01-03T00:00:00.000Z", "input": 10, "output": 15 },
    ]

    Parameters

    • profileID: string

      Profile identification

    • Optional dateObj: StatisticsDate

      Object with date and their timezone

    Returns Promise<UsageStatistic[]>

    Array of cumulative usage statistics.