Skip to content
Docs
Reference

BackstageClient.plan

BackstageClient.plan in @ticketlayer/backstage.

@ticketlayer/backstage


@ticketlayer/backstage / BackstageClient / plan

plan: {
  get: (requestOptions?: RequestOptions) => Promise<{
     entitlements: {
        accounts: boolean;
        api: boolean;
        backstage: boolean;
        channels: {
           max: number | null;
        };
        concierge: {
           ai: boolean;
        };
        elements: {
           memberships: boolean;
           passes: boolean;
           seatMaps: boolean;
        };
        events: {
           max: number | null;
        };
        payments: {
           ownStripe: boolean;
        };
        support: {
           email: boolean;
           inbox: boolean;
           knowledgeBase: boolean;
        };
        ticketTypes: {
           max: number | null;
        };
     };
     id: string;
     name: string;
  }>;
};

Defined in: client.ts:2429

Plan methods

get()#

get: (requestOptions?: RequestOptions) => Promise<{
  entitlements: {
     accounts: boolean;
     api: boolean;
     backstage: boolean;
     channels: {
        max: number | null;
     };
     concierge: {
        ai: boolean;
     };
     elements: {
        memberships: boolean;
        passes: boolean;
        seatMaps: boolean;
     };
     events: {
        max: number | null;
     };
     payments: {
        ownStripe: boolean;
     };
     support: {
        email: boolean;
        inbox: boolean;
        knowledgeBase: boolean;
     };
     ticketTypes: {
        max: number | null;
     };
  };
  id: string;
  name: string;
}>;

Get the organisation's plan The plan the CALLER'S OWN organisation is on, and what that plan permits. The organisation comes from the credential: this operation takes no parameters, so there is nothing to pass that could ask about another organisation. A limit of null means no limit. These entitlements are what a client should use to decide what to OFFER; they are not the enforcement. A limit is enforced where the data is created, so a client that ignores them reaches the same refusal by a longer route: 403 PLAN_ENTITLEMENT_REQUIRED, naming the entitlement. Enforced today: payments.ownStripe, when a payment provider of the organisation's own is linked; support.knowledgeBase, when a knowledge base article or fact is created; support.inbox, on the inbox views, assigning or claiming a case, writing the support settings and creating a macro; and concierge.ai, when a channel's Concierge AI is switched on. The counted limits (events.max, ticketTypes.max, channels.max) are reported but not yet enforced. Nothing here is ever a reason that existing data is hidden: a plan decides what may be created next, never what already exists. Requires organisation.read, which every staff role holds.

Parameters#

ParameterType
requestOptions?RequestOptions

Returns#

Promise<{ entitlements: { accounts: boolean; api: boolean; backstage: boolean; channels: { max: number | null; }; concierge: { ai: boolean; }; elements: { memberships: boolean; passes: boolean; seatMaps: boolean; }; events: { max: number | null; }; payments: { ownStripe: boolean; }; support: { email: boolean; inbox: boolean; knowledgeBase: boolean; }; ticketTypes: { max: number | null; }; }; id: string; name: string; }>

Operation Id#

getPlan