@digital8/lighting-illusions-ts-sdk 0.0.1859 → 0.0.1861
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 -14
- package/README.md +3 -10
- 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 +6 -0
- package/dist/models/AddressResource.js +2 -0
- package/dist/models/AttachCouponCartRequest.d.ts +2 -2
- package/dist/models/AttachCouponCartRequest.js +3 -3
- package/dist/models/CartResource.d.ts +4 -34
- package/dist/models/CartResource.js +10 -32
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/LineItemListResource.d.ts +3 -27
- package/dist/models/LineItemListResource.js +3 -19
- package/dist/models/StoreCartRequest.d.ts +12 -0
- package/dist/models/StoreCartRequest.js +4 -0
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +3 -1
- package/dist/models/UpdateCartRequest.d.ts +12 -0
- package/dist/models/UpdateCartRequest.js +4 -0
- package/dist/models/index.d.ts +0 -7
- package/dist/models/index.js +0 -7
- package/docs/AddressResource.md +2 -0
- package/docs/AttachCouponCartRequest.md +2 -2
- package/docs/CartResource.md +6 -16
- package/docs/CartsApi.md +8 -8
- package/docs/LineItemListResource.md +1 -9
- package/docs/StoreCartRequest.md +4 -0
- package/docs/StoreSpecialDateResource.md +1 -1
- package/docs/UpdateCartRequest.md +4 -0
- package/package.json +1 -1
- package/src/apis/CartsApi.ts +14 -12
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +8 -0
- package/src/models/AttachCouponCartRequest.ts +5 -5
- package/src/models/CartResource.ts +14 -60
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/LineItemListResource.ts +10 -46
- package/src/models/StoreCartRequest.ts +16 -0
- package/src/models/StoreSpecialDateResource.ts +4 -3
- package/src/models/UpdateCartRequest.ts +16 -0
- package/src/models/index.ts +0 -7
- 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/LineItemDiscountResource.d.ts +0 -44
- package/dist/models/LineItemDiscountResource.js +0 -59
- package/dist/models/LineItemDiscountResourceArrayResponse.d.ts +0 -33
- package/dist/models/LineItemDiscountResourceArrayResponse.js +0 -50
- 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/LineItemDiscountResource.md +0 -38
- package/docs/LineItemDiscountResourceArrayResponse.md +0 -34
- 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/LineItemDiscountResource.ts +0 -84
- package/src/models/LineItemDiscountResourceArrayResponse.ts +0 -73
- 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
|
|
@@ -171,8 +168,6 @@ docs/LabelResource.md
|
|
|
171
168
|
docs/LabelResourceArrayResponse.md
|
|
172
169
|
docs/LiAddressResource.md
|
|
173
170
|
docs/LiAddressResourceArrayResponse.md
|
|
174
|
-
docs/LineItemDiscountResource.md
|
|
175
|
-
docs/LineItemDiscountResourceArrayResponse.md
|
|
176
171
|
docs/LineItemListResource.md
|
|
177
172
|
docs/LineItemListResourceArrayResponse.md
|
|
178
173
|
docs/ListAssetsProductRegistrationRequest.md
|
|
@@ -287,8 +282,6 @@ docs/ProductChildAttributeGroupedResource.md
|
|
|
287
282
|
docs/ProductChildAttributeGroupedResourceArrayResponse.md
|
|
288
283
|
docs/ProductChildAttributeResource.md
|
|
289
284
|
docs/ProductChildAttributeResourceArrayResponse.md
|
|
290
|
-
docs/ProductChildCartLiteResource.md
|
|
291
|
-
docs/ProductChildCartLiteResourceArrayResponse.md
|
|
292
285
|
docs/ProductChildListResource.md
|
|
293
286
|
docs/ProductChildListResourceArrayResponse.md
|
|
294
287
|
docs/ProductChildLiteResource.md
|
|
@@ -597,7 +590,6 @@ src/models/DestroyAttributeValueRequest.ts
|
|
|
597
590
|
src/models/DetachAccessoriesProductRangeRequest.ts
|
|
598
591
|
src/models/DetachAssetableOverlayTemplateRequest.ts
|
|
599
592
|
src/models/DetachAttributesProductRangeRequest.ts
|
|
600
|
-
src/models/DetachCouponCartRequest.ts
|
|
601
593
|
src/models/DetachDocumentablesDocumentRequest.ts
|
|
602
594
|
src/models/DetachDocumentablesDocumentRequestDocumentablesInner.ts
|
|
603
595
|
src/models/DetachDocumentsProductChildRequest.ts
|
|
@@ -605,8 +597,6 @@ src/models/DetachDocumentsProductRangeRequest.ts
|
|
|
605
597
|
src/models/DetachProductsProductCategoryRequest.ts
|
|
606
598
|
src/models/DetachStoresSupplierRequest.ts
|
|
607
599
|
src/models/DetachSuppliersStoreRequest.ts
|
|
608
|
-
src/models/DiscountType.ts
|
|
609
|
-
src/models/DiscountValueType.ts
|
|
610
600
|
src/models/DocumentFileForUploadResource.ts
|
|
611
601
|
src/models/DocumentFileForUploadResourceArrayResponse.ts
|
|
612
602
|
src/models/DocumentFrontendResource.ts
|
|
@@ -682,8 +672,6 @@ src/models/LabelResource.ts
|
|
|
682
672
|
src/models/LabelResourceArrayResponse.ts
|
|
683
673
|
src/models/LiAddressResource.ts
|
|
684
674
|
src/models/LiAddressResourceArrayResponse.ts
|
|
685
|
-
src/models/LineItemDiscountResource.ts
|
|
686
|
-
src/models/LineItemDiscountResourceArrayResponse.ts
|
|
687
675
|
src/models/LineItemListResource.ts
|
|
688
676
|
src/models/LineItemListResourceArrayResponse.ts
|
|
689
677
|
src/models/ListAssetsProductRegistrationRequest.ts
|
|
@@ -793,8 +781,6 @@ src/models/ProductChildAttributeGroupedResource.ts
|
|
|
793
781
|
src/models/ProductChildAttributeGroupedResourceArrayResponse.ts
|
|
794
782
|
src/models/ProductChildAttributeResource.ts
|
|
795
783
|
src/models/ProductChildAttributeResourceArrayResponse.ts
|
|
796
|
-
src/models/ProductChildCartLiteResource.ts
|
|
797
|
-
src/models/ProductChildCartLiteResourceArrayResponse.ts
|
|
798
784
|
src/models/ProductChildListResource.ts
|
|
799
785
|
src/models/ProductChildListResourceArrayResponse.ts
|
|
800
786
|
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.1861
|
|
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)
|
|
@@ -405,8 +402,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
405
402
|
- [LabelResourceArrayResponse](docs/LabelResourceArrayResponse.md)
|
|
406
403
|
- [LiAddressResource](docs/LiAddressResource.md)
|
|
407
404
|
- [LiAddressResourceArrayResponse](docs/LiAddressResourceArrayResponse.md)
|
|
408
|
-
- [LineItemDiscountResource](docs/LineItemDiscountResource.md)
|
|
409
|
-
- [LineItemDiscountResourceArrayResponse](docs/LineItemDiscountResourceArrayResponse.md)
|
|
410
405
|
- [LineItemListResource](docs/LineItemListResource.md)
|
|
411
406
|
- [LineItemListResourceArrayResponse](docs/LineItemListResourceArrayResponse.md)
|
|
412
407
|
- [ListAssetsProductRegistrationRequest](docs/ListAssetsProductRegistrationRequest.md)
|
|
@@ -516,8 +511,6 @@ All URIs are relative to *http://localhost/api*
|
|
|
516
511
|
- [ProductChildAttributeGroupedResourceArrayResponse](docs/ProductChildAttributeGroupedResourceArrayResponse.md)
|
|
517
512
|
- [ProductChildAttributeResource](docs/ProductChildAttributeResource.md)
|
|
518
513
|
- [ProductChildAttributeResourceArrayResponse](docs/ProductChildAttributeResourceArrayResponse.md)
|
|
519
|
-
- [ProductChildCartLiteResource](docs/ProductChildCartLiteResource.md)
|
|
520
|
-
- [ProductChildCartLiteResourceArrayResponse](docs/ProductChildCartLiteResourceArrayResponse.md)
|
|
521
514
|
- [ProductChildListResource](docs/ProductChildListResource.md)
|
|
522
515
|
- [ProductChildListResourceArrayResponse](docs/ProductChildListResourceArrayResponse.md)
|
|
523
516
|
- [ProductChildLiteResource](docs/ProductChildLiteResource.md)
|
|
@@ -731,7 +724,7 @@ and is automatically generated by the
|
|
|
731
724
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
732
725
|
|
|
733
726
|
- API version: `1.0.0`
|
|
734
|
-
- Package version: `0.0.
|
|
727
|
+
- Package version: `0.0.1861`
|
|
735
728
|
- Generator version: `7.21.0`
|
|
736
729
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
737
730
|
|
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 { AttachCouponCartRequest, AttachItemCartRequest, CartResource,
|
|
13
|
+
import type { AttachCouponCartRequest, AttachItemCartRequest, CartResource, 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<CartResource>>;
|
|
102
102
|
/**
|
|
103
103
|
* Auto-generated: detachCouponCart
|
|
104
104
|
*/
|
|
105
|
-
detachCouponCart(requestParameters:
|
|
105
|
+
detachCouponCart(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource>;
|
|
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
|
});
|
|
@@ -22,6 +22,8 @@ exports.AddressFrontendResourceToJSONTyped = AddressFrontendResourceToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the AddressFrontendResource interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfAddressFrontendResource(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)
|
|
@@ -44,7 +46,7 @@ function AddressFrontendResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
46
|
return json;
|
|
45
47
|
}
|
|
46
48
|
return {
|
|
47
|
-
'company': json['company']
|
|
49
|
+
'company': json['company'],
|
|
48
50
|
'line1': json['line1'],
|
|
49
51
|
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
50
52
|
'postcode': json['postcode'],
|
|
@@ -49,6 +49,7 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
49
|
}
|
|
50
50
|
return {
|
|
51
51
|
'id': json['id'] == null ? undefined : json['id'],
|
|
52
|
+
'sourceAddressId': json['source_address_id'] == null ? undefined : json['source_address_id'],
|
|
52
53
|
'company': json['company'],
|
|
53
54
|
'line1': json['line_1'],
|
|
54
55
|
'line2': json['line_2'],
|
|
@@ -69,6 +70,7 @@ function AddressResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
69
70
|
}
|
|
70
71
|
return {
|
|
71
72
|
'id': value['id'],
|
|
73
|
+
'source_address_id': value['sourceAddressId'],
|
|
72
74
|
'company': value['company'],
|
|
73
75
|
'line_1': value['line1'],
|
|
74
76
|
'line_2': value['line2'],
|
|
@@ -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
|
}
|
|
@@ -114,7 +114,7 @@ export interface CartResource {
|
|
|
114
114
|
* @type {number}
|
|
115
115
|
* @memberof CartResource
|
|
116
116
|
*/
|
|
117
|
-
insuranceAmount
|
|
117
|
+
insuranceAmount?: number | null;
|
|
118
118
|
/**
|
|
119
119
|
*
|
|
120
120
|
* @type {boolean}
|
|
@@ -169,12 +169,6 @@ export interface CartResource {
|
|
|
169
169
|
* @memberof CartResource
|
|
170
170
|
*/
|
|
171
171
|
billingAddress: AddressResource | null;
|
|
172
|
-
/**
|
|
173
|
-
*
|
|
174
|
-
* @type {number}
|
|
175
|
-
* @memberof CartResource
|
|
176
|
-
*/
|
|
177
|
-
discountPreview: number;
|
|
178
172
|
/**
|
|
179
173
|
*
|
|
180
174
|
* @type {number}
|
|
@@ -186,43 +180,19 @@ export interface CartResource {
|
|
|
186
180
|
* @type {number}
|
|
187
181
|
* @memberof CartResource
|
|
188
182
|
*/
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
*
|
|
192
|
-
* @type {number}
|
|
193
|
-
* @memberof CartResource
|
|
194
|
-
*/
|
|
195
|
-
total: number;
|
|
196
|
-
/**
|
|
197
|
-
*
|
|
198
|
-
* @type {number}
|
|
199
|
-
* @memberof CartResource
|
|
200
|
-
*/
|
|
201
|
-
discountAmount: number;
|
|
202
|
-
/**
|
|
203
|
-
*
|
|
204
|
-
* @type {number}
|
|
205
|
-
* @memberof CartResource
|
|
206
|
-
*/
|
|
207
|
-
productDiscountAmount: number;
|
|
208
|
-
/**
|
|
209
|
-
*
|
|
210
|
-
* @type {number}
|
|
211
|
-
* @memberof CartResource
|
|
212
|
-
*/
|
|
213
|
-
shippingDiscountAmount: number;
|
|
183
|
+
discountPreview: number;
|
|
214
184
|
/**
|
|
215
185
|
*
|
|
216
186
|
* @type {number}
|
|
217
187
|
* @memberof CartResource
|
|
218
188
|
*/
|
|
219
|
-
|
|
189
|
+
shippingEstimate: number;
|
|
220
190
|
/**
|
|
221
191
|
*
|
|
222
192
|
* @type {number}
|
|
223
193
|
* @memberof CartResource
|
|
224
194
|
*/
|
|
225
|
-
|
|
195
|
+
insuranceEstimate: number;
|
|
226
196
|
/**
|
|
227
197
|
*
|
|
228
198
|
* @type {string}
|
|
@@ -36,8 +36,6 @@ function instanceOfCartResource(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 instanceOfCartResource(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;
|
|
@@ -101,7 +89,7 @@ function CartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
101
89
|
'shippingType': json['shipping_type'],
|
|
102
90
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
103
91
|
'overrideShipping': json['override_shipping'],
|
|
104
|
-
'insuranceAmount': json['insurance_amount'],
|
|
92
|
+
'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
|
|
105
93
|
'overrideInsurance': json['override_insurance'],
|
|
106
94
|
'useAsBillingAddress': json['use_as_billing_address'],
|
|
107
95
|
'admin': json['admin'],
|
|
@@ -111,15 +99,10 @@ function CartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
111
99
|
'coupons': json['coupons'],
|
|
112
100
|
'shippingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['shipping_address']),
|
|
113
101
|
'billingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['billing_address']),
|
|
114
|
-
'discountPreview': json['discount_preview'],
|
|
115
102
|
'subtotal': json['subtotal'],
|
|
116
|
-
'
|
|
117
|
-
'
|
|
118
|
-
'
|
|
119
|
-
'productDiscountAmount': json['product_discount_amount'],
|
|
120
|
-
'shippingDiscountAmount': json['shipping_discount_amount'],
|
|
121
|
-
'cartDiscountAmount': json['cart_discount_amount'],
|
|
122
|
-
'finalTotalAmount': json['final_total_amount'],
|
|
103
|
+
'discountPreview': json['discount_preview'],
|
|
104
|
+
'shippingEstimate': json['shipping_estimate'],
|
|
105
|
+
'insuranceEstimate': json['insurance_estimate'],
|
|
123
106
|
'status': json['status'],
|
|
124
107
|
};
|
|
125
108
|
}
|
|
@@ -157,15 +140,10 @@ function CartResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
157
140
|
'coupons': value['coupons'],
|
|
158
141
|
'shipping_address': (0, AddressResource_1.AddressResourceToJSON)(value['shippingAddress']),
|
|
159
142
|
'billing_address': (0, AddressResource_1.AddressResourceToJSON)(value['billingAddress']),
|
|
160
|
-
'discount_preview': value['discountPreview'],
|
|
161
143
|
'subtotal': value['subtotal'],
|
|
162
|
-
'
|
|
163
|
-
'
|
|
164
|
-
'
|
|
165
|
-
'product_discount_amount': value['productDiscountAmount'],
|
|
166
|
-
'shipping_discount_amount': value['shippingDiscountAmount'],
|
|
167
|
-
'cart_discount_amount': value['cartDiscountAmount'],
|
|
168
|
-
'final_total_amount': value['finalTotalAmount'],
|
|
144
|
+
'discount_preview': value['discountPreview'],
|
|
145
|
+
'shipping_estimate': value['shippingEstimate'],
|
|
146
|
+
'insurance_estimate': value['insuranceEstimate'],
|
|
169
147
|
'status': value['status'],
|
|
170
148
|
};
|
|
171
149
|
}
|
|
@@ -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']),
|
|
@@ -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 {object}
|
|
58
|
-
* @memberof LineItemListResource
|
|
59
|
-
*/
|
|
60
|
-
discounts: object;
|
|
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
|
}
|
|
@@ -102,6 +102,18 @@ export interface StoreCartRequest {
|
|
|
102
102
|
* @memberof StoreCartRequest
|
|
103
103
|
*/
|
|
104
104
|
useAsBillingAddress?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {number}
|
|
108
|
+
* @memberof StoreCartRequest
|
|
109
|
+
*/
|
|
110
|
+
shippingAddressId?: number | null;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @type {number}
|
|
114
|
+
* @memberof StoreCartRequest
|
|
115
|
+
*/
|
|
116
|
+
billingAddressId?: number | null;
|
|
105
117
|
/**
|
|
106
118
|
*
|
|
107
119
|
* @type {StoreCartRequestShippingAddress}
|
|
@@ -75,6 +75,8 @@ function StoreCartRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
75
75
|
'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
|
|
76
76
|
'overrideInsurance': json['override_insurance'] == null ? undefined : json['override_insurance'],
|
|
77
77
|
'useAsBillingAddress': json['use_as_billing_address'] == null ? undefined : json['use_as_billing_address'],
|
|
78
|
+
'shippingAddressId': json['shipping_address_id'] == null ? undefined : json['shipping_address_id'],
|
|
79
|
+
'billingAddressId': json['billing_address_id'] == null ? undefined : json['billing_address_id'],
|
|
78
80
|
'shippingAddress': json['shipping_address'] == null ? undefined : (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['shipping_address']),
|
|
79
81
|
'billingAddress': json['billing_address'] == null ? undefined : (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['billing_address']),
|
|
80
82
|
};
|
|
@@ -102,6 +104,8 @@ function StoreCartRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
102
104
|
'insurance_amount': value['insuranceAmount'],
|
|
103
105
|
'override_insurance': value['overrideInsurance'],
|
|
104
106
|
'use_as_billing_address': value['useAsBillingAddress'],
|
|
107
|
+
'shipping_address_id': value['shippingAddressId'],
|
|
108
|
+
'billing_address_id': value['billingAddressId'],
|
|
105
109
|
'shipping_address': (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressToJSON)(value['shippingAddress']),
|
|
106
110
|
'billing_address': (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressToJSON)(value['billingAddress']),
|
|
107
111
|
};
|
|
@@ -26,6 +26,8 @@ function instanceOfStoreSpecialDateResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('hours' in value) || value['hours'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('date' in value) || value['date'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
if (!('closed' in value) || value['closed'] === undefined)
|
|
30
32
|
return false;
|
|
31
33
|
if (!('displayStartDate' in value) || value['displayStartDate'] === undefined)
|
|
@@ -45,7 +47,7 @@ function StoreSpecialDateResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
47
|
'id': json['id'] == null ? undefined : json['id'],
|
|
46
48
|
'name': json['name'],
|
|
47
49
|
'hours': json['hours'],
|
|
48
|
-
'date': json['date']
|
|
50
|
+
'date': json['date'],
|
|
49
51
|
'closed': json['closed'],
|
|
50
52
|
'displayStartDate': json['display_start_date'],
|
|
51
53
|
'displayEndDate': json['display_end_date'],
|