@digital8/lighting-illusions-ts-sdk 0.0.1776 → 0.0.1777
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/.openapi-generator/FILES +6 -0
- package/README.md +11 -2
- package/dist/apis/CartsApi.d.ts +97 -1
- package/dist/apis/CartsApi.js +372 -0
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +3 -1
- package/dist/models/AttachCouponCartRequest.d.ts +32 -0
- package/dist/models/AttachCouponCartRequest.js +51 -0
- package/dist/models/AttachItemCartRequest.d.ts +44 -0
- package/dist/models/AttachItemCartRequest.js +57 -0
- package/dist/models/CartResource.d.ts +2 -2
- package/dist/models/CartResource.js +3 -1
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/IndexCartRequest.d.ts +6 -6
- package/dist/models/IndexCartRequest.js +2 -2
- package/dist/models/ProductChildSiteDetailLiteResource.d.ts +7 -0
- package/dist/models/ProductChildSiteDetailLiteResource.js +5 -0
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +1 -3
- package/dist/models/UpdateItemCartRequest.d.ts +38 -0
- package/dist/models/UpdateItemCartRequest.js +53 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/AttachCouponCartRequest.md +34 -0
- package/docs/AttachItemCartRequest.md +38 -0
- package/docs/CartResource.md +1 -1
- package/docs/CartsApi.md +414 -0
- package/docs/IndexCartRequest.md +2 -2
- package/docs/ProductChildSiteDetailLiteResource.md +2 -0
- package/docs/UpdateItemCartRequest.md +36 -0
- package/package.json +1 -1
- package/src/apis/CartsApi.ts +342 -0
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AttachCouponCartRequest.ts +66 -0
- package/src/models/AttachItemCartRequest.ts +83 -0
- package/src/models/CartResource.ts +4 -3
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/IndexCartRequest.ts +8 -8
- package/src/models/ProductChildSiteDetailLiteResource.ts +16 -0
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreResource.ts +2 -3
- package/src/models/UpdateItemCartRequest.ts +74 -0
- package/src/models/index.ts +3 -0
package/src/apis/CartsApi.ts
CHANGED
|
@@ -15,14 +15,21 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
AttachCouponCartRequest,
|
|
19
|
+
AttachItemCartRequest,
|
|
18
20
|
CartResource,
|
|
19
21
|
GenericResponse,
|
|
20
22
|
IndexCartRequest,
|
|
21
23
|
PaginatedCartListResourceResponse,
|
|
22
24
|
StoreCartRequest,
|
|
23
25
|
UpdateCartRequest,
|
|
26
|
+
UpdateItemCartRequest,
|
|
24
27
|
} from '../models/index';
|
|
25
28
|
import {
|
|
29
|
+
AttachCouponCartRequestFromJSON,
|
|
30
|
+
AttachCouponCartRequestToJSON,
|
|
31
|
+
AttachItemCartRequestFromJSON,
|
|
32
|
+
AttachItemCartRequestToJSON,
|
|
26
33
|
CartResourceFromJSON,
|
|
27
34
|
CartResourceToJSON,
|
|
28
35
|
GenericResponseFromJSON,
|
|
@@ -35,16 +42,42 @@ import {
|
|
|
35
42
|
StoreCartRequestToJSON,
|
|
36
43
|
UpdateCartRequestFromJSON,
|
|
37
44
|
UpdateCartRequestToJSON,
|
|
45
|
+
UpdateItemCartRequestFromJSON,
|
|
46
|
+
UpdateItemCartRequestToJSON,
|
|
38
47
|
} from '../models/index';
|
|
39
48
|
|
|
49
|
+
export interface AttachCouponCartOperationRequest {
|
|
50
|
+
cart: number;
|
|
51
|
+
attachCouponCartRequest?: AttachCouponCartRequest;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface AttachItemCartOperationRequest {
|
|
55
|
+
cart: number;
|
|
56
|
+
attachItemCartRequest?: AttachItemCartRequest;
|
|
57
|
+
}
|
|
58
|
+
|
|
40
59
|
export interface DestroyCartRequest {
|
|
41
60
|
cart: number;
|
|
42
61
|
}
|
|
43
62
|
|
|
63
|
+
export interface DetachCouponCartRequest {
|
|
64
|
+
cart: number;
|
|
65
|
+
coupon: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface DetachItemCartRequest {
|
|
69
|
+
cart: number;
|
|
70
|
+
cartItem: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
44
73
|
export interface IndexCartOperationRequest {
|
|
45
74
|
indexCartRequest?: IndexCartRequest;
|
|
46
75
|
}
|
|
47
76
|
|
|
77
|
+
export interface SendPaymentLinkCartRequest {
|
|
78
|
+
cart: number;
|
|
79
|
+
}
|
|
80
|
+
|
|
48
81
|
export interface ShowCartRequest {
|
|
49
82
|
cart: number;
|
|
50
83
|
}
|
|
@@ -58,11 +91,113 @@ export interface UpdateCartOperationRequest {
|
|
|
58
91
|
updateCartRequest?: UpdateCartRequest;
|
|
59
92
|
}
|
|
60
93
|
|
|
94
|
+
export interface UpdateItemCartOperationRequest {
|
|
95
|
+
cart: number;
|
|
96
|
+
cartItem: number;
|
|
97
|
+
updateItemCartRequest?: UpdateItemCartRequest;
|
|
98
|
+
}
|
|
99
|
+
|
|
61
100
|
/**
|
|
62
101
|
*
|
|
63
102
|
*/
|
|
64
103
|
export class CartsApi extends runtime.BaseAPI {
|
|
65
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Creates request options for attachCouponCart without sending the request
|
|
107
|
+
*/
|
|
108
|
+
async attachCouponCartRequestOpts(requestParameters: AttachCouponCartOperationRequest): Promise<runtime.RequestOpts> {
|
|
109
|
+
if (requestParameters['cart'] == null) {
|
|
110
|
+
throw new runtime.RequiredError(
|
|
111
|
+
'cart',
|
|
112
|
+
'Required parameter "cart" was null or undefined when calling attachCouponCart().'
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const queryParameters: any = {};
|
|
117
|
+
|
|
118
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
119
|
+
|
|
120
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
let urlPath = `/admin-api/carts/{cart}/coupons/attach`;
|
|
124
|
+
urlPath = urlPath.replace(`{${"cart"}}`, encodeURIComponent(String(requestParameters['cart'])));
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
path: urlPath,
|
|
128
|
+
method: 'POST',
|
|
129
|
+
headers: headerParameters,
|
|
130
|
+
query: queryParameters,
|
|
131
|
+
body: AttachCouponCartRequestToJSON(requestParameters['attachCouponCartRequest']),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Auto-generated: attachCouponCart
|
|
137
|
+
*/
|
|
138
|
+
async attachCouponCartRaw(requestParameters: AttachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
|
|
139
|
+
const requestOptions = await this.attachCouponCartRequestOpts(requestParameters);
|
|
140
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
141
|
+
|
|
142
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CartResourceFromJSON(jsonValue));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Auto-generated: attachCouponCart
|
|
147
|
+
*/
|
|
148
|
+
async attachCouponCart(requestParameters: AttachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
|
|
149
|
+
const response = await this.attachCouponCartRaw(requestParameters, initOverrides);
|
|
150
|
+
return await response.value();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Creates request options for attachItemCart without sending the request
|
|
155
|
+
*/
|
|
156
|
+
async attachItemCartRequestOpts(requestParameters: AttachItemCartOperationRequest): Promise<runtime.RequestOpts> {
|
|
157
|
+
if (requestParameters['cart'] == null) {
|
|
158
|
+
throw new runtime.RequiredError(
|
|
159
|
+
'cart',
|
|
160
|
+
'Required parameter "cart" was null or undefined when calling attachItemCart().'
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const queryParameters: any = {};
|
|
165
|
+
|
|
166
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
167
|
+
|
|
168
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
let urlPath = `/admin-api/carts/{cart}/items/attach`;
|
|
172
|
+
urlPath = urlPath.replace(`{${"cart"}}`, encodeURIComponent(String(requestParameters['cart'])));
|
|
173
|
+
|
|
174
|
+
return {
|
|
175
|
+
path: urlPath,
|
|
176
|
+
method: 'POST',
|
|
177
|
+
headers: headerParameters,
|
|
178
|
+
query: queryParameters,
|
|
179
|
+
body: AttachItemCartRequestToJSON(requestParameters['attachItemCartRequest']),
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Auto-generated: attachItemCart
|
|
185
|
+
*/
|
|
186
|
+
async attachItemCartRaw(requestParameters: AttachItemCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
|
|
187
|
+
const requestOptions = await this.attachItemCartRequestOpts(requestParameters);
|
|
188
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
189
|
+
|
|
190
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CartResourceFromJSON(jsonValue));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Auto-generated: attachItemCart
|
|
195
|
+
*/
|
|
196
|
+
async attachItemCart(requestParameters: AttachItemCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
|
|
197
|
+
const response = await this.attachItemCartRaw(requestParameters, initOverrides);
|
|
198
|
+
return await response.value();
|
|
199
|
+
}
|
|
200
|
+
|
|
66
201
|
/**
|
|
67
202
|
* Creates request options for destroyCart without sending the request
|
|
68
203
|
*/
|
|
@@ -108,6 +243,112 @@ export class CartsApi extends runtime.BaseAPI {
|
|
|
108
243
|
return await response.value();
|
|
109
244
|
}
|
|
110
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Creates request options for detachCouponCart without sending the request
|
|
248
|
+
*/
|
|
249
|
+
async detachCouponCartRequestOpts(requestParameters: DetachCouponCartRequest): Promise<runtime.RequestOpts> {
|
|
250
|
+
if (requestParameters['cart'] == null) {
|
|
251
|
+
throw new runtime.RequiredError(
|
|
252
|
+
'cart',
|
|
253
|
+
'Required parameter "cart" was null or undefined when calling detachCouponCart().'
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (requestParameters['coupon'] == null) {
|
|
258
|
+
throw new runtime.RequiredError(
|
|
259
|
+
'coupon',
|
|
260
|
+
'Required parameter "coupon" was null or undefined when calling detachCouponCart().'
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const queryParameters: any = {};
|
|
265
|
+
|
|
266
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
let urlPath = `/admin-api/carts/{cart}/coupons/{coupon}/detach`;
|
|
270
|
+
urlPath = urlPath.replace(`{${"cart"}}`, encodeURIComponent(String(requestParameters['cart'])));
|
|
271
|
+
urlPath = urlPath.replace(`{${"coupon"}}`, encodeURIComponent(String(requestParameters['coupon'])));
|
|
272
|
+
|
|
273
|
+
return {
|
|
274
|
+
path: urlPath,
|
|
275
|
+
method: 'DELETE',
|
|
276
|
+
headers: headerParameters,
|
|
277
|
+
query: queryParameters,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Auto-generated: detachCouponCart
|
|
283
|
+
*/
|
|
284
|
+
async detachCouponCartRaw(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
|
|
285
|
+
const requestOptions = await this.detachCouponCartRequestOpts(requestParameters);
|
|
286
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
287
|
+
|
|
288
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CartResourceFromJSON(jsonValue));
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Auto-generated: detachCouponCart
|
|
293
|
+
*/
|
|
294
|
+
async detachCouponCart(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
|
|
295
|
+
const response = await this.detachCouponCartRaw(requestParameters, initOverrides);
|
|
296
|
+
return await response.value();
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Creates request options for detachItemCart without sending the request
|
|
301
|
+
*/
|
|
302
|
+
async detachItemCartRequestOpts(requestParameters: DetachItemCartRequest): Promise<runtime.RequestOpts> {
|
|
303
|
+
if (requestParameters['cart'] == null) {
|
|
304
|
+
throw new runtime.RequiredError(
|
|
305
|
+
'cart',
|
|
306
|
+
'Required parameter "cart" was null or undefined when calling detachItemCart().'
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (requestParameters['cartItem'] == null) {
|
|
311
|
+
throw new runtime.RequiredError(
|
|
312
|
+
'cartItem',
|
|
313
|
+
'Required parameter "cartItem" was null or undefined when calling detachItemCart().'
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const queryParameters: any = {};
|
|
318
|
+
|
|
319
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
let urlPath = `/admin-api/carts/{cart}/items/{cartItem}/detach`;
|
|
323
|
+
urlPath = urlPath.replace(`{${"cart"}}`, encodeURIComponent(String(requestParameters['cart'])));
|
|
324
|
+
urlPath = urlPath.replace(`{${"cartItem"}}`, encodeURIComponent(String(requestParameters['cartItem'])));
|
|
325
|
+
|
|
326
|
+
return {
|
|
327
|
+
path: urlPath,
|
|
328
|
+
method: 'DELETE',
|
|
329
|
+
headers: headerParameters,
|
|
330
|
+
query: queryParameters,
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Auto-generated: detachItemCart
|
|
336
|
+
*/
|
|
337
|
+
async detachItemCartRaw(requestParameters: DetachItemCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
|
|
338
|
+
const requestOptions = await this.detachItemCartRequestOpts(requestParameters);
|
|
339
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
340
|
+
|
|
341
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CartResourceFromJSON(jsonValue));
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Auto-generated: detachItemCart
|
|
346
|
+
*/
|
|
347
|
+
async detachItemCart(requestParameters: DetachItemCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
|
|
348
|
+
const response = await this.detachItemCartRaw(requestParameters, initOverrides);
|
|
349
|
+
return await response.value();
|
|
350
|
+
}
|
|
351
|
+
|
|
111
352
|
/**
|
|
112
353
|
* Creates request options for indexCart without sending the request
|
|
113
354
|
*/
|
|
@@ -148,6 +389,51 @@ export class CartsApi extends runtime.BaseAPI {
|
|
|
148
389
|
return await response.value();
|
|
149
390
|
}
|
|
150
391
|
|
|
392
|
+
/**
|
|
393
|
+
* Creates request options for sendPaymentLinkCart without sending the request
|
|
394
|
+
*/
|
|
395
|
+
async sendPaymentLinkCartRequestOpts(requestParameters: SendPaymentLinkCartRequest): Promise<runtime.RequestOpts> {
|
|
396
|
+
if (requestParameters['cart'] == null) {
|
|
397
|
+
throw new runtime.RequiredError(
|
|
398
|
+
'cart',
|
|
399
|
+
'Required parameter "cart" was null or undefined when calling sendPaymentLinkCart().'
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
const queryParameters: any = {};
|
|
404
|
+
|
|
405
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
let urlPath = `/admin-api/carts/{cart}/send-payment-link`;
|
|
409
|
+
urlPath = urlPath.replace(`{${"cart"}}`, encodeURIComponent(String(requestParameters['cart'])));
|
|
410
|
+
|
|
411
|
+
return {
|
|
412
|
+
path: urlPath,
|
|
413
|
+
method: 'POST',
|
|
414
|
+
headers: headerParameters,
|
|
415
|
+
query: queryParameters,
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Auto-generated: sendPaymentLinkCart
|
|
421
|
+
*/
|
|
422
|
+
async sendPaymentLinkCartRaw(requestParameters: SendPaymentLinkCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
|
|
423
|
+
const requestOptions = await this.sendPaymentLinkCartRequestOpts(requestParameters);
|
|
424
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
425
|
+
|
|
426
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CartResourceFromJSON(jsonValue));
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Auto-generated: sendPaymentLinkCart
|
|
431
|
+
*/
|
|
432
|
+
async sendPaymentLinkCart(requestParameters: SendPaymentLinkCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
|
|
433
|
+
const response = await this.sendPaymentLinkCartRaw(requestParameters, initOverrides);
|
|
434
|
+
return await response.value();
|
|
435
|
+
}
|
|
436
|
+
|
|
151
437
|
/**
|
|
152
438
|
* Creates request options for showCart without sending the request
|
|
153
439
|
*/
|
|
@@ -281,4 +567,60 @@ export class CartsApi extends runtime.BaseAPI {
|
|
|
281
567
|
return await response.value();
|
|
282
568
|
}
|
|
283
569
|
|
|
570
|
+
/**
|
|
571
|
+
* Creates request options for updateItemCart without sending the request
|
|
572
|
+
*/
|
|
573
|
+
async updateItemCartRequestOpts(requestParameters: UpdateItemCartOperationRequest): Promise<runtime.RequestOpts> {
|
|
574
|
+
if (requestParameters['cart'] == null) {
|
|
575
|
+
throw new runtime.RequiredError(
|
|
576
|
+
'cart',
|
|
577
|
+
'Required parameter "cart" was null or undefined when calling updateItemCart().'
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
if (requestParameters['cartItem'] == null) {
|
|
582
|
+
throw new runtime.RequiredError(
|
|
583
|
+
'cartItem',
|
|
584
|
+
'Required parameter "cartItem" was null or undefined when calling updateItemCart().'
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
const queryParameters: any = {};
|
|
589
|
+
|
|
590
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
591
|
+
|
|
592
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
let urlPath = `/admin-api/carts/{cart}/items/{cartItem}/update`;
|
|
596
|
+
urlPath = urlPath.replace(`{${"cart"}}`, encodeURIComponent(String(requestParameters['cart'])));
|
|
597
|
+
urlPath = urlPath.replace(`{${"cartItem"}}`, encodeURIComponent(String(requestParameters['cartItem'])));
|
|
598
|
+
|
|
599
|
+
return {
|
|
600
|
+
path: urlPath,
|
|
601
|
+
method: 'PUT',
|
|
602
|
+
headers: headerParameters,
|
|
603
|
+
query: queryParameters,
|
|
604
|
+
body: UpdateItemCartRequestToJSON(requestParameters['updateItemCartRequest']),
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Auto-generated: updateItemCart
|
|
610
|
+
*/
|
|
611
|
+
async updateItemCartRaw(requestParameters: UpdateItemCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
|
|
612
|
+
const requestOptions = await this.updateItemCartRequestOpts(requestParameters);
|
|
613
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
614
|
+
|
|
615
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CartResourceFromJSON(jsonValue));
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Auto-generated: updateItemCart
|
|
620
|
+
*/
|
|
621
|
+
async updateItemCart(requestParameters: UpdateItemCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
|
|
622
|
+
const response = await this.updateItemCartRaw(requestParameters, initOverrides);
|
|
623
|
+
return await response.value();
|
|
624
|
+
}
|
|
625
|
+
|
|
284
626
|
}
|
|
@@ -36,7 +36,7 @@ export interface AddressFrontendResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressFrontendResource
|
|
38
38
|
*/
|
|
39
|
-
line2
|
|
39
|
+
line2: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -75,6 +75,7 @@ export interface AddressFrontendResource {
|
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
76
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
77
77
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
78
79
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
79
80
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
80
81
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -95,7 +96,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
95
96
|
|
|
96
97
|
'company': json['company'],
|
|
97
98
|
'line1': json['line1'],
|
|
98
|
-
'line2': json['line2']
|
|
99
|
+
'line2': json['line2'],
|
|
99
100
|
'postcode': json['postcode'],
|
|
100
101
|
'suburb': json['suburb'],
|
|
101
102
|
'country': json['country'],
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AttachCouponCartRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface AttachCouponCartRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof AttachCouponCartRequest
|
|
26
|
+
*/
|
|
27
|
+
couponId: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the AttachCouponCartRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfAttachCouponCartRequest(value: object): value is AttachCouponCartRequest {
|
|
34
|
+
if (!('couponId' in value) || value['couponId'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function AttachCouponCartRequestFromJSON(json: any): AttachCouponCartRequest {
|
|
39
|
+
return AttachCouponCartRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AttachCouponCartRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachCouponCartRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'couponId': json['coupon_id'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function AttachCouponCartRequestToJSON(json: any): AttachCouponCartRequest {
|
|
53
|
+
return AttachCouponCartRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AttachCouponCartRequestToJSONTyped(value?: AttachCouponCartRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'coupon_id': value['couponId'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AttachItemCartRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface AttachItemCartRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof AttachItemCartRequest
|
|
26
|
+
*/
|
|
27
|
+
productChildId: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof AttachItemCartRequest
|
|
32
|
+
*/
|
|
33
|
+
quantity: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof AttachItemCartRequest
|
|
38
|
+
*/
|
|
39
|
+
productPrice?: number | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the AttachItemCartRequest interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfAttachItemCartRequest(value: object): value is AttachItemCartRequest {
|
|
46
|
+
if (!('productChildId' in value) || value['productChildId'] === undefined) return false;
|
|
47
|
+
if (!('quantity' in value) || value['quantity'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function AttachItemCartRequestFromJSON(json: any): AttachItemCartRequest {
|
|
52
|
+
return AttachItemCartRequestFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function AttachItemCartRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachItemCartRequest {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'productChildId': json['product_child_id'],
|
|
62
|
+
'quantity': json['quantity'],
|
|
63
|
+
'productPrice': json['product_price'] == null ? undefined : json['product_price'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function AttachItemCartRequestToJSON(json: any): AttachItemCartRequest {
|
|
68
|
+
return AttachItemCartRequestToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function AttachItemCartRequestToJSONTyped(value?: AttachItemCartRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
72
|
+
if (value == null) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'product_child_id': value['productChildId'],
|
|
79
|
+
'quantity': value['quantity'],
|
|
80
|
+
'product_price': value['productPrice'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -145,10 +145,10 @@ export interface CartResource {
|
|
|
145
145
|
subtotal: number;
|
|
146
146
|
/**
|
|
147
147
|
*
|
|
148
|
-
* @type {
|
|
148
|
+
* @type {number}
|
|
149
149
|
* @memberof CartResource
|
|
150
150
|
*/
|
|
151
|
-
discountPreview
|
|
151
|
+
discountPreview: number;
|
|
152
152
|
/**
|
|
153
153
|
*
|
|
154
154
|
* @type {number}
|
|
@@ -182,6 +182,7 @@ export function instanceOfCartResource(value: object): value is CartResource {
|
|
|
182
182
|
if (!('coupons' in value) || value['coupons'] === undefined) return false;
|
|
183
183
|
if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
|
|
184
184
|
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
185
|
+
if (!('discountPreview' in value) || value['discountPreview'] === undefined) return false;
|
|
185
186
|
if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined) return false;
|
|
186
187
|
if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined) return false;
|
|
187
188
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
@@ -215,7 +216,7 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
215
216
|
'shippingAddress': json['shipping_address'],
|
|
216
217
|
'billingAddress': json['billing_address'] == null ? undefined : json['billing_address'],
|
|
217
218
|
'subtotal': json['subtotal'],
|
|
218
|
-
'discountPreview': json['discount_preview']
|
|
219
|
+
'discountPreview': json['discount_preview'],
|
|
219
220
|
'shippingEstimate': json['shipping_estimate'],
|
|
220
221
|
'insuranceEstimate': json['insurance_estimate'],
|
|
221
222
|
'status': json['status'],
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload: string;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,6 +106,7 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
|
|
|
106
106
|
if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
|
|
107
107
|
if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
|
|
108
108
|
if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
|
|
109
|
+
if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
|
|
109
110
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
110
111
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
111
112
|
return true;
|
|
@@ -128,7 +129,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
128
129
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
129
130
|
'endpoint': json['endpoint'],
|
|
130
131
|
'responseCode': json['responseCode'],
|
|
131
|
-
'requestPayload': json['requestPayload']
|
|
132
|
+
'requestPayload': json['requestPayload'],
|
|
132
133
|
'responsePayload': json['responsePayload'],
|
|
133
134
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
134
135
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
@@ -61,12 +61,6 @@ export interface IndexCartRequest {
|
|
|
61
61
|
* @memberof IndexCartRequest
|
|
62
62
|
*/
|
|
63
63
|
source?: Array<string>;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @type {Array<IndexCartRequestStatusEnum>}
|
|
67
|
-
* @memberof IndexCartRequest
|
|
68
|
-
*/
|
|
69
|
-
status?: Array<IndexCartRequestStatusEnum>;
|
|
70
64
|
/**
|
|
71
65
|
*
|
|
72
66
|
* @type {Date}
|
|
@@ -121,6 +115,12 @@ export interface IndexCartRequest {
|
|
|
121
115
|
* @memberof IndexCartRequest
|
|
122
116
|
*/
|
|
123
117
|
includesRelations?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @type {Array<IndexCartRequestStatusEnum>}
|
|
121
|
+
* @memberof IndexCartRequest
|
|
122
|
+
*/
|
|
123
|
+
status?: Array<IndexCartRequestStatusEnum>;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
|
|
@@ -178,7 +178,6 @@ export function IndexCartRequestFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
178
178
|
'page': json['page'] == null ? undefined : json['page'],
|
|
179
179
|
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
180
180
|
'source': json['source'] == null ? undefined : json['source'],
|
|
181
|
-
'status': json['status'] == null ? undefined : json['status'],
|
|
182
181
|
'beforeCreatedAt': json['before_created_at'] == null ? undefined : (new Date(json['before_created_at'])),
|
|
183
182
|
'afterCreatedAt': json['after_created_at'] == null ? undefined : (new Date(json['after_created_at'])),
|
|
184
183
|
'beforeExpiryDate': json['before_expiry_date'] == null ? undefined : (new Date(json['before_expiry_date'])),
|
|
@@ -188,6 +187,7 @@ export function IndexCartRequestFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
188
187
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
189
188
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
190
189
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
190
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -209,7 +209,6 @@ export function IndexCartRequestToJSONTyped(value?: IndexCartRequest | null, ign
|
|
|
209
209
|
'page': value['page'],
|
|
210
210
|
'site_id': value['siteId'],
|
|
211
211
|
'source': value['source'],
|
|
212
|
-
'status': value['status'],
|
|
213
212
|
'before_created_at': value['beforeCreatedAt'] == null ? value['beforeCreatedAt'] : value['beforeCreatedAt'].toISOString(),
|
|
214
213
|
'after_created_at': value['afterCreatedAt'] == null ? value['afterCreatedAt'] : value['afterCreatedAt'].toISOString(),
|
|
215
214
|
'before_expiry_date': value['beforeExpiryDate'] == null ? value['beforeExpiryDate'] : value['beforeExpiryDate'].toISOString(),
|
|
@@ -219,6 +218,7 @@ export function IndexCartRequestToJSONTyped(value?: IndexCartRequest | null, ign
|
|
|
219
218
|
'related_id': value['relatedId'],
|
|
220
219
|
'related_type': value['relatedType'],
|
|
221
220
|
'includes_relations': value['includesRelations'],
|
|
221
|
+
'status': value['status'],
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
224
|
|