Skip to main content
Version: Current

Extra Record Types

  • AccountBalancesAndSubscriptionInfo

    Defines an interface that includes both account balance information and subscription information.

    Members

    • credits JSONAccountBalance

      The credits account balance.

      This will be undefined if the user does not have a credits account.

    • subscription? SubscriptionInfo

      The information for the subscription the user has. Undefined if the user does not have a subscription.

    • usd JSONAccountBalance

      The USD account balance.

      This will be undefined if the user does not have a USD account.

  • GetBalancesActionOptions

    Defines an interface that represents the options for getting account balances.

    Members

    • contractId? string

      The ID of the contract whose balances should be retrieved.

    • endpoint? string

      The HTTP endpoint that the request should interface with.

    • studioId? string

      The ID of the studio whose balances should be retrieved.

    • userId? string

      The ID of the user whose balances should be retrieved.

  • GetRecordBudgetResult

    Defines an interface that represents the result of a request to get a record's budget.

    A GetRecordBudgetResult can be one of the following values:

  • InstallPackageOptions

    Defines an interface that represents the options for installing a package.

    Members

    • downgrade? boolean

      Whether to downgrade the package if the installed version is newer than the requested version.

    • endpoint? string

      The HTTP endpoint that the request should interface with.

  • PurchaseCreditsRequest

    Defines an interface that represents the options for purchasing credits for an account.

    Members

    • returnUrl string

      The URL that the user should be sent to if they cancel the purchase.

    • successUrl string

      The URL that the user should be sent to if the purchase completes successfully.

    • targetStudioId? string

      The ID of the studio that the credits should be purchased for. Currently, only studio admins can purchase credits.

    • targetUserId? string

      The ID of the user that the credits should be purchased for. Currently, credits can only be purchased for yourself.

  • PurchaseCreditsResult

    Defines an interface that represents the result of a request to purchase credits for an account.

  • RecordActionOptions

    Defines an interface that represents the base for options for a records action.

    Members

    • endpoint? string

      The HTTP endpoint that the request should interface with.

  • RecordCreditBudget

    Defines an interface that represents a budget that has been configured for a record.

    Members

    • amount string

      The budget amount. A bigint value represented as a string.

    • type ("fixed" | "percent")

      The type of the budget.

      • "fixed" means that a set number of credits will be transferred to the record from the owner's account upon a subscription credit grant.
      • "percent" means that the record will be granted a percentage of the total amount that the owner's account receives upon a subscription credit grant.
  • RecordUserPolicyType

    Defines a type that represents a policy that indicates which users are allowed to affect a record.

    • true indicates that any user can edit the record.
    • An array of strings indicates the list of users that are allowed to edit the record.

    A RecordUserPolicyType can be one of the following values:

    • true
    • string[]
  • SetRecordBudgetRequest

    Defines an interface that represents the options for setting a record's budget.

    Members

    • budget object

      The budget that should be set for the record. Setting this value to null will clear the budget, causing billing for the record to go to the owner's account.

    • recordName string

      The name of the record that the budget should be set for.

  • SetRecordBudgetResult

    Defines an interface that represents the result of a request to set a record's budget.

    A SetRecordBudgetResult can be one of the following values:

  • SubscriptionInfo

    Defines the subscription information for a user or studio. This includes information about the subscription period, the subscription tier, and the credit expiration policy.

    Members

    • creditExpiration ("never-expire" | "expire-after-period")

      The configuration for credit expiration for the user/studio.

      • never-expire indicates that credits never expire.
      • expire-after-period indicates that credits expire after the subscription period ends or if the subscription is not active.
    • hasActiveSubscription boolean

      Whether the user has an active subscription. If false, then the user had a subscription, but it is not currently active.

    • periodEndMs number

      The unix time in milliseconds that the user/studio's subscription period ends at. Null if the subscription never ends.

    • periodStartMs number

      The unix time in milliseconds that the user/studio's subscription period started at. Null if the subscription does not have a start date.

    • subscriptionId string

      The ID of the subscription that the user has.

    • subscriptionTier string

      The tier of the subscription that the user has.