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