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.

  • 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.

  • 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[]
  • 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 miliseconds that the user/studio's subscription period ends at. Null if the subscription never ends.

    • periodStartMs number

      The unix time in miliseconds 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.