@digital8/lighting-illusions-ts-sdk 0.0.1839 → 0.0.1841
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 +0 -10
- package/README.md +3 -8
- package/dist/apis/CartsApi.d.ts +6 -6
- package/dist/apis/CartsApi.js +5 -3
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +3 -1
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/AdminCartResource.d.ts +4 -34
- package/dist/models/AdminCartResource.js +10 -32
- package/dist/models/AttachCouponCartRequest.d.ts +2 -2
- package/dist/models/AttachCouponCartRequest.js +3 -3
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/FrontendCartResource.d.ts +0 -12
- package/dist/models/FrontendCartResource.js +0 -8
- package/dist/models/LineItemListResource.d.ts +3 -27
- package/dist/models/LineItemListResource.js +3 -19
- package/dist/models/StoreCartRequest.d.ts +2 -2
- package/dist/models/StoreCartRequest.js +2 -6
- package/dist/models/StoreCartRequestShippingAddress.d.ts +4 -4
- package/dist/models/StoreCartRequestShippingAddress.js +4 -12
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/UpdateCartRequest.d.ts +2 -2
- package/dist/models/UpdateCartRequest.js +2 -6
- package/dist/models/index.d.ts +0 -5
- package/dist/models/index.js +0 -5
- package/docs/AdminCartResource.md +6 -16
- package/docs/AttachCouponCartRequest.md +2 -2
- package/docs/CartsApi.md +8 -8
- package/docs/FrontendCartResource.md +0 -4
- package/docs/LineItemListResource.md +1 -9
- package/package.json +1 -1
- package/src/apis/CartsApi.ts +14 -12
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +3 -2
- package/src/models/AdminCartResource.ts +14 -60
- package/src/models/AttachCouponCartRequest.ts +5 -5
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/FrontendCartResource.ts +0 -18
- package/src/models/LineItemListResource.ts +10 -46
- package/src/models/StoreCartRequest.ts +4 -6
- package/src/models/StoreCartRequestShippingAddress.ts +8 -12
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/UpdateCartRequest.ts +4 -6
- package/src/models/index.ts +0 -5
- package/dist/models/DetachCouponCartRequest.d.ts +0 -32
- package/dist/models/DetachCouponCartRequest.js +0 -51
- package/dist/models/DiscountType.d.ts +0 -26
- package/dist/models/DiscountType.js +0 -52
- package/dist/models/DiscountValueType.d.ts +0 -25
- package/dist/models/DiscountValueType.js +0 -51
- package/dist/models/ProductChildCartLiteResource.d.ts +0 -70
- package/dist/models/ProductChildCartLiteResource.js +0 -77
- package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductChildCartLiteResourceArrayResponse.js +0 -50
- package/docs/DetachCouponCartRequest.md +0 -34
- package/docs/DiscountType.md +0 -32
- package/docs/DiscountValueType.md +0 -32
- package/docs/ProductChildCartLiteResource.md +0 -46
- package/docs/ProductChildCartLiteResourceArrayResponse.md +0 -34
- package/src/models/DetachCouponCartRequest.ts +0 -66
- package/src/models/DiscountType.ts +0 -54
- package/src/models/DiscountValueType.ts +0 -53
- package/src/models/ProductChildCartLiteResource.ts +0 -135
- package/src/models/ProductChildCartLiteResourceArrayResponse.ts +0 -73
package/.openapi-generator/FILES
CHANGED
|
@@ -82,7 +82,6 @@ docs/DestroyAttributeValueRequest.md
|
|
|
82
82
|
docs/DetachAccessoriesProductRangeRequest.md
|
|
83
83
|
docs/DetachAssetableOverlayTemplateRequest.md
|
|
84
84
|
docs/DetachAttributesProductRangeRequest.md
|
|
85
|
-
docs/DetachCouponCartRequest.md
|
|
86
85
|
docs/DetachDocumentablesDocumentRequest.md
|
|
87
86
|
docs/DetachDocumentablesDocumentRequestDocumentablesInner.md
|
|
88
87
|
docs/DetachDocumentsProductChildRequest.md
|
|
@@ -90,8 +89,6 @@ docs/DetachDocumentsProductRangeRequest.md
|
|
|
90
89
|
docs/DetachProductsProductCategoryRequest.md
|
|
91
90
|
docs/DetachStoresSupplierRequest.md
|
|
92
91
|
docs/DetachSuppliersStoreRequest.md
|
|
93
|
-
docs/DiscountType.md
|
|
94
|
-
docs/DiscountValueType.md
|
|
95
92
|
docs/DocumentApi.md
|
|
96
93
|
docs/DocumentFileForUploadResource.md
|
|
97
94
|
docs/DocumentFileForUploadResourceArrayResponse.md
|
|
@@ -287,8 +284,6 @@ docs/ProductChildAttributeGroupedResource.md
|
|
|
287
284
|
docs/ProductChildAttributeGroupedResourceArrayResponse.md
|
|
288
285
|
docs/ProductChildAttributeResource.md
|
|
289
286
|
docs/ProductChildAttributeResourceArrayResponse.md
|
|
290
|
-
docs/ProductChildCartLiteResource.md
|
|
291
|
-
docs/ProductChildCartLiteResourceArrayResponse.md
|
|
292
287
|
docs/ProductChildListResource.md
|
|
293
288
|
docs/ProductChildListResourceArrayResponse.md
|
|
294
289
|
docs/ProductChildLiteResource.md
|
|
@@ -597,7 +592,6 @@ src/models/DestroyAttributeValueRequest.ts
|
|
|
597
592
|
src/models/DetachAccessoriesProductRangeRequest.ts
|
|
598
593
|
src/models/DetachAssetableOverlayTemplateRequest.ts
|
|
599
594
|
src/models/DetachAttributesProductRangeRequest.ts
|
|
600
|
-
src/models/DetachCouponCartRequest.ts
|
|
601
595
|
src/models/DetachDocumentablesDocumentRequest.ts
|
|
602
596
|
src/models/DetachDocumentablesDocumentRequestDocumentablesInner.ts
|
|
603
597
|
src/models/DetachDocumentsProductChildRequest.ts
|
|
@@ -605,8 +599,6 @@ src/models/DetachDocumentsProductRangeRequest.ts
|
|
|
605
599
|
src/models/DetachProductsProductCategoryRequest.ts
|
|
606
600
|
src/models/DetachStoresSupplierRequest.ts
|
|
607
601
|
src/models/DetachSuppliersStoreRequest.ts
|
|
608
|
-
src/models/DiscountType.ts
|
|
609
|
-
src/models/DiscountValueType.ts
|
|
610
602
|
src/models/DocumentFileForUploadResource.ts
|
|
611
603
|
src/models/DocumentFileForUploadResourceArrayResponse.ts
|
|
612
604
|
src/models/DocumentFrontendResource.ts
|
|
@@ -793,8 +785,6 @@ src/models/ProductChildAttributeGroupedResource.ts
|
|
|
793
785
|
src/models/ProductChildAttributeGroupedResourceArrayResponse.ts
|
|
794
786
|
src/models/ProductChildAttributeResource.ts
|
|
795
787
|
src/models/ProductChildAttributeResourceArrayResponse.ts
|
|
796
|
-
src/models/ProductChildCartLiteResource.ts
|
|
797
|
-
src/models/ProductChildCartLiteResourceArrayResponse.ts
|
|
798
788
|
src/models/ProductChildListResource.ts
|
|
799
789
|
src/models/ProductChildListResourceArrayResponse.ts
|
|
800
790
|
src/models/ProductChildLiteResource.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @digital8/lighting-illusions-ts-sdk@0.0.
|
|
1
|
+
# @digital8/lighting-illusions-ts-sdk@0.0.1841
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -77,7 +77,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
77
77
|
*CartsApi* | [**attachCouponCart**](docs/CartsApi.md#attachcouponcartoperation) | **POST** /admin-api/carts/{cart}/coupons/attach | Auto-generated: attachCouponCart
|
|
78
78
|
*CartsApi* | [**attachItemCart**](docs/CartsApi.md#attachitemcartoperation) | **POST** /admin-api/carts/{cart}/items/attach | Auto-generated: attachItemCart
|
|
79
79
|
*CartsApi* | [**destroyCart**](docs/CartsApi.md#destroycart) | **DELETE** /admin-api/carts/{cart}/delete | Auto-generated: destroyCart
|
|
80
|
-
*CartsApi* | [**detachCouponCart**](docs/CartsApi.md#
|
|
80
|
+
*CartsApi* | [**detachCouponCart**](docs/CartsApi.md#detachcouponcart) | **DELETE** /admin-api/carts/{cart}/coupons/{coupon}/detach | Auto-generated: detachCouponCart
|
|
81
81
|
*CartsApi* | [**detachItemCart**](docs/CartsApi.md#detachitemcart) | **DELETE** /admin-api/carts/{cart}/items/{lineItem}/detach | Auto-generated: detachItemCart
|
|
82
82
|
*CartsApi* | [**indexCart**](docs/CartsApi.md#indexcartoperation) | **POST** /admin-api/carts/list | Auto-generated: indexCart
|
|
83
83
|
*CartsApi* | [**sendPaymentLinkCart**](docs/CartsApi.md#sendpaymentlinkcart) | **POST** /admin-api/carts/{cart}/send-payment-link | Auto-generated: sendPaymentLinkCart
|
|
@@ -320,7 +320,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
320
320
|
- [DetachAccessoriesProductRangeRequest](docs/DetachAccessoriesProductRangeRequest.md)
|
|
321
321
|
- [DetachAssetableOverlayTemplateRequest](docs/DetachAssetableOverlayTemplateRequest.md)
|
|
322
322
|
- [DetachAttributesProductRangeRequest](docs/DetachAttributesProductRangeRequest.md)
|
|
323
|
-
- [DetachCouponCartRequest](docs/DetachCouponCartRequest.md)
|
|
324
323
|
- [DetachDocumentablesDocumentRequest](docs/DetachDocumentablesDocumentRequest.md)
|
|
325
324
|
- [DetachDocumentablesDocumentRequestDocumentablesInner](docs/DetachDocumentablesDocumentRequestDocumentablesInner.md)
|
|
326
325
|
- [DetachDocumentsProductChildRequest](docs/DetachDocumentsProductChildRequest.md)
|
|
@@ -328,8 +327,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
328
327
|
- [DetachProductsProductCategoryRequest](docs/DetachProductsProductCategoryRequest.md)
|
|
329
328
|
- [DetachStoresSupplierRequest](docs/DetachStoresSupplierRequest.md)
|
|
330
329
|
- [DetachSuppliersStoreRequest](docs/DetachSuppliersStoreRequest.md)
|
|
331
|
-
- [DiscountType](docs/DiscountType.md)
|
|
332
|
-
- [DiscountValueType](docs/DiscountValueType.md)
|
|
333
330
|
- [DocumentFileForUploadResource](docs/DocumentFileForUploadResource.md)
|
|
334
331
|
- [DocumentFileForUploadResourceArrayResponse](docs/DocumentFileForUploadResourceArrayResponse.md)
|
|
335
332
|
- [DocumentFrontendResource](docs/DocumentFrontendResource.md)
|
|
@@ -516,8 +513,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
516
513
|
- [ProductChildAttributeGroupedResourceArrayResponse](docs/ProductChildAttributeGroupedResourceArrayResponse.md)
|
|
517
514
|
- [ProductChildAttributeResource](docs/ProductChildAttributeResource.md)
|
|
518
515
|
- [ProductChildAttributeResourceArrayResponse](docs/ProductChildAttributeResourceArrayResponse.md)
|
|
519
|
-
- [ProductChildCartLiteResource](docs/ProductChildCartLiteResource.md)
|
|
520
|
-
- [ProductChildCartLiteResourceArrayResponse](docs/ProductChildCartLiteResourceArrayResponse.md)
|
|
521
516
|
- [ProductChildListResource](docs/ProductChildListResource.md)
|
|
522
517
|
- [ProductChildListResourceArrayResponse](docs/ProductChildListResourceArrayResponse.md)
|
|
523
518
|
- [ProductChildLiteResource](docs/ProductChildLiteResource.md)
|
|
@@ -731,7 +726,7 @@ and is automatically generated by the
|
|
|
731
726
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
732
727
|
|
|
733
728
|
- API version: `1.0.0`
|
|
734
|
-
- Package version: `0.0.
|
|
729
|
+
- Package version: `0.0.1841`
|
|
735
730
|
- Generator version: `7.21.0`
|
|
736
731
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
737
732
|
|
package/dist/apis/CartsApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AdminCartResource, AttachCouponCartRequest, AttachItemCartRequest,
|
|
13
|
+
import type { AdminCartResource, AttachCouponCartRequest, AttachItemCartRequest, GenericResponse, IndexCartRequest, PaginatedCartListResourceResponse, StoreCartRequest, UpdateCartRequest, UpdateItemCartRequest } from '../models/index';
|
|
14
14
|
export interface AttachCouponCartOperationRequest {
|
|
15
15
|
cart: number;
|
|
16
16
|
attachCouponCartRequest?: AttachCouponCartRequest;
|
|
@@ -22,9 +22,9 @@ export interface AttachItemCartOperationRequest {
|
|
|
22
22
|
export interface DestroyCartRequest {
|
|
23
23
|
cart: number;
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
25
|
+
export interface DetachCouponCartRequest {
|
|
26
26
|
cart: number;
|
|
27
|
-
|
|
27
|
+
coupon: number;
|
|
28
28
|
}
|
|
29
29
|
export interface DetachItemCartRequest {
|
|
30
30
|
cart: number;
|
|
@@ -94,15 +94,15 @@ export declare class CartsApi extends runtime.BaseAPI {
|
|
|
94
94
|
/**
|
|
95
95
|
* Creates request options for detachCouponCart without sending the request
|
|
96
96
|
*/
|
|
97
|
-
detachCouponCartRequestOpts(requestParameters:
|
|
97
|
+
detachCouponCartRequestOpts(requestParameters: DetachCouponCartRequest): Promise<runtime.RequestOpts>;
|
|
98
98
|
/**
|
|
99
99
|
* Auto-generated: detachCouponCart
|
|
100
100
|
*/
|
|
101
|
-
detachCouponCartRaw(requestParameters:
|
|
101
|
+
detachCouponCartRaw(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminCartResource>>;
|
|
102
102
|
/**
|
|
103
103
|
* Auto-generated: detachCouponCart
|
|
104
104
|
*/
|
|
105
|
-
detachCouponCart(requestParameters:
|
|
105
|
+
detachCouponCart(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCartResource>;
|
|
106
106
|
/**
|
|
107
107
|
* Creates request options for detachItemCart without sending the request
|
|
108
108
|
*/
|
package/dist/apis/CartsApi.js
CHANGED
|
@@ -266,17 +266,19 @@ var CartsApi = /** @class */ (function (_super) {
|
|
|
266
266
|
if (requestParameters['cart'] == null) {
|
|
267
267
|
throw new runtime.RequiredError('cart', 'Required parameter "cart" was null or undefined when calling detachCouponCart().');
|
|
268
268
|
}
|
|
269
|
+
if (requestParameters['coupon'] == null) {
|
|
270
|
+
throw new runtime.RequiredError('coupon', 'Required parameter "coupon" was null or undefined when calling detachCouponCart().');
|
|
271
|
+
}
|
|
269
272
|
queryParameters = {};
|
|
270
273
|
headerParameters = {};
|
|
271
|
-
|
|
272
|
-
urlPath = "/admin-api/carts/{cart}/coupons/detach";
|
|
274
|
+
urlPath = "/admin-api/carts/{cart}/coupons/{coupon}/detach";
|
|
273
275
|
urlPath = urlPath.replace("{".concat("cart", "}"), encodeURIComponent(String(requestParameters['cart'])));
|
|
276
|
+
urlPath = urlPath.replace("{".concat("coupon", "}"), encodeURIComponent(String(requestParameters['coupon'])));
|
|
274
277
|
return [2 /*return*/, {
|
|
275
278
|
path: urlPath,
|
|
276
279
|
method: 'DELETE',
|
|
277
280
|
headers: headerParameters,
|
|
278
281
|
query: queryParameters,
|
|
279
|
-
body: (0, index_1.DetachCouponCartRequestToJSON)(requestParameters['detachCouponCartRequest']),
|
|
280
282
|
}];
|
|
281
283
|
});
|
|
282
284
|
});
|
|
@@ -26,6 +26,8 @@ function instanceOfAddressFrontendResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('line1' in value) || value['line1'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('line2' in value) || value['line2'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
if (!('postcode' in value) || value['postcode'] === undefined)
|
|
30
32
|
return false;
|
|
31
33
|
if (!('suburb' in value) || value['suburb'] === undefined)
|
|
@@ -48,7 +50,7 @@ function AddressFrontendResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
50
|
return {
|
|
49
51
|
'company': json['company'],
|
|
50
52
|
'line1': json['line1'],
|
|
51
|
-
'line2': json['line2']
|
|
53
|
+
'line2': json['line2'],
|
|
52
54
|
'postcode': json['postcode'],
|
|
53
55
|
'suburb': json['suburb'],
|
|
54
56
|
'country': json['country'],
|
|
@@ -22,6 +22,8 @@ exports.AddressResourceToJSONTyped = AddressResourceToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the AddressResource interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfAddressResource(value) {
|
|
25
|
+
if (!('company' in value) || value['company'] === undefined)
|
|
26
|
+
return false;
|
|
25
27
|
if (!('line1' in value) || value['line1'] === undefined)
|
|
26
28
|
return false;
|
|
27
29
|
if (!('postcode' in value) || value['postcode'] === undefined)
|
|
@@ -45,7 +47,7 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
47
|
}
|
|
46
48
|
return {
|
|
47
49
|
'id': json['id'] == null ? undefined : json['id'],
|
|
48
|
-
'company': json['company']
|
|
50
|
+
'company': json['company'],
|
|
49
51
|
'line1': json['line_1'],
|
|
50
52
|
'line2': json['line_2'] == null ? undefined : json['line_2'],
|
|
51
53
|
'postcode': json['postcode'],
|
|
@@ -108,7 +108,7 @@ export interface AdminCartResource {
|
|
|
108
108
|
* @type {number}
|
|
109
109
|
* @memberof AdminCartResource
|
|
110
110
|
*/
|
|
111
|
-
insuranceAmount
|
|
111
|
+
insuranceAmount?: number | null;
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
114
|
* @type {boolean}
|
|
@@ -163,12 +163,6 @@ export interface AdminCartResource {
|
|
|
163
163
|
* @memberof AdminCartResource
|
|
164
164
|
*/
|
|
165
165
|
billingAddress: AddressResource | null;
|
|
166
|
-
/**
|
|
167
|
-
*
|
|
168
|
-
* @type {number}
|
|
169
|
-
* @memberof AdminCartResource
|
|
170
|
-
*/
|
|
171
|
-
discountPreview: number;
|
|
172
166
|
/**
|
|
173
167
|
*
|
|
174
168
|
* @type {number}
|
|
@@ -180,43 +174,19 @@ export interface AdminCartResource {
|
|
|
180
174
|
* @type {number}
|
|
181
175
|
* @memberof AdminCartResource
|
|
182
176
|
*/
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
*
|
|
186
|
-
* @type {number}
|
|
187
|
-
* @memberof AdminCartResource
|
|
188
|
-
*/
|
|
189
|
-
total: number;
|
|
190
|
-
/**
|
|
191
|
-
*
|
|
192
|
-
* @type {number}
|
|
193
|
-
* @memberof AdminCartResource
|
|
194
|
-
*/
|
|
195
|
-
discountAmount: number;
|
|
196
|
-
/**
|
|
197
|
-
*
|
|
198
|
-
* @type {number}
|
|
199
|
-
* @memberof AdminCartResource
|
|
200
|
-
*/
|
|
201
|
-
productDiscountAmount: number;
|
|
202
|
-
/**
|
|
203
|
-
*
|
|
204
|
-
* @type {number}
|
|
205
|
-
* @memberof AdminCartResource
|
|
206
|
-
*/
|
|
207
|
-
shippingDiscountAmount: number;
|
|
177
|
+
discountPreview: number;
|
|
208
178
|
/**
|
|
209
179
|
*
|
|
210
180
|
* @type {number}
|
|
211
181
|
* @memberof AdminCartResource
|
|
212
182
|
*/
|
|
213
|
-
|
|
183
|
+
shippingEstimate: number;
|
|
214
184
|
/**
|
|
215
185
|
*
|
|
216
186
|
* @type {number}
|
|
217
187
|
* @memberof AdminCartResource
|
|
218
188
|
*/
|
|
219
|
-
|
|
189
|
+
insuranceEstimate: number;
|
|
220
190
|
/**
|
|
221
191
|
*
|
|
222
192
|
* @type {string}
|
|
@@ -36,8 +36,6 @@ function instanceOfAdminCartResource(value) {
|
|
|
36
36
|
return false;
|
|
37
37
|
if (!('overrideShipping' in value) || value['overrideShipping'] === undefined)
|
|
38
38
|
return false;
|
|
39
|
-
if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined)
|
|
40
|
-
return false;
|
|
41
39
|
if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined)
|
|
42
40
|
return false;
|
|
43
41
|
if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined)
|
|
@@ -56,23 +54,13 @@ function instanceOfAdminCartResource(value) {
|
|
|
56
54
|
return false;
|
|
57
55
|
if (!('billingAddress' in value) || value['billingAddress'] === undefined)
|
|
58
56
|
return false;
|
|
59
|
-
if (!('discountPreview' in value) || value['discountPreview'] === undefined)
|
|
60
|
-
return false;
|
|
61
57
|
if (!('subtotal' in value) || value['subtotal'] === undefined)
|
|
62
58
|
return false;
|
|
63
|
-
if (!('
|
|
64
|
-
return false;
|
|
65
|
-
if (!('total' in value) || value['total'] === undefined)
|
|
66
|
-
return false;
|
|
67
|
-
if (!('discountAmount' in value) || value['discountAmount'] === undefined)
|
|
68
|
-
return false;
|
|
69
|
-
if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined)
|
|
70
|
-
return false;
|
|
71
|
-
if (!('shippingDiscountAmount' in value) || value['shippingDiscountAmount'] === undefined)
|
|
59
|
+
if (!('discountPreview' in value) || value['discountPreview'] === undefined)
|
|
72
60
|
return false;
|
|
73
|
-
if (!('
|
|
61
|
+
if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined)
|
|
74
62
|
return false;
|
|
75
|
-
if (!('
|
|
63
|
+
if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined)
|
|
76
64
|
return false;
|
|
77
65
|
if (!('status' in value) || value['status'] === undefined)
|
|
78
66
|
return false;
|
|
@@ -100,7 +88,7 @@ function AdminCartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
100
88
|
'shippingType': json['shipping_type'],
|
|
101
89
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
102
90
|
'overrideShipping': json['override_shipping'],
|
|
103
|
-
'insuranceAmount': json['insurance_amount'],
|
|
91
|
+
'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
|
|
104
92
|
'overrideInsurance': json['override_insurance'],
|
|
105
93
|
'useAsBillingAddress': json['use_as_billing_address'],
|
|
106
94
|
'admin': json['admin'],
|
|
@@ -110,15 +98,10 @@ function AdminCartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
110
98
|
'coupons': json['coupons'],
|
|
111
99
|
'shippingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['shipping_address']),
|
|
112
100
|
'billingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['billing_address']),
|
|
113
|
-
'discountPreview': json['discount_preview'],
|
|
114
101
|
'subtotal': json['subtotal'],
|
|
115
|
-
'
|
|
116
|
-
'
|
|
117
|
-
'
|
|
118
|
-
'productDiscountAmount': json['product_discount_amount'],
|
|
119
|
-
'shippingDiscountAmount': json['shipping_discount_amount'],
|
|
120
|
-
'cartDiscountAmount': json['cart_discount_amount'],
|
|
121
|
-
'finalTotalAmount': json['final_total_amount'],
|
|
102
|
+
'discountPreview': json['discount_preview'],
|
|
103
|
+
'shippingEstimate': json['shipping_estimate'],
|
|
104
|
+
'insuranceEstimate': json['insurance_estimate'],
|
|
122
105
|
'status': json['status'],
|
|
123
106
|
};
|
|
124
107
|
}
|
|
@@ -155,15 +138,10 @@ function AdminCartResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
155
138
|
'coupons': value['coupons'],
|
|
156
139
|
'shipping_address': (0, AddressResource_1.AddressResourceToJSON)(value['shippingAddress']),
|
|
157
140
|
'billing_address': (0, AddressResource_1.AddressResourceToJSON)(value['billingAddress']),
|
|
158
|
-
'discount_preview': value['discountPreview'],
|
|
159
141
|
'subtotal': value['subtotal'],
|
|
160
|
-
'
|
|
161
|
-
'
|
|
162
|
-
'
|
|
163
|
-
'product_discount_amount': value['productDiscountAmount'],
|
|
164
|
-
'shipping_discount_amount': value['shippingDiscountAmount'],
|
|
165
|
-
'cart_discount_amount': value['cartDiscountAmount'],
|
|
166
|
-
'final_total_amount': value['finalTotalAmount'],
|
|
142
|
+
'discount_preview': value['discountPreview'],
|
|
143
|
+
'shipping_estimate': value['shippingEstimate'],
|
|
144
|
+
'insurance_estimate': value['insuranceEstimate'],
|
|
167
145
|
'status': value['status'],
|
|
168
146
|
};
|
|
169
147
|
}
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
export interface AttachCouponCartRequest {
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
20
|
-
* @type {
|
|
20
|
+
* @type {number}
|
|
21
21
|
* @memberof AttachCouponCartRequest
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
couponId: number;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Check if a given object implements the AttachCouponCartRequest interface.
|
|
@@ -22,7 +22,7 @@ exports.AttachCouponCartRequestToJSONTyped = AttachCouponCartRequestToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the AttachCouponCartRequest interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfAttachCouponCartRequest(value) {
|
|
25
|
-
if (!('
|
|
25
|
+
if (!('couponId' in value) || value['couponId'] === undefined)
|
|
26
26
|
return false;
|
|
27
27
|
return true;
|
|
28
28
|
}
|
|
@@ -34,7 +34,7 @@ function AttachCouponCartRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
34
34
|
return json;
|
|
35
35
|
}
|
|
36
36
|
return {
|
|
37
|
-
'
|
|
37
|
+
'couponId': json['coupon_id'],
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function AttachCouponCartRequestToJSON(json) {
|
|
@@ -46,6 +46,6 @@ function AttachCouponCartRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
46
46
|
return value;
|
|
47
47
|
}
|
|
48
48
|
return {
|
|
49
|
-
'
|
|
49
|
+
'coupon_id': value['couponId'],
|
|
50
50
|
};
|
|
51
51
|
}
|
|
@@ -37,8 +37,6 @@ function instanceOfExternalApiLogResource(value) {
|
|
|
37
37
|
return false;
|
|
38
38
|
if (!('responseCode' in value) || value['responseCode'] === undefined)
|
|
39
39
|
return false;
|
|
40
|
-
if (!('requestPayload' in value) || value['requestPayload'] === undefined)
|
|
41
|
-
return false;
|
|
42
40
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined)
|
|
43
41
|
return false;
|
|
44
42
|
if (!('site' in value) || value['site'] === undefined)
|
|
@@ -60,7 +58,7 @@ function ExternalApiLogResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
58
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
61
59
|
'endpoint': json['endpoint'],
|
|
62
60
|
'responseCode': json['responseCode'],
|
|
63
|
-
'requestPayload': json['requestPayload'],
|
|
61
|
+
'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
|
|
64
62
|
'responsePayload': json['responsePayload'],
|
|
65
63
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
66
64
|
'site': (0, SiteLiteResource_1.SiteLiteResourceFromJSON)(json['site']),
|
|
@@ -133,18 +133,6 @@ export interface FrontendCartResource {
|
|
|
133
133
|
* @memberof FrontendCartResource
|
|
134
134
|
*/
|
|
135
135
|
discountPreview: number;
|
|
136
|
-
/**
|
|
137
|
-
*
|
|
138
|
-
* @type {number}
|
|
139
|
-
* @memberof FrontendCartResource
|
|
140
|
-
*/
|
|
141
|
-
totalSubtotalDiscount: number;
|
|
142
|
-
/**
|
|
143
|
-
*
|
|
144
|
-
* @type {number}
|
|
145
|
-
* @memberof FrontendCartResource
|
|
146
|
-
*/
|
|
147
|
-
totalShippingDiscount: number;
|
|
148
136
|
/**
|
|
149
137
|
*
|
|
150
138
|
* @type {number}
|
|
@@ -50,10 +50,6 @@ function instanceOfFrontendCartResource(value) {
|
|
|
50
50
|
return false;
|
|
51
51
|
if (!('discountPreview' in value) || value['discountPreview'] === undefined)
|
|
52
52
|
return false;
|
|
53
|
-
if (!('totalSubtotalDiscount' in value) || value['totalSubtotalDiscount'] === undefined)
|
|
54
|
-
return false;
|
|
55
|
-
if (!('totalShippingDiscount' in value) || value['totalShippingDiscount'] === undefined)
|
|
56
|
-
return false;
|
|
57
53
|
if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined)
|
|
58
54
|
return false;
|
|
59
55
|
if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined)
|
|
@@ -89,8 +85,6 @@ function FrontendCartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
89
85
|
'billingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['billing_address']),
|
|
90
86
|
'subtotal': json['subtotal'],
|
|
91
87
|
'discountPreview': json['discount_preview'],
|
|
92
|
-
'totalSubtotalDiscount': json['total_subtotal_discount'],
|
|
93
|
-
'totalShippingDiscount': json['total_shipping_discount'],
|
|
94
88
|
'shippingEstimate': json['shipping_estimate'],
|
|
95
89
|
'insuranceEstimate': json['insurance_estimate'],
|
|
96
90
|
'status': json['status'],
|
|
@@ -124,8 +118,6 @@ function FrontendCartResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
124
118
|
'billing_address': (0, AddressResource_1.AddressResourceToJSON)(value['billingAddress']),
|
|
125
119
|
'subtotal': value['subtotal'],
|
|
126
120
|
'discount_preview': value['discountPreview'],
|
|
127
|
-
'total_subtotal_discount': value['totalSubtotalDiscount'],
|
|
128
|
-
'total_shipping_discount': value['totalShippingDiscount'],
|
|
129
121
|
'shipping_estimate': value['shippingEstimate'],
|
|
130
122
|
'insurance_estimate': value['insuranceEstimate'],
|
|
131
123
|
'status': value['status'],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { ProductChildListResource } from './ProductChildListResource';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -36,34 +36,10 @@ export interface LineItemListResource {
|
|
|
36
36
|
productPrice: number;
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
|
-
* @type {
|
|
40
|
-
* @memberof LineItemListResource
|
|
41
|
-
*/
|
|
42
|
-
productDiscount: number;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @type {number}
|
|
46
|
-
* @memberof LineItemListResource
|
|
47
|
-
*/
|
|
48
|
-
totalDiscount: number;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @type {number}
|
|
52
|
-
* @memberof LineItemListResource
|
|
53
|
-
*/
|
|
54
|
-
lineSubtotal: number;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @type {Array<boolean>}
|
|
58
|
-
* @memberof LineItemListResource
|
|
59
|
-
*/
|
|
60
|
-
discounts: Array<boolean>;
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @type {ProductChildCartLiteResource}
|
|
39
|
+
* @type {ProductChildListResource}
|
|
64
40
|
* @memberof LineItemListResource
|
|
65
41
|
*/
|
|
66
|
-
productChild:
|
|
42
|
+
productChild: ProductChildListResource | null;
|
|
67
43
|
}
|
|
68
44
|
/**
|
|
69
45
|
* Check if a given object implements the LineItemListResource interface.
|
|
@@ -18,7 +18,7 @@ exports.LineItemListResourceFromJSON = LineItemListResourceFromJSON;
|
|
|
18
18
|
exports.LineItemListResourceFromJSONTyped = LineItemListResourceFromJSONTyped;
|
|
19
19
|
exports.LineItemListResourceToJSON = LineItemListResourceToJSON;
|
|
20
20
|
exports.LineItemListResourceToJSONTyped = LineItemListResourceToJSONTyped;
|
|
21
|
-
var
|
|
21
|
+
var ProductChildListResource_1 = require("./ProductChildListResource");
|
|
22
22
|
/**
|
|
23
23
|
* Check if a given object implements the LineItemListResource interface.
|
|
24
24
|
*/
|
|
@@ -27,14 +27,6 @@ function instanceOfLineItemListResource(value) {
|
|
|
27
27
|
return false;
|
|
28
28
|
if (!('productPrice' in value) || value['productPrice'] === undefined)
|
|
29
29
|
return false;
|
|
30
|
-
if (!('productDiscount' in value) || value['productDiscount'] === undefined)
|
|
31
|
-
return false;
|
|
32
|
-
if (!('totalDiscount' in value) || value['totalDiscount'] === undefined)
|
|
33
|
-
return false;
|
|
34
|
-
if (!('lineSubtotal' in value) || value['lineSubtotal'] === undefined)
|
|
35
|
-
return false;
|
|
36
|
-
if (!('discounts' in value) || value['discounts'] === undefined)
|
|
37
|
-
return false;
|
|
38
30
|
if (!('productChild' in value) || value['productChild'] === undefined)
|
|
39
31
|
return false;
|
|
40
32
|
return true;
|
|
@@ -50,11 +42,7 @@ function LineItemListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
42
|
'id': json['id'] == null ? undefined : json['id'],
|
|
51
43
|
'quantity': json['quantity'],
|
|
52
44
|
'productPrice': json['product_price'],
|
|
53
|
-
'
|
|
54
|
-
'totalDiscount': json['total_discount'],
|
|
55
|
-
'lineSubtotal': json['line_subtotal'],
|
|
56
|
-
'discounts': json['discounts'],
|
|
57
|
-
'productChild': (0, ProductChildCartLiteResource_1.ProductChildCartLiteResourceFromJSON)(json['product_child']),
|
|
45
|
+
'productChild': (0, ProductChildListResource_1.ProductChildListResourceFromJSON)(json['product_child']),
|
|
58
46
|
};
|
|
59
47
|
}
|
|
60
48
|
function LineItemListResourceToJSON(json) {
|
|
@@ -69,10 +57,6 @@ function LineItemListResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
69
57
|
'id': value['id'],
|
|
70
58
|
'quantity': value['quantity'],
|
|
71
59
|
'product_price': value['productPrice'],
|
|
72
|
-
'
|
|
73
|
-
'total_discount': value['totalDiscount'],
|
|
74
|
-
'line_subtotal': value['lineSubtotal'],
|
|
75
|
-
'discounts': value['discounts'],
|
|
76
|
-
'product_child': (0, ProductChildCartLiteResource_1.ProductChildCartLiteResourceToJSON)(value['productChild']),
|
|
60
|
+
'product_child': (0, ProductChildListResource_1.ProductChildListResourceToJSON)(value['productChild']),
|
|
77
61
|
};
|
|
78
62
|
}
|
|
@@ -101,13 +101,13 @@ export interface StoreCartRequest {
|
|
|
101
101
|
* @type {StoreCartRequestShippingAddress}
|
|
102
102
|
* @memberof StoreCartRequest
|
|
103
103
|
*/
|
|
104
|
-
shippingAddress
|
|
104
|
+
shippingAddress?: StoreCartRequestShippingAddress;
|
|
105
105
|
/**
|
|
106
106
|
*
|
|
107
107
|
* @type {StoreCartRequestShippingAddress}
|
|
108
108
|
* @memberof StoreCartRequest
|
|
109
109
|
*/
|
|
110
|
-
billingAddress
|
|
110
|
+
billingAddress?: StoreCartRequestShippingAddress;
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* @export
|
|
@@ -51,10 +51,6 @@ function instanceOfStoreCartRequest(value) {
|
|
|
51
51
|
return false;
|
|
52
52
|
if (!('source' in value) || value['source'] === undefined)
|
|
53
53
|
return false;
|
|
54
|
-
if (!('shippingAddress' in value) || value['shippingAddress'] === undefined)
|
|
55
|
-
return false;
|
|
56
|
-
if (!('billingAddress' in value) || value['billingAddress'] === undefined)
|
|
57
|
-
return false;
|
|
58
54
|
return true;
|
|
59
55
|
}
|
|
60
56
|
function StoreCartRequestFromJSON(json) {
|
|
@@ -78,8 +74,8 @@ function StoreCartRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
78
74
|
'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
|
|
79
75
|
'overrideInsurance': json['override_insurance'] == null ? undefined : json['override_insurance'],
|
|
80
76
|
'useAsBillingAddress': json['use_as_billing_address'] == null ? undefined : json['use_as_billing_address'],
|
|
81
|
-
'shippingAddress': (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['shipping_address']),
|
|
82
|
-
'billingAddress': (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['billing_address']),
|
|
77
|
+
'shippingAddress': json['shipping_address'] == null ? undefined : (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['shipping_address']),
|
|
78
|
+
'billingAddress': json['billing_address'] == null ? undefined : (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['billing_address']),
|
|
83
79
|
};
|
|
84
80
|
}
|
|
85
81
|
function StoreCartRequestToJSON(json) {
|