@drttix/drt-sdk 1.5.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/cjs/src/functions/sdkConfig.d.ts +37 -2
- package/dist/cjs/src/functions/sdkConfig.js +37 -3
- package/dist/cjs/src/generated/portal/core/OpenAPI.js +1 -1
- package/dist/cjs/src/generated/portal/core/request.js +4 -0
- package/dist/cjs/src/generated/portal/index.d.ts +3 -0
- package/dist/cjs/src/generated/portal/index.js +4 -2
- package/dist/cjs/src/generated/portal/models/AddSessionSeatResponseDto.d.ts +7 -0
- package/dist/cjs/src/generated/portal/models/AddSessionSeatResponseDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/OrderRecalculateRequestDto.d.ts +4 -0
- package/dist/cjs/src/generated/portal/models/SessionSeatRefDto.d.ts +4 -0
- package/dist/cjs/src/generated/portal/models/SessionSeatRefDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/ShowBlockedSeatResponseDto.d.ts +11 -0
- package/dist/cjs/src/generated/portal/models/SkippedSessionSeatDto.d.ts +17 -0
- package/dist/cjs/src/generated/portal/models/SkippedSessionSeatDto.js +14 -0
- package/dist/cjs/src/generated/portal/services/OrderLookupService.d.ts +3 -2
- package/dist/cjs/src/generated/portal/services/OrderLookupService.js +1 -1
- package/dist/cjs/src/generated/portal/types.d.ts +2 -0
- package/dist/cjs/src/generated/scanner/core/request.js +4 -0
- package/dist/cjs/src/generated/shopper/core/OpenAPI.js +1 -1
- package/dist/cjs/src/generated/shopper/core/request.js +4 -0
- package/dist/cjs/src/generated/shopper/index.d.ts +3 -2
- package/dist/cjs/src/generated/shopper/index.js +3 -1
- package/dist/cjs/src/generated/shopper/models/CapabilityManifestDto.d.ts +18 -0
- package/dist/cjs/src/generated/shopper/models/CapabilityManifestDto.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CompleteBody.d.ts +1 -1
- package/dist/cjs/src/generated/shopper/models/CorrelatedCode.d.ts +23 -0
- package/dist/cjs/src/generated/shopper/models/CorrelatedCode.js +14 -0
- package/dist/cjs/src/generated/shopper/models/EmailUpdate.d.ts +1 -1
- package/dist/cjs/src/generated/shopper/models/EventFormat.d.ts +18 -0
- package/dist/cjs/src/generated/shopper/models/EventFormat.js +2 -0
- package/dist/cjs/src/generated/shopper/models/EventListItem.d.ts +3 -14
- package/dist/cjs/src/generated/shopper/models/GAResponse.d.ts +15 -3
- package/dist/cjs/src/generated/shopper/models/GaTier.d.ts +4 -1
- package/dist/cjs/src/generated/shopper/models/SaveDetailsBody.d.ts +0 -1
- package/dist/cjs/src/generated/shopper/models/SeatHoldObject.d.ts +2 -3
- package/dist/cjs/src/generated/shopper/models/SeatHoldReturn.d.ts +2 -3
- package/dist/cjs/src/generated/shopper/models/SiteTheme.d.ts +4 -0
- package/dist/cjs/src/generated/shopper/services/CartService.d.ts +2 -2
- package/dist/cjs/src/generated/shopper/services/CartService.js +2 -2
- package/dist/cjs/src/generated/shopper/services/OrderService.d.ts +2 -2
- package/dist/cjs/src/generated/shopper/services/OrderService.js +2 -2
- package/dist/cjs/src/generated/shopper/services/SessionService.d.ts +23 -0
- package/dist/cjs/src/generated/shopper/services/SessionService.js +38 -0
- package/dist/cjs/src/generated/shopper/types.d.ts +2 -2
- package/dist/esm/src/functions/sdkConfig.d.ts +37 -2
- package/dist/esm/src/functions/sdkConfig.js +35 -3
- package/dist/esm/src/generated/portal/core/OpenAPI.js +1 -1
- package/dist/esm/src/generated/portal/core/request.js +4 -0
- package/dist/esm/src/generated/portal/index.d.ts +3 -0
- package/dist/esm/src/generated/portal/index.js +1 -0
- package/dist/esm/src/generated/portal/models/AddSessionSeatResponseDto.d.ts +7 -0
- package/dist/esm/src/generated/portal/models/AddSessionSeatResponseDto.js +1 -0
- package/dist/esm/src/generated/portal/models/OrderRecalculateRequestDto.d.ts +4 -0
- package/dist/esm/src/generated/portal/models/SessionSeatRefDto.d.ts +4 -0
- package/dist/esm/src/generated/portal/models/SessionSeatRefDto.js +1 -0
- package/dist/esm/src/generated/portal/models/ShowBlockedSeatResponseDto.d.ts +11 -0
- package/dist/esm/src/generated/portal/models/SkippedSessionSeatDto.d.ts +17 -0
- package/dist/esm/src/generated/portal/models/SkippedSessionSeatDto.js +11 -0
- package/dist/esm/src/generated/portal/services/OrderLookupService.d.ts +3 -2
- package/dist/esm/src/generated/portal/services/OrderLookupService.js +1 -1
- package/dist/esm/src/generated/portal/types.d.ts +2 -0
- package/dist/esm/src/generated/scanner/core/request.js +4 -0
- package/dist/esm/src/generated/shopper/core/OpenAPI.js +1 -1
- package/dist/esm/src/generated/shopper/core/request.js +4 -0
- package/dist/esm/src/generated/shopper/index.d.ts +3 -2
- package/dist/esm/src/generated/shopper/index.js +1 -0
- package/dist/esm/src/generated/shopper/models/CapabilityManifestDto.d.ts +18 -0
- package/dist/esm/src/generated/shopper/models/CapabilityManifestDto.js +1 -0
- package/dist/esm/src/generated/shopper/models/CompleteBody.d.ts +1 -1
- package/dist/esm/src/generated/shopper/models/CorrelatedCode.d.ts +23 -0
- package/dist/esm/src/generated/shopper/models/CorrelatedCode.js +13 -1
- package/dist/esm/src/generated/shopper/models/EmailUpdate.d.ts +1 -1
- package/dist/esm/src/generated/shopper/models/EventFormat.d.ts +18 -0
- package/dist/esm/src/generated/shopper/models/EventFormat.js +1 -0
- package/dist/esm/src/generated/shopper/models/EventListItem.d.ts +3 -14
- package/dist/esm/src/generated/shopper/models/GAResponse.d.ts +15 -3
- package/dist/esm/src/generated/shopper/models/GaTier.d.ts +4 -1
- package/dist/esm/src/generated/shopper/models/SaveDetailsBody.d.ts +0 -1
- package/dist/esm/src/generated/shopper/models/SeatHoldObject.d.ts +2 -3
- package/dist/esm/src/generated/shopper/models/SeatHoldReturn.d.ts +2 -3
- package/dist/esm/src/generated/shopper/models/SiteTheme.d.ts +4 -0
- package/dist/esm/src/generated/shopper/services/CartService.d.ts +2 -2
- package/dist/esm/src/generated/shopper/services/CartService.js +2 -2
- package/dist/esm/src/generated/shopper/services/OrderService.d.ts +2 -2
- package/dist/esm/src/generated/shopper/services/OrderService.js +2 -2
- package/dist/esm/src/generated/shopper/services/SessionService.d.ts +23 -0
- package/dist/esm/src/generated/shopper/services/SessionService.js +38 -0
- package/dist/esm/src/generated/shopper/types.d.ts +2 -2
- package/package.json +1 -1
- package/src/custom/custom-request.txt +4 -0
- package/src/functions/sdkConfig.ts +56 -3
- package/src/generated/portal/core/OpenAPI.ts +1 -1
- package/src/generated/portal/core/request.ts +4 -0
- package/src/generated/portal/index.ts +3 -0
- package/src/generated/portal/models/AddSessionSeatResponseDto.ts +12 -0
- package/src/generated/portal/models/OrderRecalculateRequestDto.ts +4 -0
- package/src/generated/portal/models/SessionSeatRefDto.ts +9 -0
- package/src/generated/portal/models/ShowBlockedSeatResponseDto.ts +11 -0
- package/src/generated/portal/models/SkippedSessionSeatDto.ts +22 -0
- package/src/generated/portal/services/OrderLookupService.ts +3 -2
- package/src/generated/portal/types.ts +2 -0
- package/src/generated/scanner/core/request.ts +4 -0
- package/src/generated/shopper/core/OpenAPI.ts +1 -1
- package/src/generated/shopper/core/request.ts +4 -0
- package/src/generated/shopper/index.ts +3 -2
- package/src/generated/shopper/models/CapabilityManifestDto.ts +23 -0
- package/src/generated/shopper/models/CompleteBody.ts +1 -1
- package/src/generated/shopper/models/CorrelatedCode.ts +23 -0
- package/src/generated/shopper/models/EmailUpdate.ts +1 -1
- package/src/generated/shopper/models/EventFormat.ts +23 -0
- package/src/generated/shopper/models/EventListItem.ts +3 -14
- package/src/generated/shopper/models/GAResponse.ts +15 -3
- package/src/generated/shopper/models/GaTier.ts +4 -1
- package/src/generated/shopper/models/SaveDetailsBody.ts +0 -1
- package/src/generated/shopper/models/SeatHoldObject.ts +2 -3
- package/src/generated/shopper/models/SeatHoldReturn.ts +2 -3
- package/src/generated/shopper/models/SiteTheme.ts +4 -0
- package/src/generated/shopper/services/CartService.ts +2 -2
- package/src/generated/shopper/services/OrderService.ts +2 -2
- package/src/generated/shopper/services/SessionService.ts +43 -0
- package/src/generated/shopper/types.ts +2 -2
- package/src/generated/shopper/models/CartStateEnvelope.ts +0 -31
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
import { ApiError } from "./ApiError.js";
|
|
6
6
|
import { CancelablePromise } from "./CancelablePromise.js";
|
|
7
|
+
// Every service's request.ts is this same template (build-all.ts copies it),
|
|
8
|
+
// so this one check is what makes DRT.init() mandatory SDK-wide.
|
|
9
|
+
import { assertInitialized } from "../../../functions/sdkConfig.js";
|
|
7
10
|
export const isDefined = (value) => {
|
|
8
11
|
return value !== undefined && value !== null;
|
|
9
12
|
};
|
|
@@ -270,6 +273,7 @@ const storeCookie = (key, value) => {
|
|
|
270
273
|
export const request = (config, options) => {
|
|
271
274
|
return new CancelablePromise(async (resolve, reject, onCancel) => {
|
|
272
275
|
try {
|
|
276
|
+
assertInitialized(config.BASE);
|
|
273
277
|
const url = getUrl(config, options);
|
|
274
278
|
const formData = getFormData(options);
|
|
275
279
|
const body = getRequestBody(options);
|
|
@@ -10,6 +10,7 @@ export type { AnswerInput } from './models/AnswerInput';
|
|
|
10
10
|
export type { AssignNamesReturn } from './models/AssignNamesReturn';
|
|
11
11
|
export type { BAHold } from './models/BAHold';
|
|
12
12
|
export type { BlockOfTickets } from './models/BlockOfTickets';
|
|
13
|
+
export type { CapabilityManifestDto } from './models/CapabilityManifestDto';
|
|
13
14
|
export type { Cart } from './models/Cart';
|
|
14
15
|
export type { CartAmounts } from './models/CartAmounts';
|
|
15
16
|
export type { CartClearResult } from './models/CartClearResult';
|
|
@@ -17,7 +18,6 @@ export type { CartCounts } from './models/CartCounts';
|
|
|
17
18
|
export type { CartCountsLite } from './models/CartCountsLite';
|
|
18
19
|
export type { CartHashResponse } from './models/CartHashResponse';
|
|
19
20
|
export type { CartItemCounts } from './models/CartItemCounts';
|
|
20
|
-
export type { CartStateEnvelope } from './models/CartStateEnvelope';
|
|
21
21
|
export type { CartSummary } from './models/CartSummary';
|
|
22
22
|
export type { CartTierOption } from './models/CartTierOption';
|
|
23
23
|
export type { CartTierSeat } from './models/CartTierSeat';
|
|
@@ -39,7 +39,7 @@ export type { CheckoutSuccessResponse } from './models/CheckoutSuccessResponse';
|
|
|
39
39
|
export type { CodeDto } from './models/CodeDto';
|
|
40
40
|
export type { CompleteBody } from './models/CompleteBody';
|
|
41
41
|
export type { ConnectedAccountResponse } from './models/ConnectedAccountResponse';
|
|
42
|
-
export
|
|
42
|
+
export { CorrelatedCode } from './models/CorrelatedCode';
|
|
43
43
|
export type { CreateCustomerResponse } from './models/CreateCustomerResponse';
|
|
44
44
|
export type { CreatePaymentIntentBody } from './models/CreatePaymentIntentBody';
|
|
45
45
|
export type { CreatePaymentIntentResponse } from './models/CreatePaymentIntentResponse';
|
|
@@ -55,6 +55,7 @@ export type { DonationText } from './models/DonationText';
|
|
|
55
55
|
export type { EmailUpdate } from './models/EmailUpdate';
|
|
56
56
|
export type { EngineSeat } from './models/EngineSeat';
|
|
57
57
|
export type { EventDetails } from './models/EventDetails';
|
|
58
|
+
export type { EventFormat } from './models/EventFormat';
|
|
58
59
|
export type { EventGroup } from './models/EventGroup';
|
|
59
60
|
export type { EventLegend } from './models/EventLegend';
|
|
60
61
|
export type { EventLegendItem } from './models/EventLegendItem';
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export { ApiError } from './core/ApiError.js';
|
|
6
6
|
export { CancelablePromise, CancelError } from './core/CancelablePromise.js';
|
|
7
7
|
export { OpenAPI } from './core/OpenAPI.js';
|
|
8
|
+
export { CorrelatedCode } from './models/CorrelatedCode.js';
|
|
8
9
|
export { AccountService } from './services/AccountService.js';
|
|
9
10
|
export { CartService } from './services/CartService.js';
|
|
10
11
|
export { CheckoutService } from './services/CheckoutService.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type CapabilityManifestDto = {
|
|
2
|
+
/**
|
|
3
|
+
* True when session.logged_in = 1 AND a session_admin row exists for this (shopper, studio) — i.e. a box-office operator is driving the session.
|
|
4
|
+
*/
|
|
5
|
+
operator: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* True when the requesting IP appears in whitelist_ip.
|
|
8
|
+
*/
|
|
9
|
+
whitelistedIp: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The IP the server saw. Null unless whitelistedIp is true.
|
|
12
|
+
*/
|
|
13
|
+
ip: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* What the UI may paint. A RENDERING HINT, not a permission: every entry corresponds to a server-side check that is enforced independently, and a client that fakes this list gains nothing.
|
|
16
|
+
*/
|
|
17
|
+
capabilities: Array<'debug-bar' | 'cash-payment' | 'order-testing' | 'pos-defaults'>;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,4 +11,27 @@ export type CorrelatedCode = {
|
|
|
11
11
|
* Human-readable summary of the code (shows, seats, effect).
|
|
12
12
|
*/
|
|
13
13
|
details: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the code can be applied now. The listing includes codes that cannot be, so the UI can say WHY (the legacy modal printed "Already Used" / "EXPIRED {date}" / "AVAILABLE {date}" beside a disabled button) rather than offering an Apply that will fail.
|
|
16
|
+
*/
|
|
17
|
+
status: CorrelatedCode.status;
|
|
18
|
+
/**
|
|
19
|
+
* Calendar date (yyyy-MM-dd) the code becomes usable, or null if it already is. Drives the "AVAILABLE {date}" label. Naive by design: the column carries a wall clock in the studio's own time, and an instant renders a day early west of Greenwich.
|
|
20
|
+
*/
|
|
21
|
+
availableFrom: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Calendar date (yyyy-MM-dd) the code expires, or null if it never does. Drives the "EXPIRED {date}" label. Naive, as availableFrom.
|
|
24
|
+
*/
|
|
25
|
+
expiresAt: string | null;
|
|
14
26
|
};
|
|
27
|
+
export declare namespace CorrelatedCode {
|
|
28
|
+
/**
|
|
29
|
+
* Whether the code can be applied now. The listing includes codes that cannot be, so the UI can say WHY (the legacy modal printed "Already Used" / "EXPIRED {date}" / "AVAILABLE {date}" beside a disabled button) rather than offering an Apply that will fail.
|
|
30
|
+
*/
|
|
31
|
+
enum status {
|
|
32
|
+
AVAILABLE = "available",
|
|
33
|
+
USED = "used",
|
|
34
|
+
EXPIRED = "expired",
|
|
35
|
+
NOT_YET = "notYet"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var CorrelatedCode;
|
|
2
|
+
(function (CorrelatedCode) {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the code can be applied now. The listing includes codes that cannot be, so the UI can say WHY (the legacy modal printed "Already Used" / "EXPIRED {date}" / "AVAILABLE {date}" beside a disabled button) rather than offering an Apply that will fail.
|
|
5
|
+
*/
|
|
6
|
+
let status;
|
|
7
|
+
(function (status) {
|
|
8
|
+
status["AVAILABLE"] = "available";
|
|
9
|
+
status["USED"] = "used";
|
|
10
|
+
status["EXPIRED"] = "expired";
|
|
11
|
+
status["NOT_YET"] = "notYet";
|
|
12
|
+
})(status = CorrelatedCode.status || (CorrelatedCode.status = {}));
|
|
13
|
+
})(CorrelatedCode || (CorrelatedCode = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type EventFormat = {
|
|
2
|
+
/**
|
|
3
|
+
* The show id of this format.
|
|
4
|
+
*/
|
|
5
|
+
showId: number;
|
|
6
|
+
/**
|
|
7
|
+
* show.type_id — the format kind.
|
|
8
|
+
*/
|
|
9
|
+
typeId: number;
|
|
10
|
+
/**
|
|
11
|
+
* This format's seating-chart id (PROJ-902 — lets a sibling format's pill link directly without resolving the chart on click).
|
|
12
|
+
*/
|
|
13
|
+
chartId: number;
|
|
14
|
+
/**
|
|
15
|
+
* Roster (performer) count for this format (PROJ-912).
|
|
16
|
+
*/
|
|
17
|
+
rosterCount: number;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EventFormat } from './EventFormat';
|
|
1
2
|
export type EventListItem = {
|
|
2
3
|
id: number;
|
|
3
4
|
chartId: number;
|
|
@@ -44,21 +45,9 @@ export type EventListItem = {
|
|
|
44
45
|
salesTax: number;
|
|
45
46
|
theatreName: string;
|
|
46
47
|
/**
|
|
47
|
-
*
|
|
48
|
+
* Every format collapsed into this row (same production offered in-person/livestream/VOD/…).
|
|
48
49
|
*/
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Show ids of every format collapsed into this row.
|
|
52
|
-
*/
|
|
53
|
-
showIdList: Array<number>;
|
|
54
|
-
/**
|
|
55
|
-
* Chart ids parallel to showIdList (PROJ-902 — lets a sibling format's pill link directly without resolving the chart id on click).
|
|
56
|
-
*/
|
|
57
|
-
chartIdList: Array<number>;
|
|
58
|
-
/**
|
|
59
|
-
* Roster (performer) counts parallel to showIdList (PROJ-912).
|
|
60
|
-
*/
|
|
61
|
-
rosterCountList: Array<number>;
|
|
50
|
+
formats: Array<EventFormat>;
|
|
62
51
|
/**
|
|
63
52
|
* Show artwork URL (cloud URL, or the legacy local path when not clouded — dbo.ShowsAvailable derivation). Null when the show has no artwork (PROJ-901).
|
|
64
53
|
*/
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EngineSeat } from './EngineSeat';
|
|
2
2
|
export type GAResponse = {
|
|
3
|
+
/**
|
|
4
|
+
* False when the engine refused the request and held nothing. Absent on the release path, which cannot partially fail.
|
|
5
|
+
*/
|
|
6
|
+
success?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The engine's own explanation when success is false (e.g. 'No occupancy available in chart.').
|
|
9
|
+
*/
|
|
10
|
+
message?: string;
|
|
3
11
|
/**
|
|
4
12
|
* The number of seats involved in the operation.
|
|
5
13
|
*/
|
|
@@ -13,7 +21,11 @@ export type GAResponse = {
|
|
|
13
21
|
*/
|
|
14
22
|
seatsHeld?: number;
|
|
15
23
|
/**
|
|
16
|
-
*
|
|
24
|
+
* The seats the engine actually held/released in this call — the client applies exactly this delta to its own list (2026-08-31: seat clicks carry no cart state; totals belong to the summary pages).
|
|
25
|
+
*/
|
|
26
|
+
seats?: Array<EngineSeat>;
|
|
27
|
+
/**
|
|
28
|
+
* Server processing time for this request, in ms.
|
|
17
29
|
*/
|
|
18
|
-
|
|
30
|
+
serverTime?: number;
|
|
19
31
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export type GaTier = {
|
|
2
2
|
tierId: number;
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The name of this price level. Null for the single implicit level a general-admission show has when it defines no tiers of its own (tierId 0) — naming that one belongs to the client, and legacy labels it "ALL TICKETS".
|
|
5
|
+
*/
|
|
6
|
+
name: string | null;
|
|
4
7
|
/**
|
|
5
8
|
* Advance (pre-door) price.
|
|
6
9
|
*/
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { CartStateEnvelope } from './CartStateEnvelope';
|
|
2
1
|
import type { EngineSeat } from './EngineSeat';
|
|
3
2
|
export type SeatHoldObject = {
|
|
4
3
|
seats: Array<EngineSeat>;
|
|
5
4
|
success: boolean;
|
|
6
5
|
/**
|
|
7
|
-
*
|
|
6
|
+
* Server processing time for this request, in ms.
|
|
8
7
|
*/
|
|
9
|
-
|
|
8
|
+
serverTime?: number;
|
|
10
9
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { CartStateEnvelope } from './CartStateEnvelope';
|
|
2
1
|
import type { EngineSeat } from './EngineSeat';
|
|
3
2
|
export type SeatHoldReturn = {
|
|
4
3
|
seats: Array<EngineSeat>;
|
|
5
4
|
success: boolean;
|
|
6
5
|
message: string;
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
7
|
+
* Server processing time for this request, in ms.
|
|
9
8
|
*/
|
|
10
|
-
|
|
9
|
+
serverTime?: number;
|
|
11
10
|
};
|
|
@@ -3,6 +3,10 @@ export type SiteTheme = {
|
|
|
3
3
|
* Resolved studio logo URL (legacy application.cfm rule): the newest image row named logo.png with a cloud_src wins; null means fall back to the legacy on-disk path /client-content/images/{studioId}/logo.png on the legacy host.
|
|
4
4
|
*/
|
|
5
5
|
logoSrc: string | null;
|
|
6
|
+
/**
|
|
7
|
+
* The studio's compiled stylesheet (studio_design.css) — the same text legacy rpc/theme.cfm streamed as text/css, and the authoritative theme. The Admin Portal Theme Builder regenerates the `:root{}` block on every save and re-appends the superuser Custom CSS tool's hand-written block (everything from `* Start protected content *` onward), so it carries rules the structured fields below cannot express. The site injects it verbatim and only falls back to composing from those fields when this is null — a studio whose design predates the column.
|
|
8
|
+
*/
|
|
9
|
+
css: string | null;
|
|
6
10
|
id: number;
|
|
7
11
|
studio_id: number;
|
|
8
12
|
facebook_image_id: number | null;
|
|
@@ -54,8 +54,8 @@ export declare class CartService {
|
|
|
54
54
|
accountId?: string;
|
|
55
55
|
}): CancelablePromise<CartHashResponse>;
|
|
56
56
|
/**
|
|
57
|
-
* Get Cash Payment Detail
|
|
58
|
-
* Returns cash payment details for the current shopper session, including order total, payments total, and house card credentials.
|
|
57
|
+
* Get Cash Payment Detail (operator only)
|
|
58
|
+
* Returns cash payment details for the current shopper session, including order total, payments total, and house card credentials. Requires a logged-in operator session — returns 403 for a plain shopper.
|
|
59
59
|
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
60
60
|
* @returns CashPaymentDetail Cash payment detail retrieved successfully.
|
|
61
61
|
* @throws ApiError
|
|
@@ -79,8 +79,8 @@ export class CartService {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Get Cash Payment Detail
|
|
83
|
-
* Returns cash payment details for the current shopper session, including order total, payments total, and house card credentials.
|
|
82
|
+
* Get Cash Payment Detail (operator only)
|
|
83
|
+
* Returns cash payment details for the current shopper session, including order total, payments total, and house card credentials. Requires a logged-in operator session — returns 403 for a plain shopper.
|
|
84
84
|
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
85
85
|
* @returns CashPaymentDetail Cash payment detail retrieved successfully.
|
|
86
86
|
* @throws ApiError
|
|
@@ -93,8 +93,8 @@ export declare class OrderService {
|
|
|
93
93
|
accountId?: string;
|
|
94
94
|
}): CancelablePromise<LinkWithSuccess>;
|
|
95
95
|
/**
|
|
96
|
-
* Get testing guid
|
|
97
|
-
* Fetches a
|
|
96
|
+
* Get testing guid (operator only)
|
|
97
|
+
* Fetches a random order guid for development purposes. Requires a logged-in operator session — returns 403 for a plain shopper.
|
|
98
98
|
* @param guid Unique identifier for an order.
|
|
99
99
|
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
100
100
|
* @returns GuidReturn Returns a testing guid.
|
|
@@ -118,8 +118,8 @@ export class OrderService {
|
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
* Get testing guid
|
|
122
|
-
* Fetches a
|
|
121
|
+
* Get testing guid (operator only)
|
|
122
|
+
* Fetches a random order guid for development purposes. Requires a logged-in operator session — returns 403 for a plain shopper.
|
|
123
123
|
* @param guid Unique identifier for an order.
|
|
124
124
|
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
125
125
|
* @returns GuidReturn Returns a testing guid.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CapabilityManifestDto } from '../models/CapabilityManifestDto';
|
|
1
2
|
import type { CreateSessionDto } from '../models/CreateSessionDto';
|
|
2
3
|
import type { ExtendTimerDto } from '../models/ExtendTimerDto';
|
|
3
4
|
import type { ExtendTimerResponseDto } from '../models/ExtendTimerResponseDto';
|
|
@@ -60,4 +61,26 @@ export declare class SessionService {
|
|
|
60
61
|
shopperGuid?: string;
|
|
61
62
|
accountId?: string;
|
|
62
63
|
}, requestBody?: ExtendTimerDto): CancelablePromise<ExtendTimerResponseDto>;
|
|
64
|
+
/**
|
|
65
|
+
* Shorten the cart timer
|
|
66
|
+
* Shortens the cart-hold timer to 5 seconds from now via the Session-Service (legacy cart-shorten), clearing show_group_id and moving the held seats’ release times with it. Staff debug tool for walking the cart-timeout flow on demand.
|
|
67
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
68
|
+
* @returns ExtendTimerResponseDto Returns the shortened timer state.
|
|
69
|
+
* @throws ApiError
|
|
70
|
+
*/
|
|
71
|
+
static shortenTimer(context?: {
|
|
72
|
+
shopperGuid?: string;
|
|
73
|
+
accountId?: string;
|
|
74
|
+
}): CancelablePromise<ExtendTimerResponseDto>;
|
|
75
|
+
/**
|
|
76
|
+
* What this caller may see
|
|
77
|
+
* Returns the operator flag, the debug IP-allowlist flag, and the resulting capability list for the calling session. A rendering hint for the UI — never a permission.
|
|
78
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
79
|
+
* @returns CapabilityManifestDto Capability manifest for the calling session.
|
|
80
|
+
* @throws ApiError
|
|
81
|
+
*/
|
|
82
|
+
static getCapabilities(context?: {
|
|
83
|
+
shopperGuid?: string;
|
|
84
|
+
accountId?: string;
|
|
85
|
+
}): CancelablePromise<CapabilityManifestDto>;
|
|
63
86
|
}
|
|
@@ -104,4 +104,42 @@ export class SessionService {
|
|
|
104
104
|
},
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Shorten the cart timer
|
|
109
|
+
* Shortens the cart-hold timer to 5 seconds from now via the Session-Service (legacy cart-shorten), clearing show_group_id and moving the held seats’ release times with it. Staff debug tool for walking the cart-timeout flow on demand.
|
|
110
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
111
|
+
* @returns ExtendTimerResponseDto Returns the shortened timer state.
|
|
112
|
+
* @throws ApiError
|
|
113
|
+
*/
|
|
114
|
+
static shortenTimer(context) {
|
|
115
|
+
return __request(OpenAPI, {
|
|
116
|
+
method: 'POST',
|
|
117
|
+
url: '/session/shorten',
|
|
118
|
+
headers: resolveShopperHeaders(context),
|
|
119
|
+
errors: {
|
|
120
|
+
400: `Bad Request error with error details.`,
|
|
121
|
+
404: `Not found error with error details.`,
|
|
122
|
+
500: `Internal Server Error, please contact developers.`,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* What this caller may see
|
|
128
|
+
* Returns the operator flag, the debug IP-allowlist flag, and the resulting capability list for the calling session. A rendering hint for the UI — never a permission.
|
|
129
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
130
|
+
* @returns CapabilityManifestDto Capability manifest for the calling session.
|
|
131
|
+
* @throws ApiError
|
|
132
|
+
*/
|
|
133
|
+
static getCapabilities(context) {
|
|
134
|
+
return __request(OpenAPI, {
|
|
135
|
+
method: 'GET',
|
|
136
|
+
url: '/session/capabilities',
|
|
137
|
+
headers: resolveShopperHeaders(context),
|
|
138
|
+
errors: {
|
|
139
|
+
400: `Bad Request error with error details.`,
|
|
140
|
+
404: `Not found error with error details.`,
|
|
141
|
+
500: `Internal Server Error, please contact developers.`,
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
}
|
|
107
145
|
}
|
|
@@ -6,6 +6,7 @@ export type { AnswerInput } from './models/AnswerInput';
|
|
|
6
6
|
export type { AssignNamesReturn } from './models/AssignNamesReturn';
|
|
7
7
|
export type { BAHold } from './models/BAHold';
|
|
8
8
|
export type { BlockOfTickets } from './models/BlockOfTickets';
|
|
9
|
+
export type { CapabilityManifestDto } from './models/CapabilityManifestDto';
|
|
9
10
|
export type { Cart } from './models/Cart';
|
|
10
11
|
export type { CartAmounts } from './models/CartAmounts';
|
|
11
12
|
export type { CartClearResult } from './models/CartClearResult';
|
|
@@ -13,7 +14,6 @@ export type { CartCounts } from './models/CartCounts';
|
|
|
13
14
|
export type { CartCountsLite } from './models/CartCountsLite';
|
|
14
15
|
export type { CartHashResponse } from './models/CartHashResponse';
|
|
15
16
|
export type { CartItemCounts } from './models/CartItemCounts';
|
|
16
|
-
export type { CartStateEnvelope } from './models/CartStateEnvelope';
|
|
17
17
|
export type { CartSummary } from './models/CartSummary';
|
|
18
18
|
export type { CartTierOption } from './models/CartTierOption';
|
|
19
19
|
export type { CartTierSeat } from './models/CartTierSeat';
|
|
@@ -35,7 +35,6 @@ export type { CheckoutSuccessResponse } from './models/CheckoutSuccessResponse';
|
|
|
35
35
|
export type { CodeDto } from './models/CodeDto';
|
|
36
36
|
export type { CompleteBody } from './models/CompleteBody';
|
|
37
37
|
export type { ConnectedAccountResponse } from './models/ConnectedAccountResponse';
|
|
38
|
-
export type { CorrelatedCode } from './models/CorrelatedCode';
|
|
39
38
|
export type { CreateCustomerResponse } from './models/CreateCustomerResponse';
|
|
40
39
|
export type { CreatePaymentIntentBody } from './models/CreatePaymentIntentBody';
|
|
41
40
|
export type { CreatePaymentIntentResponse } from './models/CreatePaymentIntentResponse';
|
|
@@ -51,6 +50,7 @@ export type { DonationText } from './models/DonationText';
|
|
|
51
50
|
export type { EmailUpdate } from './models/EmailUpdate';
|
|
52
51
|
export type { EngineSeat } from './models/EngineSeat';
|
|
53
52
|
export type { EventDetails } from './models/EventDetails';
|
|
53
|
+
export type { EventFormat } from './models/EventFormat';
|
|
54
54
|
export type { EventGroup } from './models/EventGroup';
|
|
55
55
|
export type { EventLegend } from './models/EventLegend';
|
|
56
56
|
export type { EventLegendItem } from './models/EventLegendItem';
|
package/package.json
CHANGED
|
@@ -8,6 +8,9 @@ import type { ApiResult } from "./ApiResult";
|
|
|
8
8
|
import { CancelablePromise } from "./CancelablePromise";
|
|
9
9
|
import type { OnCancel } from "./CancelablePromise";
|
|
10
10
|
import type { OpenAPIConfig } from "./OpenAPI";
|
|
11
|
+
// Every service's request.ts is this same template (build-all.ts copies it),
|
|
12
|
+
// so this one check is what makes DRT.init() mandatory SDK-wide.
|
|
13
|
+
import { assertInitialized } from "../../../functions/sdkConfig";
|
|
11
14
|
|
|
12
15
|
export const isDefined = <T>(
|
|
13
16
|
value: T | null | undefined
|
|
@@ -359,6 +362,7 @@ export const request = <T>(
|
|
|
359
362
|
): CancelablePromise<T> => {
|
|
360
363
|
return new CancelablePromise(async (resolve, reject, onCancel) => {
|
|
361
364
|
try {
|
|
365
|
+
assertInitialized(config.BASE);
|
|
362
366
|
const url = getUrl(config, options);
|
|
363
367
|
const formData = getFormData(options);
|
|
364
368
|
const body = getRequestBody(options);
|
|
@@ -5,8 +5,32 @@ import { OpenAPI as PortalAPI } from '../generated/portal/core/OpenAPI';
|
|
|
5
5
|
|
|
6
6
|
export type ShopperScope = 'singleton' | 'per-request';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Header a non-browser caller uses to declare the domain it acts as. The
|
|
10
|
+
* shopper API matches it against the api key's allowed domains when no
|
|
11
|
+
* browser-set Origin/Referer is present.
|
|
12
|
+
*/
|
|
13
|
+
export const DOMAIN_HEADER = 'x-drt-domain';
|
|
14
|
+
|
|
8
15
|
export interface SDKConfig {
|
|
16
|
+
/**
|
|
17
|
+
* A shopper API key issued by DRT ('drt_shopper_...'), sent as the `apikey`
|
|
18
|
+
* header on every call. The shopper API refuses any request without a live
|
|
19
|
+
* key, and only honours a key from the domains it was issued for: a browser
|
|
20
|
+
* is identified by the Origin header it sets itself; a server by `domain`.
|
|
21
|
+
*
|
|
22
|
+
* Read it from the DRT_API_KEY environment variable — never commit it.
|
|
23
|
+
*/
|
|
9
24
|
apiKey: string;
|
|
25
|
+
/**
|
|
26
|
+
* The domain this caller acts as (e.g. 'tap-to-pay.drttix.com'), sent as
|
|
27
|
+
* `x-drt-domain`. REQUIRED for callers that are not browsers — a Node
|
|
28
|
+
* backend, a server-side script — because they send no Origin/Referer, so
|
|
29
|
+
* without it the shopper API sees an empty domain and refuses the key.
|
|
30
|
+
* Browsers leave it unset: the API trusts the Origin the browser sets and
|
|
31
|
+
* ignores this header whenever an Origin/Referer is present.
|
|
32
|
+
*/
|
|
33
|
+
domain?: string;
|
|
10
34
|
/**
|
|
11
35
|
* Required when shopperScope is 'singleton' (the default). Optional when
|
|
12
36
|
* shopperScope is 'per-request' — in that mode these act only as a fallback
|
|
@@ -56,8 +80,13 @@ let currentShopperScope: ShopperScope = 'singleton';
|
|
|
56
80
|
*
|
|
57
81
|
* @example
|
|
58
82
|
* ```javascript
|
|
59
|
-
* // Backend serving many shoppers/accounts from a single SDK instance
|
|
60
|
-
*
|
|
83
|
+
* // Backend serving many shoppers/accounts from a single SDK instance.
|
|
84
|
+
* // A backend is not a browser, so it must also say which domain it acts as.
|
|
85
|
+
* DRT.init({
|
|
86
|
+
* apiKey: process.env.DRT_API_KEY,
|
|
87
|
+
* domain: 'tap-to-pay.drttix.com',
|
|
88
|
+
* shopperScope: 'per-request',
|
|
89
|
+
* });
|
|
61
90
|
*
|
|
62
91
|
* // Pass shopperGuid/accountId per call instead
|
|
63
92
|
* await DRT.shopper.product.addProduct(body, {
|
|
@@ -85,6 +114,9 @@ export function init(config: SDKConfig): void {
|
|
|
85
114
|
// Portal and scanner are always singleton-scoped: one fixed set of
|
|
86
115
|
// credentials for every call, applied globally via OpenAPI.HEADERS.
|
|
87
116
|
const sharedHeaders: Record<string, string> = { apikey: config.apiKey };
|
|
117
|
+
if (config.domain) {
|
|
118
|
+
sharedHeaders[DOMAIN_HEADER] = config.domain;
|
|
119
|
+
}
|
|
88
120
|
if (config.shopperGuid && config.accountId) {
|
|
89
121
|
sharedHeaders.shopperguid = config.shopperGuid;
|
|
90
122
|
sharedHeaders.accountid = config.accountId;
|
|
@@ -108,6 +140,23 @@ export function isReady(): boolean {
|
|
|
108
140
|
return isInitialized;
|
|
109
141
|
}
|
|
110
142
|
|
|
143
|
+
/**
|
|
144
|
+
* Called by the shared request layer before EVERY request, for every service
|
|
145
|
+
* (shopper, portal, scanner). The SDK is unusable until DRT.init() has been
|
|
146
|
+
* given an api key — there is no keyless mode. Throwing here, rather than
|
|
147
|
+
* letting the request go out and fail at the API, names the fix in the error.
|
|
148
|
+
*/
|
|
149
|
+
export function assertInitialized(baseUrl: string): void {
|
|
150
|
+
if (isInitialized) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
throw new Error(
|
|
154
|
+
`DRT SDK not initialized — call DRT.init({ apiKey, ... }) before using it (request to ${baseUrl}). ` +
|
|
155
|
+
'The key comes from the DRT_API_KEY environment variable; a backend also passes ' +
|
|
156
|
+
"`domain`, and one that serves many shoppers passes shopperScope: 'per-request'.",
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
111
160
|
/**
|
|
112
161
|
* Get the current SDK configuration (if initialized).
|
|
113
162
|
*/
|
|
@@ -161,9 +210,13 @@ export function resolveShopperHeaders(context?: {
|
|
|
161
210
|
);
|
|
162
211
|
}
|
|
163
212
|
|
|
164
|
-
|
|
213
|
+
const headers: Record<string, string> = {
|
|
165
214
|
shopperguid: shopperGuid,
|
|
166
215
|
accountid: accountId,
|
|
167
216
|
apikey: currentConfig.apiKey,
|
|
168
217
|
};
|
|
218
|
+
if (currentConfig.domain) {
|
|
219
|
+
headers[DOMAIN_HEADER] = currentConfig.domain;
|
|
220
|
+
}
|
|
221
|
+
return headers;
|
|
169
222
|
}
|
|
@@ -8,6 +8,9 @@ import type { ApiResult } from "./ApiResult";
|
|
|
8
8
|
import { CancelablePromise } from "./CancelablePromise";
|
|
9
9
|
import type { OnCancel } from "./CancelablePromise";
|
|
10
10
|
import type { OpenAPIConfig } from "./OpenAPI";
|
|
11
|
+
// Every service's request.ts is this same template (build-all.ts copies it),
|
|
12
|
+
// so this one check is what makes DRT.init() mandatory SDK-wide.
|
|
13
|
+
import { assertInitialized } from "../../../functions/sdkConfig";
|
|
11
14
|
|
|
12
15
|
export const isDefined = <T>(
|
|
13
16
|
value: T | null | undefined
|
|
@@ -359,6 +362,7 @@ export const request = <T>(
|
|
|
359
362
|
): CancelablePromise<T> => {
|
|
360
363
|
return new CancelablePromise(async (resolve, reject, onCancel) => {
|
|
361
364
|
try {
|
|
365
|
+
assertInitialized(config.BASE);
|
|
362
366
|
const url = getUrl(config, options);
|
|
363
367
|
const formData = getFormData(options);
|
|
364
368
|
const body = getRequestBody(options);
|
|
@@ -13,6 +13,7 @@ export type { AccountDetailResponseDto } from './models/AccountDetailResponseDto
|
|
|
13
13
|
export { AccountingTimezone } from './models/AccountingTimezone';
|
|
14
14
|
export type { ActionResponseDto } from './models/ActionResponseDto';
|
|
15
15
|
export type { AddSessionSeatRequestDto } from './models/AddSessionSeatRequestDto';
|
|
16
|
+
export type { AddSessionSeatResponseDto } from './models/AddSessionSeatResponseDto';
|
|
16
17
|
export type { AddVideoAssetFormatRequestDto } from './models/AddVideoAssetFormatRequestDto';
|
|
17
18
|
export type { AdminUserLevelResponseDto } from './models/AdminUserLevelResponseDto';
|
|
18
19
|
export type { AdminUserResponseDto } from './models/AdminUserResponseDto';
|
|
@@ -332,6 +333,7 @@ export type { SendMailRequestDto } from './models/SendMailRequestDto';
|
|
|
332
333
|
export type { SendReservationCodeMailRequestDto } from './models/SendReservationCodeMailRequestDto';
|
|
333
334
|
export type { SendTextRequestDto } from './models/SendTextRequestDto';
|
|
334
335
|
export type { SentMailResponseDto } from './models/SentMailResponseDto';
|
|
336
|
+
export type { SessionSeatRefDto } from './models/SessionSeatRefDto';
|
|
335
337
|
export type { SetTiersRequestDto } from './models/SetTiersRequestDto';
|
|
336
338
|
export type { SettingsAndWavesResponseDto } from './models/SettingsAndWavesResponseDto';
|
|
337
339
|
export type { SettingsDetailsResponseDto } from './models/SettingsDetailsResponseDto';
|
|
@@ -376,6 +378,7 @@ export type { SingleFundDetailResponseDto } from './models/SingleFundDetailRespo
|
|
|
376
378
|
export type { SingleOrderDetailResponseDto } from './models/SingleOrderDetailResponseDto';
|
|
377
379
|
export type { SinglePatronCodeResponseDto } from './models/SinglePatronCodeResponseDto';
|
|
378
380
|
export type { SinglePerformerRequestDto } from './models/SinglePerformerRequestDto';
|
|
381
|
+
export { SkippedSessionSeatDto } from './models/SkippedSessionSeatDto';
|
|
379
382
|
export type { SoldTicketsResponseDto } from './models/SoldTicketsResponseDto';
|
|
380
383
|
export type { StartImageUploadRequestDto } from './models/StartImageUploadRequestDto';
|
|
381
384
|
export type { StartImageUploadResponseDto } from './models/StartImageUploadResponseDto';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { SessionSeatRefDto } from './SessionSeatRefDto';
|
|
6
|
+
import type { SkippedSessionSeatDto } from './SkippedSessionSeatDto';
|
|
7
|
+
export type AddSessionSeatResponseDto = {
|
|
8
|
+
success: boolean;
|
|
9
|
+
added: Array<SessionSeatRefDto>;
|
|
10
|
+
skipped: Array<SkippedSessionSeatDto>;
|
|
11
|
+
};
|
|
12
|
+
|