@drttix/drt-sdk 1.3.2 → 1.3.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.
@@ -51,7 +51,6 @@ steps:
51
51
  scriptType: 'inline'
52
52
  inlineScript: |
53
53
  aws s3 cp $(Build.SourcesDirectory)/dist/bundle/drt-sdk.js s3://drt-public-assets/sdk/$(VERSION)/drt-sdk.js --cache-control "max-age=31536000,public,immutable"
54
- aws s3 cp $(Build.SourcesDirectory)/dist/bundle/staging.js s3://drt-public-assets/sdk/$(VERSION)/staging.js --cache-control "max-age=31536000,public,immutable"
55
54
 
56
55
  - task: AWSShellScript@1
57
56
  displayName: 'Upload to latest'
@@ -61,7 +60,6 @@ steps:
61
60
  scriptType: 'inline'
62
61
  inlineScript: |
63
62
  aws s3 cp $(Build.SourcesDirectory)/dist/bundle/drt-sdk.js s3://drt-public-assets/sdk/latest/drt-sdk.js --cache-control "max-age=0,no-cache,no-store,must-revalidate"
64
- aws s3 cp $(Build.SourcesDirectory)/dist/bundle/staging.js s3://drt-public-assets/sdk/latest/staging.js --cache-control "max-age=0,no-cache,no-store,must-revalidate"
65
63
 
66
64
  - task: AWSShellScript@1
