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.
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.
RecordUserPolicyType
Defines a type that represents a policy that indicates which users are allowed to affect a record.
trueindicates 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:
truestring[]
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-expireindicates that credits never expire.expire-after-periodindicates 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.