@drttix/drt-sdk 0.9.7 → 0.9.8
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/demo/test.html +1554 -674
- package/dist/bundle/drt-sdk.js +1 -1
- package/dist/cjs/src/generated/shopper/services/AccountService.d.ts +4 -16
- package/dist/cjs/src/generated/shopper/services/AccountService.js +4 -36
- package/dist/cjs/src/generated/shopper/services/CartService.d.ts +2 -8
- package/dist/cjs/src/generated/shopper/services/CartService.js +2 -18
- package/dist/cjs/src/generated/shopper/services/CheckoutService.d.ts +5 -20
- package/dist/cjs/src/generated/shopper/services/CheckoutService.js +5 -45
- package/dist/cjs/src/generated/shopper/services/CodeService.d.ts +5 -20
- package/dist/cjs/src/generated/shopper/services/CodeService.js +5 -45
- package/dist/cjs/src/generated/shopper/services/DonationService.d.ts +2 -8
- package/dist/cjs/src/generated/shopper/services/DonationService.js +2 -16
- package/dist/cjs/src/generated/shopper/services/EventService.d.ts +4 -16
- package/dist/cjs/src/generated/shopper/services/EventService.js +4 -36
- package/dist/cjs/src/generated/shopper/services/GiftCardService.d.ts +5 -20
- package/dist/cjs/src/generated/shopper/services/GiftCardService.js +5 -45
- package/dist/cjs/src/generated/shopper/services/OrderService.d.ts +14 -56
- package/dist/cjs/src/generated/shopper/services/OrderService.js +14 -126
- package/dist/cjs/src/generated/shopper/services/PaymentService.d.ts +3 -12
- package/dist/cjs/src/generated/shopper/services/PaymentService.js +3 -27
- package/dist/cjs/src/generated/shopper/services/ProductService.d.ts +3 -12
- package/dist/cjs/src/generated/shopper/services/ProductService.js +3 -27
- package/dist/cjs/src/generated/shopper/services/SeatService.d.ts +6 -24
- package/dist/cjs/src/generated/shopper/services/SeatService.js +6 -54
- package/dist/cjs/src/generated/shopper/services/SessionService.d.ts +2 -8
- package/dist/cjs/src/generated/shopper/services/SessionService.js +2 -18
- package/dist/cjs/src/scripts/build-all.js +39 -0
- package/dist/esm/src/generated/shopper/services/AccountService.d.ts +4 -16
- package/dist/esm/src/generated/shopper/services/AccountService.js +4 -36
- package/dist/esm/src/generated/shopper/services/CartService.d.ts +2 -8
- package/dist/esm/src/generated/shopper/services/CartService.js +2 -18
- package/dist/esm/src/generated/shopper/services/CheckoutService.d.ts +5 -20
- package/dist/esm/src/generated/shopper/services/CheckoutService.js +5 -45
- package/dist/esm/src/generated/shopper/services/CodeService.d.ts +5 -20
- package/dist/esm/src/generated/shopper/services/CodeService.js +5 -45
- package/dist/esm/src/generated/shopper/services/DonationService.d.ts +2 -8
- package/dist/esm/src/generated/shopper/services/DonationService.js +2 -16
- package/dist/esm/src/generated/shopper/services/EventService.d.ts +4 -16
- package/dist/esm/src/generated/shopper/services/EventService.js +4 -36
- package/dist/esm/src/generated/shopper/services/GiftCardService.d.ts +5 -20
- package/dist/esm/src/generated/shopper/services/GiftCardService.js +5 -45
- package/dist/esm/src/generated/shopper/services/OrderService.d.ts +14 -56
- package/dist/esm/src/generated/shopper/services/OrderService.js +14 -126
- package/dist/esm/src/generated/shopper/services/PaymentService.d.ts +3 -12
- package/dist/esm/src/generated/shopper/services/PaymentService.js +3 -27
- package/dist/esm/src/generated/shopper/services/ProductService.d.ts +3 -12
- package/dist/esm/src/generated/shopper/services/ProductService.js +3 -27
- package/dist/esm/src/generated/shopper/services/SeatService.d.ts +6 -24
- package/dist/esm/src/generated/shopper/services/SeatService.js +6 -54
- package/dist/esm/src/generated/shopper/services/SessionService.d.ts +2 -8
- package/dist/esm/src/generated/shopper/services/SessionService.js +2 -18
- package/dist/esm/src/scripts/build-all.js +39 -0
- package/package.json +1 -1
- package/public/sdk/latest/drt-sdk.js +1 -1
- package/src/generated/shopper/services/AccountService.ts +0 -44
- package/src/generated/shopper/services/CartService.ts +0 -22
- package/src/generated/shopper/services/CheckoutService.ts +0 -55
- package/src/generated/shopper/services/CodeService.ts +0 -55
- package/src/generated/shopper/services/DonationService.ts +0 -20
- package/src/generated/shopper/services/EventService.ts +0 -44
- package/src/generated/shopper/services/GiftCardService.ts +0 -55
- package/src/generated/shopper/services/OrderService.ts +0 -154
- package/src/generated/shopper/services/PaymentService.ts +0 -33
- package/src/generated/shopper/services/ProductService.ts +0 -33
- package/src/generated/shopper/services/SeatService.ts +0 -66
- package/src/generated/shopper/services/SessionService.ts +0 -22
- package/src/scripts/build-all.ts +52 -0
|
@@ -33,27 +33,16 @@ export class SeatService {
|
|
|
33
33
|
/**
|
|
34
34
|
* Hold a reserved seat
|
|
35
35
|
* Holds a reserved seat for the shopper.
|
|
36
|
-
* @param shopperguid Unique identifier for the shopper.
|
|
37
|
-
* @param accountid Unique identifier for the account.
|
|
38
|
-
* @param apikey API key for authentication.
|
|
39
36
|
* @param requestBody Seat data for holding a reserved seat
|
|
40
37
|
* @returns SeatHoldReturn Successfully held the reserved seat.
|
|
41
38
|
* @throws ApiError
|
|
42
39
|
*/
|
|
43
40
|
public static holdReservedSeat(
|
|
44
|
-
shopperguid: string,
|
|
45
|
-
accountid: string,
|
|
46
|
-
apikey: string,
|
|
47
41
|
requestBody: SeatData,
|
|
48
42
|
): CancelablePromise<SeatHoldReturn> {
|
|
49
43
|
return __request(OpenAPI, {
|
|
50
44
|
method: 'POST',
|
|
51
45
|
url: '/seat/hold-reserved',
|
|
52
|
-
headers: {
|
|
53
|
-
'shopperguid': shopperguid,
|
|
54
|
-
'accountid': accountid,
|
|
55
|
-
'apikey': apikey,
|
|
56
|
-
},
|
|
57
46
|
body: requestBody,
|
|
58
47
|
mediaType: 'application/json',
|
|
59
48
|
errors: {
|
|
@@ -66,27 +55,16 @@ export class SeatService {
|
|
|
66
55
|
/**
|
|
67
56
|
* Hold a general admission seat
|
|
68
57
|
* Holds a general admission seat for the shopper.
|
|
69
|
-
* @param shopperguid Unique identifier for the shopper.
|
|
70
|
-
* @param accountid Unique identifier for the account.
|
|
71
|
-
* @param apikey API key for authentication.
|
|
72
58
|
* @param requestBody Seat data for holding a general admission seat
|
|
73
59
|
* @returns GAResponse Successfully held the general admission seat.
|
|
74
60
|
* @throws ApiError
|
|
75
61
|
*/
|
|
76
62
|
public static holdGaSeat(
|
|
77
|
-
shopperguid: string,
|
|
78
|
-
accountid: string,
|
|
79
|
-
apikey: string,
|
|
80
63
|
requestBody: GAHold,
|
|
81
64
|
): CancelablePromise<GAResponse> {
|
|
82
65
|
return __request(OpenAPI, {
|
|
83
66
|
method: 'POST',
|
|
84
67
|
url: '/seat/hold-ga',
|
|
85
|
-
headers: {
|
|
86
|
-
'shopperguid': shopperguid,
|
|
87
|
-
'accountid': accountid,
|
|
88
|
-
'apikey': apikey,
|
|
89
|
-
},
|
|
90
68
|
body: requestBody,
|
|
91
69
|
mediaType: 'application/json',
|
|
92
70
|
errors: {
|
|
@@ -99,27 +77,16 @@ export class SeatService {
|
|
|
99
77
|
/**
|
|
100
78
|
* Hold a reserved seat for a BA event
|
|
101
79
|
* Holds a reserved seat for a BA event.
|
|
102
|
-
* @param shopperguid Unique identifier for the shopper.
|
|
103
|
-
* @param accountid Unique identifier for the account.
|
|
104
|
-
* @param apikey API key for authentication.
|
|
105
80
|
* @param requestBody Seat data for holding a reserved seat for a BA event
|
|
106
81
|
* @returns SeatHoldReturn Successfully held the reserved seat for a BA event.
|
|
107
82
|
* @throws ApiError
|
|
108
83
|
*/
|
|
109
84
|
public static holdBaSeat(
|
|
110
|
-
shopperguid: string,
|
|
111
|
-
accountid: string,
|
|
112
|
-
apikey: string,
|
|
113
85
|
requestBody: BAHold,
|
|
114
86
|
): CancelablePromise<SeatHoldReturn> {
|
|
115
87
|
return __request(OpenAPI, {
|
|
116
88
|
method: 'POST',
|
|
117
89
|
url: '/seat/hold-ba',
|
|
118
|
-
headers: {
|
|
119
|
-
'shopperguid': shopperguid,
|
|
120
|
-
'accountid': accountid,
|
|
121
|
-
'apikey': apikey,
|
|
122
|
-
},
|
|
123
90
|
body: requestBody,
|
|
124
91
|
mediaType: 'application/json',
|
|
125
92
|
errors: {
|
|
@@ -132,27 +99,16 @@ export class SeatService {
|
|
|
132
99
|
/**
|
|
133
100
|
* Release a reserved seat
|
|
134
101
|
* Releases a reserved seat for the shopper.
|
|
135
|
-
* @param shopperguid Unique identifier for the shopper.
|
|
136
|
-
* @param accountid Unique identifier for the account.
|
|
137
|
-
* @param apikey API key for authentication.
|
|
138
102
|
* @param requestBody Seat data for releasing a reserved seat
|
|
139
103
|
* @returns any Successfully released the reserved seat.
|
|
140
104
|
* @throws ApiError
|
|
141
105
|
*/
|
|
142
106
|
public static releaseReservedSeat(
|
|
143
|
-
shopperguid: string,
|
|
144
|
-
accountid: string,
|
|
145
|
-
apikey: string,
|
|
146
107
|
requestBody: SeatData,
|
|
147
108
|
): CancelablePromise<any> {
|
|
148
109
|
return __request(OpenAPI, {
|
|
149
110
|
method: 'DELETE',
|
|
150
111
|
url: '/seat/release-reserved',
|
|
151
|
-
headers: {
|
|
152
|
-
'shopperguid': shopperguid,
|
|
153
|
-
'accountid': accountid,
|
|
154
|
-
'apikey': apikey,
|
|
155
|
-
},
|
|
156
112
|
body: requestBody,
|
|
157
113
|
mediaType: 'application/json',
|
|
158
114
|
errors: {
|
|
@@ -165,27 +121,16 @@ export class SeatService {
|
|
|
165
121
|
/**
|
|
166
122
|
* Release a general admission seat
|
|
167
123
|
* Releases a general admission seat for the shopper.
|
|
168
|
-
* @param shopperguid Unique identifier for the shopper.
|
|
169
|
-
* @param accountid Unique identifier for the account.
|
|
170
|
-
* @param apikey API key for authentication.
|
|
171
124
|
* @param requestBody Seat data for releasing a general admission seat
|
|
172
125
|
* @returns any
|
|
173
126
|
* @throws ApiError
|
|
174
127
|
*/
|
|
175
128
|
public static releaseGaSeat(
|
|
176
|
-
shopperguid: string,
|
|
177
|
-
accountid: string,
|
|
178
|
-
apikey: string,
|
|
179
129
|
requestBody: GASeatRelease,
|
|
180
130
|
): CancelablePromise<any> {
|
|
181
131
|
return __request(OpenAPI, {
|
|
182
132
|
method: 'DELETE',
|
|
183
133
|
url: '/seat/release-ga',
|
|
184
|
-
headers: {
|
|
185
|
-
'shopperguid': shopperguid,
|
|
186
|
-
'accountid': accountid,
|
|
187
|
-
'apikey': apikey,
|
|
188
|
-
},
|
|
189
134
|
body: requestBody,
|
|
190
135
|
mediaType: 'application/json',
|
|
191
136
|
errors: {
|
|
@@ -198,27 +143,16 @@ export class SeatService {
|
|
|
198
143
|
/**
|
|
199
144
|
* Update tier information for a seat
|
|
200
145
|
* Updates the tier information for a seat.
|
|
201
|
-
* @param shopperguid Unique identifier for the shopper.
|
|
202
|
-
* @param accountid Unique identifier for the account.
|
|
203
|
-
* @param apikey API key for authentication.
|
|
204
146
|
* @param requestBody Data for updating tier information
|
|
205
147
|
* @returns UpdateTierData Successfully updated the tier information.
|
|
206
148
|
* @throws ApiError
|
|
207
149
|
*/
|
|
208
150
|
public static updateTier(
|
|
209
|
-
shopperguid: string,
|
|
210
|
-
accountid: string,
|
|
211
|
-
apikey: string,
|
|
212
151
|
requestBody: UpdateTierData,
|
|
213
152
|
): CancelablePromise<UpdateTierData> {
|
|
214
153
|
return __request(OpenAPI, {
|
|
215
154
|
method: 'POST',
|
|
216
155
|
url: '/seat/update-tier',
|
|
217
|
-
headers: {
|
|
218
|
-
'shopperguid': shopperguid,
|
|
219
|
-
'accountid': accountid,
|
|
220
|
-
'apikey': apikey,
|
|
221
|
-
},
|
|
222
156
|
body: requestBody,
|
|
223
157
|
mediaType: 'application/json',
|
|
224
158
|
errors: {
|
|
@@ -34,25 +34,14 @@ export class SessionService {
|
|
|
34
34
|
/**
|
|
35
35
|
* Get Session information
|
|
36
36
|
* Retrieves all Sessions available for the specified account.
|
|
37
|
-
* @param shopperguid Unique identifier for the shopper.
|
|
38
|
-
* @param accountid Unique identifier for the account.
|
|
39
|
-
* @param apikey API key for authentication.
|
|
40
37
|
* @returns SessionInfoDto Returns session data for the provided shopperguid.
|
|
41
38
|
* @throws ApiError
|
|
42
39
|
*/
|
|
43
40
|
public static getSessions(
|
|
44
|
-
shopperguid: string,
|
|
45
|
-
accountid: string,
|
|
46
|
-
apikey: string,
|
|
47
41
|
): CancelablePromise<SessionInfoDto> {
|
|
48
42
|
return __request(OpenAPI, {
|
|
49
43
|
method: 'GET',
|
|
50
44
|
url: '/session',
|
|
51
|
-
headers: {
|
|
52
|
-
'shopperguid': shopperguid,
|
|
53
|
-
'accountid': accountid,
|
|
54
|
-
'apikey': apikey,
|
|
55
|
-
},
|
|
56
45
|
errors: {
|
|
57
46
|
400: `Bad Request error with error details.`,
|
|
58
47
|
404: `Not found error with error details.`,
|
|
@@ -63,25 +52,14 @@ export class SessionService {
|
|
|
63
52
|
/**
|
|
64
53
|
* Get Session Timer Heartbeat
|
|
65
54
|
* Retrieves the heartbeat for the sessions timer in ms.
|
|
66
|
-
* @param shopperguid Unique identifier for the shopper.
|
|
67
|
-
* @param accountid Unique identifier for the account.
|
|
68
|
-
* @param apikey API key for authentication.
|
|
69
55
|
* @returns SessionHeartbeatDto Returns session data for the provided shopperguid.
|
|
70
56
|
* @throws ApiError
|
|
71
57
|
*/
|
|
72
58
|
public static getHeartbeat(
|
|
73
|
-
shopperguid: string,
|
|
74
|
-
accountid: string,
|
|
75
|
-
apikey: string,
|
|
76
59
|
): CancelablePromise<SessionHeartbeatDto> {
|
|
77
60
|
return __request(OpenAPI, {
|
|
78
61
|
method: 'GET',
|
|
79
62
|
url: '/session/heartbeat',
|
|
80
|
-
headers: {
|
|
81
|
-
'shopperguid': shopperguid,
|
|
82
|
-
'accountid': accountid,
|
|
83
|
-
'apikey': apikey,
|
|
84
|
-
},
|
|
85
63
|
errors: {
|
|
86
64
|
400: `Bad Request error with error details.`,
|
|
87
65
|
404: `Not found error with error details.`,
|
package/src/scripts/build-all.ts
CHANGED
|
@@ -83,6 +83,58 @@ console.log('✅ Replaced portal/core/request.ts with custom-request.txt');
|
|
|
83
83
|
fs.writeFileSync(scannerRequestPath, customRequestContent);
|
|
84
84
|
console.log('✅ Replaced scanner/core/request.ts with custom-request.txt');
|
|
85
85
|
|
|
86
|
+
// Strip credential params (shopperguid/accountid/apikey) from all generated service methods.
|
|
87
|
+
// DRT.init() injects these globally via OpenAPI.HEADERS, so callers never need to pass them.
|
|
88
|
+
console.log('⚙️ Stripping credential params from generated services...');
|
|
89
|
+
function walkServices(dir: string): string[] {
|
|
90
|
+
const results: string[] = [];
|
|
91
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
92
|
+
const full = path.join(dir, entry.name);
|
|
93
|
+
if (entry.isDirectory()) results.push(...walkServices(full));
|
|
94
|
+
else if (
|
|
95
|
+
entry.isFile() &&
|
|
96
|
+
entry.name.endsWith('.ts') &&
|
|
97
|
+
dir.endsWith('services')
|
|
98
|
+
)
|
|
99
|
+
results.push(full);
|
|
100
|
+
}
|
|
101
|
+
return results;
|
|
102
|
+
}
|
|
103
|
+
const serviceFiles = walkServices(GENERATED_BASE);
|
|
104
|
+
for (const file of serviceFiles) {
|
|
105
|
+
let src = fs.readFileSync(file, 'utf-8');
|
|
106
|
+
let patched = src
|
|
107
|
+
// Remove param lines from function signatures
|
|
108
|
+
.replace(
|
|
109
|
+
/\n\s*shopperguid: string(?:\s*\|\s*undefined)?\s*(?:=\s*undefined)?,/g,
|
|
110
|
+
'',
|
|
111
|
+
)
|
|
112
|
+
.replace(
|
|
113
|
+
/\n\s*accountid: string(?:\s*\|\s*undefined)?\s*(?:=\s*undefined)?,/g,
|
|
114
|
+
'',
|
|
115
|
+
)
|
|
116
|
+
.replace(
|
|
117
|
+
/\n\s*apikey: string(?:\s*\|\s*undefined)?\s*(?:=\s*undefined)?,/g,
|
|
118
|
+
'',
|
|
119
|
+
)
|
|
120
|
+
// Remove @param jsdoc lines
|
|
121
|
+
.replace(/\n\s*\* @param shopperguid[^\n]*/g, '')
|
|
122
|
+
.replace(/\n\s*\* @param accountid[^\n]*/g, '')
|
|
123
|
+
.replace(/\n\s*\* @param apikey[^\n]*/g, '')
|
|
124
|
+
// Remove header entries inside __request
|
|
125
|
+
.replace(/\n\s*'shopperguid': shopperguid,/g, '')
|
|
126
|
+
.replace(/\n\s*'accountid': accountid,/g, '')
|
|
127
|
+
.replace(/\n\s*'apikey': apikey,/g, '')
|
|
128
|
+
// Remove empty headers: {} blocks left behind
|
|
129
|
+
.replace(/\n\s*headers: \{\s*\},/g, '');
|
|
130
|
+
if (patched !== src) {
|
|
131
|
+
fs.writeFileSync(file, patched);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
console.log(
|
|
135
|
+
`✅ Stripped credentials from ${serviceFiles.length} service files`,
|
|
136
|
+
);
|
|
137
|
+
|
|
86
138
|
// --- Generate index.ts
|
|
87
139
|
console.log(`🧩 Generating DRT index...`);
|
|
88
140
|
|