@drttix/drt-sdk 2.0.3 → 2.0.4
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/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/src/definitions/shopper.d.ts +2 -0
- package/dist/cjs/src/definitions/shopper.js +9 -7
- package/dist/cjs/src/generated/portal/core/OpenAPI.js +1 -1
- package/dist/cjs/src/generated/portal/index.d.ts +2 -0
- package/dist/cjs/src/generated/portal/index.js +4 -2
- package/dist/cjs/src/generated/portal/models/BugReportRequestDto.d.ts +4 -0
- package/dist/cjs/src/generated/portal/models/CouponDetailResponseDto.d.ts +12 -0
- package/dist/cjs/src/generated/portal/models/CreateUpdateFundRequestDto.d.ts +2 -2
- package/dist/cjs/src/generated/portal/models/ExecuteReleaseSeatRequestDto.d.ts +4 -1
- package/dist/cjs/src/generated/portal/models/ExecuteReleaseSeatResponseDto.d.ts +20 -0
- package/dist/cjs/src/generated/portal/models/ExecuteReleaseSeatResponseDto.js +13 -0
- package/dist/cjs/src/generated/portal/models/MigrateTicketResultDto.d.ts +10 -0
- package/dist/cjs/src/generated/portal/models/MigrateTicketResultDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/OrderActionsResponseDto.d.ts +7 -0
- package/dist/cjs/src/generated/portal/models/OrderListRequestDto.d.ts +4 -0
- package/dist/cjs/src/generated/portal/models/PartialTicketResponseDto.d.ts +4 -0
- package/dist/cjs/src/generated/portal/models/ShowDetailsResponseDto.d.ts +4 -0
- package/dist/cjs/src/generated/portal/models/UpdateDiscountCodeRequestDto.d.ts +12 -3
- package/dist/cjs/src/generated/portal/services/ClientToolsInterviewUpdateService.d.ts +1 -1
- package/dist/cjs/src/generated/portal/services/ClientToolsInterviewUpdateService.js +1 -1
- package/dist/cjs/src/generated/portal/services/OrderLookupService.d.ts +4 -3
- package/dist/cjs/src/generated/portal/services/OrderLookupService.js +2 -2
- package/dist/cjs/src/generated/portal/services/ShowsService.d.ts +5 -3
- package/dist/cjs/src/generated/portal/services/ShowsService.js +7 -3
- package/dist/cjs/src/generated/portal/services/SuperUserShoppersService.d.ts +2 -2
- package/dist/cjs/src/generated/portal/services/SuperUserShoppersService.js +2 -2
- package/dist/cjs/src/generated/portal/types.d.ts +1 -0
- package/dist/cjs/src/generated/shopper/core/OpenAPI.js +1 -1
- package/dist/cjs/src/generated/shopper/index.d.ts +1 -0
- package/dist/cjs/src/generated/shopper/index.js +3 -1
- package/dist/cjs/src/generated/shopper/models/AlbumWithImages.d.ts +1 -1
- package/dist/cjs/src/generated/shopper/models/ShowExtras.d.ts +4 -0
- package/dist/cjs/src/generated/shopper/services/OccupancyService.d.ts +27 -0
- package/dist/cjs/src/generated/shopper/services/OccupancyService.js +39 -0
- package/dist/cjs/src/staging/index.d.ts +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/src/definitions/shopper.d.ts +2 -0
- package/dist/esm/src/definitions/shopper.js +2 -0
- package/dist/esm/src/generated/portal/core/OpenAPI.js +1 -1
- package/dist/esm/src/generated/portal/index.d.ts +2 -0
- package/dist/esm/src/generated/portal/index.js +1 -0
- package/dist/esm/src/generated/portal/models/BugReportRequestDto.d.ts +4 -0
- package/dist/esm/src/generated/portal/models/CouponDetailResponseDto.d.ts +12 -0
- package/dist/esm/src/generated/portal/models/CreateUpdateFundRequestDto.d.ts +2 -2
- package/dist/esm/src/generated/portal/models/ExecuteReleaseSeatRequestDto.d.ts +4 -1
- package/dist/esm/src/generated/portal/models/ExecuteReleaseSeatResponseDto.d.ts +20 -0
- package/dist/esm/src/generated/portal/models/ExecuteReleaseSeatResponseDto.js +10 -0
- package/dist/esm/src/generated/portal/models/MigrateTicketResultDto.d.ts +10 -0
- package/dist/esm/src/generated/portal/models/MigrateTicketResultDto.js +1 -0
- package/dist/esm/src/generated/portal/models/OrderActionsResponseDto.d.ts +7 -0
- package/dist/esm/src/generated/portal/models/OrderListRequestDto.d.ts +4 -0
- package/dist/esm/src/generated/portal/models/PartialTicketResponseDto.d.ts +4 -0
- package/dist/esm/src/generated/portal/models/ShowDetailsResponseDto.d.ts +4 -0
- package/dist/esm/src/generated/portal/models/UpdateDiscountCodeRequestDto.d.ts +12 -3
- package/dist/esm/src/generated/portal/services/ClientToolsInterviewUpdateService.d.ts +1 -1
- package/dist/esm/src/generated/portal/services/ClientToolsInterviewUpdateService.js +1 -1
- package/dist/esm/src/generated/portal/services/OrderLookupService.d.ts +4 -3
- package/dist/esm/src/generated/portal/services/OrderLookupService.js +2 -2
- package/dist/esm/src/generated/portal/services/ShowsService.d.ts +5 -3
- package/dist/esm/src/generated/portal/services/ShowsService.js +7 -3
- package/dist/esm/src/generated/portal/services/SuperUserShoppersService.d.ts +2 -2
- package/dist/esm/src/generated/portal/services/SuperUserShoppersService.js +2 -2
- package/dist/esm/src/generated/portal/types.d.ts +1 -0
- package/dist/esm/src/generated/shopper/core/OpenAPI.js +1 -1
- package/dist/esm/src/generated/shopper/index.d.ts +1 -0
- package/dist/esm/src/generated/shopper/index.js +1 -0
- package/dist/esm/src/generated/shopper/models/AlbumWithImages.d.ts +1 -1
- package/dist/esm/src/generated/shopper/models/ShowExtras.d.ts +4 -0
- package/dist/esm/src/generated/shopper/services/OccupancyService.d.ts +27 -0
- package/dist/esm/src/generated/shopper/services/OccupancyService.js +35 -0
- package/dist/esm/src/staging/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/definitions/shopper.ts +2 -0
- package/src/generated/portal/core/OpenAPI.ts +1 -1
- package/src/generated/portal/index.ts +2 -0
- package/src/generated/portal/models/BugReportRequestDto.ts +4 -0
- package/src/generated/portal/models/CouponDetailResponseDto.ts +12 -0
- package/src/generated/portal/models/CreateUpdateFundRequestDto.ts +2 -2
- package/src/generated/portal/models/ExecuteReleaseSeatRequestDto.ts +4 -1
- package/src/generated/portal/models/ExecuteReleaseSeatResponseDto.ts +25 -0
- package/src/generated/portal/models/MigrateTicketResultDto.ts +15 -0
- package/src/generated/portal/models/OrderActionsResponseDto.ts +7 -0
- package/src/generated/portal/models/OrderListRequestDto.ts +4 -0
- package/src/generated/portal/models/PartialTicketResponseDto.ts +4 -0
- package/src/generated/portal/models/ShowDetailsResponseDto.ts +4 -0
- package/src/generated/portal/models/UpdateDiscountCodeRequestDto.ts +12 -3
- package/src/generated/portal/services/ClientToolsInterviewUpdateService.ts +1 -1
- package/src/generated/portal/services/OrderLookupService.ts +4 -3
- package/src/generated/portal/services/ShowsService.ts +9 -3
- package/src/generated/portal/services/SuperUserShoppersService.ts +2 -2
- package/src/generated/portal/types.ts +1 -0
- package/src/generated/shopper/core/OpenAPI.ts +1 -1
- package/src/generated/shopper/index.ts +1 -0
- package/src/generated/shopper/models/AlbumWithImages.ts +1 -1
- package/src/generated/shopper/models/ShowExtras.ts +4 -0
- package/src/generated/shopper/services/OccupancyService.ts +46 -0
|
@@ -10,7 +10,10 @@ export type ExecuteReleaseSeatRequestDto = {
|
|
|
10
10
|
amountGc: number;
|
|
11
11
|
createRefundRequest: number;
|
|
12
12
|
amountRefundRequest: number;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Email the buyer the order update after the release. Defaults to true. Sent whether or not a refund request created by the release was auto-approved.
|
|
15
|
+
*/
|
|
16
|
+
emailBuyer?: boolean;
|
|
14
17
|
addToWaitlist: number;
|
|
15
18
|
};
|
|
16
19
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type ExecuteReleaseSeatResponseDto = {
|
|
6
|
+
success: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Seats released by this call. 0 when a refund request was created but not auto-approved.
|
|
9
|
+
*/
|
|
10
|
+
released: number;
|
|
11
|
+
/**
|
|
12
|
+
* The refund request this release created, if any.
|
|
13
|
+
*/
|
|
14
|
+
refundRequestId: number | null;
|
|
15
|
+
refundState: ExecuteReleaseSeatResponseDto.refundState;
|
|
16
|
+
};
|
|
17
|
+
export namespace ExecuteReleaseSeatResponseDto {
|
|
18
|
+
export enum refundState {
|
|
19
|
+
NONE = 'none',
|
|
20
|
+
APPROVED = 'approved',
|
|
21
|
+
PENDING = 'pending',
|
|
22
|
+
DECLINED = 'declined',
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type MigrateTicketResultDto = {
|
|
6
|
+
/**
|
|
7
|
+
* True when every seat the order held on the source event moved to the target event
|
|
8
|
+
*/
|
|
9
|
+
success: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* "OK" on success, otherwise the reason dbo.MigrateTickets gave for not moving the seats, verbatim; empty when it gave none
|
|
12
|
+
*/
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
@@ -7,6 +7,13 @@ export type OrderActionsResponseDto = {
|
|
|
7
7
|
balance: number;
|
|
8
8
|
guid: string;
|
|
9
9
|
disputeCount: number;
|
|
10
|
+
/**
|
|
11
|
+
* Refund requests on the order that are not yet completed, declined, cancelled or client-approved. Classic blocks exchanges while this is non-zero.
|
|
12
|
+
*/
|
|
13
|
+
activeRefundCount: number;
|
|
14
|
+
/**
|
|
15
|
+
* 1 when classic would offer Exchange Tickets: the ledger is in balance, no refund request is active and the order still holds seats. Show dates and show type do not matter.
|
|
16
|
+
*/
|
|
10
17
|
isExchangeEligible: number;
|
|
11
18
|
isReleaseEligible: number;
|
|
12
19
|
isModifyEligible: number;
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
export type OrderListRequestDto = {
|
|
6
6
|
type: string;
|
|
7
7
|
searchQuery: string;
|
|
8
|
+
/**
|
|
9
|
+
* Ignored. The export-only columns (couponAmount, discountAmount, srcCode) are returned on every request; kept so existing clients still validate.
|
|
10
|
+
* @deprecated
|
|
11
|
+
*/
|
|
8
12
|
inputFormat: string;
|
|
9
13
|
};
|
|
10
14
|
|
|
@@ -14,6 +14,10 @@ export type PartialTicketResponseDto = {
|
|
|
14
14
|
tierName: string;
|
|
15
15
|
price: number;
|
|
16
16
|
isVirtualPerformance: number;
|
|
17
|
+
/**
|
|
18
|
+
* 1 when the show is virtual (Video on Demand, Digital Download or Live Stream; show.type_id <> 1), else 0. Use this, not isVirtualPerformance, to tell a virtual show: that flag is missing on some Live Stream rows and set on some in-person ones.
|
|
19
|
+
*/
|
|
20
|
+
isVirtual: number;
|
|
17
21
|
serviceCharge: number;
|
|
18
22
|
isGeneralSeating: number;
|
|
19
23
|
};
|
|
@@ -13,6 +13,10 @@ export type ShowDetailsResponseDto = {
|
|
|
13
13
|
status: string | null;
|
|
14
14
|
isGeneralSeating: number;
|
|
15
15
|
isVirtualPerformance: number;
|
|
16
|
+
/**
|
|
17
|
+
* 1 when the show is virtual (Video on Demand, Digital Download or Live Stream; show.type_id <> 1), else 0. Use this, not isVirtualPerformance, to tell a virtual show: that flag is missing on some Live Stream rows and set on some in-person ones.
|
|
18
|
+
*/
|
|
19
|
+
isVirtual: number;
|
|
16
20
|
statusId: number | null;
|
|
17
21
|
statusName: string | null;
|
|
18
22
|
};
|
|
@@ -7,9 +7,18 @@ export type UpdateDiscountCodeRequestDto = {
|
|
|
7
7
|
code: string;
|
|
8
8
|
seats: number;
|
|
9
9
|
minOrderSize: number;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Omit to keep the stored show. 0 or null stores NULL ("Any show").
|
|
12
|
+
*/
|
|
13
|
+
showId?: number | null;
|
|
14
|
+
/**
|
|
15
|
+
* Omit to keep the stored show group. 0 or null stores NULL.
|
|
16
|
+
*/
|
|
17
|
+
showGroupId?: number | null;
|
|
18
|
+
/**
|
|
19
|
+
* Omit to keep the stored show type. 0 or null stores NULL.
|
|
20
|
+
*/
|
|
21
|
+
showTypeId?: number | null;
|
|
13
22
|
email: string;
|
|
14
23
|
dateAllowed: string;
|
|
15
24
|
dateExpires: string;
|
|
@@ -34,7 +34,7 @@ export class ClientToolsInterviewUpdateService {
|
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Submit interview update responses
|
|
37
|
-
*
|
|
37
|
+
* Email the responses for the interview follow-up questionnaire to the DRT team (the interview record is not modified)
|
|
38
38
|
* @param xStudioId The ID of the studio
|
|
39
39
|
* @param requestBody
|
|
40
40
|
* @returns SuccessResponse Interview update submitted successfully
|
|
@@ -6,6 +6,7 @@ import type { AddSessionSeatRequestDto } from '../models/AddSessionSeatRequestDt
|
|
|
6
6
|
import type { AddSessionSeatResponseDto } from '../models/AddSessionSeatResponseDto';
|
|
7
7
|
import type { CancelExchangeTicketRequestDto } from '../models/CancelExchangeTicketRequestDto';
|
|
8
8
|
import type { ExecuteReleaseSeatRequestDto } from '../models/ExecuteReleaseSeatRequestDto';
|
|
9
|
+
import type { ExecuteReleaseSeatResponseDto } from '../models/ExecuteReleaseSeatResponseDto';
|
|
9
10
|
import type { ExecuteSeatExchangeRequestDto } from '../models/ExecuteSeatExchangeRequestDto';
|
|
10
11
|
import type { ModifyTicketRequestDto } from '../models/ModifyTicketRequestDto';
|
|
11
12
|
import type { OrderActionsResponseDto } from '../models/OrderActionsResponseDto';
|
|
@@ -244,14 +245,14 @@ export class OrderLookupService {
|
|
|
244
245
|
* @param xStudioId The ID of the studio
|
|
245
246
|
* @param orderId The ID of the order
|
|
246
247
|
* @param requestBody Release seat payload
|
|
247
|
-
* @returns
|
|
248
|
+
* @returns ExecuteReleaseSeatResponseDto Release processed. refundState says whether a refund request it created was auto-approved (seats released) or is pending / declined (nothing released).
|
|
248
249
|
* @throws ApiError
|
|
249
250
|
*/
|
|
250
251
|
public static releaseSeat(
|
|
251
252
|
xStudioId: string,
|
|
252
253
|
orderId: string,
|
|
253
254
|
requestBody: ExecuteReleaseSeatRequestDto,
|
|
254
|
-
): CancelablePromise<
|
|
255
|
+
): CancelablePromise<ExecuteReleaseSeatResponseDto> {
|
|
255
256
|
return __request(OpenAPI, {
|
|
256
257
|
method: 'POST',
|
|
257
258
|
url: '/admin-portal/order-lookup/{orderId}/release-seat',
|
|
@@ -512,7 +513,7 @@ export class OrderLookupService {
|
|
|
512
513
|
}
|
|
513
514
|
/**
|
|
514
515
|
* Modify order tickets
|
|
515
|
-
* To modify order tickets for the orders
|
|
516
|
+
* To modify order tickets for the orders. Answers 400 NO_TIER_CHANGE_ERROR, writing nothing, when no seat in `tier` differs from its current tier.
|
|
516
517
|
* @param xStudioId The ID of the studio
|
|
517
518
|
* @param orderId The ID of the order
|
|
518
519
|
* @param requestBody Modify order tickets payload
|
|
@@ -18,6 +18,7 @@ import type { EmailBuyersRequestDto } from '../models/EmailBuyersRequestDto';
|
|
|
18
18
|
import type { ManagedShowResponseDto } from '../models/ManagedShowResponseDto';
|
|
19
19
|
import type { MigrateTicketDetails } from '../models/MigrateTicketDetails';
|
|
20
20
|
import type { MigrateTicketRequestDto } from '../models/MigrateTicketRequestDto';
|
|
21
|
+
import type { MigrateTicketResultDto } from '../models/MigrateTicketResultDto';
|
|
21
22
|
import type { PerformersListRequestDto } from '../models/PerformersListRequestDto';
|
|
22
23
|
import type { PerformersListResponseDto } from '../models/PerformersListResponseDto';
|
|
23
24
|
import type { SavePricingSetRequestDto } from '../models/SavePricingSetRequestDto';
|
|
@@ -687,17 +688,22 @@ export class ShowsService {
|
|
|
687
688
|
}
|
|
688
689
|
/**
|
|
689
690
|
* Migrate the show tickets to target show
|
|
690
|
-
* To migrate
|
|
691
|
+
* To migrate one order's tickets from the source show to the target show. Both shows must belong to the studio (400 NO_ASSOC_SHOW_ERROR otherwise) and the order must hold seats on the source show (404 ORDER_NOT_FOUND_ERROR otherwise).
|
|
692
|
+
* @param xStudioId The ID of the studio
|
|
691
693
|
* @param requestBody Migrate show tickets
|
|
692
|
-
* @returns
|
|
694
|
+
* @returns MigrateTicketResultDto The migration ran; success says whether every seat on the order moved, message is "OK" or the reason it did not
|
|
693
695
|
* @throws ApiError
|
|
694
696
|
*/
|
|
695
697
|
public static migrateTickets(
|
|
698
|
+
xStudioId: string,
|
|
696
699
|
requestBody: MigrateTicketRequestDto,
|
|
697
|
-
): CancelablePromise<
|
|
700
|
+
): CancelablePromise<MigrateTicketResultDto> {
|
|
698
701
|
return __request(OpenAPI, {
|
|
699
702
|
method: 'PUT',
|
|
700
703
|
url: '/admin-portal/shows/migrate-ticket',
|
|
704
|
+
headers: {
|
|
705
|
+
'x-studio-id': xStudioId,
|
|
706
|
+
},
|
|
701
707
|
body: requestBody,
|
|
702
708
|
mediaType: 'application/json',
|
|
703
709
|
});
|
|
@@ -33,15 +33,15 @@ export class SuperUserShoppersService {
|
|
|
33
33
|
/**
|
|
34
34
|
* Update the details of a shopper
|
|
35
35
|
* Update the details of a shopper
|
|
36
|
-
* @param shopper
|
|
37
36
|
* @param xStudioId The ID of the studio
|
|
37
|
+
* @param shopper
|
|
38
38
|
* @param requestBody Payload to update shopper session details
|
|
39
39
|
* @returns SuccessResponse Details of the shopper updated successfully
|
|
40
40
|
* @throws ApiError
|
|
41
41
|
*/
|
|
42
42
|
public static updateShopperDetails(
|
|
43
|
-
shopper: string,
|
|
44
43
|
xStudioId: string,
|
|
44
|
+
shopper: string,
|
|
45
45
|
requestBody: UpdateSessionRequestDto,
|
|
46
46
|
): CancelablePromise<SuccessResponse> {
|
|
47
47
|
return __request(OpenAPI, {
|
|
@@ -211,6 +211,7 @@ export type { MarkedUnavailableSeatResponseDto } from './models/MarkedUnavailabl
|
|
|
211
211
|
export type { MessageSettingResponseDto } from './models/MessageSettingResponseDto';
|
|
212
212
|
export type { MigrateTicketDetails } from './models/MigrateTicketDetails';
|
|
213
213
|
export type { MigrateTicketRequestDto } from './models/MigrateTicketRequestDto';
|
|
214
|
+
export type { MigrateTicketResultDto } from './models/MigrateTicketResultDto';
|
|
214
215
|
export type { MigrationPossibleShow } from './models/MigrationPossibleShow';
|
|
215
216
|
export type { ModifyTicketRequestDto } from './models/ModifyTicketRequestDto';
|
|
216
217
|
export type { NotificationDto } from './models/NotificationDto';
|
|
@@ -212,6 +212,7 @@ export { DonationService } from './services/DonationService';
|
|
|
212
212
|
export { EventService } from './services/EventService';
|
|
213
213
|
export { GiftCardService } from './services/GiftCardService';
|
|
214
214
|
export { HealthService } from './services/HealthService';
|
|
215
|
+
export { OccupancyService } from './services/OccupancyService';
|
|
215
216
|
export { OrderService } from './services/OrderService';
|
|
216
217
|
export { PaymentService } from './services/PaymentService';
|
|
217
218
|
export { PaymentLinkService } from './services/PaymentLinkService';
|
|
@@ -15,6 +15,10 @@ export type ShowExtras = {
|
|
|
15
15
|
* Maximum age for a lap child, if a lap-child policy applies.
|
|
16
16
|
*/
|
|
17
17
|
lapChildMaxAge: number | null;
|
|
18
|
+
/**
|
|
19
|
+
* The venue's (theatre.handicap_policy) accessible-seating policy. GET /event/{id} already folds it into event.handicapPolicy when the show has none of its own; carried here so the fallback is visible.
|
|
20
|
+
*/
|
|
21
|
+
venueHandicapPolicy: string | null;
|
|
18
22
|
/**
|
|
19
23
|
* The show's performer positions across the front of the stage, as the studio keys them: a list, a span, or spans and singles mixed ("1-10", "1,3,5,7", "10-1" for a house that counts the other way), with "|" breaking a cast too wide for one legible line onto a second ("1-12|13-24"). Read live from show.stage_numbers, and mirrored onto the event as stageNumbers.
|
|
20
24
|
*/
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
7
|
+
import { request as __request } from '../core/request';
|
|
8
|
+
import { resolveShopperHeaders } from '../../../functions/sdkConfig';
|
|
9
|
+
export class OccupancyService {
|
|
10
|
+
/**
|
|
11
|
+
* Provision a read-only websocket for live per-event counts (staff only)
|
|
12
|
+
* Mints a listen-only websocket-server token bound to the session's STUDIO counts room and returns the connection details: {url, token, roomId, event, expiresAt}. The browser connects with `new WebSocket(url, ["bearer." + token])` and receives {type:"event", event:"occupancy-counts-update", payload:{eventId, studioId, capacity, sold, held, blocked}} frames whenever the seat engine reports a change for any of the studio's shows. No snapshot arrives on join — clients paint from their own first read and may reconcile with GET /occupancy/counts. Requires a logged-in operator or a whitelisted IP; everyone else gets 403 NOT_STAFF. A 503 means "run without a socket for now", not a page failure.
|
|
13
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
14
|
+
* @param xDrtDomain Server-to-server callers only: the domain the caller acts as, matched against the API key allowed domains. Browsers omit it (the Origin header is used instead).
|
|
15
|
+
* @returns any The websocket connection details.
|
|
16
|
+
* @throws ApiError
|
|
17
|
+
*/
|
|
18
|
+
public static getOccupancyCountsSocket(
|
|
19
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
20
|
+
xDrtDomain?: string,
|
|
21
|
+
): CancelablePromise<any> {
|
|
22
|
+
return __request(OpenAPI, {
|
|
23
|
+
method: 'GET',
|
|
24
|
+
url: '/occupancy/counts/socket',
|
|
25
|
+
headers: resolveShopperHeaders(context, xDrtDomain),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Last known per-event counts for the session's studio (staff only)
|
|
30
|
+
* The most recent {eventId, studioId, capacity, sold, held, blocked} snapshot this API has received from the seat engine for each of the studio's shows, each with the `storedAt` epoch milliseconds it arrived. In-memory only: a show nobody has touched since the API started is absent, not zero.
|
|
31
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
32
|
+
* @param xDrtDomain Server-to-server callers only: the domain the caller acts as, matched against the API key allowed domains. Browsers omit it (the Origin header is used instead).
|
|
33
|
+
* @returns any The cached counts snapshots.
|
|
34
|
+
* @throws ApiError
|
|
35
|
+
*/
|
|
36
|
+
public static getOccupancyCounts(
|
|
37
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
38
|
+
xDrtDomain?: string,
|
|
39
|
+
): CancelablePromise<any> {
|
|
40
|
+
return __request(OpenAPI, {
|
|
41
|
+
method: 'GET',
|
|
42
|
+
url: '/occupancy/counts',
|
|
43
|
+
headers: resolveShopperHeaders(context, xDrtDomain),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|