BackstageClient.ticketTemplates
BackstageClient.ticketTemplates in @ticketlayer/backstage.
@ticketlayer/backstage / BackstageClient / ticketTemplates
ticketTemplates: {
create: (request: {
accountId?: any;
brandId?: any;
description?: any;
isDefault?: boolean;
layout?: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
}[];
page: {
background?: {
color?: string;
};
height: number;
width: number;
};
};
mediaType?: any;
name: string;
scopeChannelId?: any;
scopeEventId?: any;
scopeTicketTypeId?: any;
status?: "active" | "draft" | "archived";
type?: "label" | "ticket" | "receipt" | "eticket";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ... | ...;
} & {
[key: string]: unknown;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}>;
delete: (id: string, requestOptions?: RequestOptions) => Promise<boolean>;
get: (id: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ... | ...;
} & {
[key: string]: unknown;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}>;
list: (options?: {
eventId?: string;
status?: "active" | "draft" | "archived";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ...;
} & {
[key: ...]: ...;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}[]>;
update: (id: string, request: {
brandId?: any;
description?: any;
isDefault?: boolean;
layout?: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
}[];
page: {
background?: {
color?: string;
};
height: number;
width: number;
};
};
mediaType?: any;
name?: string;
scopeChannelId?: any;
scopeEventId?: any;
scopeTicketTypeId?: any;
status?: "active" | "draft" | "archived";
type?: "label" | "ticket" | "receipt" | "eticket";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ... | ...;
} & {
[key: string]: unknown;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}>;
};Defined in: client.ts:9198
Ticket Templates methods
create()#
create: (request: {
accountId?: any;
brandId?: any;
description?: any;
isDefault?: boolean;
layout?: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
}[];
page: {
background?: {
color?: string;
};
height: number;
width: number;
};
};
mediaType?: any;
name: string;
scopeChannelId?: any;
scopeEventId?: any;
scopeTicketTypeId?: any;
status?: "active" | "draft" | "archived";
type?: "label" | "ticket" | "receipt" | "eticket";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ... | ...;
} & {
[key: string]: unknown;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}>;Create ticket template Create a ticket/pass template. layout is the renderer-agnostic block model.
Parameters#
| Parameter | Type |
|---|---|
request | { accountId?: any; brandId?: any; description?: any; isDefault?: boolean; layout?: { blocks: { height: number; id: string; type: "text" | "qr" | "barcode" | "image" | "rect"; width: number; x: number; y: number; }[]; page: { background?: { color?: string; }; height: number; width: number; }; }; mediaType?: any; name: string; scopeChannelId?: any; scopeEventId?: any; scopeTicketTypeId?: any; status?: "active" | "draft" | "archived"; type?: "label" | "ticket" | "receipt" | "eticket"; } |
request.accountId? | any |
request.brandId? | any |
request.description? | any |
request.isDefault? | boolean |
request.layout? | { blocks: { height: number; id: string; type: "text" | "qr" | "barcode" | "image" | "rect"; width: number; x: number; y: number; }[]; page: { background?: { color?: string; }; height: number; width: number; }; } |
request.layout.blocks? | { height: number; id: string; type: "text" | "qr" | "barcode" | "image" | "rect"; width: number; x: number; y: number; }[] |
request.layout.page? | { background?: { color?: string; }; height: number; width: number; } |
request.layout.page.background? | { color?: string; } |
request.layout.page.background.color? | string |
request.layout.page.height? | number |
request.layout.page.width? | number |
request.mediaType? | any |
request.name? | string |
request.scopeChannelId? | any |
request.scopeEventId? | any |
request.scopeTicketTypeId? | any |
request.status? | "active" | "draft" | "archived" |
request.type? | "label" | "ticket" | "receipt" | "eticket" |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ... | ...;
} & {
[key: string]: unknown;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}>
Operation Id#
createTicketTemplate
delete()#
delete: (id: string, requestOptions?: RequestOptions) => Promise<boolean>;Delete ticket template Soft-delete a ticket/pass template.
Parameters#
| Parameter | Type |
|---|---|
id | string |
requestOptions? | RequestOptions |
Returns#
Promise<boolean>
Operation Id#
deleteTicketTemplate
get()#
get: (id: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ... | ...;
} & {
[key: string]: unknown;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}>;Get ticket template Get a ticket/pass template by id.
Parameters#
| Parameter | Type |
|---|---|
id | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ... | ...;
} & {
[key: string]: unknown;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}>
Operation Id#
getTicketTemplate
list()#
list: (options?: {
eventId?: string;
status?: "active" | "draft" | "archived";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ...;
} & {
[key: ...]: ...;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}[]>;List ticket templates List the organisation's ticket/pass templates (the designer layouts).
Parameters#
| Parameter | Type |
|---|---|
options? | { eventId?: string; status?: "active" | "draft" | "archived"; } |
options.eventId? | string |
options.status? | "active" | "draft" | "archived" |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ...;
} & {
[key: ...]: ...;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}[]>
Operation Id#
listTicketTemplates
update()#
update: (id: string, request: {
brandId?: any;
description?: any;
isDefault?: boolean;
layout?: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
}[];
page: {
background?: {
color?: string;
};
height: number;
width: number;
};
};
mediaType?: any;
name?: string;
scopeChannelId?: any;
scopeEventId?: any;
scopeTicketTypeId?: any;
status?: "active" | "draft" | "archived";
type?: "label" | "ticket" | "receipt" | "eticket";
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ... | ...;
} & {
[key: string]: unknown;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}>;Update ticket template Update a ticket/pass template. Saving a new layout bumps its version.
Parameters#
| Parameter | Type |
|---|---|
id | string |
request | { brandId?: any; description?: any; isDefault?: boolean; layout?: { blocks: { height: number; id: string; type: "text" | "qr" | "barcode" | "image" | "rect"; width: number; x: number; y: number; }[]; page: { background?: { color?: string; }; height: number; width: number; }; }; mediaType?: any; name?: string; scopeChannelId?: any; scopeEventId?: any; scopeTicketTypeId?: any; status?: "active" | "draft" | "archived"; type?: "label" | "ticket" | "receipt" | "eticket"; } |
request.brandId? | any |
request.description? | any |
request.isDefault? | boolean |
request.layout? | { blocks: { height: number; id: string; type: "text" | "qr" | "barcode" | "image" | "rect"; width: number; x: number; y: number; }[]; page: { background?: { color?: string; }; height: number; width: number; }; } |
request.layout.blocks? | { height: number; id: string; type: "text" | "qr" | "barcode" | "image" | "rect"; width: number; x: number; y: number; }[] |
request.layout.page? | { background?: { color?: string; }; height: number; width: number; } |
request.layout.page.background? | { color?: string; } |
request.layout.page.background.color? | string |
request.layout.page.height? | number |
request.layout.page.width? | number |
request.mediaType? | any |
request.name? | string |
request.scopeChannelId? | any |
request.scopeEventId? | any |
request.scopeTicketTypeId? | any |
request.status? | "active" | "draft" | "archived" |
request.type? | "label" | "ticket" | "receipt" | "eticket" |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
brandId: string | null;
createdAt: string;
description: string | null;
id: string;
isDefault: boolean;
layout: {
blocks: {
height: number;
id: string;
type: "text" | "qr" | "barcode" | "image" | "rect";
width: number;
x: number;
y: number;
} & {
[key: string]: unknown;
}[];
page: {
background?: {
color?: ... | ...;
} & {
[key: string]: unknown;
};
height: number;
width: number;
} & {
[key: string]: unknown;
};
};
mediaType: string | null;
name: string;
organisationId: string;
scopeChannelId: string | null;
scopeEventId: string | null;
scopeTicketTypeId: string | null;
status: string;
type: string;
updatedAt: string;
version: number;
}>
Operation Id#
updateTicketTemplate