67
65
  displayName: 'Upload demo files'
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpenAPI = void 0;
4
4
  exports.OpenAPI = {
5
5
  BASE: '',
6
- VERSION: '20260615.2',
6
+ VERSION: '20260622.4',
7
7
  WITH_CREDENTIALS: false,
8
8
  CREDENTIALS: 'include',
9
9
  TOKEN: undefined,
@@ -122,10 +122,11 @@ export declare class ShowsService {
122
122
  * Fetch the show virtual stream details
123
123
  * To fetch the virtual stream details of the show
124
124
  * @param guid The GUID of the resource
125
+ * @param showId The ID of the show
125
126
  * @returns VirtualStreamResponseDto Virtual stream details fetched successfully
126
127
  * @throws ApiError
127
128
  */
128
- static getShowVirtualStream(guid: string): CancelablePromise<VirtualStreamResponseDto>;
129
+ static getShowVirtualStream(guid: string, showId: string): CancelablePromise<VirtualStreamResponseDto>;
129
130
  /**
130
131
  * Fetch the migrate ticket details
131
132
  * To fetch the migrate ticket details of the show
@@ -203,14 +203,18 @@ class ShowsService {
203
203
  * Fetch the show virtual stream details
204
204
  * To fetch the virtual stream details of the show
205
205
  * @param guid The GUID of the resource
206
+ * @param showId The ID of the show
206
207
  * @returns VirtualStreamResponseDto Virtual stream details fetched successfully
207
208
  * @throws ApiError
208
209
  */
209
- static getShowVirtualStream(guid) {
210
+ static getShowVirtualStream(guid, showId) {
210
211
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
211
212
  method: 'GET',
212
- url: '/shows/{guid}/virtual-stream',
213
+ url: '/shows/{showId}/virtual-stream',
213
214
  path: {
215
+ 'showId': showId,
216
+ },
217
+ query: {
214
218
  'guid': guid,
215
219
  },
216
220
  });
@@ -344,7 +348,7 @@ class ShowsService {
344
348
  static createShow(xStudioId, requestBody) {
345
349
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
346
350
  method: 'POST',
347
- url: '/shows/shows/new',
351
+ url: '/shows/new',
348
352
  headers: {
349
353
  'x-studio-id': xStudioId,
350
354
  },
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpenAPI = void 0;
4
4
  exports.OpenAPI = {
5
5
  BASE: 'https://api.drttix.com/shopper',
6
- VERSION: '20260619.2',
6
+ VERSION: '20260622.1',
7
7
  WITH_CREDENTIALS: false,
8
8
  CREDENTIALS: 'include',
9
9
  TOKEN: undefined,
@@ -49,4 +49,14 @@ export type Account = {
49
49
  csPhone: string;
50
50
  numCouponAliases: number;
51
51
  maxOrderSeats: number;
52
+ receiptFrom: string | null;
53
+ refundExchangePolicy: string | null;
54
+ eTickets: number;
55
+ canAssignTickets: number;
56
+ canEmailTickets: number;
57
+ enableOrderDonation: number;
58
+ obfuscateData: number;
59
+ paymentGatewayId: number | null;
60
+ enableAdjustmentPayment: number;
61
+ groupShows: number;
52
62
  };
@@ -14,4 +14,13 @@ export type SessionInfoDto = {
14
14
  superuser: boolean;
15
15
  expireOnUnlock: boolean;
16
16
  tierReminderShown: boolean;
17
+ modifyingOrderId: number | null;
18
+ /**
19
+ * Resolved session/cart effective date (legacy cart_sessionDate). Use this for availability/priority checks instead of new Date().
20
+ */
21
+ effectiveDate: string;
22
+ /**
23
+ * Whether an admin/preview date override is active.
24
+ */
25
+ usingDateOverride: boolean;
17
26
  };
@@ -6,6 +6,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const fs_1 = __importDefault(require("fs"));
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const child_process_1 = require("child_process");
9
+ // On Windows, execFileSync with shell:true joins args without quoting, so paths
10
+ // containing spaces are split. Use execSync with manual quoting on Windows instead.
11
+ function runCommand(cmd, args) {
12
+ if (process.platform === 'win32') {
13
+ const quotedArgs = args.map((a) => (a.includes(' ') ? `"${a}"` : a));
14
+ (0, child_process_1.execSync)([cmd, ...quotedArgs].join(' '), { stdio: 'inherit' });
15
+ }
16
+ else {
17
+ (0, child_process_1.execFileSync)(cmd, args, { stdio: 'inherit' });
18
+ }
19
+ }
9
20
  // Load the spec list (use staging specs when --staging flag is passed)
10
21
  const isStaging = process.argv.includes('--staging');
11
22
  const specsFile = isStaging
@@ -27,11 +38,8 @@ for (const spec of specs) {
27
38
  const tempSpecFile = path_1.default.join(process.cwd(), `${name}-spec.json`);
28
39
  try {
29
40
  console.log(`📥 Downloading spec from ${url}...`);
30
- (0, child_process_1.execFileSync)(CURL_CMD, ['-s', '-o', tempSpecFile, url], {
31
- stdio: 'inherit',
32
- shell: true,
33
- });
34
- (0, child_process_1.execFileSync)(NPX_CMD, [
41
+ runCommand(CURL_CMD, ['-s', '-o', tempSpecFile, url]);
42
+ runCommand(NPX_CMD, [
35
43
  'openapi-typescript-codegen',
36
44
  '--input',
37
45
  tempSpecFile,
@@ -39,7 +47,7 @@ for (const spec of specs) {
39
47
  outputDir,
40
48
  '--client',
41
49
  'fetch',
42
- ], { stdio: 'inherit', shell: true });
50
+ ]);
43
51
  // Clean up temp file
44
52
  fs_1.default.unlinkSync(tempSpecFile);
45
53
  }
@@ -51,10 +59,7 @@ for (const spec of specs) {
51
59
  throw error;
52
60
  }
53
61
  console.log(`⚙️ Generating wrapper for ${name}...`);
54
- (0, child_process_1.execFileSync)(NPX_CMD, ['tsx', 'src/scripts/generate-definition.ts', name], {
55
- stdio: 'inherit',
56
- shell: true,
57
- });
62
+ runCommand(NPX_CMD, ['tsx', 'src/scripts/generate-definition.ts', name]);
58
63
  }
59
64
  // After generating all clients and definitions, replace request.ts for all services
60
65
  const customRequestPath = path_1.default.resolve('src/custom/custom-request.txt');
@@ -1,6 +1,6 @@
1
1
  export const OpenAPI = {
2
2
  BASE: '',
3
- VERSION: '20260615.2',
3
+ VERSION: '20260622.4',
4
4
  WITH_CREDENTIALS: false,
5
5
  CREDENTIALS: 'include',
6
6
  TOKEN: undefined,
@@ -122,10 +122,11 @@ export declare class ShowsService {
122
122
  * Fetch the show virtual stream details
123
123
  * To fetch the virtual stream details of the show
124
124
  * @param guid The GUID of the resource
125
+ * @param showId The ID of the show
125
126
  * @returns VirtualStreamResponseDto Virtual stream details fetched successfully
126
127
  * @throws ApiError
127
128
  */
128
- static getShowVirtualStream(guid: string): CancelablePromise<VirtualStreamResponseDto>;
129
+ static getShowVirtualStream(guid: string, showId: string): CancelablePromise<VirtualStreamResponseDto>;
129
130
  /**
130
131
  * Fetch the migrate ticket details
131
132
  * To fetch the migrate ticket details of the show
@@ -200,14 +200,18 @@ export class ShowsService {
200
200
  * Fetch the show virtual stream details
201
201
  * To fetch the virtual stream details of the show
202
202
  * @param guid The GUID of the resource
203
+ * @param showId The ID of the show
203
204
  * @returns VirtualStreamResponseDto Virtual stream details fetched successfully
204
205
  * @throws ApiError
205
206
  */
206
- static getShowVirtualStream(guid) {
207
+ static getShowVirtualStream(guid, showId) {
207
208
  return __request(OpenAPI, {
208
209
  method: 'GET',
209
- url: '/shows/{guid}/virtual-stream',
210
+ url: '/shows/{showId}/virtual-stream',
210
211
  path: {
212
+ 'showId': showId,
213
+ },
214
+ query: {
211
215
  'guid': guid,
212
216
  },
213
217
  });
@@ -341,7 +345,7 @@ export class ShowsService {
341
345
  static createShow(xStudioId, requestBody) {
342
346
  return __request(OpenAPI, {
343
347
  method: 'POST',
344
- url: '/shows/shows/new',
348
+ url: '/shows/new',
345
349
  headers: {
346
350
  'x-studio-id': xStudioId,
347
351
  },
@@ -1,6 +1,6 @@
1
1
  export const OpenAPI = {
2
2
  BASE: 'https://api.drttix.com/shopper',
3
- VERSION: '20260619.2',
3
+ VERSION: '20260622.1',
4
4
  WITH_CREDENTIALS: false,
5
5
  CREDENTIALS: 'include',
6
6
  TOKEN: undefined,
@@ -49,4 +49,14 @@ export type Account = {
49
49
  csPhone: string;
50
50
  numCouponAliases: number;
51
51
  maxOrderSeats: number;
52
+ receiptFrom: string | null;
53
+ refundExchangePolicy: string | null;
54
+ eTickets: number;
55
+ canAssignTickets: number;
56
+ canEmailTickets: number;
57
+ enableOrderDonation: number;
58
+ obfuscateData: number;
59
+ paymentGatewayId: number | null;
60
+ enableAdjustmentPayment: number;
61
+ groupShows: number;
52
62
  };
@@ -14,4 +14,13 @@ export type SessionInfoDto = {
14
14
  superuser: boolean;
15
15
  expireOnUnlock: boolean;
16
16
  tierReminderShown: boolean;
17
+ modifyingOrderId: number | null;
18
+ /**
19
+ * Resolved session/cart effective date (legacy cart_sessionDate). Use this for availability/priority checks instead of new Date().
20
+ */
21
+ effectiveDate: string;
22
+ /**
23
+ * Whether an admin/preview date override is active.
24
+ */
25
+ usingDateOverride: boolean;
17
26
  };
@@ -1,6 +1,17 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
- import { execFileSync } from 'child_process';
3
+ import { execSync, execFileSync } from 'child_process';
4
+ // On Windows, execFileSync with shell:true joins args without quoting, so paths
5
+ // containing spaces are split. Use execSync with manual quoting on Windows instead.
6
+ function runCommand(cmd, args) {
7
+ if (process.platform === 'win32') {
8
+ const quotedArgs = args.map((a) => (a.includes(' ') ? `"${a}"` : a));
9
+ execSync([cmd, ...quotedArgs].join(' '), { stdio: 'inherit' });
10
+ }
11
+ else {
12
+ execFileSync(cmd, args, { stdio: 'inherit' });
13
+ }
14
+ }
4
15
  // Load the spec list (use staging specs when --staging flag is passed)
5
16
  const isStaging = process.argv.includes('--staging');
6
17
  const specsFile = isStaging
@@ -22,11 +33,8 @@ for (const spec of specs) {
22
33
  const tempSpecFile = path.join(process.cwd(), `${name}-spec.json`);
23
34
  try {
24
35
  console.log(`📥 Downloading spec from ${url}...`);
25
- execFileSync(CURL_CMD, ['-s', '-o', tempSpecFile, url], {
26
- stdio: 'inherit',
27
- shell: true,
28
- });
29
- execFileSync(NPX_CMD, [
36
+ runCommand(CURL_CMD, ['-s', '-o', tempSpecFile, url]);
37
+ runCommand(NPX_CMD, [
30
38
  'openapi-typescript-codegen',
31
39
  '--input',
32
40
  tempSpecFile,
@@ -34,7 +42,7 @@ for (const spec of specs) {
34
42
  outputDir,
35
43
  '--client',
36
44
  'fetch',
37
- ], { stdio: 'inherit', shell: true });
45
+ ]);
38
46
  // Clean up temp file
39
47
  fs.unlinkSync(tempSpecFile);
40
48
  }
@@ -46,10 +54,7 @@ for (const spec of specs) {
46
54
  throw error;
47
55
  }
48
56
  console.log(`⚙️ Generating wrapper for ${name}...`);
49
- execFileSync(NPX_CMD, ['tsx', 'src/scripts/generate-definition.ts', name], {
50
- stdio: 'inherit',
51
- shell: true,
52
- });
57
+ runCommand(NPX_CMD, ['tsx', 'src/scripts/generate-definition.ts', name]);
53
58
  }
54
59
  // After generating all clients and definitions, replace request.ts for all services
55
60
  const customRequestPath = path.resolve('src/custom/custom-request.txt');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@drttix/drt-sdk",
3
3
  "description": "DRT SDK",
4
- "version": "1.3.2",
4
+ "version": "1.3.4",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/esm/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "scripts": {
27
27
  "build": "npx tsc --project tsconfig.esm.json && npx tsc --project tsconfig.cjs.json && node scripts/fix-import-extensions.mjs",
28
- "build:bundle": "npm run build && npx esbuild dist/esm/index.js --bundle --format=esm --outfile=dist/bundle/drt-sdk.js --minify && npx esbuild dist/esm/staging.js --bundle --format=esm --outfile=dist/bundle/staging.js --minify",
28
+ "build:bundle": "npm run build && npx esbuild dist/esm/index.js --bundle --format=esm --outfile=dist/bundle/drt-sdk.js --minify",
29
29
  "generate": "npx tsx src/scripts/build-all.ts && npx tsx src/scripts/build-all.ts --staging",
30
30
  "prepublishOnly": "npx tsx src/scripts/check-version-not-published.ts && npm run build"
31
31
  },
@@ -21,7 +21,7 @@ export type OpenAPIConfig = {
21
21
 
22
22
  export const OpenAPI: OpenAPIConfig = {
23
23
  BASE: '',
24
- VERSION: '20260615.2',
24
+ VERSION: '20260622.4',
25
25
  WITH_CREDENTIALS: false,
26
26
  CREDENTIALS: 'include',
27
27
  TOKEN: undefined,
@@ -263,16 +263,21 @@ export class ShowsService {
263
263
  * Fetch the show virtual stream details
264
264
  * To fetch the virtual stream details of the show
265
265
  * @param guid The GUID of the resource
266
+ * @param showId The ID of the show
266
267
  * @returns VirtualStreamResponseDto Virtual stream details fetched successfully
267
268
  * @throws ApiError
268
269
  */
269
270
  public static getShowVirtualStream(
270
271
  guid: string,
272
+ showId: string,
271
273
  ): CancelablePromise<VirtualStreamResponseDto> {
272
274
  return __request(OpenAPI, {
273
275
  method: 'GET',
274
- url: '/shows/{guid}/virtual-stream',
276
+ url: '/shows/{showId}/virtual-stream',
275
277
  path: {
278
+ 'showId': showId,
279
+ },
280
+ query: {
276
281
  'guid': guid,
277
282
  },
278
283
  });
@@ -427,7 +432,7 @@ export class ShowsService {
427
432
  ): CancelablePromise<Array<SuccessResponse>> {
428
433
  return __request(OpenAPI, {
429
434
  method: 'POST',
430
- url: '/shows/shows/new',
435
+ url: '/shows/new',
431
436
  headers: {
432
437
  'x-studio-id': xStudioId,
433
438
  },
@@ -21,7 +21,7 @@ export type OpenAPIConfig = {
21
21
 
22
22
  export const OpenAPI: OpenAPIConfig = {
23
23
  BASE: 'https://api.drttix.com/shopper',
24
- VERSION: '20260619.2',
24
+ VERSION: '20260622.1',
25
25
  WITH_CREDENTIALS: false,
26
26
  CREDENTIALS: 'include',
27
27
  TOKEN: undefined,
@@ -53,5 +53,15 @@ export type Account = {
53
53
  csPhone: string;
54
54
  numCouponAliases: number;
55
55
  maxOrderSeats: number;
56
+ receiptFrom: string | null;
57
+ refundExchangePolicy: string | null;
58
+ eTickets: number;
59
+ canAssignTickets: number;
60
+ canEmailTickets: number;
61
+ enableOrderDonation: number;
62
+ obfuscateData: number;
63
+ paymentGatewayId: number | null;
64
+ enableAdjustmentPayment: number;
65
+ groupShows: number;
56
66
  };
57
67
 
@@ -18,5 +18,14 @@ export type SessionInfoDto = {
18
18
  superuser: boolean;
19
19
  expireOnUnlock: boolean;
20
20
  tierReminderShown: boolean;
21
+ modifyingOrderId: number | null;
22
+ /**
23
+ * Resolved session/cart effective date (legacy cart_sessionDate). Use this for availability/priority checks instead of new Date().
24
+ */
25
+ effectiveDate: string;
26
+ /**
27
+ * Whether an admin/preview date override is active.
28
+ */
29
+ usingDateOverride: boolean;
21
30
  };
22
31
 
@@ -2,6 +2,17 @@ import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { execSync, execFileSync } from 'child_process';
4
4
 
5
+ // On Windows, execFileSync with shell:true joins args without quoting, so paths
6
+ // containing spaces are split. Use execSync with manual quoting on Windows instead.
7
+ function runCommand(cmd: string, args: string[]): void {
8
+ if (process.platform === 'win32') {
9
+ const quotedArgs = args.map((a) => (a.includes(' ') ? `"${a}"` : a));
10
+ execSync([cmd, ...quotedArgs].join(' '), { stdio: 'inherit' });
11
+ } else {
12
+ execFileSync(cmd, args, { stdio: 'inherit' });
13
+ }
14
+ }
15
+
5
16
  // Load the spec list (use staging specs when --staging flag is passed)
6
17
  const isStaging = process.argv.includes('--staging');
7
18
  const specsFile = isStaging
@@ -31,24 +42,17 @@ for (const spec of specs) {
31
42
  const tempSpecFile = path.join(process.cwd(), `${name}-spec.json`);
32
43
  try {
33
44
  console.log(`📥 Downloading spec from ${url}...`);
34
- execFileSync(CURL_CMD, ['-s', '-o', tempSpecFile, url], {
35
- stdio: 'inherit',
36
- shell: true,
37
- });
38
-
39
- execFileSync(
40
- NPX_CMD,
41
- [
42
- 'openapi-typescript-codegen',
43
- '--input',
44
- tempSpecFile,
45
- '--output',
46
- outputDir,
47
- '--client',
48
- 'fetch',
49
- ],
50
- { stdio: 'inherit', shell: true },
51
- );
45
+ runCommand(CURL_CMD, ['-s', '-o', tempSpecFile, url]);
46
+
47
+ runCommand(NPX_CMD, [
48
+ 'openapi-typescript-codegen',
49
+ '--input',
50
+ tempSpecFile,
51
+ '--output',
52
+ outputDir,
53
+ '--client',
54
+ 'fetch',
55
+ ]);
52
56
 
53
57
  // Clean up temp file
54
58
  fs.unlinkSync(tempSpecFile);
@@ -61,10 +65,7 @@ for (const spec of specs) {
61
65
  }
62
66
 
63
67
  console.log(`⚙️ Generating wrapper for ${name}...`);
64
- execFileSync(NPX_CMD, ['tsx', 'src/scripts/generate-definition.ts', name], {
65
- stdio: 'inherit',
66
- shell: true,
67
- });
68
+ runCommand(NPX_CMD, ['tsx', 'src/scripts/generate-definition.ts', name]);
68
69
  }
69
70
 
70
71
  // After generating all clients and definitions, replace request.ts for all services