@digital8/lighting-illusions-ts-sdk 0.0.2033 → 0.0.2035
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 +18 -8
- package/README.md +12 -7
- package/dist/apis/OrdersApi.d.ts +15 -0
- package/dist/apis/OrdersApi.js +59 -0
- package/dist/apis/ProductApi.d.ts +0 -16
- package/dist/apis/ProductApi.js +0 -59
- package/dist/apis/TransactionsApi.d.ts +3 -3
- package/dist/apis/TransactionsApi.js +2 -2
- package/dist/models/AddressResource.d.ts +1 -7
- package/dist/models/AddressResource.js +3 -3
- package/dist/models/AdminNoteResource.d.ts +12 -0
- package/dist/models/AdminNoteResource.js +8 -0
- package/dist/models/AdminOrderResource.d.ts +3 -3
- package/dist/models/AdminOrderResource.js +3 -3
- package/dist/models/CartCouponLiteResource.d.ts +56 -0
- package/dist/models/CartCouponLiteResource.js +67 -0
- package/dist/models/CartCouponLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/CartCouponLiteResourceArrayResponse.js +50 -0
- package/dist/models/CartResource.d.ts +3 -3
- package/dist/models/CartResource.js +3 -3
- package/dist/models/CreateTransactionRequest.d.ts +0 -6
- package/dist/models/CreateTransactionRequest.js +0 -2
- package/dist/models/CustomerListResource.d.ts +7 -0
- package/dist/models/CustomerListResource.js +5 -0
- package/dist/models/FrontendCartResource.d.ts +144 -0
- package/dist/models/FrontendCartResource.js +121 -0
- package/dist/models/FrontendCartResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendCartResourceArrayResponse.js +50 -0
- package/dist/models/FrontendCartResourceCouponsInner.d.ts +56 -0
- package/dist/models/FrontendCartResourceCouponsInner.js +57 -0
- package/dist/models/FrontendLineItemResource.d.ts +81 -0
- package/dist/models/FrontendLineItemResource.js +82 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.js +50 -0
- package/dist/models/FrontendOrderResource.d.ts +168 -0
- package/dist/models/FrontendOrderResource.js +137 -0
- package/dist/models/FrontendOrderResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendOrderResourceArrayResponse.js +50 -0
- package/dist/models/PaymentSource.d.ts +1 -0
- package/dist/models/PaymentSource.js +2 -1
- package/dist/models/ProductChildLineItemLiteResource.d.ts +18 -0
- package/dist/models/ProductChildLineItemLiteResource.js +12 -0
- package/dist/models/StoreFrontendResource.d.ts +2 -2
- package/dist/models/StoreFrontendResource.js +4 -4
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +4 -4
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
- package/dist/models/TransactionLiteResource.d.ts +0 -12
- package/dist/models/TransactionLiteResource.js +0 -4
- package/dist/models/UpdateOrderRequest.d.ts +0 -6
- package/dist/models/UpdateOrderRequest.js +0 -2
- package/dist/models/index.d.ts +9 -4
- package/dist/models/index.js +9 -4
- package/docs/AddressResource.md +0 -2
- package/docs/AdminNoteResource.md +4 -0
- package/docs/AdminOrderResource.md +1 -1
- package/docs/CartCouponLiteResource.md +42 -0
- package/docs/{TransactionListResourceArrayResponse.md → CartCouponLiteResourceArrayResponse.md} +5 -5
- package/docs/CartResource.md +1 -1
- package/docs/CreateTransactionRequest.md +0 -2
- package/docs/CustomerListResource.md +2 -0
- package/docs/FrontendCartResource.md +70 -0
- package/docs/{SkuSearchProductChildRequest.md → FrontendCartResourceArrayResponse.md} +6 -8
- package/docs/FrontendCartResourceCouponsInner.md +42 -0
- package/docs/FrontendLineItemResource.md +50 -0
- package/docs/{PaginatedTransactionListResourceResponse.md → FrontendLineItemResourceArrayResponse.md} +5 -7
- package/docs/FrontendOrderResource.md +78 -0
- package/docs/FrontendOrderResourceArrayResponse.md +34 -0
- package/docs/OrdersApi.md +66 -0
- package/docs/ProductApi.md +0 -66
- package/docs/ProductChildLineItemLiteResource.md +6 -0
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/docs/TransactionLiteResource.md +0 -4
- package/docs/TransactionsApi.md +3 -3
- package/docs/UpdateOrderRequest.md +0 -2
- package/package.json +1 -1
- package/src/apis/OrdersApi.ts +49 -0
- package/src/apis/ProductApi.ts +0 -49
- package/src/apis/TransactionsApi.ts +7 -7
- package/src/models/AddressResource.ts +3 -10
- package/src/models/AdminNoteResource.ts +18 -0
- package/src/models/AdminOrderResource.ts +11 -11
- package/src/models/CartCouponLiteResource.ts +102 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -0
- package/src/models/CartResource.ts +11 -11
- package/src/models/CreateTransactionRequest.ts +0 -8
- package/src/models/CustomerListResource.ts +16 -0
- package/src/models/FrontendCartResource.ts +254 -0
- package/src/models/FrontendCartResourceArrayResponse.ts +73 -0
- package/src/models/FrontendCartResourceCouponsInner.ts +97 -0
- package/src/models/FrontendLineItemResource.ts +145 -0
- package/src/models/FrontendLineItemResourceArrayResponse.ts +73 -0
- package/src/models/FrontendOrderResource.ts +290 -0
- package/src/models/FrontendOrderResourceArrayResponse.ts +73 -0
- package/src/models/PaymentSource.ts +2 -1
- package/src/models/ProductChildLineItemLiteResource.ts +27 -0
- package/src/models/StoreFrontendResource.ts +5 -5
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreResource.ts +5 -5
- package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
- package/src/models/TransactionLiteResource.ts +0 -16
- package/src/models/UpdateOrderRequest.ts +0 -8
- package/src/models/index.ts +9 -4
- package/dist/models/PaginatedTransactionListResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedTransactionListResourceResponse.js +0 -57
- package/dist/models/SkuSearchProductChildRequest.d.ts +0 -38
- package/dist/models/SkuSearchProductChildRequest.js +0 -55
- package/dist/models/TransactionListResource.d.ts +0 -116
- package/dist/models/TransactionListResource.js +0 -97
- package/dist/models/TransactionListResourceArrayResponse.d.ts +0 -33
- package/dist/models/TransactionListResourceArrayResponse.js +0 -50
- package/docs/TransactionListResource.md +0 -62
- package/src/models/PaginatedTransactionListResourceResponse.ts +0 -90
- package/src/models/SkuSearchProductChildRequest.ts +0 -75
- package/src/models/TransactionListResource.ts +0 -187
- package/src/models/TransactionListResourceArrayResponse.ts +0 -73
package/src/apis/OrdersApi.ts
CHANGED
|
@@ -106,6 +106,10 @@ export interface IndexOrderRequest {
|
|
|
106
106
|
searchOrdersRequest?: SearchOrdersRequest;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
export interface PdfOrderRequest {
|
|
110
|
+
order: number;
|
|
111
|
+
}
|
|
112
|
+
|
|
109
113
|
export interface SendPaymentLinkOrderRequest {
|
|
110
114
|
order: number;
|
|
111
115
|
}
|
|
@@ -452,6 +456,51 @@ export class OrdersApi extends runtime.BaseAPI {
|
|
|
452
456
|
return await response.value();
|
|
453
457
|
}
|
|
454
458
|
|
|
459
|
+
/**
|
|
460
|
+
* Creates request options for pdfOrder without sending the request
|
|
461
|
+
*/
|
|
462
|
+
async pdfOrderRequestOpts(requestParameters: PdfOrderRequest): Promise<runtime.RequestOpts> {
|
|
463
|
+
if (requestParameters['order'] == null) {
|
|
464
|
+
throw new runtime.RequiredError(
|
|
465
|
+
'order',
|
|
466
|
+
'Required parameter "order" was null or undefined when calling pdfOrder().'
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
const queryParameters: any = {};
|
|
471
|
+
|
|
472
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
let urlPath = `/admin-api/orders/{order}/pdf`;
|
|
476
|
+
urlPath = urlPath.replace('{order}', encodeURIComponent(String(requestParameters['order'])));
|
|
477
|
+
|
|
478
|
+
return {
|
|
479
|
+
path: urlPath,
|
|
480
|
+
method: 'POST',
|
|
481
|
+
headers: headerParameters,
|
|
482
|
+
query: queryParameters,
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Auto-generated: pdfOrder
|
|
488
|
+
*/
|
|
489
|
+
async pdfOrderRaw(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
490
|
+
const requestOptions = await this.pdfOrderRequestOpts(requestParameters);
|
|
491
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
492
|
+
|
|
493
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Auto-generated: pdfOrder
|
|
498
|
+
*/
|
|
499
|
+
async pdfOrder(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
500
|
+
const response = await this.pdfOrderRaw(requestParameters, initOverrides);
|
|
501
|
+
return await response.value();
|
|
502
|
+
}
|
|
503
|
+
|
|
455
504
|
/**
|
|
456
505
|
* Creates request options for sendPaymentLinkOrder without sending the request
|
|
457
506
|
*/
|
package/src/apis/ProductApi.ts
CHANGED
|
@@ -118,11 +118,6 @@ import {
|
|
|
118
118
|
ShowProductChildAssetsRequestFromJSON,
|
|
119
119
|
ShowProductChildAssetsRequestToJSON,
|
|
120
120
|
} from '../models/ShowProductChildAssetsRequest';
|
|
121
|
-
import {
|
|
122
|
-
type SkuSearchProductChildRequest,
|
|
123
|
-
SkuSearchProductChildRequestFromJSON,
|
|
124
|
-
SkuSearchProductChildRequestToJSON,
|
|
125
|
-
} from '../models/SkuSearchProductChildRequest';
|
|
126
121
|
import {
|
|
127
122
|
type UpdateProductChildRequest,
|
|
128
123
|
UpdateProductChildRequestFromJSON,
|
|
@@ -216,10 +211,6 @@ export interface ShowProductChildRequest {
|
|
|
216
211
|
productChild: number;
|
|
217
212
|
}
|
|
218
213
|
|
|
219
|
-
export interface SkuSearchProductChildOperationRequest {
|
|
220
|
-
skuSearchProductChildRequest?: SkuSearchProductChildRequest;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
214
|
export interface StoreProductRequest {
|
|
224
215
|
createProductRequest?: CreateProductRequest;
|
|
225
216
|
}
|
|
@@ -1073,46 +1064,6 @@ export class ProductApi extends runtime.BaseAPI {
|
|
|
1073
1064
|
return await response.value();
|
|
1074
1065
|
}
|
|
1075
1066
|
|
|
1076
|
-
/**
|
|
1077
|
-
* Creates request options for skuSearchProductChild without sending the request
|
|
1078
|
-
*/
|
|
1079
|
-
async skuSearchProductChildRequestOpts(requestParameters: SkuSearchProductChildOperationRequest): Promise<runtime.RequestOpts> {
|
|
1080
|
-
const queryParameters: any = {};
|
|
1081
|
-
|
|
1082
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1083
|
-
|
|
1084
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
let urlPath = `/admin-api/product/children/sku-search`;
|
|
1088
|
-
|
|
1089
|
-
return {
|
|
1090
|
-
path: urlPath,
|
|
1091
|
-
method: 'POST',
|
|
1092
|
-
headers: headerParameters,
|
|
1093
|
-
query: queryParameters,
|
|
1094
|
-
body: SkuSearchProductChildRequestToJSON(requestParameters['skuSearchProductChildRequest']),
|
|
1095
|
-
};
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
/**
|
|
1099
|
-
* Auto-generated: skuSearchProductChild
|
|
1100
|
-
*/
|
|
1101
|
-
async skuSearchProductChildRaw(requestParameters: SkuSearchProductChildOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductChildResource>> {
|
|
1102
|
-
const requestOptions = await this.skuSearchProductChildRequestOpts(requestParameters);
|
|
1103
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
1104
|
-
|
|
1105
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ProductChildResourceFromJSON(jsonValue));
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* Auto-generated: skuSearchProductChild
|
|
1110
|
-
*/
|
|
1111
|
-
async skuSearchProductChild(requestParameters: SkuSearchProductChildOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductChildResource> {
|
|
1112
|
-
const response = await this.skuSearchProductChildRaw(requestParameters, initOverrides);
|
|
1113
|
-
return await response.value();
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
1067
|
/**
|
|
1117
1068
|
* Creates request options for storeProduct without sending the request
|
|
1118
1069
|
*/
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
CreateTransactionRequestToJSON,
|
|
20
20
|
} from '../models/CreateTransactionRequest';
|
|
21
21
|
import {
|
|
22
|
-
type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} from '../models/
|
|
22
|
+
type PaginatedTransactionResourceResponse,
|
|
23
|
+
PaginatedTransactionResourceResponseFromJSON,
|
|
24
|
+
PaginatedTransactionResourceResponseToJSON,
|
|
25
|
+
} from '../models/PaginatedTransactionResourceResponse';
|
|
26
26
|
import {
|
|
27
27
|
type RefundTransactionRequest,
|
|
28
28
|
RefundTransactionRequestFromJSON,
|
|
@@ -87,17 +87,17 @@ export class TransactionsApi extends runtime.BaseAPI {
|
|
|
87
87
|
/**
|
|
88
88
|
* Auto-generated: indexTransaction
|
|
89
89
|
*/
|
|
90
|
-
async indexTransactionRaw(requestParameters: IndexTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
90
|
+
async indexTransactionRaw(requestParameters: IndexTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedTransactionResourceResponse>> {
|
|
91
91
|
const requestOptions = await this.indexTransactionRequestOpts(requestParameters);
|
|
92
92
|
const response = await this.request(requestOptions, initOverrides);
|
|
93
93
|
|
|
94
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
94
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTransactionResourceResponseFromJSON(jsonValue));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Auto-generated: indexTransaction
|
|
99
99
|
*/
|
|
100
|
-
async indexTransaction(requestParameters: IndexTransactionRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
100
|
+
async indexTransaction(requestParameters: IndexTransactionRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTransactionResourceResponse> {
|
|
101
101
|
const response = await this.indexTransactionRaw(requestParameters, initOverrides);
|
|
102
102
|
return await response.value();
|
|
103
103
|
}
|
|
@@ -25,12 +25,6 @@ export interface AddressResource {
|
|
|
25
25
|
* @memberof AddressResource
|
|
26
26
|
*/
|
|
27
27
|
id?: number | null;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof AddressResource
|
|
32
|
-
*/
|
|
33
|
-
type?: string | null;
|
|
34
28
|
/**
|
|
35
29
|
*
|
|
36
30
|
* @type {number}
|
|
@@ -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}
|
|
@@ -100,6 +94,7 @@ export function instanceOfAddressResource(value: object): value is AddressResour
|
|
|
100
94
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
101
95
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
102
96
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
97
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
103
98
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
104
99
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
105
100
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -119,12 +114,11 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
119
114
|
return {
|
|
120
115
|
|
|
121
116
|
'id': json['id'] == null ? undefined : json['id'],
|
|
122
|
-
'type': json['type'] == null ? undefined : json['type'],
|
|
123
117
|
'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
|
|
124
118
|
'addresseeName': json['addresseeName'],
|
|
125
119
|
'company': json['company'],
|
|
126
120
|
'line1': json['line1'],
|
|
127
|
-
'line2': json['line2']
|
|
121
|
+
'line2': json['line2'],
|
|
128
122
|
'postcode': json['postcode'],
|
|
129
123
|
'suburb': json['suburb'],
|
|
130
124
|
'country': json['country'],
|
|
@@ -145,7 +139,6 @@ export function AddressResourceToJSONTyped(value?: AddressResource | null, ignor
|
|
|
145
139
|
return {
|
|
146
140
|
|
|
147
141
|
'id': value['id'],
|
|
148
|
-
'type': value['type'],
|
|
149
142
|
'sourceAddressId': value['sourceAddressId'],
|
|
150
143
|
'addresseeName': value['addresseeName'],
|
|
151
144
|
'company': value['company'],
|
|
@@ -33,6 +33,18 @@ export interface AdminNoteResource {
|
|
|
33
33
|
* @memberof AdminNoteResource
|
|
34
34
|
*/
|
|
35
35
|
id: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof AdminNoteResource
|
|
40
|
+
*/
|
|
41
|
+
orderId: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof AdminNoteResource
|
|
46
|
+
*/
|
|
47
|
+
adminId: number;
|
|
36
48
|
/**
|
|
37
49
|
*
|
|
38
50
|
* @type {string}
|
|
@@ -64,6 +76,8 @@ export interface AdminNoteResource {
|
|
|
64
76
|
*/
|
|
65
77
|
export function instanceOfAdminNoteResource(value: object): value is AdminNoteResource {
|
|
66
78
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
79
|
+
if (!('orderId' in value) || value['orderId'] === undefined) return false;
|
|
80
|
+
if (!('adminId' in value) || value['adminId'] === undefined) return false;
|
|
67
81
|
if (!('note' in value) || value['note'] === undefined) return false;
|
|
68
82
|
if (!('admin' in value) || value['admin'] === undefined) return false;
|
|
69
83
|
return true;
|
|
@@ -80,6 +94,8 @@ export function AdminNoteResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
80
94
|
return {
|
|
81
95
|
|
|
82
96
|
'id': json['id'],
|
|
97
|
+
'orderId': json['orderId'],
|
|
98
|
+
'adminId': json['adminId'],
|
|
83
99
|
'note': json['note'],
|
|
84
100
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
85
101
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
@@ -99,6 +115,8 @@ export function AdminNoteResourceToJSONTyped(value?: AdminNoteResource | null, i
|
|
|
99
115
|
return {
|
|
100
116
|
|
|
101
117
|
'id': value['id'],
|
|
118
|
+
'orderId': value['orderId'],
|
|
119
|
+
'adminId': value['adminId'],
|
|
102
120
|
'note': value['note'],
|
|
103
121
|
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
104
122
|
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
@@ -55,13 +55,6 @@ import {
|
|
|
55
55
|
CartCouponResourceToJSON,
|
|
56
56
|
CartCouponResourceToJSONTyped,
|
|
57
57
|
} from './CartCouponResource';
|
|
58
|
-
import type { CustomerResource } from './CustomerResource';
|
|
59
|
-
import {
|
|
60
|
-
CustomerResourceFromJSON,
|
|
61
|
-
CustomerResourceFromJSONTyped,
|
|
62
|
-
CustomerResourceToJSON,
|
|
63
|
-
CustomerResourceToJSONTyped,
|
|
64
|
-
} from './CustomerResource';
|
|
65
58
|
import type { LiAdminUserLiteResource } from './LiAdminUserLiteResource';
|
|
66
59
|
import {
|
|
67
60
|
LiAdminUserLiteResourceFromJSON,
|
|
@@ -76,6 +69,13 @@ import {
|
|
|
76
69
|
OmnisendSyncLiteResourceToJSON,
|
|
77
70
|
OmnisendSyncLiteResourceToJSONTyped,
|
|
78
71
|
} from './OmnisendSyncLiteResource';
|
|
72
|
+
import type { CustomerListResource } from './CustomerListResource';
|
|
73
|
+
import {
|
|
74
|
+
CustomerListResourceFromJSON,
|
|
75
|
+
CustomerListResourceFromJSONTyped,
|
|
76
|
+
CustomerListResourceToJSON,
|
|
77
|
+
CustomerListResourceToJSONTyped,
|
|
78
|
+
} from './CustomerListResource';
|
|
79
79
|
import type { AddressResource } from './AddressResource';
|
|
80
80
|
import {
|
|
81
81
|
AddressResourceFromJSON,
|
|
@@ -296,10 +296,10 @@ export interface AdminOrderResource {
|
|
|
296
296
|
site: SiteLiteResource | null;
|
|
297
297
|
/**
|
|
298
298
|
*
|
|
299
|
-
* @type {
|
|
299
|
+
* @type {CustomerListResource}
|
|
300
300
|
* @memberof AdminOrderResource
|
|
301
301
|
*/
|
|
302
|
-
customer:
|
|
302
|
+
customer: CustomerListResource | null;
|
|
303
303
|
/**
|
|
304
304
|
*
|
|
305
305
|
* @type {LiAdminUserLiteResource}
|
|
@@ -446,7 +446,7 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
446
446
|
'shippingEstimate': json['shippingEstimate'],
|
|
447
447
|
'insuranceEstimate': json['insuranceEstimate'],
|
|
448
448
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
449
|
-
'customer':
|
|
449
|
+
'customer': CustomerListResourceFromJSON(json['customer']),
|
|
450
450
|
'admin': LiAdminUserLiteResourceFromJSON(json['admin']),
|
|
451
451
|
'status': OrderStatusLiteResourceFromJSON(json['status']),
|
|
452
452
|
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(LineItemListResourceFromJSON)),
|
|
@@ -504,7 +504,7 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
|
|
|
504
504
|
'shippingEstimate': value['shippingEstimate'],
|
|
505
505
|
'insuranceEstimate': value['insuranceEstimate'],
|
|
506
506
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
507
|
-
'customer':
|
|
507
|
+
'customer': CustomerListResourceToJSON(value['customer']),
|
|
508
508
|
'admin': LiAdminUserLiteResourceToJSON(value['admin']),
|
|
509
509
|
'status': OrderStatusLiteResourceToJSON(value['status']),
|
|
510
510
|
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(LineItemListResourceToJSON)),
|
|
@@ -0,0 +1,102 @@
|
|
|
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 CartCouponLiteResource
|
|
20
|
+
*/
|
|
21
|
+
export interface CartCouponLiteResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CartCouponLiteResource
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CartCouponLiteResource
|
|
32
|
+
*/
|
|
33
|
+
code: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CartCouponLiteResource
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof CartCouponLiteResource
|
|
44
|
+
*/
|
|
45
|
+
discount: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof CartCouponLiteResource
|
|
50
|
+
*/
|
|
51
|
+
appliesTo: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the CartCouponLiteResource interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfCartCouponLiteResource(value: object): value is CartCouponLiteResource {
|
|
58
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
59
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
60
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
61
|
+
if (!('discount' in value) || value['discount'] === undefined) return false;
|
|
62
|
+
if (!('appliesTo' in value) || value['appliesTo'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CartCouponLiteResourceFromJSON(json: any): CartCouponLiteResource {
|
|
67
|
+
return CartCouponLiteResourceFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function CartCouponLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResource {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'code': json['code'],
|
|
78
|
+
'name': json['name'],
|
|
79
|
+
'discount': json['discount'],
|
|
80
|
+
'appliesTo': json['appliesTo'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function CartCouponLiteResourceToJSON(json: any): CartCouponLiteResource {
|
|
85
|
+
return CartCouponLiteResourceToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function CartCouponLiteResourceToJSONTyped(value?: CartCouponLiteResource | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'id': value['id'],
|
|
96
|
+
'code': value['code'],
|
|
97
|
+
'name': value['name'],
|
|
98
|
+
'discount': value['discount'],
|
|
99
|
+
'appliesTo': value['appliesTo'],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
import type { CartCouponLiteResource } from './CartCouponLiteResource';
|
|
17
|
+
import {
|
|
18
|
+
CartCouponLiteResourceFromJSON,
|
|
19
|
+
CartCouponLiteResourceFromJSONTyped,
|
|
20
|
+
CartCouponLiteResourceToJSON,
|
|
21
|
+
CartCouponLiteResourceToJSONTyped,
|
|
22
|
+
} from './CartCouponLiteResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CartCouponLiteResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface CartCouponLiteResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<CartCouponLiteResource>}
|
|
33
|
+
* @memberof CartCouponLiteResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<CartCouponLiteResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CartCouponLiteResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCartCouponLiteResourceArrayResponse(value: object): value is CartCouponLiteResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CartCouponLiteResourceArrayResponseFromJSON(json: any): CartCouponLiteResourceArrayResponse {
|
|
46
|
+
return CartCouponLiteResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CartCouponLiteResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CartCouponLiteResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CartCouponLiteResourceArrayResponseToJSON(json: any): CartCouponLiteResourceArrayResponse {
|
|
60
|
+
return CartCouponLiteResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function CartCouponLiteResourceArrayResponseToJSONTyped(value?: CartCouponLiteResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(CartCouponLiteResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -27,13 +27,6 @@ import {
|
|
|
27
27
|
LineItemListResourceToJSON,
|
|
28
28
|
LineItemListResourceToJSONTyped,
|
|
29
29
|
} from './LineItemListResource';
|
|
30
|
-
import type { CustomerResource } from './CustomerResource';
|
|
31
|
-
import {
|
|
32
|
-
CustomerResourceFromJSON,
|
|
33
|
-
CustomerResourceFromJSONTyped,
|
|
34
|
-
CustomerResourceToJSON,
|
|
35
|
-
CustomerResourceToJSONTyped,
|
|
36
|
-
} from './CustomerResource';
|
|
37
30
|
import type { LiAdminUserLiteResource } from './LiAdminUserLiteResource';
|
|
38
31
|
import {
|
|
39
32
|
LiAdminUserLiteResourceFromJSON,
|
|
@@ -41,6 +34,13 @@ import {
|
|
|
41
34
|
LiAdminUserLiteResourceToJSON,
|
|
42
35
|
LiAdminUserLiteResourceToJSONTyped,
|
|
43
36
|
} from './LiAdminUserLiteResource';
|
|
37
|
+
import type { CustomerListResource } from './CustomerListResource';
|
|
38
|
+
import {
|
|
39
|
+
CustomerListResourceFromJSON,
|
|
40
|
+
CustomerListResourceFromJSONTyped,
|
|
41
|
+
CustomerListResourceToJSON,
|
|
42
|
+
CustomerListResourceToJSONTyped,
|
|
43
|
+
} from './CustomerListResource';
|
|
44
44
|
import type { AddressResource } from './AddressResource';
|
|
45
45
|
import {
|
|
46
46
|
AddressResourceFromJSON,
|
|
@@ -165,10 +165,10 @@ export interface CartResource {
|
|
|
165
165
|
site: SiteLiteResource | null;
|
|
166
166
|
/**
|
|
167
167
|
*
|
|
168
|
-
* @type {
|
|
168
|
+
* @type {CustomerListResource}
|
|
169
169
|
* @memberof CartResource
|
|
170
170
|
*/
|
|
171
|
-
customer:
|
|
171
|
+
customer: CustomerListResource | null;
|
|
172
172
|
/**
|
|
173
173
|
*
|
|
174
174
|
* @type {Array<LineItemListResource>}
|
|
@@ -321,7 +321,7 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
321
321
|
'useAsBillingAddress': json['useAsBillingAddress'],
|
|
322
322
|
'admin': LiAdminUserLiteResourceFromJSON(json['admin']),
|
|
323
323
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
324
|
-
'customer':
|
|
324
|
+
'customer': CustomerListResourceFromJSON(json['customer']),
|
|
325
325
|
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(LineItemListResourceFromJSON)),
|
|
326
326
|
'coupons': json['coupons'],
|
|
327
327
|
'shippingAddress': AddressResourceFromJSON(json['shippingAddress']),
|
|
@@ -369,7 +369,7 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
|
|
|
369
369
|
'useAsBillingAddress': value['useAsBillingAddress'],
|
|
370
370
|
'admin': LiAdminUserLiteResourceToJSON(value['admin']),
|
|
371
371
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
372
|
-
'customer':
|
|
372
|
+
'customer': CustomerListResourceToJSON(value['customer']),
|
|
373
373
|
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(LineItemListResourceToJSON)),
|
|
374
374
|
'coupons': value['coupons'],
|
|
375
375
|
'shippingAddress': AddressResourceToJSON(value['shippingAddress']),
|
|
@@ -49,12 +49,6 @@ export interface CreateTransactionRequest {
|
|
|
49
49
|
* @memberof CreateTransactionRequest
|
|
50
50
|
*/
|
|
51
51
|
paymentMethod: CreateTransactionRequestPaymentMethodEnum;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @type {string}
|
|
55
|
-
* @memberof CreateTransactionRequest
|
|
56
|
-
*/
|
|
57
|
-
description?: string | null;
|
|
58
52
|
/**
|
|
59
53
|
*
|
|
60
54
|
* @type {string}
|
|
@@ -109,7 +103,6 @@ export function CreateTransactionRequestFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
109
103
|
'amount': json['amount'] == null ? undefined : json['amount'],
|
|
110
104
|
'surcharge': json['surcharge'],
|
|
111
105
|
'paymentMethod': json['payment_method'],
|
|
112
|
-
'description': json['description'] == null ? undefined : json['description'],
|
|
113
106
|
'nonce': json['nonce'] == null ? undefined : json['nonce'],
|
|
114
107
|
'deviceData': json['device_data'] == null ? undefined : json['device_data'],
|
|
115
108
|
};
|
|
@@ -131,7 +124,6 @@ export function CreateTransactionRequestToJSONTyped(value?: CreateTransactionReq
|
|
|
131
124
|
'amount': value['amount'],
|
|
132
125
|
'surcharge': value['surcharge'],
|
|
133
126
|
'payment_method': value['paymentMethod'],
|
|
134
|
-
'description': value['description'],
|
|
135
127
|
'nonce': value['nonce'],
|
|
136
128
|
'device_data': value['deviceData'],
|
|
137
129
|
};
|
|
@@ -20,6 +20,13 @@ import {
|
|
|
20
20
|
SiteLiteResourceToJSON,
|
|
21
21
|
SiteLiteResourceToJSONTyped,
|
|
22
22
|
} from './SiteLiteResource';
|
|
23
|
+
import type { LiAddressResource } from './LiAddressResource';
|
|
24
|
+
import {
|
|
25
|
+
LiAddressResourceFromJSON,
|
|
26
|
+
LiAddressResourceFromJSONTyped,
|
|
27
|
+
LiAddressResourceToJSON,
|
|
28
|
+
LiAddressResourceToJSONTyped,
|
|
29
|
+
} from './LiAddressResource';
|
|
23
30
|
|
|
24
31
|
/**
|
|
25
32
|
*
|
|
@@ -63,6 +70,12 @@ export interface CustomerListResource {
|
|
|
63
70
|
* @memberof CustomerListResource
|
|
64
71
|
*/
|
|
65
72
|
site: SiteLiteResource | null;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {Array<LiAddressResource>}
|
|
76
|
+
* @memberof CustomerListResource
|
|
77
|
+
*/
|
|
78
|
+
addresses: Array<LiAddressResource> | null;
|
|
66
79
|
}
|
|
67
80
|
|
|
68
81
|
/**
|
|
@@ -74,6 +87,7 @@ export function instanceOfCustomerListResource(value: object): value is Customer
|
|
|
74
87
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
75
88
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
76
89
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
90
|
+
if (!('addresses' in value) || value['addresses'] === undefined) return false;
|
|
77
91
|
return true;
|
|
78
92
|
}
|
|
79
93
|
|
|
@@ -93,6 +107,7 @@ export function CustomerListResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
93
107
|
'email': json['email'],
|
|
94
108
|
'phone': json['phone'],
|
|
95
109
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
110
|
+
'addresses': (json['addresses'] == null ? null : (json['addresses'] as Array<any>).map(LiAddressResourceFromJSON)),
|
|
96
111
|
};
|
|
97
112
|
}
|
|
98
113
|
|
|
@@ -113,6 +128,7 @@ export function CustomerListResourceToJSONTyped(value?: CustomerListResource | n
|
|
|
113
128
|
'email': value['email'],
|
|
114
129
|
'phone': value['phone'],
|
|
115
130
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
131
|
+
'addresses': (value['addresses'] == null ? null : (value['addresses'] as Array<any>).map(LiAddressResourceToJSON)),
|
|
116
132
|
};
|
|
117
133
|
}
|
|
118
134
|
|