/** * Collections an invitation may grant, taken from the API's list of invitation collections minus * the two that are not meaningful choices. * * This list is duplicated from the API. A collection added there will be silently omitted * here until it is added to this array AND given a `scopes.` label in every consuming * namespace (`user-invitation-card`, `user-invitation-form`). Rendering an unlabelled raw * token among humanized names looks broken, so omission is the deliberate failure mode. * * Two of the API's 22 collections are excluded on purpose -- do not "fix" the omission: * * - `clients`: a separate top-level resource that the Foxy admin does not manage. * Sign-in never issues `clients_read`/`clients_write`, so granting them would have * no effect. * - `users`: the API treats `user_full_access` as `users_read users_write`, * and every admin sign-in requests `user_full_access`, so a user's access here never * depends on their invitation. A toggle would be inert rather than merely redundant. */ export declare const COLLECTIONS: readonly ["carts", "coupons", "customers", "customer_portal_settings", "downloadables", "gift_cards", "integrations", "item_categories", "payment_settings", "reporting", "shipping_integrations", "shipping_settings", "stores", "subscriptions", "subscription_settings", "taxes", "templates", "transactions", "user_invitations", "webhooks"]; /** Collections that additionally support a `_resend` permission. */ export declare const RESENDABLE: readonly ["transactions", "webhooks", "taxes"]; export declare type ScopeGroups = { /** `store_full_access` was present. All other tokens are ignored and the arrays are empty. */ storeFullAccess: boolean; /** Collections the user can read and write. A `_write` scope implies read, per the API. */ full: string[]; /** Collections the user can read but not write. */ read: string[]; /** Collections the user can resend without full access. Full access includes resend. */ resend: string[]; }; /** * Groups an invitation's space-separated `scope` string by permission level. * * Returns collection tokens rather than display labels: labels are localized, and sorting * by them belongs in the element that has a translation function. */ export declare function groupInvitationScopes(scope: string | null | undefined): ScopeGroups;