entitlements.ts

Entitlement configuration fields and template defaults.

config/entitlements.ts exports a WebsiteEntitlementDefinitionsInput object with one entitlement per key. starter_download is an example used by the template's subscription product, not a fixed field. You can add, remove, or change entitlement keys, or export an empty object if there are no entitlements.

The Entitlement union type exported at the end of the file is generated from the configuration object's keys. After changing entitlement keys, also update product configuration, upgrade rules, and entitlement data already stored in the database.

Entitlement keys

Entitlement keys are nonempty strings. They should be English identifiers that clearly describe their purpose, such as starter_download or monthly_export_quota. Put the user-facing name in name.

Entitlement records

Each entitlement key maps to an entitlement record with the following format:

Prop

Type

capabilities must not contain duplicates, and a capability cannot belong to multiple entitlements. The schema checks string formats and duplicates, but does not verify that capability keys exist. After making changes, check the keys against capability.ts as well.

Template defaults

Entitlement keyname.valuedescription.valuecapabilities
starter_downloadSample product accessExample access granted while a configured Saavo Starter plan is active.starter.download

This record demonstrates how a subscription plan grants product access. When deleting or replacing it, also update the plans in products.ts that reference this entitlement.