@digital8/lighting-illusions-ts-sdk 0.0.1936 → 0.0.1938
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 +8 -2
- package/README.md +8 -3
- package/dist/apis/OrdersApi.d.ts +37 -2
- package/dist/apis/OrdersApi.js +126 -1
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +3 -1
- package/dist/models/AddressResource.d.ts +1 -7
- package/dist/models/AddressResource.js +3 -5
- package/dist/models/AdminOrderResource.d.ts +12 -0
- package/dist/models/AdminOrderResource.js +8 -0
- package/dist/models/AttachCouponOrderRequest.d.ts +32 -0
- package/dist/models/AttachCouponOrderRequest.js +51 -0
- package/dist/models/CartListResource.d.ts +6 -0
- package/dist/models/CartListResource.js +4 -0
- package/dist/models/CartResource.d.ts +6 -0
- package/dist/models/CartResource.js +4 -0
- package/dist/models/DetachCouponOrderRequest.d.ts +32 -0
- package/dist/models/DetachCouponOrderRequest.js +51 -0
- package/dist/models/GetAllOrderRequest.d.ts +1 -0
- package/dist/models/GetAllOrderRequest.js +2 -1
- package/dist/models/IndexOrderRequest.d.ts +1 -0
- package/dist/models/IndexOrderRequest.js +2 -1
- package/dist/models/OrderListResource.d.ts +18 -0
- package/dist/models/OrderListResource.js +10 -0
- package/dist/models/OrderStatusWithCountResource.d.ts +50 -0
- package/dist/models/OrderStatusWithCountResource.js +63 -0
- package/dist/models/OrderStatusWithCountResourceArrayResponse.d.ts +33 -0
- package/dist/models/OrderStatusWithCountResourceArrayResponse.js +50 -0
- package/dist/models/StoreCartRequest.d.ts +6 -0
- package/dist/models/StoreCartRequest.js +2 -0
- package/dist/models/StoreCartRequestShippingAddress.d.ts +0 -6
- package/dist/models/StoreCartRequestShippingAddress.js +0 -2
- package/dist/models/StoreListResource.d.ts +2 -2
- package/dist/models/StoreListResource.js +4 -4
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +1 -3
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +1 -3
- package/dist/models/UpdateCartRequest.d.ts +6 -0
- package/dist/models/UpdateCartRequest.js +2 -0
- package/dist/models/UpdateOrderRequest.d.ts +9 -3
- package/dist/models/UpdateOrderRequest.js +5 -3
- package/dist/models/UpdateOrderRequestBillingAddress.d.ts +1 -7
- package/dist/models/UpdateOrderRequestBillingAddress.js +3 -5
- package/dist/models/index.d.ts +4 -1
- package/dist/models/index.js +4 -1
- package/docs/AddressResource.md +0 -2
- package/docs/AdminOrderResource.md +4 -0
- package/docs/AttachCouponOrderRequest.md +34 -0
- package/docs/CartListResource.md +2 -0
- package/docs/CartResource.md +2 -0
- package/docs/DetachCouponOrderRequest.md +34 -0
- package/docs/OrderListResource.md +6 -0
- package/docs/OrderStatusWithCountResource.md +40 -0
- package/docs/OrderStatusWithCountResourceArrayResponse.md +34 -0
- package/docs/OrdersApi.md +141 -3
- package/docs/StoreCartRequest.md +2 -0
- package/docs/StoreCartRequestShippingAddress.md +0 -2
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/docs/StoreSpecialDateResource.md +1 -1
- package/docs/UpdateCartRequest.md +2 -0
- package/docs/UpdateOrderRequest.md +3 -1
- package/docs/UpdateOrderRequestBillingAddress.md +2 -4
- package/package.json +1 -1
- package/src/apis/OrdersApi.ts +124 -3
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +3 -11
- package/src/models/AdminOrderResource.ts +18 -0
- package/src/models/AttachCouponOrderRequest.ts +66 -0
- package/src/models/CartListResource.ts +9 -0
- package/src/models/CartResource.ts +9 -0
- package/src/models/DetachCouponOrderRequest.ts +66 -0
- package/src/models/GetAllOrderRequest.ts +2 -1
- package/src/models/IndexOrderRequest.ts +2 -1
- package/src/models/OrderListResource.ts +26 -0
- package/src/models/OrderStatusWithCountResource.ts +93 -0
- package/src/models/OrderStatusWithCountResourceArrayResponse.ts +73 -0
- package/src/models/StoreCartRequest.ts +8 -0
- package/src/models/StoreCartRequestShippingAddress.ts +0 -8
- package/src/models/StoreListResource.ts +5 -5
- package/src/models/StoreResource.ts +2 -3
- package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
- package/src/models/StoreSpecialDateResource.ts +3 -4
- package/src/models/UpdateCartRequest.ts +8 -0
- package/src/models/UpdateOrderRequest.ts +18 -10
- package/src/models/UpdateOrderRequestBillingAddress.ts +4 -12
- package/src/models/index.ts +4 -1
- package/dist/models/UpdateOrderRequestShippingAddress.d.ts +0 -80
- package/dist/models/UpdateOrderRequestShippingAddress.js +0 -67
- package/docs/UpdateOrderRequestShippingAddress.md +0 -50
- package/src/models/UpdateOrderRequestShippingAddress.ts +0 -130
|
@@ -13,8 +13,9 @@ Name | Type
|
|
|
13
13
|
`shippingSubtotal` | number
|
|
14
14
|
`overrideShipping` | boolean
|
|
15
15
|
`insuranceAmount` | number
|
|
16
|
+
`includeInsurance` | boolean
|
|
16
17
|
`overrideInsurance` | boolean
|
|
17
|
-
`shippingAddress` | [
|
|
18
|
+
`shippingAddress` | [StoreCartRequestShippingAddress](StoreCartRequestShippingAddress.md)
|
|
18
19
|
`billingAddress` | [UpdateOrderRequestBillingAddress](UpdateOrderRequestBillingAddress.md)
|
|
19
20
|
|
|
20
21
|
## Example
|
|
@@ -31,6 +32,7 @@ const example = {
|
|
|
31
32
|
"shippingSubtotal": null,
|
|
32
33
|
"overrideShipping": null,
|
|
33
34
|
"insuranceAmount": null,
|
|
35
|
+
"includeInsurance": null,
|
|
34
36
|
"overrideInsurance": null,
|
|
35
37
|
"shippingAddress": null,
|
|
36
38
|
"billingAddress": null,
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`
|
|
10
|
-
`addressee` | string
|
|
9
|
+
`addresseeName` | string
|
|
11
10
|
`company` | string
|
|
12
11
|
`line1` | string
|
|
13
12
|
`line2` | string
|
|
@@ -23,8 +22,7 @@ import type { UpdateOrderRequestBillingAddress } from '@digital8/lighting-illusi
|
|
|
23
22
|
|
|
24
23
|
// TODO: Update the object below with actual values
|
|
25
24
|
const example = {
|
|
26
|
-
"
|
|
27
|
-
"addressee": null,
|
|
25
|
+
"addresseeName": null,
|
|
28
26
|
"company": null,
|
|
29
27
|
"line1": null,
|
|
30
28
|
"line2": null,
|
package/package.json
CHANGED
package/src/apis/OrdersApi.ts
CHANGED
|
@@ -18,11 +18,21 @@ import {
|
|
|
18
18
|
AdminOrderResourceFromJSON,
|
|
19
19
|
AdminOrderResourceToJSON,
|
|
20
20
|
} from '../models/AdminOrderResource';
|
|
21
|
+
import {
|
|
22
|
+
type AttachCouponOrderRequest,
|
|
23
|
+
AttachCouponOrderRequestFromJSON,
|
|
24
|
+
AttachCouponOrderRequestToJSON,
|
|
25
|
+
} from '../models/AttachCouponOrderRequest';
|
|
21
26
|
import {
|
|
22
27
|
type AttachItemOrderRequest,
|
|
23
28
|
AttachItemOrderRequestFromJSON,
|
|
24
29
|
AttachItemOrderRequestToJSON,
|
|
25
30
|
} from '../models/AttachItemOrderRequest';
|
|
31
|
+
import {
|
|
32
|
+
type DetachCouponOrderRequest,
|
|
33
|
+
DetachCouponOrderRequestFromJSON,
|
|
34
|
+
DetachCouponOrderRequestToJSON,
|
|
35
|
+
} from '../models/DetachCouponOrderRequest';
|
|
26
36
|
import {
|
|
27
37
|
type GenericResponse,
|
|
28
38
|
GenericResponseFromJSON,
|
|
@@ -43,6 +53,11 @@ import {
|
|
|
43
53
|
OrderLiteResourceArrayResponseFromJSON,
|
|
44
54
|
OrderLiteResourceArrayResponseToJSON,
|
|
45
55
|
} from '../models/OrderLiteResourceArrayResponse';
|
|
56
|
+
import {
|
|
57
|
+
type OrderStatusWithCountResourceArrayResponse,
|
|
58
|
+
OrderStatusWithCountResourceArrayResponseFromJSON,
|
|
59
|
+
OrderStatusWithCountResourceArrayResponseToJSON,
|
|
60
|
+
} from '../models/OrderStatusWithCountResourceArrayResponse';
|
|
46
61
|
import {
|
|
47
62
|
type PaginatedOrderListResourceResponse,
|
|
48
63
|
PaginatedOrderListResourceResponseFromJSON,
|
|
@@ -59,6 +74,11 @@ import {
|
|
|
59
74
|
UpdateOrderRequestToJSON,
|
|
60
75
|
} from '../models/UpdateOrderRequest';
|
|
61
76
|
|
|
77
|
+
export interface AttachCouponOrderOperationRequest {
|
|
78
|
+
order: number;
|
|
79
|
+
attachCouponOrderRequest?: AttachCouponOrderRequest;
|
|
80
|
+
}
|
|
81
|
+
|
|
62
82
|
export interface AttachItemOrderOperationRequest {
|
|
63
83
|
order: number;
|
|
64
84
|
attachItemOrderRequest?: AttachItemOrderRequest;
|
|
@@ -68,6 +88,11 @@ export interface DestroyOrderRequest {
|
|
|
68
88
|
order: number;
|
|
69
89
|
}
|
|
70
90
|
|
|
91
|
+
export interface DetachCouponOrderOperationRequest {
|
|
92
|
+
order: number;
|
|
93
|
+
detachCouponOrderRequest?: DetachCouponOrderRequest;
|
|
94
|
+
}
|
|
95
|
+
|
|
71
96
|
export interface DetachItemOrderRequest {
|
|
72
97
|
order: number;
|
|
73
98
|
lineItem: number;
|
|
@@ -105,6 +130,54 @@ export interface UpdateOrderOperationRequest {
|
|
|
105
130
|
*/
|
|
106
131
|
export class OrdersApi extends runtime.BaseAPI {
|
|
107
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Creates request options for attachCouponOrder without sending the request
|
|
135
|
+
*/
|
|
136
|
+
async attachCouponOrderRequestOpts(requestParameters: AttachCouponOrderOperationRequest): Promise<runtime.RequestOpts> {
|
|
137
|
+
if (requestParameters['order'] == null) {
|
|
138
|
+
throw new runtime.RequiredError(
|
|
139
|
+
'order',
|
|
140
|
+
'Required parameter "order" was null or undefined when calling attachCouponOrder().'
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const queryParameters: any = {};
|
|
145
|
+
|
|
146
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
147
|
+
|
|
148
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
let urlPath = `/admin-api/orders/{order}/coupon/attach`;
|
|
152
|
+
urlPath = urlPath.replace('{order}', encodeURIComponent(String(requestParameters['order'])));
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
path: urlPath,
|
|
156
|
+
method: 'POST',
|
|
157
|
+
headers: headerParameters,
|
|
158
|
+
query: queryParameters,
|
|
159
|
+
body: AttachCouponOrderRequestToJSON(requestParameters['attachCouponOrderRequest']),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Auto-generated: attachCouponOrder
|
|
165
|
+
*/
|
|
166
|
+
async attachCouponOrderRaw(requestParameters: AttachCouponOrderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminOrderResource>> {
|
|
167
|
+
const requestOptions = await this.attachCouponOrderRequestOpts(requestParameters);
|
|
168
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
169
|
+
|
|
170
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminOrderResourceFromJSON(jsonValue));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Auto-generated: attachCouponOrder
|
|
175
|
+
*/
|
|
176
|
+
async attachCouponOrder(requestParameters: AttachCouponOrderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminOrderResource> {
|
|
177
|
+
const response = await this.attachCouponOrderRaw(requestParameters, initOverrides);
|
|
178
|
+
return await response.value();
|
|
179
|
+
}
|
|
180
|
+
|
|
108
181
|
/**
|
|
109
182
|
* Creates request options for attachItemOrder without sending the request
|
|
110
183
|
*/
|
|
@@ -198,6 +271,54 @@ export class OrdersApi extends runtime.BaseAPI {
|
|
|
198
271
|
return await response.value();
|
|
199
272
|
}
|
|
200
273
|
|
|
274
|
+
/**
|
|
275
|
+
* Creates request options for detachCouponOrder without sending the request
|
|
276
|
+
*/
|
|
277
|
+
async detachCouponOrderRequestOpts(requestParameters: DetachCouponOrderOperationRequest): Promise<runtime.RequestOpts> {
|
|
278
|
+
if (requestParameters['order'] == null) {
|
|
279
|
+
throw new runtime.RequiredError(
|
|
280
|
+
'order',
|
|
281
|
+
'Required parameter "order" was null or undefined when calling detachCouponOrder().'
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const queryParameters: any = {};
|
|
286
|
+
|
|
287
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
288
|
+
|
|
289
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
let urlPath = `/admin-api/orders/{order}/coupon/detach`;
|
|
293
|
+
urlPath = urlPath.replace('{order}', encodeURIComponent(String(requestParameters['order'])));
|
|
294
|
+
|
|
295
|
+
return {
|
|
296
|
+
path: urlPath,
|
|
297
|
+
method: 'DELETE',
|
|
298
|
+
headers: headerParameters,
|
|
299
|
+
query: queryParameters,
|
|
300
|
+
body: DetachCouponOrderRequestToJSON(requestParameters['detachCouponOrderRequest']),
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Auto-generated: detachCouponOrder
|
|
306
|
+
*/
|
|
307
|
+
async detachCouponOrderRaw(requestParameters: DetachCouponOrderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminOrderResource>> {
|
|
308
|
+
const requestOptions = await this.detachCouponOrderRequestOpts(requestParameters);
|
|
309
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
310
|
+
|
|
311
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminOrderResourceFromJSON(jsonValue));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Auto-generated: detachCouponOrder
|
|
316
|
+
*/
|
|
317
|
+
async detachCouponOrder(requestParameters: DetachCouponOrderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminOrderResource> {
|
|
318
|
+
const response = await this.detachCouponOrderRaw(requestParameters, initOverrides);
|
|
319
|
+
return await response.value();
|
|
320
|
+
}
|
|
321
|
+
|
|
201
322
|
/**
|
|
202
323
|
* Creates request options for detachItemOrder without sending the request
|
|
203
324
|
*/
|
|
@@ -443,17 +564,17 @@ export class OrdersApi extends runtime.BaseAPI {
|
|
|
443
564
|
/**
|
|
444
565
|
* Auto-generated: statusesAllOrder
|
|
445
566
|
*/
|
|
446
|
-
async statusesAllOrderRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
567
|
+
async statusesAllOrderRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderStatusWithCountResourceArrayResponse>> {
|
|
447
568
|
const requestOptions = await this.statusesAllOrderRequestOpts();
|
|
448
569
|
const response = await this.request(requestOptions, initOverrides);
|
|
449
570
|
|
|
450
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
571
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OrderStatusWithCountResourceArrayResponseFromJSON(jsonValue));
|
|
451
572
|
}
|
|
452
573
|
|
|
453
574
|
/**
|
|
454
575
|
* Auto-generated: statusesAllOrder
|
|
455
576
|
*/
|
|
456
|
-
async statusesAllOrder(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
577
|
+
async statusesAllOrder(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderStatusWithCountResourceArrayResponse> {
|
|
457
578
|
const response = await this.statusesAllOrderRaw(initOverrides);
|
|
458
579
|
return await response.value();
|
|
459
580
|
}
|
|
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof AddressFrontendResource
|
|
26
26
|
*/
|
|
27
|
-
company
|
|
27
|
+
company: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -73,6 +73,7 @@ export interface AddressFrontendResource {
|
|
|
73
73
|
* Check if a given object implements the AddressFrontendResource interface.
|
|
74
74
|
*/
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
|
+
if (!('company' in value) || value['company'] === undefined) return false;
|
|
76
77
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
77
78
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
78
79
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
@@ -92,7 +93,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
92
93
|
}
|
|
93
94
|
return {
|
|
94
95
|
|
|
95
|
-
'company': json['company']
|
|
96
|
+
'company': json['company'],
|
|
96
97
|
'line1': json['line1'],
|
|
97
98
|
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
98
99
|
'postcode': json['postcode'],
|
|
@@ -43,12 +43,6 @@ export interface AddressResource {
|
|
|
43
43
|
* @memberof AddressResource
|
|
44
44
|
*/
|
|
45
45
|
company: string;
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* @type {string}
|
|
49
|
-
* @memberof AddressResource
|
|
50
|
-
*/
|
|
51
|
-
addressee: string;
|
|
52
46
|
/**
|
|
53
47
|
*
|
|
54
48
|
* @type {string}
|
|
@@ -60,7 +54,7 @@ export interface AddressResource {
|
|
|
60
54
|
* @type {string}
|
|
61
55
|
* @memberof AddressResource
|
|
62
56
|
*/
|
|
63
|
-
line2
|
|
57
|
+
line2: string;
|
|
64
58
|
/**
|
|
65
59
|
*
|
|
66
60
|
* @type {string}
|
|
@@ -99,8 +93,8 @@ export interface AddressResource {
|
|
|
99
93
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
100
94
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
101
95
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
102
|
-
if (!('addressee' in value) || value['addressee'] === undefined) return false;
|
|
103
96
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
97
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
104
98
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
105
99
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
106
100
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -123,9 +117,8 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
123
117
|
'sourceAddressId': json['source_address_id'] == null ? undefined : json['source_address_id'],
|
|
124
118
|
'addresseeName': json['addressee_name'],
|
|
125
119
|
'company': json['company'],
|
|
126
|
-
'addressee': json['addressee'],
|
|
127
120
|
'line1': json['line_1'],
|
|
128
|
-
'line2': json['line_2']
|
|
121
|
+
'line2': json['line_2'],
|
|
129
122
|
'postcode': json['postcode'],
|
|
130
123
|
'suburb': json['suburb'],
|
|
131
124
|
'country': json['country'],
|
|
@@ -149,7 +142,6 @@ export function AddressResourceToJSONTyped(value?: AddressResource | null, ignor
|
|
|
149
142
|
'source_address_id': value['sourceAddressId'],
|
|
150
143
|
'addressee_name': value['addresseeName'],
|
|
151
144
|
'company': value['company'],
|
|
152
|
-
'addressee': value['addressee'],
|
|
153
145
|
'line_1': value['line1'],
|
|
154
146
|
'line_2': value['line2'],
|
|
155
147
|
'postcode': value['postcode'],
|
|
@@ -100,6 +100,12 @@ export interface AdminOrderResource {
|
|
|
100
100
|
* @memberof AdminOrderResource
|
|
101
101
|
*/
|
|
102
102
|
insuranceAmount: number;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @type {boolean}
|
|
106
|
+
* @memberof AdminOrderResource
|
|
107
|
+
*/
|
|
108
|
+
includeInsurance: boolean;
|
|
103
109
|
/**
|
|
104
110
|
*
|
|
105
111
|
* @type {boolean}
|
|
@@ -124,6 +130,12 @@ export interface AdminOrderResource {
|
|
|
124
130
|
* @memberof AdminOrderResource
|
|
125
131
|
*/
|
|
126
132
|
isNetsuiteLocked: boolean;
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @type {boolean}
|
|
136
|
+
* @memberof AdminOrderResource
|
|
137
|
+
*/
|
|
138
|
+
isDisabled: boolean;
|
|
127
139
|
/**
|
|
128
140
|
*
|
|
129
141
|
* @type {string}
|
|
@@ -279,9 +291,11 @@ export function instanceOfAdminOrderResource(value: object): value is AdminOrder
|
|
|
279
291
|
if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
|
|
280
292
|
if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
|
|
281
293
|
if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined) return false;
|
|
294
|
+
if (!('includeInsurance' in value) || value['includeInsurance'] === undefined) return false;
|
|
282
295
|
if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
|
|
283
296
|
if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
|
|
284
297
|
if (!('isNetsuiteLocked' in value) || value['isNetsuiteLocked'] === undefined) return false;
|
|
298
|
+
if (!('isDisabled' in value) || value['isDisabled'] === undefined) return false;
|
|
285
299
|
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
286
300
|
if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined) return false;
|
|
287
301
|
if (!('subtotalDiscountAmount' in value) || value['subtotalDiscountAmount'] === undefined) return false;
|
|
@@ -328,10 +342,12 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
328
342
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
329
343
|
'overrideShipping': json['override_shipping'],
|
|
330
344
|
'insuranceAmount': json['insurance_amount'],
|
|
345
|
+
'includeInsurance': json['include_insurance'],
|
|
331
346
|
'overrideInsurance': json['override_insurance'],
|
|
332
347
|
'useAsBillingAddress': json['use_as_billing_address'],
|
|
333
348
|
'netsuiteId': json['netsuite_id'] == null ? undefined : json['netsuite_id'],
|
|
334
349
|
'isNetsuiteLocked': json['is_netsuite_locked'],
|
|
350
|
+
'isDisabled': json['is_disabled'],
|
|
335
351
|
'omnisendId': json['omnisend_id'] == null ? undefined : json['omnisend_id'],
|
|
336
352
|
'subtotal': json['subtotal'],
|
|
337
353
|
'productDiscountAmount': json['product_discount_amount'],
|
|
@@ -381,10 +397,12 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
|
|
|
381
397
|
'shipping_subtotal': value['shippingSubtotal'],
|
|
382
398
|
'override_shipping': value['overrideShipping'],
|
|
383
399
|
'insurance_amount': value['insuranceAmount'],
|
|
400
|
+
'include_insurance': value['includeInsurance'],
|
|
384
401
|
'override_insurance': value['overrideInsurance'],
|
|
385
402
|
'use_as_billing_address': value['useAsBillingAddress'],
|
|
386
403
|
'netsuite_id': value['netsuiteId'],
|
|
387
404
|
'is_netsuite_locked': value['isNetsuiteLocked'],
|
|
405
|
+
'is_disabled': value['isDisabled'],
|
|
388
406
|
'omnisend_id': value['omnisendId'],
|
|
389
407
|
'subtotal': value['subtotal'],
|
|
390
408
|
'product_discount_amount': value['productDiscountAmount'],
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AttachCouponOrderRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface AttachCouponOrderRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AttachCouponOrderRequest
|
|
26
|
+
*/
|
|
27
|
+
couponCode: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the AttachCouponOrderRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfAttachCouponOrderRequest(value: object): value is AttachCouponOrderRequest {
|
|
34
|
+
if (!('couponCode' in value) || value['couponCode'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function AttachCouponOrderRequestFromJSON(json: any): AttachCouponOrderRequest {
|
|
39
|
+
return AttachCouponOrderRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AttachCouponOrderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachCouponOrderRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'couponCode': json['coupon_code'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function AttachCouponOrderRequestToJSON(json: any): AttachCouponOrderRequest {
|
|
53
|
+
return AttachCouponOrderRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AttachCouponOrderRequestToJSONTyped(value?: AttachCouponOrderRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'coupon_code': value['couponCode'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -83,6 +83,12 @@ export interface CartListResource {
|
|
|
83
83
|
* @memberof CartListResource
|
|
84
84
|
*/
|
|
85
85
|
insuranceAmount?: number | null;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {boolean}
|
|
89
|
+
* @memberof CartListResource
|
|
90
|
+
*/
|
|
91
|
+
includeInsurance: boolean;
|
|
86
92
|
/**
|
|
87
93
|
*
|
|
88
94
|
* @type {boolean}
|
|
@@ -151,6 +157,7 @@ export interface CartListResource {
|
|
|
151
157
|
export function instanceOfCartListResource(value: object): value is CartListResource {
|
|
152
158
|
if (!('source' in value) || value['source'] === undefined) return false;
|
|
153
159
|
if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
|
|
160
|
+
if (!('includeInsurance' in value) || value['includeInsurance'] === undefined) return false;
|
|
154
161
|
if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
|
|
155
162
|
if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
|
|
156
163
|
if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
|
|
@@ -179,6 +186,7 @@ export function CartListResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
179
186
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
180
187
|
'overrideShipping': json['override_shipping'],
|
|
181
188
|
'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
|
|
189
|
+
'includeInsurance': json['include_insurance'],
|
|
182
190
|
'overrideInsurance': json['override_insurance'],
|
|
183
191
|
'useAsBillingAddress': json['use_as_billing_address'],
|
|
184
192
|
'expiryDate': (new Date(json['expiry_date'])),
|
|
@@ -210,6 +218,7 @@ export function CartListResourceToJSONTyped(value?: CartListResource | null, ign
|
|
|
210
218
|
'shipping_subtotal': value['shippingSubtotal'],
|
|
211
219
|
'override_shipping': value['overrideShipping'],
|
|
212
220
|
'insurance_amount': value['insuranceAmount'],
|
|
221
|
+
'include_insurance': value['includeInsurance'],
|
|
213
222
|
'override_insurance': value['overrideInsurance'],
|
|
214
223
|
'use_as_billing_address': value['useAsBillingAddress'],
|
|
215
224
|
'expiry_date': value['expiryDate'].toISOString(),
|
|
@@ -133,6 +133,12 @@ export interface CartResource {
|
|
|
133
133
|
* @memberof CartResource
|
|
134
134
|
*/
|
|
135
135
|
insuranceSubtotal?: string | null;
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
* @type {boolean}
|
|
139
|
+
* @memberof CartResource
|
|
140
|
+
*/
|
|
141
|
+
includeInsurance: boolean;
|
|
136
142
|
/**
|
|
137
143
|
*
|
|
138
144
|
* @type {boolean}
|
|
@@ -263,6 +269,7 @@ export function instanceOfCartResource(value: object): value is CartResource {
|
|
|
263
269
|
if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
|
|
264
270
|
if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
|
|
265
271
|
if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
|
|
272
|
+
if (!('includeInsurance' in value) || value['includeInsurance'] === undefined) return false;
|
|
266
273
|
if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
|
|
267
274
|
if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
|
|
268
275
|
if (!('admin' in value) || value['admin'] === undefined) return false;
|
|
@@ -309,6 +316,7 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
309
316
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
310
317
|
'overrideShipping': json['override_shipping'],
|
|
311
318
|
'insuranceSubtotal': json['insurance_subtotal'] == null ? undefined : json['insurance_subtotal'],
|
|
319
|
+
'includeInsurance': json['include_insurance'],
|
|
312
320
|
'overrideInsurance': json['override_insurance'],
|
|
313
321
|
'useAsBillingAddress': json['use_as_billing_address'],
|
|
314
322
|
'admin': json['admin'],
|
|
@@ -356,6 +364,7 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
|
|
|
356
364
|
'shipping_subtotal': value['shippingSubtotal'],
|
|
357
365
|
'override_shipping': value['overrideShipping'],
|
|
358
366
|
'insurance_subtotal': value['insuranceSubtotal'],
|
|
367
|
+
'include_insurance': value['includeInsurance'],
|
|
359
368
|
'override_insurance': value['overrideInsurance'],
|
|
360
369
|
'use_as_billing_address': value['useAsBillingAddress'],
|
|
361
370
|
'admin': value['admin'],
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DetachCouponOrderRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface DetachCouponOrderRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof DetachCouponOrderRequest
|
|
26
|
+
*/
|
|
27
|
+
couponId: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the DetachCouponOrderRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfDetachCouponOrderRequest(value: object): value is DetachCouponOrderRequest {
|
|
34
|
+
if (!('couponId' in value) || value['couponId'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function DetachCouponOrderRequestFromJSON(json: any): DetachCouponOrderRequest {
|
|
39
|
+
return DetachCouponOrderRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function DetachCouponOrderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetachCouponOrderRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'couponId': json['coupon_id'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function DetachCouponOrderRequestToJSON(json: any): DetachCouponOrderRequest {
|
|
53
|
+
return DetachCouponOrderRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function DetachCouponOrderRequestToJSONTyped(value?: DetachCouponOrderRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'coupon_id': value['couponId'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -89,7 +89,8 @@ export const GetAllOrderRequestSortByEnum = {
|
|
|
89
89
|
Id: 'id',
|
|
90
90
|
CreatedAt: 'created_at',
|
|
91
91
|
PlacedAt: 'placed_at',
|
|
92
|
-
UpdatedAt: 'updated_at'
|
|
92
|
+
UpdatedAt: 'updated_at',
|
|
93
|
+
NsId: 'ns_id'
|
|
93
94
|
} as const;
|
|
94
95
|
export type GetAllOrderRequestSortByEnum = typeof GetAllOrderRequestSortByEnum[keyof typeof GetAllOrderRequestSortByEnum];
|
|
95
96
|
|
|
@@ -125,7 +125,8 @@ export const IndexOrderRequestSortByEnum = {
|
|
|
125
125
|
Id: 'id',
|
|
126
126
|
CreatedAt: 'created_at',
|
|
127
127
|
PlacedAt: 'placed_at',
|
|
128
|
-
UpdatedAt: 'updated_at'
|
|
128
|
+
UpdatedAt: 'updated_at',
|
|
129
|
+
NsId: 'ns_id'
|
|
129
130
|
} as const;
|
|
130
131
|
export type IndexOrderRequestSortByEnum = typeof IndexOrderRequestSortByEnum[keyof typeof IndexOrderRequestSortByEnum];
|
|
131
132
|
|
|
@@ -71,6 +71,24 @@ export interface OrderListResource {
|
|
|
71
71
|
* @memberof OrderListResource
|
|
72
72
|
*/
|
|
73
73
|
updatedAt?: Date | null;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof OrderListResource
|
|
78
|
+
*/
|
|
79
|
+
source: string;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {string}
|
|
83
|
+
* @memberof OrderListResource
|
|
84
|
+
*/
|
|
85
|
+
netsuiteId?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {boolean}
|
|
89
|
+
* @memberof OrderListResource
|
|
90
|
+
*/
|
|
91
|
+
isNetsuiteLocked: boolean;
|
|
74
92
|
/**
|
|
75
93
|
*
|
|
76
94
|
* @type {number}
|
|
@@ -120,6 +138,8 @@ export interface OrderListResource {
|
|
|
120
138
|
*/
|
|
121
139
|
export function instanceOfOrderListResource(value: object): value is OrderListResource {
|
|
122
140
|
if (!('placedAt' in value) || value['placedAt'] === undefined) return false;
|
|
141
|
+
if (!('source' in value) || value['source'] === undefined) return false;
|
|
142
|
+
if (!('isNetsuiteLocked' in value) || value['isNetsuiteLocked'] === undefined) return false;
|
|
123
143
|
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
124
144
|
if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined) return false;
|
|
125
145
|
if (!('cartStatusContext' in value) || value['cartStatusContext'] === undefined) return false;
|
|
@@ -145,6 +165,9 @@ export function OrderListResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
145
165
|
'placedAt': (new Date(json['placed_at'])),
|
|
146
166
|
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
147
167
|
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
168
|
+
'source': json['source'],
|
|
169
|
+
'netsuiteId': json['netsuite_id'] == null ? undefined : json['netsuite_id'],
|
|
170
|
+
'isNetsuiteLocked': json['is_netsuite_locked'],
|
|
148
171
|
'subtotal': json['subtotal'],
|
|
149
172
|
'finalTotalAmount': json['final_total_amount'],
|
|
150
173
|
'cartStatusContext': json['cart_status_context'],
|
|
@@ -171,6 +194,9 @@ export function OrderListResourceToJSONTyped(value?: OrderListResource | null, i
|
|
|
171
194
|
'placed_at': value['placedAt'].toISOString(),
|
|
172
195
|
'created_at': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
173
196
|
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
197
|
+
'source': value['source'],
|
|
198
|
+
'netsuite_id': value['netsuiteId'],
|
|
199
|
+
'is_netsuite_locked': value['isNetsuiteLocked'],
|
|
174
200
|
'subtotal': value['subtotal'],
|
|
175
201
|
'final_total_amount': value['finalTotalAmount'],
|
|
176
202
|
'cart_status_context': value['cartStatusContext'],
|