Skip to content
Docs
Reference

BackstageClient.passPolicies

BackstageClient.passPolicies in @ticketlayer/backstage.

@ticketlayer/backstage


@ticketlayer/backstage / BackstageClient / passPolicies

passPolicies: {
  get: (scopeType: string, scopeId: string, options?: {
     eventId?: string;
   }, requestOptions?: RequestOptions) => Promise<{
     effective: {
        changeCutoffHours: number | null;
        codeRelease: "on_issue" | "before_event" | null;
        codeReleaseHours: number | null;
        loadOntoLongLived: boolean | null;
        maxNameChanges: number | null;
        maxTransfers: number | null;
        nameChangesAllowed: boolean | null;
        naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
        namingDeadlineHours: number | null;
        placement: "per_holder" | "own" | null;
        security: "open" | "protected" | null;
        signedBarcodes: boolean | null;
        transfersAllowed: boolean | null;
     };
     eventId: string;
     own: {
        changeCutoffHours: number | null;
        codeRelease: "on_issue" | "before_event" | null;
        codeReleaseHours: number | null;
        loadOntoLongLived: boolean | null;
        maxNameChanges: number | null;
        maxTransfers: number | null;
        nameChangesAllowed: boolean | null;
        naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
        namingDeadlineHours: number | null;
        placement: "per_holder" | "own" | null;
        security: "open" | "protected" | null;
        signedBarcodes: boolean | null;
        transfersAllowed: boolean | null;
     };
     scopeId: string;
     scopeType: "ticket_type" | "event";
  }>;
  put: (scopeType: string, scopeId: string, request: {
     changeCutoffHours?: number | null;
     codeRelease?: "on_issue" | "before_event" | null;
     codeReleaseHours?: number | null;
     loadOntoLongLived?: boolean | null;
     maxNameChanges?: number | null;
     maxTransfers?: number | null;
     nameChangesAllowed?: boolean | null;
     naming?: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
     namingDeadlineHours?: number | null;
     placement?: "per_holder" | "own" | null;
     security?: "open" | "protected" | null;
     signedBarcodes?: boolean | null;
     transfersAllowed?: boolean | null;
   }, options?: {
     eventId?: string;
   }, requestOptions?: RequestOptions) => Promise<{
     effective: {
        changeCutoffHours: number | null;
        codeRelease: "on_issue" | "before_event" | null;
        codeReleaseHours: number | null;
        loadOntoLongLived: boolean | null;
        maxNameChanges: number | null;
        maxTransfers: number | null;
        nameChangesAllowed: boolean | null;
        naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
        namingDeadlineHours: number | null;
        placement: "per_holder" | "own" | null;
        security: "open" | "protected" | null;
        signedBarcodes: boolean | null;
        transfersAllowed: boolean | null;
     };
     eventId: string;
     own: {
        changeCutoffHours: number | null;
        codeRelease: "on_issue" | "before_event" | null;
        codeReleaseHours: number | null;
        loadOntoLongLived: boolean | null;
        maxNameChanges: number | null;
        maxTransfers: number | null;
        nameChangesAllowed: boolean | null;
        naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
        namingDeadlineHours: number | null;
        placement: "per_holder" | "own" | null;
        security: "open" | "protected" | null;
        signedBarcodes: boolean | null;
        transfersAllowed: boolean | null;
     };
     scopeId: string;
     scopeType: "ticket_type" | "event";
  }>;
};

Defined in: client.ts:9154

Pass Policies methods

get()#

get: (scopeType: string, scopeId: string, options?: {
  eventId?: string;
}, requestOptions?: RequestOptions) => Promise<{
  effective: {
     changeCutoffHours: number | null;
     codeRelease: "on_issue" | "before_event" | null;
     codeReleaseHours: number | null;
     loadOntoLongLived: boolean | null;
     maxNameChanges: number | null;
     maxTransfers: number | null;
     nameChangesAllowed: boolean | null;
     naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
     namingDeadlineHours: number | null;
     placement: "per_holder" | "own" | null;
     security: "open" | "protected" | null;
     signedBarcodes: boolean | null;
     transfersAllowed: boolean | null;
  };
  eventId: string;
  own: {
     changeCutoffHours: number | null;
     codeRelease: "on_issue" | "before_event" | null;
     codeReleaseHours: number | null;
     loadOntoLongLived: boolean | null;
     maxNameChanges: number | null;
     maxTransfers: number | null;
     nameChangesAllowed: boolean | null;
     naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
     namingDeadlineHours: number | null;
     placement: "per_holder" | "own" | null;
     security: "open" | "protected" | null;
     signedBarcodes: boolean | null;
     transfersAllowed: boolean | null;
  };
  scopeId: string;
  scopeType: "ticket_type" | "event";
}>;

Get an event's or a ticket type's pass policy Naming (none, at checkout, before a deadline, ID at the gate), name changes and transfers (allowed, how many, until how long before the event), signed barcodes, placement, security (open or protected) and when the code is released, as this level sets them and as they apply. Needs events.read on the event's account.

Parameters#

ParameterType
scopeTypestring
scopeIdstring
options?{ eventId?: string; }
options.eventId?string
requestOptions?RequestOptions

Returns#

Promise<{ effective: { changeCutoffHours: number | null; codeRelease: "on_issue" | "before_event" | null; codeReleaseHours: number | null; loadOntoLongLived: boolean | null; maxNameChanges: number | null; maxTransfers: number | null; nameChangesAllowed: boolean | null; naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null; namingDeadlineHours: number | null; placement: "per_holder" | "own" | null; security: "open" | "protected" | null; signedBarcodes: boolean | null; transfersAllowed: boolean | null; }; eventId: string; own: { changeCutoffHours: number | null; codeRelease: "on_issue" | "before_event" | null; codeReleaseHours: number | null; loadOntoLongLived: boolean | null; maxNameChanges: number | null; maxTransfers: number | null; nameChangesAllowed: boolean | null; naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null; namingDeadlineHours: number | null; placement: "per_holder" | "own" | null; security: "open" | "protected" | null; signedBarcodes: boolean | null; transfersAllowed: boolean | null; }; scopeId: string; scopeType: "ticket_type" | "event"; }>

