@digital8/lighting-illusions-ts-sdk 0.0.1844 → 0.0.1845
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/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +3 -1
- package/dist/models/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +6 -2
- package/dist/models/AdminCartResource.d.ts +34 -4
- package/dist/models/AdminCartResource.js +32 -10
- package/dist/models/AttachCouponCartRequest.d.ts +2 -2
- package/dist/models/AttachCouponCartRequest.js +3 -3
- 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 +2 -2
- package/dist/models/StoreListResource.js +2 -6
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +1 -3
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/AdminCartResource.md +16 -6
- package/docs/AttachCouponCartRequest.md +2 -2
- 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/StoreSpecialDateResource.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 +6 -4
- package/src/models/AdminCartResource.ts +60 -14
- package/src/models/AttachCouponCartRequest.ts +5 -5
- 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 +4 -6
- package/src/models/StoreResource.ts +3 -2
- package/src/models/StoreSpecialDateResource.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.1845
|
|
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.1845`
|
|
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 { AdminCartResource, AttachCouponCartRequest, AttachItemCartRequest, GenericResponse, IndexCartRequest, PaginatedCartListResourceResponse, StoreCartRequest, UpdateCartRequest, UpdateItemCartRequest } from '../models/index';
|
|
13
|
+
import type { AdminCartResource, AttachCouponCartRequest, AttachItemCartRequest, 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<AdminCartResource>>;
|
|
102
102
|
/**
|
|
103
103
|
* Auto-generated: detachCouponCart
|
|
104
104
|
*/
|
|
105
|
-
detachCouponCart(requestParameters:
|
|
105
|
+
detachCouponCart(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCartResource>;
|
|
106
106
|
/**
|
|
107
107
|
* Creates request options for detachItemCart without sending the request
|
|
108
108
|
*/
|
package/dist/apis/CartsApi.js
CHANGED
|
@@ -266,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
|
});
|
|
@@ -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'],
|
|
@@ -26,7 +26,7 @@ export interface AddressResource {
|
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof AddressResource
|
|
28
28
|
*/
|
|
29
|
-
company
|
|
29
|
+
company: string;
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
32
|
* @type {string}
|
|
@@ -38,7 +38,7 @@ export interface AddressResource {
|
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof AddressResource
|
|
40
40
|
*/
|
|
41
|
-
line2
|
|
41
|
+
line2: string;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
44
44
|
* @type {string}
|
|
@@ -22,8 +22,12 @@ exports.AddressResourceToJSONTyped = AddressResourceToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the AddressResource interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfAddressResource(value) {
|
|
25
|
+
if (!('company' in value) || value['company'] === undefined)
|
|
26
|
+
return false;
|
|
25
27
|
if (!('line1' in value) || value['line1'] === undefined)
|
|
26
28
|
return false;
|
|
29
|
+
if (!('line2' in value) || value['line2'] === undefined)
|
|
30
|
+
return false;
|
|
27
31
|
if (!('postcode' in value) || value['postcode'] === undefined)
|
|
28
32
|
return false;
|
|
29
33
|
if (!('suburb' in value) || value['suburb'] === undefined)
|
|
@@ -45,9 +49,9 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
49
|
}
|
|
46
50
|
return {
|
|
47
51
|
'id': json['id'] == null ? undefined : json['id'],
|
|
48
|
-
'company': json['company']
|
|
52
|
+
'company': json['company'],
|
|
49
53
|
'line1': json['line_1'],
|
|
50
|
-
'line2': json['line_2']
|
|
54
|
+
'line2': json['line_2'],
|
|
51
55
|
'postcode': json['postcode'],
|
|
52
56
|
'suburb': json['suburb'],
|
|
53
57
|
'country': json['country'],
|
|
@@ -108,7 +108,7 @@ export interface AdminCartResource {
|
|
|
108
108
|
* @type {number}
|
|
109
109
|
* @memberof AdminCartResource
|
|
110
110
|
*/
|
|
111
|
-
insuranceAmount
|
|
111
|
+
insuranceAmount: number;
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
114
|
* @type {boolean}
|
|
@@ -163,6 +163,12 @@ export interface AdminCartResource {
|
|
|
163
163
|
* @memberof AdminCartResource
|
|
164
164
|
*/
|
|
165
165
|
billingAddress: AddressResource | null;
|
|
166
|
+
/**
|
|
167
|
+
*
|
|
168
|
+
* @type {number}
|
|
169
|
+
* @memberof AdminCartResource
|
|
170
|
+
*/
|
|
171
|
+
discountPreview: number;
|
|
166
172
|
/**
|
|
167
173
|
*
|
|
168
174
|
* @type {number}
|
|
@@ -174,19 +180,43 @@ export interface AdminCartResource {
|
|
|
174
180
|
* @type {number}
|
|
175
181
|
* @memberof AdminCartResource
|
|
176
182
|
*/
|
|
177
|
-
|
|
183
|
+
shippingAmount: number;
|
|
184
|
+
/**
|
|
185
|
+
*
|
|
186
|
+
* @type {number}
|
|
187
|
+
* @memberof AdminCartResource
|
|
188
|
+
*/
|
|
189
|
+
total: number;
|
|
190
|
+
/**
|
|
191
|
+
*
|
|
192
|
+
* @type {number}
|
|
193
|
+
* @memberof AdminCartResource
|
|
194
|
+
*/
|
|
195
|
+
discountAmount: number;
|
|
196
|
+
/**
|
|
197
|
+
*
|
|
198
|
+
* @type {number}
|
|
199
|
+
* @memberof AdminCartResource
|
|
200
|
+
*/
|
|
201
|
+
productDiscountAmount: number;
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @type {number}
|
|
205
|
+
* @memberof AdminCartResource
|
|
206
|
+
*/
|
|
207
|
+
shippingDiscountAmount: number;
|
|
178
208
|
/**
|
|
179
209
|
*
|
|
180
210
|
* @type {number}
|
|
181
211
|
* @memberof AdminCartResource
|
|
182
212
|
*/
|
|
183
|
-
|
|
213
|
+
cartDiscountAmount: number;
|
|
184
214
|
/**
|
|
185
215
|
*
|
|
186
216
|
* @type {number}
|
|
187
217
|
* @memberof AdminCartResource
|
|
188
218
|
*/
|
|
189
|
-
|
|
219
|
+
finalTotalAmount: number;
|
|
190
220
|
/**
|
|
191
221
|
*
|
|
192
222
|
* @type {string}
|
|
@@ -36,6 +36,8 @@ function instanceOfAdminCartResource(value) {
|
|
|
36
36
|
return false;
|
|
37
37
|
if (!('overrideShipping' in value) || value['overrideShipping'] === undefined)
|
|
38
38
|
return false;
|
|
39
|
+
if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined)
|
|
40
|
+
return false;
|
|
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 instanceOfAdminCartResource(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;
|
|
@@ -88,7 +100,7 @@ function AdminCartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
88
100
|
'shippingType': json['shipping_type'],
|
|
89
101
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
90
102
|
'overrideShipping': json['override_shipping'],
|
|
91
|
-
'insuranceAmount': json['insurance_amount']
|
|
103
|
+
'insuranceAmount': json['insurance_amount'],
|
|
92
104
|
'overrideInsurance': json['override_insurance'],
|
|
93
105
|
'useAsBillingAddress': json['use_as_billing_address'],
|
|
94
106
|
'admin': json['admin'],
|
|
@@ -98,10 +110,15 @@ function AdminCartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
98
110
|
'coupons': json['coupons'],
|
|
99
111
|
'shippingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['shipping_address']),
|
|
100
112
|
'billingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['billing_address']),
|
|
101
|
-
'subtotal': json['subtotal'],
|
|
102
113
|
'discountPreview': json['discount_preview'],
|
|
103
|
-
'
|
|
104
|
-
'
|
|
114
|
+
'subtotal': json['subtotal'],
|
|
115
|
+
'shippingAmount': json['shipping_amount'],
|
|
116
|
+
'total': json['total'],
|
|
117
|
+
'discountAmount': json['discount_amount'],
|
|
118
|
+
'productDiscountAmount': json['product_discount_amount'],
|
|
119
|
+
'shippingDiscountAmount': json['shipping_discount_amount'],
|
|
120
|
+
'cartDiscountAmount': json['cart_discount_amount'],
|
|
121
|
+
'finalTotalAmount': json['final_total_amount'],
|
|
105
122
|
'status': json['status'],
|
|
106
123
|
};
|
|
107
124
|
}
|
|
@@ -138,10 +155,15 @@ function AdminCartResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
138
155
|
'coupons': value['coupons'],
|
|
139
156
|
'shipping_address': (0, AddressResource_1.AddressResourceToJSON)(value['shippingAddress']),
|
|
140
157
|
'billing_address': (0, AddressResource_1.AddressResourceToJSON)(value['billingAddress']),
|
|
141
|
-
'subtotal': value['subtotal'],
|
|
142
158
|
'discount_preview': value['discountPreview'],
|
|
143
|
-
'
|
|
144
|
-
'
|
|
159
|
+
'subtotal': value['subtotal'],
|
|
160
|
+
'shipping_amount': value['shippingAmount'],
|
|
161
|
+
'total': value['total'],
|
|
162
|
+
'discount_amount': value['discountAmount'],
|
|
163
|
+
'product_discount_amount': value['productDiscountAmount'],
|
|
164
|
+
'shipping_discount_amount': value['shippingDiscountAmount'],
|
|
165
|
+
'cart_discount_amount': value['cartDiscountAmount'],
|
|
166
|
+
'final_total_amount': value['finalTotalAmount'],
|
|
145
167
|
'status': value['status'],
|
|
146
168
|
};
|
|
147
169
|
}
|
|
@@ -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
|
}
|
|
@@ -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;
|