Enums (also known as enumeration types) represent possible sets of values for a field.

You can see the Objects to understand which fields resolve to enums and therefore have a restricted selection of allowed values.

FeatureType

Represents the type of a Feature.

Values

NameDescription
BINARYA user would either have access or not to the given feature in a package. There are either no set amounts or unlimited amounts of a feature when it is binary.
CONSUMABLEA user has a set amount of the given feature in a package. There are limits for a feature when it’s consumable.

PackageStatus

Represents the status of a Package.

Values

NameDescription
ARCHIVEDThe package has been archived and is therefore no longer in use. The package will not be modifiable. Users will also not be able to subscribe to the package.
DRAFTThe package is still being drafted. Users will not be able to subscribe to the package.
PUBLISHEDThe package is published and is therefore live for users to subscribe to.
ALLUsed solely for listing all packages as an argument for the packages query.

ResetPeriod

Represents theperiod in which the usage of a Feature resets.

Does this impact when someone is billed?

No - when someone is billed for a feature/package is decided by the price of the package/features which they they subscribed to. You would have defined the billingPeriod in the BillingTemplate when creating (or editing) the package.

Values

NameDescription
YEARUsage will reset in a year from the time someone has subscribed to the package with the feature.
MONTHUsage will reset in a month from the time someone has subscribed to the package with the feature.
DAYUsage will reset in a day from the time someone has subscribed to the package with the feature.

SubscriptionStatus

Represents the status of a PackageSubscription. When a subscription has been imported in or synced from Stripe, this will mirror the status of the subscription from there. You can see more on Stripe’s definitions here.

Values

NameDescription
ACTIVEThe user is currently subscribed to the given package.
TRIALINGThe user is currently subscribed to the given package on a trialled basis.
CANCELLEDThe subscription is no longer valid as the user has cancelled it.
PAST_DUEThe payment for the subscription is past due and the user needs to pay to regain access.
UNPAIDThe payment for the subscription is unpaid and the user needs to pay to regain access.
INCOMPLETEThe subscription has just been created but payment still needs to take place.
INCOMPLETE_EXPIREDThe needed payment for the new subscription has expired.

What status does a subscription need to have in order for a user to have access to the features within the subscribed package?

Users will only have access to features in packages related to subscriptions which are ACTIVE or TRIALING. They will not be entitled to access the features otherwise.

Does CANCELLED mean that the user is not subscribed to the package in the PackageSubscription?

Not necessarily - it only means that this particular PackageSubscription is no longer valid. A user may have since subscribed to the same package again, although we will record this with a separate PackageSubscription.

You should look through all of a user’s subscriptions via the subscriptions query, and identify the packages they have an ACTIVE SubscriptionStatus for.

RecordUsageAction

Represents how you want the usage of a feature to be recorded (used for recordUsage).

Values

NameDescription
ADDAdds to the existing usage of a feature.
SETOverwrites any existing usage of a feature and sets the delta given as the total amount.