@digital8/lighting-illusions-ts-sdk 0.0.1861 → 0.0.1862
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 +14 -0
- package/README.md +10 -3
- package/dist/apis/CartsApi.d.ts +6 -6
- package/dist/apis/CartsApi.js +3 -5
- 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 +1 -3
- 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/LineItemDiscountResource.d.ts +44 -0
- package/dist/models/LineItemDiscountResource.js +59 -0
- package/dist/models/LineItemDiscountResourceArrayResponse.d.ts +33 -0
- package/dist/models/LineItemDiscountResourceArrayResponse.js +50 -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 +3 -1
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -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/LineItemDiscountResource.md +38 -0
- package/docs/LineItemDiscountResourceArrayResponse.md +34 -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/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +2 -3
- 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/LineItemDiscountResource.ts +84 -0
- package/src/models/LineItemDiscountResourceArrayResponse.ts +73 -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 +3 -2
- package/src/models/StoreResource.ts +3 -2
- package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
- package/src/models/index.ts +7 -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
|
|
@@ -168,6 +171,8 @@ docs/LabelResource.md
|
|
|
168
171
|
docs/LabelResourceArrayResponse.md
|
|
169
172
|
docs/LiAddressResource.md
|
|
170
173
|
docs/LiAddressResourceArrayResponse.md
|
|
174
|
+
docs/LineItemDiscountResource.md
|
|
175
|
+
docs/LineItemDiscountResourceArrayResponse.md
|
|
171
176
|
docs/LineItemListResource.md
|
|
172
177
|
docs/LineItemListResourceArrayResponse.md
|
|
173
178
|
docs/ListAssetsProductRegistrationRequest.md
|
|
@@ -282,6 +287,8 @@ docs/ProductChildAttributeGroupedResource.md
|
|
|
282
287
|
docs/ProductChildAttributeGroupedResourceArrayResponse.md
|
|
283
288
|
docs/ProductChildAttributeResource.md
|
|
284
289
|
docs/ProductChildAttributeResourceArrayResponse.md
|
|
290
|
+
docs/ProductChildCartLiteResource.md
|
|
291
|
+
docs/ProductChildCartLiteResourceArrayResponse.md
|
|
285
292
|
docs/ProductChildListResource.md
|
|
286
293
|
docs/ProductChildListResourceArrayResponse.md
|
|
287
294
|
docs/ProductChildLiteResource.md
|
|
@@ -590,6 +597,7 @@ src/models/DestroyAttributeValueRequest.ts
|
|
|
590
597
|
src/models/DetachAccessoriesProductRangeRequest.ts
|
|
591
598
|
src/models/DetachAssetableOverlayTemplateRequest.ts
|
|
592
599
|
src/models/DetachAttributesProductRangeRequest.ts
|
|
600
|
+
src/models/DetachCouponCartRequest.ts
|
|
593
601
|
src/models/DetachDocumentablesDocumentRequest.ts
|
|
594
602
|
src/models/DetachDocumentablesDocumentRequestDocumentablesInner.ts
|
|
595
603
|
src/models/DetachDocumentsProductChildRequest.ts
|
|
@@ -597,6 +605,8 @@ src/models/DetachDocumentsProductRangeRequest.ts
|
|
|
597
605
|
src/models/DetachProductsProductCategoryRequest.ts
|
|
598
606
|
src/models/DetachStoresSupplierRequest.ts
|
|
599
607
|
src/models/DetachSuppliersStoreRequest.ts
|
|
608
|
+
src/models/DiscountType.ts
|
|
609
|
+
src/models/DiscountValueType.ts
|
|
600
610
|
src/models/DocumentFileForUploadResource.ts
|
|
601
611
|
src/models/DocumentFileForUploadResourceArrayResponse.ts
|
|
602
612
|
src/models/DocumentFrontendResource.ts
|
|
@@ -672,6 +682,8 @@ src/models/LabelResource.ts
|
|
|
672
682
|
src/models/LabelResourceArrayResponse.ts
|
|
673
683
|
src/models/LiAddressResource.ts
|
|
674
684
|
src/models/LiAddressResourceArrayResponse.ts
|
|
685
|
+
src/models/LineItemDiscountResource.ts
|
|
686
|
+
src/models/LineItemDiscountResourceArrayResponse.ts
|
|
675
687
|
src/models/LineItemListResource.ts
|
|
676
688
|
src/models/LineItemListResourceArrayResponse.ts
|
|
677
689
|
src/models/ListAssetsProductRegistrationRequest.ts
|
|
@@ -781,6 +793,8 @@ src/models/ProductChildAttributeGroupedResource.ts
|
|
|
781
793
|
src/models/ProductChildAttributeGroupedResourceArrayResponse.ts
|
|
782
794
|
src/models/ProductChildAttributeResource.ts
|
|
783
795
|
src/models/ProductChildAttributeResourceArrayResponse.ts
|
|
796
|
+
src/models/ProductChildCartLiteResource.ts
|
|
797
|
+
src/models/ProductChildCartLiteResourceArrayResponse.ts
|
|
784
798
|
src/models/ProductChildListResource.ts
|
|
785
799
|
src/models/ProductChildListResourceArrayResponse.ts
|
|
786
800
|
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.1862
|
|
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)
|
|
@@ -402,6 +405,8 @@ All URIs are relative to *http://localhost/api*
|
|
|
402
405
|
- [LabelResourceArrayResponse](docs/LabelResourceArrayResponse.md)
|
|
403
406
|
- [LiAddressResource](docs/LiAddressResource.md)
|
|
404
407
|
- [LiAddressResourceArrayResponse](docs/LiAddressResourceArrayResponse.md)
|
|
408
|
+
- [LineItemDiscountResource](docs/LineItemDiscountResource.md)
|
|
409
|
+
- [LineItemDiscountResourceArrayResponse](docs/LineItemDiscountResourceArrayResponse.md)
|
|
405
410
|
- [LineItemListResource](docs/LineItemListResource.md)
|
|
406
411
|
- [LineItemListResourceArrayResponse](docs/LineItemListResourceArrayResponse.md)
|
|
407
412
|
- [ListAssetsProductRegistrationRequest](docs/ListAssetsProductRegistrationRequest.md)
|
|
@@ -511,6 +516,8 @@ All URIs are relative to *http://localhost/api*
|
|
|
511
516
|
- [ProductChildAttributeGroupedResourceArrayResponse](docs/ProductChildAttributeGroupedResourceArrayResponse.md)
|
|
512
517
|
- [ProductChildAttributeResource](docs/ProductChildAttributeResource.md)
|
|
513
518
|
- [ProductChildAttributeResourceArrayResponse](docs/ProductChildAttributeResourceArrayResponse.md)
|
|
519
|
+
- [ProductChildCartLiteResource](docs/ProductChildCartLiteResource.md)
|
|
520
|
+
- [ProductChildCartLiteResourceArrayResponse](docs/ProductChildCartLiteResourceArrayResponse.md)
|
|
514
521
|
- [ProductChildListResource](docs/ProductChildListResource.md)
|
|
515
522
|
- [ProductChildListResourceArrayResponse](docs/ProductChildListResourceArrayResponse.md)
|
|
516
523
|
- [ProductChildLiteResource](docs/ProductChildLiteResource.md)
|
|
@@ -724,7 +731,7 @@ and is automatically generated by the
|
|
|
724
731
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
725
732
|
|
|
726
733
|
- API version: `1.0.0`
|
|
727
|
-
- Package version: `0.0.
|
|
734
|
+
- Package version: `0.0.1862`
|
|
728
735
|
- Generator version: `7.21.0`
|
|
729
736
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
730
737
|
|
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
|
});
|
|
@@ -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'],
|
|
@@ -26,8 +26,6 @@ function instanceOfAddressResource(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;
|
|
31
29
|
if (!('postcode' in value) || value['postcode'] === undefined)
|
|
32
30
|
return false;
|
|
33
31
|
if (!('suburb' in value) || value['suburb'] === undefined)
|
|
@@ -52,7 +50,7 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
50
|
'sourceAddressId': json['source_address_id'] == null ? undefined : json['source_address_id'],
|
|
53
51
|
'company': json['company'],
|
|
54
52
|
'line1': json['line_1'],
|
|
55
|
-
'line2': json['line_2'],
|
|
53
|
+
'line2': json['line_2'] == null ? undefined : json['line_2'],
|
|
56
54
|
'postcode': json['postcode'],
|
|
57
55
|
'suburb': json['suburb'],
|
|
58
56
|
'country': json['country'],
|
|
@@ -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;
|