@digital8/lighting-illusions-ts-sdk 0.0.1856 → 0.0.1857
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 +10 -0
- package/README.md +8 -3
- package/dist/apis/CartsApi.d.ts +6 -6
- package/dist/apis/CartsApi.js +3 -5
- package/dist/models/AttachCouponCartRequest.d.ts +2 -2
- package/dist/models/AttachCouponCartRequest.js +3 -3
- package/dist/models/CartResource.d.ts +34 -4
- package/dist/models/CartResource.js +32 -10
- package/dist/models/DetachCouponCartRequest.d.ts +32 -0
- package/dist/models/DetachCouponCartRequest.js +51 -0
- package/dist/models/DiscountType.d.ts +26 -0
- package/dist/models/DiscountType.js +52 -0
- package/dist/models/DiscountValueType.d.ts +25 -0
- package/dist/models/DiscountValueType.js +51 -0
- package/dist/models/LineItemListResource.d.ts +27 -3
- package/dist/models/LineItemListResource.js +19 -3
- package/dist/models/ProductChildCartLiteResource.d.ts +70 -0
- package/dist/models/ProductChildCartLiteResource.js +77 -0
- package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/ProductChildCartLiteResourceArrayResponse.js +50 -0
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +1 -3
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +1 -3
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/AttachCouponCartRequest.md +2 -2
- package/docs/CartResource.md +16 -6
- package/docs/CartsApi.md +8 -8
- package/docs/DetachCouponCartRequest.md +34 -0
- package/docs/DiscountType.md +32 -0
- package/docs/DiscountValueType.md +32 -0
- package/docs/LineItemListResource.md +9 -1
- package/docs/ProductChildCartLiteResource.md +46 -0
- package/docs/ProductChildCartLiteResourceArrayResponse.md +34 -0
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/package.json +1 -1
- package/src/apis/CartsApi.ts +12 -14
- package/src/models/AttachCouponCartRequest.ts +5 -5
- package/src/models/CartResource.ts +60 -14
- package/src/models/DetachCouponCartRequest.ts +66 -0
- package/src/models/DiscountType.ts +54 -0
- package/src/models/DiscountValueType.ts +53 -0
- package/src/models/LineItemListResource.ts +46 -10
- package/src/models/ProductChildCartLiteResource.ts +135 -0
- package/src/models/ProductChildCartLiteResourceArrayResponse.ts +73 -0
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreResource.ts +2 -3
- package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
- package/src/models/index.ts +5 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -82,6 +82,7 @@ docs/DestroyAttributeValueRequest.md
|
|
|
82
82
|
docs/DetachAccessoriesProductRangeRequest.md
|
|
83
83
|
docs/DetachAssetableOverlayTemplateRequest.md
|
|
84
84
|
docs/DetachAttributesProductRangeRequest.md
|
|
85
|
+
docs/DetachCouponCartRequest.md
|
|
85
86
|
docs/DetachDocumentablesDocumentRequest.md
|
|
86
87
|
docs/DetachDocumentablesDocumentRequestDocumentablesInner.md
|
|
87
88
|
docs/DetachDocumentsProductChildRequest.md
|
|
@@ -89,6 +90,8 @@ docs/DetachDocumentsProductRangeRequest.md
|
|
|
89
90
|
docs/DetachProductsProductCategoryRequest.md
|
|
90
91
|
docs/DetachStoresSupplierRequest.md
|
|
91
92
|
docs/DetachSuppliersStoreRequest.md
|
|
93
|
+
docs/DiscountType.md
|
|
94
|
+
docs/DiscountValueType.md
|
|
92
95
|
docs/DocumentApi.md
|
|
93
96
|
docs/DocumentFileForUploadResource.md
|
|
94
97
|
docs/DocumentFileForUploadResourceArrayResponse.md
|
|
@@ -282,6 +285,8 @@ docs/ProductChildAttributeGroupedResource.md
|
|
|
282
285
|
docs/ProductChildAttributeGroupedResourceArrayResponse.md
|
|
283
286
|
docs/ProductChildAttributeResource.md
|
|
284
287
|
docs/ProductChildAttributeResourceArrayResponse.md
|
|
288
|
+
docs/ProductChildCartLiteResource.md
|
|
289
|
+
docs/ProductChildCartLiteResourceArrayResponse.md
|
|
285
290
|
docs/ProductChildListResource.md
|
|
286
291
|
docs/ProductChildListResourceArrayResponse.md
|
|
287
292
|
docs/ProductChildLiteResource.md
|
|
@@ -590,6 +595,7 @@ src/models/DestroyAttributeValueRequest.ts
|
|
|
590
595
|
src/models/DetachAccessoriesProductRangeRequest.ts
|
|
591
596
|
src/models/DetachAssetableOverlayTemplateRequest.ts
|
|
592
597
|
src/models/DetachAttributesProductRangeRequest.ts
|
|
598
|
+
src/models/DetachCouponCartRequest.ts
|
|
593
599
|
src/models/DetachDocumentablesDocumentRequest.ts
|
|
594
600
|
src/models/DetachDocumentablesDocumentRequestDocumentablesInner.ts
|
|
595
601
|
src/models/DetachDocumentsProductChildRequest.ts
|
|
@@ -597,6 +603,8 @@ src/models/DetachDocumentsProductRangeRequest.ts
|
|
|
597
603
|
src/models/DetachProductsProductCategoryRequest.ts
|
|
598
604
|
src/models/DetachStoresSupplierRequest.ts
|
|
599
605
|
src/models/DetachSuppliersStoreRequest.ts
|
|
606
|
+
src/models/DiscountType.ts
|
|
607
|
+
src/models/DiscountValueType.ts
|
|
600
608
|
src/models/DocumentFileForUploadResource.ts
|
|
601
609
|
src/models/DocumentFileForUploadResourceArrayResponse.ts
|
|
602
610
|
src/models/DocumentFrontendResource.ts
|
|
@@ -781,6 +789,8 @@ src/models/ProductChildAttributeGroupedResource.ts
|
|
|
781
789
|
src/models/ProductChildAttributeGroupedResourceArrayResponse.ts
|
|
782
790
|
src/models/ProductChildAttributeResource.ts
|
|
783
791
|
src/models/ProductChildAttributeResourceArrayResponse.ts
|
|
792
|
+
src/models/ProductChildCartLiteResource.ts
|
|
793
|
+
src/models/ProductChildCartLiteResourceArrayResponse.ts
|
|
784
794
|
src/models/ProductChildListResource.ts
|
|
785
795
|
src/models/ProductChildListResourceArrayResponse.ts
|
|
786
796
|
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.1857
|
|
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#detachcouponcartoperation) | **DELETE** /admin-api/carts/{cart}/coupons/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,6 +320,7 @@ 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)
|
|
323
324
|
- [DetachDocumentablesDocumentRequest](docs/DetachDocumentablesDocumentRequest.md)
|
|
324
325
|
- [DetachDocumentablesDocumentRequestDocumentablesInner](docs/DetachDocumentablesDocumentRequestDocumentablesInner.md)
|
|
325
326
|
- [DetachDocumentsProductChildRequest](docs/DetachDocumentsProductChildRequest.md)
|
|
@@ -327,6 +328,8 @@ All URIs are relative to *http://localhost/api*
|
|
|
327
328
|
- [DetachProductsProductCategoryRequest](docs/DetachProductsProductCategoryRequest.md)
|
|
328
329
|
- [DetachStoresSupplierRequest](docs/DetachStoresSupplierRequest.md)
|
|
329
330
|
- [DetachSuppliersStoreRequest](docs/DetachSuppliersStoreRequest.md)
|
|
331
|
+
- [DiscountType](docs/DiscountType.md)
|
|
332
|
+
- [DiscountValueType](docs/DiscountValueType.md)
|
|
330
333
|
- [DocumentFileForUploadResource](docs/DocumentFileForUploadResource.md)
|
|
331
334
|
- [DocumentFileForUploadResourceArrayResponse](docs/DocumentFileForUploadResourceArrayResponse.md)
|
|
332
335
|
- [DocumentFrontendResource](docs/DocumentFrontendResource.md)
|
|
@@ -511,6 +514,8 @@ All URIs are relative to *http://localhost/api*
|
|
|
511
514
|
- [ProductChildAttributeGroupedResourceArrayResponse](docs/ProductChildAttributeGroupedResourceArrayResponse.md)
|
|
512
515
|
- [ProductChildAttributeResource](docs/ProductChildAttributeResource.md)
|
|
513
516
|
- [ProductChildAttributeResourceArrayResponse](docs/ProductChildAttributeResourceArrayResponse.md)
|
|
517
|
+
- [ProductChildCartLiteResource](docs/ProductChildCartLiteResource.md)
|
|
518
|
+
- [ProductChildCartLiteResourceArrayResponse](docs/ProductChildCartLiteResourceArrayResponse.md)
|
|
514
519
|
- [ProductChildListResource](docs/ProductChildListResource.md)
|
|
515
520
|
- [ProductChildListResourceArrayResponse](docs/ProductChildListResourceArrayResponse.md)
|
|
516
521
|
- [ProductChildLiteResource](docs/ProductChildLiteResource.md)
|
|
@@ -724,7 +729,7 @@ and is automatically generated by the
|
|
|
724
729
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
725
730
|
|
|
726
731
|
- API version: `1.0.0`
|
|
727
|
-
- Package version: `0.0.
|
|
732
|
+
- Package version: `0.0.1857`
|
|
728
733
|
- Generator version: `7.21.0`
|
|
729
734
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
730
735
|
|
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, GenericResponse, IndexCartRequest, PaginatedCartListResourceResponse, StoreCartRequest, UpdateCartRequest, UpdateItemCartRequest } from '../models/index';
|
|
13
|
+
import type { AttachCouponCartRequest, AttachItemCartRequest, CartResource, DetachCouponCartRequest, 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 DetachCouponCartOperationRequest {
|
|
26
26
|
cart: number;
|
|
27
|
-
|
|
27
|
+
detachCouponCartRequest?: DetachCouponCartRequest;
|
|
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: DetachCouponCartOperationRequest): Promise<runtime.RequestOpts>;
|
|
98
98
|
/**
|
|
99
99
|
* Auto-generated: detachCouponCart
|
|
100
100
|
*/
|
|
101
|
-
detachCouponCartRaw(requestParameters:
|
|
101
|
+
detachCouponCartRaw(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>>;
|
|
102
102
|
/**
|
|
103
103
|
* Auto-generated: detachCouponCart
|
|
104
104
|
*/
|
|
105
|
-
detachCouponCart(requestParameters:
|
|
105
|
+
detachCouponCart(requestParameters: DetachCouponCartOperationRequest, 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,19 +266,17 @@ 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
|
-
}
|
|
272
269
|
queryParameters = {};
|
|
273
270
|
headerParameters = {};
|
|
274
|
-
|
|
271
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
272
|
+
urlPath = "/admin-api/carts/{cart}/coupons/detach";
|
|
275
273
|
urlPath = urlPath.replace("{".concat("cart", "}"), encodeURIComponent(String(requestParameters['cart'])));
|
|
276
|
-
urlPath = urlPath.replace("{".concat("coupon", "}"), encodeURIComponent(String(requestParameters['coupon'])));
|
|
277
274
|
return [2 /*return*/, {
|
|
278
275
|
path: urlPath,
|
|
279
276
|
method: 'DELETE',
|
|
280
277
|
headers: headerParameters,
|
|
281
278
|
query: queryParameters,
|
|
279
|
+
body: (0, index_1.DetachCouponCartRequestToJSON)(requestParameters['detachCouponCartRequest']),
|
|
282
280
|
}];
|
|
283
281
|
});
|
|
284
282
|
});
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
export interface AttachCouponCartRequest {
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
20
|
-
* @type {number}
|
|
20
|
+
* @type {Array<number>}
|
|
21
21
|
* @memberof AttachCouponCartRequest
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
couponIds: Array<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 (!('couponIds' in value) || value['couponIds'] === 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
|
+
'couponIds': json['coupon_ids'],
|
|
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_ids': value['couponIds'],
|
|
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;
|
|
118
118
|
/**
|
|
119
119
|
*
|
|
120
120
|
* @type {boolean}
|
|
@@ -169,6 +169,12 @@ 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;
|
|
172
178
|
/**
|
|
173
179
|
*
|
|
174
180
|
* @type {number}
|
|
@@ -180,19 +186,43 @@ export interface CartResource {
|
|
|
180
186
|
* @type {number}
|
|
181
187
|
* @memberof CartResource
|
|
182
188
|
*/
|
|
183
|
-
|
|
189
|
+
shippingAmount: number;
|
|
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;
|
|
184
214
|
/**
|
|
185
215
|
*
|
|
186
216
|
* @type {number}
|
|
187
217
|
* @memberof CartResource
|
|
188
218
|
*/
|
|
189
|
-
|
|
219
|
+
cartDiscountAmount: number;
|
|
190
220
|
/**
|
|
191
221
|
*
|
|
192
222
|
* @type {number}
|
|
193
223
|
* @memberof CartResource
|
|
194
224
|
*/
|
|
195
|
-
|
|
225
|
+
finalTotalAmount: number;
|
|
196
226
|
/**
|
|
197
227
|
*
|
|
198
228
|
* @type {string}
|
|
@@ -36,6 +36,8 @@ 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;
|
|
39
41
|
if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined)
|
|
40
42
|
return false;
|
|
41
43
|
if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined)
|
|
@@ -54,13 +56,23 @@ function instanceOfCartResource(value) {
|
|
|
54
56
|
return false;
|
|
55
57
|
if (!('billingAddress' in value) || value['billingAddress'] === undefined)
|
|
56
58
|
return false;
|
|
59
|
+
if (!('discountPreview' in value) || value['discountPreview'] === undefined)
|
|
60
|
+
return false;
|
|
57
61
|
if (!('subtotal' in value) || value['subtotal'] === undefined)
|
|
58
62
|
return false;
|
|
59
|
-
if (!('
|
|
63
|
+
if (!('shippingAmount' in value) || value['shippingAmount'] === undefined)
|
|
64
|
+
return false;
|
|
65
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
66
|
+
return false;
|
|
67
|
+
if (!('discountAmount' in value) || value['discountAmount'] === undefined)
|
|
60
68
|
return false;
|
|
61
|
-
if (!('
|
|
69
|
+
if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined)
|
|
62
70
|
return false;
|
|
63
|
-
if (!('
|
|
71
|
+
if (!('shippingDiscountAmount' in value) || value['shippingDiscountAmount'] === undefined)
|
|
72
|
+
return false;
|
|
73
|
+
if (!('cartDiscountAmount' in value) || value['cartDiscountAmount'] === undefined)
|
|
74
|
+
return false;
|
|
75
|
+
if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined)
|
|
64
76
|
return false;
|
|
65
77
|
if (!('status' in value) || value['status'] === undefined)
|
|
66
78
|
return false;
|
|
@@ -89,7 +101,7 @@ function CartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
89
101
|
'shippingType': json['shipping_type'],
|
|
90
102
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
91
103
|
'overrideShipping': json['override_shipping'],
|
|
92
|
-
'insuranceAmount': json['insurance_amount']
|
|
104
|
+
'insuranceAmount': json['insurance_amount'],
|
|
93
105
|
'overrideInsurance': json['override_insurance'],
|
|
94
106
|
'useAsBillingAddress': json['use_as_billing_address'],
|
|
95
107
|
'admin': json['admin'],
|
|
@@ -99,10 +111,15 @@ function CartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
99
111
|
'coupons': json['coupons'],
|
|
100
112
|
'shippingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['shipping_address']),
|
|
101
113
|
'billingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['billing_address']),
|
|
102
|
-
'subtotal': json['subtotal'],
|
|
103
114
|
'discountPreview': json['discount_preview'],
|
|
104
|
-
'
|
|
105
|
-
'
|
|
115
|
+
'subtotal': json['subtotal'],
|
|
116
|
+
'shippingAmount': json['shipping_amount'],
|
|
117
|
+
'total': json['total'],
|
|
118
|
+
'discountAmount': json['discount_amount'],
|
|
119
|
+
'productDiscountAmount': json['product_discount_amount'],
|
|
120
|
+
'shippingDiscountAmount': json['shipping_discount_amount'],
|
|
121
|
+
'cartDiscountAmount': json['cart_discount_amount'],
|
|
122
|
+
'finalTotalAmount': json['final_total_amount'],
|
|
106
123
|
'status': json['status'],
|
|
107
124
|
};
|
|
108
125
|
}
|
|
@@ -140,10 +157,15 @@ function CartResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
140
157
|
'coupons': value['coupons'],
|
|
141
158
|
'shipping_address': (0, AddressResource_1.AddressResourceToJSON)(value['shippingAddress']),
|
|
142
159
|
'billing_address': (0, AddressResource_1.AddressResourceToJSON)(value['billingAddress']),
|
|
143
|
-
'subtotal': value['subtotal'],
|
|
144
160
|
'discount_preview': value['discountPreview'],
|
|
145
|
-
'
|
|
146
|
-
'
|
|
161
|
+
'subtotal': value['subtotal'],
|
|
162
|
+
'shipping_amount': value['shippingAmount'],
|
|
163
|
+
'total': value['total'],
|
|
164
|
+
'discount_amount': value['discountAmount'],
|
|
165
|
+
'product_discount_amount': value['productDiscountAmount'],
|
|
166
|
+
'shipping_discount_amount': value['shippingDiscountAmount'],
|
|
167
|
+
'cart_discount_amount': value['cartDiscountAmount'],
|
|
168
|
+
'final_total_amount': value['finalTotalAmount'],
|
|
147
169
|
'status': value['status'],
|
|
148
170
|
};
|
|
149
171
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface DetachCouponCartRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface DetachCouponCartRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Array<number>}
|
|
21
|
+
* @memberof DetachCouponCartRequest
|
|
22
|
+
*/
|
|
23
|
+
couponIds: Array<number>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the DetachCouponCartRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfDetachCouponCartRequest(value: object): value is DetachCouponCartRequest;
|
|
29
|
+
export declare function DetachCouponCartRequestFromJSON(json: any): DetachCouponCartRequest;
|
|
30
|
+
export declare function DetachCouponCartRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetachCouponCartRequest;
|
|
31
|
+
export declare function DetachCouponCartRequestToJSON(json: any): DetachCouponCartRequest;
|
|
32
|
+
export declare function DetachCouponCartRequestToJSONTyped(value?: DetachCouponCartRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfDetachCouponCartRequest = instanceOfDetachCouponCartRequest;
|
|
17
|
+
exports.DetachCouponCartRequestFromJSON = DetachCouponCartRequestFromJSON;
|
|
18
|
+
exports.DetachCouponCartRequestFromJSONTyped = DetachCouponCartRequestFromJSONTyped;
|
|
19
|
+
exports.DetachCouponCartRequestToJSON = DetachCouponCartRequestToJSON;
|
|
20
|
+
exports.DetachCouponCartRequestToJSONTyped = DetachCouponCartRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the DetachCouponCartRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfDetachCouponCartRequest(value) {
|
|
25
|
+
if (!('couponIds' in value) || value['couponIds'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function DetachCouponCartRequestFromJSON(json) {
|
|
30
|
+
return DetachCouponCartRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function DetachCouponCartRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'couponIds': json['coupon_ids'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function DetachCouponCartRequestToJSON(json) {
|
|
41
|
+
return DetachCouponCartRequestToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function DetachCouponCartRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
44
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'coupon_ids': value['couponIds'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const DiscountType: {
|
|
17
|
+
readonly Shipping: "shipping";
|
|
18
|
+
readonly Subtotal: "subtotal";
|
|
19
|
+
readonly Product: "product";
|
|
20
|
+
};
|
|
21
|
+
export type DiscountType = typeof DiscountType[keyof typeof DiscountType];
|
|
22
|
+
export declare function instanceOfDiscountType(value: any): boolean;
|
|
23
|
+
export declare function DiscountTypeFromJSON(json: any): DiscountType;
|
|
24
|
+
export declare function DiscountTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DiscountType;
|
|
25
|
+
export declare function DiscountTypeToJSON(value?: DiscountType | null): any;
|
|
26
|
+
export declare function DiscountTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): DiscountType;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.DiscountType = void 0;
|
|
17
|
+
exports.instanceOfDiscountType = instanceOfDiscountType;
|
|
18
|
+
exports.DiscountTypeFromJSON = DiscountTypeFromJSON;
|
|
19
|
+
exports.DiscountTypeFromJSONTyped = DiscountTypeFromJSONTyped;
|
|
20
|
+
exports.DiscountTypeToJSON = DiscountTypeToJSON;
|
|
21
|
+
exports.DiscountTypeToJSONTyped = DiscountTypeToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.DiscountType = {
|
|
27
|
+
Shipping: 'shipping',
|
|
28
|
+
Subtotal: 'subtotal',
|
|
29
|
+
Product: 'product'
|
|
30
|
+
};
|
|
31
|
+
function instanceOfDiscountType(value) {
|
|
32
|
+
for (var key in exports.DiscountType) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(exports.DiscountType, key)) {
|
|
34
|
+
if (exports.DiscountType[key] === value) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
function DiscountTypeFromJSON(json) {
|
|
42
|
+
return DiscountTypeFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function DiscountTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
function DiscountTypeToJSON(value) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
function DiscountTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const DiscountValueType: {
|
|
17
|
+
readonly FixedValue: "fixed_value";
|
|
18
|
+
readonly Percentage: "percentage";
|
|
19
|
+
};
|
|
20
|
+
export type DiscountValueType = typeof DiscountValueType[keyof typeof DiscountValueType];
|
|
21
|
+
export declare function instanceOfDiscountValueType(value: any): boolean;
|
|
22
|
+
export declare function DiscountValueTypeFromJSON(json: any): DiscountValueType;
|
|
23
|
+
export declare function DiscountValueTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DiscountValueType;
|
|
24
|
+
export declare function DiscountValueTypeToJSON(value?: DiscountValueType | null): any;
|
|
25
|
+
export declare function DiscountValueTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): DiscountValueType;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.DiscountValueType = void 0;
|
|
17
|
+
exports.instanceOfDiscountValueType = instanceOfDiscountValueType;
|
|
18
|
+
exports.DiscountValueTypeFromJSON = DiscountValueTypeFromJSON;
|
|
19
|
+
exports.DiscountValueTypeFromJSONTyped = DiscountValueTypeFromJSONTyped;
|
|
20
|
+
exports.DiscountValueTypeToJSON = DiscountValueTypeToJSON;
|
|
21
|
+
exports.DiscountValueTypeToJSONTyped = DiscountValueTypeToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.DiscountValueType = {
|
|
27
|
+
FixedValue: 'fixed_value',
|
|
28
|
+
Percentage: 'percentage'
|
|
29
|
+
};
|
|
30
|
+
function instanceOfDiscountValueType(value) {
|
|
31
|
+
for (var key in exports.DiscountValueType) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(exports.DiscountValueType, key)) {
|
|
33
|
+
if (exports.DiscountValueType[key] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function DiscountValueTypeFromJSON(json) {
|
|
41
|
+
return DiscountValueTypeFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function DiscountValueTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
function DiscountValueTypeToJSON(value) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function DiscountValueTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
@@ -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 { ProductChildCartLiteResource } from './ProductChildCartLiteResource';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -36,10 +36,34 @@ export interface LineItemListResource {
|
|
|
36
36
|
productPrice: number;
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
|
-
* @type {
|
|
39
|
+
* @type {number}
|
|
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}
|
|
40
64
|
* @memberof LineItemListResource
|
|
41
65
|
*/
|
|
42
|
-
productChild:
|
|
66
|
+
productChild: ProductChildCartLiteResource | null;
|
|
43
67
|
}
|
|
44
68
|
/**
|
|
45
69
|
* Check if a given object implements the LineItemListResource interface.
|