Operation Id#

getPassPolicy

put()#

put: (scopeType: string, scopeId: string, request: {
  changeCutoffHours?: number | null;
  codeRelease?: "on_issue" | "before_event" | null;
  codeReleaseHours?: number | null;
  loadOntoLongLived?: boolean | null;
  maxNameChanges?: number | null;
  maxTransfers?: number | null;
  nameChangesAllowed?: boolean | null;
  naming?: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
  namingDeadlineHours?: number | null;
  placement?: "per_holder" | "own" | null;
  security?: "open" | "protected" | null;
  signedBarcodes?: boolean | null;
  transfersAllowed?: boolean | null;
}, options?: {
  eventId?: string;
}, requestOptions?: RequestOptions) => Promise<{
  effective: {
     changeCutoffHours: number | null;
     codeRelease: "on_issue" | "before_event" | null;
     codeReleaseHours: number | null;
     loadOntoLongLived: boolean | null;
     maxNameChanges: number | null;
     maxTransfers: number | null;
     nameChangesAllowed: boolean | null;
     naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
     namingDeadlineHours: number | null;
     placement: "per_holder" | "own" | null;
     security: "open" | "protected" | null;
     signedBarcodes: boolean | null;
     transfersAllowed: boolean | null;
  };
  eventId: string;
  own: {
     changeCutoffHours: number | null;
     codeRelease: "on_issue" | "before_event" | null;
     codeReleaseHours: number | null;
     loadOntoLongLived: boolean | null;
     maxNameChanges: number | null;
     maxTransfers: number | null;
     nameChangesAllowed: boolean | null;
     naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null;
     namingDeadlineHours: number | null;
     placement: "per_holder" | "own" | null;
     security: "open" | "protected" | null;
     signedBarcodes: boolean | null;
     transfersAllowed: boolean | null;
  };
  scopeId: string;
  scopeType: "ticket_type" | "event";
}>;

Set an event's or a ticket type's pass policy A field left out keeps its value; null clears it (the level above applies). A ticket type names its event in eventId. Needs events.update on the event's account.

Parameters#

ParameterTypeDescription
scopeTypestring-
scopeIdstring-
request{ changeCutoffHours?: number | null; codeRelease?: "on_issue" | "before_event" | null; codeReleaseHours?: number | null; loadOntoLongLived?: boolean | null; maxNameChanges?: number | null; maxTransfers?: number | null; nameChangesAllowed?: boolean | null; naming?: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null; namingDeadlineHours?: number | null; placement?: "per_holder" | "own" | null; security?: "open" | "protected" | null; signedBarcodes?: boolean | null; transfersAllowed?: boolean | null; }-
request.changeCutoffHours?number | nullDescription Name changes and transfers close this many hours before the event starts; null is until it starts
request.codeRelease?"on_issue" | "before_event" | nullDescription When the code is shown: on_issue (the default), or before_event, codeReleaseHours before the event starts. Until then the barcode is withheld
request.codeReleaseHours?number | null-
request.loadOntoLongLived?boolean | nullDescription Entitlements may be moved onto their holder's long-lived pass, such as a membership card, so scanning the card admits them. Off by default
request.maxNameChanges?number | null-
request.maxTransfers?number | null-
request.nameChangesAllowed?boolean | null-
request.naming?"none" | "at_checkout" | "before_deadline" | "id_at_gate" | nullDescription none; a name per pass at checkout; before a deadline (namingDeadlineHours before the event); or checked against ID at the gate, with nothing stored
request.namingDeadlineHours?number | null-
request.placement?"per_holder" | "own" | nullDescription Where entitlements go when issued: own (a pass each, the default) or per_holder (every entitlement one holder has for the event on one pass, such as a festival wristband)
request.security?"open" | "protected" | nullDescription open (the default): PDF, print, wallet and app. protected: app or wallet only, with rotating codes; PDF, print and Apple Wallet are refused, and the door refuses a static barcode
request.signedBarcodes?boolean | nullDescription Passes carry a signed TL1. barcode, which a scanner can verify offline with the organisation's public keys, beside their random one. Off by default
request.transfersAllowed?boolean | null-
options?{ eventId?: string; }-
options.eventId?string-
requestOptions?RequestOptions-

Returns#

Promise<{ effective: { changeCutoffHours: number | null; codeRelease: "on_issue" | "before_event" | null; codeReleaseHours: number | null; loadOntoLongLived: boolean | null; maxNameChanges: number | null; maxTransfers: number | null; nameChangesAllowed: boolean | null; naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null; namingDeadlineHours: number | null; placement: "per_holder" | "own" | null; security: "open" | "protected" | null; signedBarcodes: boolean | null; transfersAllowed: boolean | null; }; eventId: string; own: { changeCutoffHours: number | null; codeRelease: "on_issue" | "before_event" | null; codeReleaseHours: number | null; loadOntoLongLived: boolean | null; maxNameChanges: number | null; maxTransfers: number | null; nameChangesAllowed: boolean | null; naming: "none" | "at_checkout" | "before_deadline" | "id_at_gate" | null; namingDeadlineHours: number | null; placement: "per_holder" | "own" | null; security: "open" | "protected" | null; signedBarcodes: boolean | null; transfersAllowed: boolean | null; }; scopeId: string; scopeType: "ticket_type" | "event"; }>

Operation Id#

putPassPolicy