BackstageClient.scan
BackstageClient.scan in @ticketlayer/backstage.
@ticketlayer/backstage / BackstageClient / scan
scan: {
config: (requestOptions?: RequestOptions) => Promise<{
allowedKinds: string[];
configVersion: string;
entitlementFilter: | {
[key: string]: unknown;
}
| null;
eventFilter: {
[key: string]: unknown;
};
gates: string[] | null;
id: string;
isTest: boolean;
name: string;
validFrom: string | null;
validUntil: string | null;
}>;
keys: (requestOptions?: RequestOptions) => Promise<{
alg: "EdDSA";
crv: "Ed25519";
kid: string;
status: string;
x: string;
}[]>;
manifest: (options?: {
since?: string;
}, requestOptions?: RequestOptions) => Promise<{
entitlements: {
barcode: string;
entitlementId: string;
entitlementStatus: string;
holderName: string | null;
identifiers: {
kind: string;
secret?: string;
value: string;
}[];
occurrenceId: string | null;
orderRef: string;
passId: string;
passStatus: string;
redemptionCount: number;
redemptionLimit: number | null;
rotatingCodeRequired: boolean;
rulesSummary?: unknown;
seatLabel: string | null;
ticketTypeName: string;
type: string;
updatedAt: string;
}[];
full: boolean;
hasMore: boolean;
nextCursor: string;
redemptions: {
[key: string]: unknown;
}[];
revocations: {
endedAt: string;
kind: string;
passId: string;
status: string;
value: string;
}[];
rotatingCodes: {
algorithm: string;
digits: number;
maxSkewSeconds: number;
periodSeconds: number;
prefix: string;
};
}>;
operations: (request: {
operations: {
actor?: {
id: string;
type: "user" | "device";
};
entitlementId?: string;
gate?: string;
hopPath?: string[];
kind: "validate" | "redeem" | "reverse";
locationId?: string;
occurredAt: string;
opId: string;
originDeviceId?: string;
passBarcode: string;
reverseOf?: string;
seq?: number;
}[];
}, requestOptions?: RequestOptions) => Promise<{
conflict?: {
[key: string]: unknown;
};
entitlement?: {
[key: string]: unknown;
};
holderName?: string | null;
opId: string;
orderRef?: string;
outcome: "duplicate" | "rejected" | "valid" | "reversed";
reason?: string;
redemption?: {
[key: string]: unknown;
};
seatLabel?: string | null;
ticketTypeName?: string;
}[]>;
};Defined in: client.ts:9373
Scan methods
config()#
config: (requestOptions?: RequestOptions) => Promise<{
allowedKinds: string[];
configVersion: string;
entitlementFilter: | {
[key: string]: unknown;
}
| null;
eventFilter: {
[key: string]: unknown;
};
gates: string[] | null;
id: string;
isTest: boolean;
name: string;
validFrom: string | null;
validUntil: string | null;
}>;Get the device scan scope The calling scanner device’s resolved configuration (scope + allowed operations). Device JWT only.
Parameters#
| Parameter | Type |
|---|---|
requestOptions? | RequestOptions |
Returns#
Promise<{
allowedKinds: string[];
configVersion: string;
entitlementFilter: | {
[key: string]: unknown;
}
| null;
eventFilter: {
[key: string]: unknown;
};
gates: string[] | null;
id: string;
isTest: boolean;
name: string;
validFrom: string | null;
validUntil: string | null;
}>
Operation Id#
getScanConfigForDevice
keys()#
keys: (requestOptions?: RequestOptions) => Promise<{
alg: "EdDSA";
crv: "Ed25519";
kid: string;
status: string;
x: string;
}[]>;The organisation's pass signing keys The public keys a scanner verifies signed TL1. barcodes with, offline: the active key and every retired one that may still have tokens out (EdDSA, Ed25519, raw x in base64url). Cache them; a token's kid names its key. Device JWT only.
Parameters#
| Parameter | Type |
|---|---|
requestOptions? | RequestOptions |
Returns#
Promise<{
alg: "EdDSA";
crv: "Ed25519";
kid: string;
status: string;
x: string;
}[]>
Operation Id#
getScanSigningKeys
manifest()#
manifest: (options?: {
since?: string;
}, requestOptions?: RequestOptions) => Promise<{
entitlements: {
barcode: string;
entitlementId: string;
entitlementStatus: string;
holderName: string | null;
identifiers: {
kind: string;
secret?: string;
value: string;
}[];
occurrenceId: string | null;
orderRef: string;
passId: string;
passStatus: string;
redemptionCount: number;
redemptionLimit: number | null;
rotatingCodeRequired: boolean;
rulesSummary?: unknown;
seatLabel: string | null;
ticketTypeName: string;
type: string;
updatedAt: string;
}[];
full: boolean;
hasMore: boolean;
nextCursor: string;
redemptions: {
[key: string]: unknown;
}[];
revocations: {
endedAt: string;
kind: string;
passId: string;
status: string;
value: string;
}[];
rotatingCodes: {
algorithm: string;
digits: number;
maxSkewSeconds: number;
periodSeconds: number;
prefix: string;
};
}>;Get the offline validation dataset The entitlements in scope, as a cursored delta (pass ?since= the prior cursor). Device JWT only.
Parameters#
| Parameter | Type |
|---|---|
options? | { since?: string; } |
options.since? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
entitlements: {
barcode: string;
entitlementId: string;
entitlementStatus: string;
holderName: string | null;
identifiers: {
kind: string;
secret?: string;
value: string;
}[];
occurrenceId: string | null;
orderRef: string;
passId: string;
passStatus: string;
redemptionCount: number;
redemptionLimit: number | null;
rotatingCodeRequired: boolean;
rulesSummary?: unknown;
seatLabel: string | null;
ticketTypeName: string;
type: string;
updatedAt: string;
}[];
full: boolean;
hasMore: boolean;
nextCursor: string;
redemptions: {
[key: string]: unknown;
}[];
revocations: {
endedAt: string;
kind: string;
passId: string;
status: string;
value: string;
}[];
rotatingCodes: {
algorithm: string;
digits: number;
maxSkewSeconds: number;
periodSeconds: number;
prefix: string;
};
}>
Operation Id#
getScanManifest
operations()#
operations: (request: {
operations: {
actor?: {
id: string;
type: "user" | "device";
};
entitlementId?: string;
gate?: string;
hopPath?: string[];
kind: "validate" | "redeem" | "reverse";
locationId?: string;
occurredAt: string;
opId: string;
originDeviceId?: string;
passBarcode: string;
reverseOf?: string;
seq?: number;
}[];
}, requestOptions?: RequestOptions) => Promise<{
conflict?: {
[key: string]: unknown;
};
entitlement?: {
[key: string]: unknown;
};
holderName?: string | null;
opId: string;
orderRef?: string;
outcome: "duplicate" | "rejected" | "valid" | "reversed";
reason?: string;
redemption?: {
[key: string]: unknown;
};
seatLabel?: string | null;
ticketTypeName?: string;
}[]>;Submit scan operations Batch of ScanOperations - applied in occurredAt order, idempotent on opId, duplicates recorded + noted. Device JWT only.
Parameters#
| Parameter | Type |
|---|---|
request | { operations: { actor?: { id: string; type: "user" | "device"; }; entitlementId?: string; gate?: string; hopPath?: string[]; kind: "validate" | "redeem" | "reverse"; locationId?: string; occurredAt: string; opId: string; originDeviceId?: string; passBarcode: string; reverseOf?: string; seq?: number; }[]; } |
request.operations | { actor?: { id: string; type: "user" | "device"; }; entitlementId?: string; gate?: string; hopPath?: string[]; kind: "validate" | "redeem" | "reverse"; locationId?: string; occurredAt: string; opId: string; originDeviceId?: string; passBarcode: string; reverseOf?: string; seq?: number; }[] |
requestOptions? | RequestOptions |
Returns#
Promise<{
conflict?: {
[key: string]: unknown;
};
entitlement?: {
[key: string]: unknown;
};
holderName?: string | null;
opId: string;
orderRef?: string;
outcome: "duplicate" | "rejected" | "valid" | "reversed";
reason?: string;
redemption?: {
[key: string]: unknown;
};
seatLabel?: string | null;
ticketTypeName?: string;
}[]>
Operation Id#
submitScanOperations