@digital8/lighting-illusions-ts-sdk 0.0.2425 → 0.0.2427
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 +15 -0
- package/README.md +2 -2
- package/dist/apis/CouponsApi.d.ts +85 -0
- package/dist/apis/CouponsApi.js +355 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +2 -6
- package/dist/models/AdminOrderResource.d.ts +0 -6
- package/dist/models/AdminOrderResource.js +0 -4
- package/dist/models/CouponListResource.d.ts +99 -0
- package/dist/models/CouponListResource.js +91 -0
- package/dist/models/CouponListResourceArrayResponse.d.ts +33 -0
- package/dist/models/CouponListResourceArrayResponse.js +50 -0
- package/dist/models/CouponLiteResource.d.ts +44 -0
- package/dist/models/CouponLiteResource.js +57 -0
- package/dist/models/CouponLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/CouponLiteResourceArrayResponse.js +50 -0
- package/dist/models/CouponResource.d.ts +163 -0
- package/dist/models/CouponResource.js +135 -0
- package/dist/models/CouponResourceArrayResponse.d.ts +33 -0
- package/dist/models/CouponResourceArrayResponse.js +50 -0
- package/dist/models/CouponType.d.ts +26 -0
- package/dist/models/CouponType.js +52 -0
- package/dist/models/CreateCouponRequest.d.ts +126 -0
- package/dist/models/CreateCouponRequest.js +107 -0
- package/dist/models/CreateCouponRequestCouponablesInner.d.ts +48 -0
- package/dist/models/CreateCouponRequestCouponablesInner.js +61 -0
- package/dist/models/OrderFulfillmentResource.d.ts +1 -1
- package/dist/models/OrderFulfillmentResource.js +1 -3
- package/dist/models/PaginatedCouponListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedCouponListResourceResponse.js +57 -0
- package/dist/models/PaginatedCouponResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedCouponResourceResponse.js +57 -0
- package/dist/models/ProductCategoryLiteResource.d.ts +6 -0
- package/dist/models/ProductCategoryLiteResource.js +4 -0
- package/dist/models/ProductChildListResource.d.ts +6 -0
- package/dist/models/ProductChildListResource.js +4 -0
- package/dist/models/SearchAllCouponsRequest.d.ts +101 -0
- package/dist/models/SearchAllCouponsRequest.js +85 -0
- package/dist/models/SearchCartsRequest.d.ts +6 -0
- package/dist/models/SearchCartsRequest.js +2 -0
- package/dist/models/SearchCouponsRequest.d.ts +137 -0
- package/dist/models/SearchCouponsRequest.js +97 -0
- package/dist/models/SearchOrdersRequest.d.ts +6 -0
- package/dist/models/SearchOrdersRequest.js +2 -0
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
- package/dist/models/UpdateCouponRequest.d.ts +120 -0
- package/dist/models/UpdateCouponRequest.js +103 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/index.js +14 -0
- package/package.json +1 -1
- package/src/apis/CouponsApi.ts +286 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +4 -6
- package/src/models/AdminOrderResource.ts +0 -9
- package/src/models/CouponListResource.ts +170 -0
- package/src/models/CouponListResourceArrayResponse.ts +73 -0
- package/src/models/CouponLiteResource.ts +83 -0
- package/src/models/CouponLiteResourceArrayResponse.ts +73 -0
- package/src/models/CouponResource.ts +288 -0
- package/src/models/CouponResourceArrayResponse.ts +73 -0
- package/src/models/CouponType.ts +54 -0
- package/src/models/CreateCouponRequest.ts +207 -0
- package/src/models/CreateCouponRequestCouponablesInner.ts +86 -0
- package/src/models/OrderFulfillmentResource.ts +2 -3
- package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
- package/src/models/PaginatedCouponResourceResponse.ts +90 -0
- package/src/models/ProductCategoryLiteResource.ts +9 -0
- package/src/models/ProductChildListResource.ts +9 -0
- package/src/models/SearchAllCouponsRequest.ts +154 -0
- package/src/models/SearchCartsRequest.ts +8 -0
- package/src/models/SearchCouponsRequest.ts +202 -0
- package/src/models/SearchOrdersRequest.ts +8 -0
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
- package/src/models/UpdateCouponRequest.ts +198 -0
- package/src/models/index.ts +14 -0
|
@@ -0,0 +1,286 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
CouponLiteResourceArrayResponse,
|
|
19
|
+
CouponResource,
|
|
20
|
+
CreateCouponRequest,
|
|
21
|
+
GenericResponse,
|
|
22
|
+
PaginatedCouponListResourceResponse,
|
|
23
|
+
SearchAllCouponsRequest,
|
|
24
|
+
SearchCouponsRequest,
|
|
25
|
+
UpdateCouponRequest,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
import {
|
|
28
|
+
CouponLiteResourceArrayResponseFromJSON,
|
|
29
|
+
CouponLiteResourceArrayResponseToJSON,
|
|
30
|
+
CouponResourceFromJSON,
|
|
31
|
+
CouponResourceToJSON,
|
|
32
|
+
CreateCouponRequestFromJSON,
|
|
33
|
+
CreateCouponRequestToJSON,
|
|
34
|
+
GenericResponseFromJSON,
|
|
35
|
+
GenericResponseToJSON,
|
|
36
|
+
PaginatedCouponListResourceResponseFromJSON,
|
|
37
|
+
PaginatedCouponListResourceResponseToJSON,
|
|
38
|
+
SearchAllCouponsRequestFromJSON,
|
|
39
|
+
SearchAllCouponsRequestToJSON,
|
|
40
|
+
SearchCouponsRequestFromJSON,
|
|
41
|
+
SearchCouponsRequestToJSON,
|
|
42
|
+
UpdateCouponRequestFromJSON,
|
|
43
|
+
UpdateCouponRequestToJSON,
|
|
44
|
+
} from '../models/index';
|
|
45
|
+
|
|
46
|
+
export interface DestroyCouponRequest {
|
|
47
|
+
coupon: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface GetAllCouponRequest {
|
|
51
|
+
searchAllCouponsRequest?: SearchAllCouponsRequest;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IndexCouponRequest {
|
|
55
|
+
searchCouponsRequest?: SearchCouponsRequest;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ShowCouponRequest {
|
|
59
|
+
coupon: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface StoreCouponRequest {
|
|
63
|
+
createCouponRequest?: CreateCouponRequest;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface UpdateCouponOperationRequest {
|
|
67
|
+
coupon: number;
|
|
68
|
+
updateCouponRequest?: UpdateCouponRequest;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
export class CouponsApi extends runtime.BaseAPI {
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Auto-generated: destroyCoupon
|
|
78
|
+
*/
|
|
79
|
+
async destroyCouponRaw(requestParameters: DestroyCouponRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
80
|
+
if (requestParameters['coupon'] == null) {
|
|
81
|
+
throw new runtime.RequiredError(
|
|
82
|
+
'coupon',
|
|
83
|
+
'Required parameter "coupon" was null or undefined when calling destroyCoupon().'
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const queryParameters: any = {};
|
|
88
|
+
|
|
89
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
let urlPath = `/admin-api/coupons/{coupon}/delete`;
|
|
93
|
+
urlPath = urlPath.replace(`{${"coupon"}}`, encodeURIComponent(String(requestParameters['coupon'])));
|
|
94
|
+
|
|
95
|
+
const response = await this.request({
|
|
96
|
+
path: urlPath,
|
|
97
|
+
method: 'DELETE',
|
|
98
|
+
headers: headerParameters,
|
|
99
|
+
query: queryParameters,
|
|
100
|
+
}, initOverrides);
|
|
101
|
+
|
|
102
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Auto-generated: destroyCoupon
|
|
107
|
+
*/
|
|
108
|
+
async destroyCoupon(requestParameters: DestroyCouponRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
109
|
+
const response = await this.destroyCouponRaw(requestParameters, initOverrides);
|
|
110
|
+
return await response.value();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Auto-generated: getAllCoupon
|
|
115
|
+
*/
|
|
116
|
+
async getAllCouponRaw(requestParameters: GetAllCouponRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CouponLiteResourceArrayResponse>> {
|
|
117
|
+
const queryParameters: any = {};
|
|
118
|
+
|
|
119
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
120
|
+
|
|
121
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
let urlPath = `/admin-api/coupons/all`;
|
|
125
|
+
|
|
126
|
+
const response = await this.request({
|
|
127
|
+
path: urlPath,
|
|
128
|
+
method: 'POST',
|
|
129
|
+
headers: headerParameters,
|
|
130
|
+
query: queryParameters,
|
|
131
|
+
body: SearchAllCouponsRequestToJSON(requestParameters['searchAllCouponsRequest']),
|
|
132
|
+
}, initOverrides);
|
|
133
|
+
|
|
134
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CouponLiteResourceArrayResponseFromJSON(jsonValue));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Auto-generated: getAllCoupon
|
|
139
|
+
*/
|
|
140
|
+
async getAllCoupon(requestParameters: GetAllCouponRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CouponLiteResourceArrayResponse> {
|
|
141
|
+
const response = await this.getAllCouponRaw(requestParameters, initOverrides);
|
|
142
|
+
return await response.value();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Auto-generated: indexCoupon
|
|
147
|
+
*/
|
|
148
|
+
async indexCouponRaw(requestParameters: IndexCouponRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedCouponListResourceResponse>> {
|
|
149
|
+
const queryParameters: any = {};
|
|
150
|
+
|
|
151
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
152
|
+
|
|
153
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
let urlPath = `/admin-api/coupons/list`;
|
|
157
|
+
|
|
158
|
+
const response = await this.request({
|
|
159
|
+
path: urlPath,
|
|
160
|
+
method: 'POST',
|
|
161
|
+
headers: headerParameters,
|
|
162
|
+
query: queryParameters,
|
|
163
|
+
body: SearchCouponsRequestToJSON(requestParameters['searchCouponsRequest']),
|
|
164
|
+
}, initOverrides);
|
|
165
|
+
|
|
166
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedCouponListResourceResponseFromJSON(jsonValue));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Auto-generated: indexCoupon
|
|
171
|
+
*/
|
|
172
|
+
async indexCoupon(requestParameters: IndexCouponRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedCouponListResourceResponse> {
|
|
173
|
+
const response = await this.indexCouponRaw(requestParameters, initOverrides);
|
|
174
|
+
return await response.value();
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Auto-generated: showCoupon
|
|
179
|
+
*/
|
|
180
|
+
async showCouponRaw(requestParameters: ShowCouponRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CouponResource>> {
|
|
181
|
+
if (requestParameters['coupon'] == null) {
|
|
182
|
+
throw new runtime.RequiredError(
|
|
183
|
+
'coupon',
|
|
184
|
+
'Required parameter "coupon" was null or undefined when calling showCoupon().'
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const queryParameters: any = {};
|
|
189
|
+
|
|
190
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
let urlPath = `/admin-api/coupons/{coupon}`;
|
|
194
|
+
urlPath = urlPath.replace(`{${"coupon"}}`, encodeURIComponent(String(requestParameters['coupon'])));
|
|
195
|
+
|
|
196
|
+
const response = await this.request({
|
|
197
|
+
path: urlPath,
|
|
198
|
+
method: 'GET',
|
|
199
|
+
headers: headerParameters,
|
|
200
|
+
query: queryParameters,
|
|
201
|
+
}, initOverrides);
|
|
202
|
+
|
|
203
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CouponResourceFromJSON(jsonValue));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Auto-generated: showCoupon
|
|
208
|
+
*/
|
|
209
|
+
async showCoupon(requestParameters: ShowCouponRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CouponResource> {
|
|
210
|
+
const response = await this.showCouponRaw(requestParameters, initOverrides);
|
|
211
|
+
return await response.value();
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Auto-generated: storeCoupon
|
|
216
|
+
*/
|
|
217
|
+
async storeCouponRaw(requestParameters: StoreCouponRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CouponResource>> {
|
|
218
|
+
const queryParameters: any = {};
|
|
219
|
+
|
|
220
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
221
|
+
|
|
222
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
let urlPath = `/admin-api/coupons/create`;
|
|
226
|
+
|
|
227
|
+
const response = await this.request({
|
|
228
|
+
path: urlPath,
|
|
229
|
+
method: 'POST',
|
|
230
|
+
headers: headerParameters,
|
|
231
|
+
query: queryParameters,
|
|
232
|
+
body: CreateCouponRequestToJSON(requestParameters['createCouponRequest']),
|
|
233
|
+
}, initOverrides);
|
|
234
|
+
|
|
235
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CouponResourceFromJSON(jsonValue));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Auto-generated: storeCoupon
|
|
240
|
+
*/
|
|
241
|
+
async storeCoupon(requestParameters: StoreCouponRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CouponResource> {
|
|
242
|
+
const response = await this.storeCouponRaw(requestParameters, initOverrides);
|
|
243
|
+
return await response.value();
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Auto-generated: updateCoupon
|
|
248
|
+
*/
|
|
249
|
+
async updateCouponRaw(requestParameters: UpdateCouponOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CouponResource>> {
|
|
250
|
+
if (requestParameters['coupon'] == null) {
|
|
251
|
+
throw new runtime.RequiredError(
|
|
252
|
+
'coupon',
|
|
253
|
+
'Required parameter "coupon" was null or undefined when calling updateCoupon().'
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const queryParameters: any = {};
|
|
258
|
+
|
|
259
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
260
|
+
|
|
261
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
let urlPath = `/admin-api/coupons/{coupon}/update`;
|
|
265
|
+
urlPath = urlPath.replace(`{${"coupon"}}`, encodeURIComponent(String(requestParameters['coupon'])));
|
|
266
|
+
|
|
267
|
+
const response = await this.request({
|
|
268
|
+
path: urlPath,
|
|
269
|
+
method: 'PUT',
|
|
270
|
+
headers: headerParameters,
|
|
271
|
+
query: queryParameters,
|
|
272
|
+
body: UpdateCouponRequestToJSON(requestParameters['updateCouponRequest']),
|
|
273
|
+
}, initOverrides);
|
|
274
|
+
|
|
275
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CouponResourceFromJSON(jsonValue));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Auto-generated: updateCoupon
|
|
280
|
+
*/
|
|
281
|
+
async updateCoupon(requestParameters: UpdateCouponOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CouponResource> {
|
|
282
|
+
const response = await this.updateCouponRaw(requestParameters, initOverrides);
|
|
283
|
+
return await response.value();
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof AddressFrontendResource
|
|
26
26
|
*/
|
|
27
|
-
company
|
|
27
|
+
company?: string | null;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -73,7 +73,6 @@ 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;
|
|
77
76
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
77
|
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
79
78
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
@@ -94,7 +93,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
94
93
|
}
|
|
95
94
|
return {
|
|
96
95
|
|
|
97
|
-
'company': json['company'],
|
|
96
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
98
97
|
'line1': json['line1'],
|
|
99
98
|
'line2': json['line2'],
|
|
100
99
|
'postcode': json['postcode'],
|
|
@@ -48,7 +48,7 @@ export interface AddressResource {
|
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof AddressResource
|
|
50
50
|
*/
|
|
51
|
-
company
|
|
51
|
+
company?: string | null;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {string}
|
|
@@ -60,7 +60,7 @@ export interface AddressResource {
|
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof AddressResource
|
|
62
62
|
*/
|
|
63
|
-
line2
|
|
63
|
+
line2?: string | null;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
@@ -98,9 +98,7 @@ export interface AddressResource {
|
|
|
98
98
|
*/
|
|
99
99
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
100
100
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
101
|
-
if (!('company' in value) || value['company'] === undefined) return false;
|
|
102
101
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
103
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
104
102
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
105
103
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
106
104
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -123,9 +121,9 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
123
121
|
'type': json['type'] == null ? undefined : json['type'],
|
|
124
122
|
'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
|
|
125
123
|
'addresseeName': json['addresseeName'],
|
|
126
|
-
'company': json['company'],
|
|
124
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
127
125
|
'line1': json['line1'],
|
|
128
|
-
'line2': json['line2'],
|
|
126
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
129
127
|
'postcode': json['postcode'],
|
|
130
128
|
'suburb': json['suburb'],
|
|
131
129
|
'country': json['country'],
|
|
@@ -186,12 +186,6 @@ export interface AdminOrderResource {
|
|
|
186
186
|
* @memberof AdminOrderResource
|
|
187
187
|
*/
|
|
188
188
|
isNetsuiteLocked: boolean;
|
|
189
|
-
/**
|
|
190
|
-
*
|
|
191
|
-
* @type {boolean}
|
|
192
|
-
* @memberof AdminOrderResource
|
|
193
|
-
*/
|
|
194
|
-
isPrivilegedAdmin: boolean;
|
|
195
189
|
/**
|
|
196
190
|
*
|
|
197
191
|
* @type {number}
|
|
@@ -377,7 +371,6 @@ export function instanceOfAdminOrderResource(value: object): value is AdminOrder
|
|
|
377
371
|
if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
|
|
378
372
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false;
|
|
379
373
|
if (!('isNetsuiteLocked' in value) || value['isNetsuiteLocked'] === undefined) return false;
|
|
380
|
-
if (!('isPrivilegedAdmin' in value) || value['isPrivilegedAdmin'] === undefined) return false;
|
|
381
374
|
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
382
375
|
if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined) return false;
|
|
383
376
|
if (!('subtotalDiscountAmount' in value) || value['subtotalDiscountAmount'] === undefined) return false;
|
|
@@ -435,7 +428,6 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
435
428
|
'useAsBillingAddress': json['useAsBillingAddress'],
|
|
436
429
|
'netsuiteId': json['netsuiteId'],
|
|
437
430
|
'isNetsuiteLocked': json['isNetsuiteLocked'],
|
|
438
|
-
'isPrivilegedAdmin': json['isPrivilegedAdmin'],
|
|
439
431
|
'subtotal': json['subtotal'],
|
|
440
432
|
'productDiscountAmount': json['productDiscountAmount'],
|
|
441
433
|
'subtotalDiscountAmount': json['subtotalDiscountAmount'],
|
|
@@ -494,7 +486,6 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
|
|
|
494
486
|
'useAsBillingAddress': value['useAsBillingAddress'],
|
|
495
487
|
'netsuiteId': value['netsuiteId'],
|
|
496
488
|
'isNetsuiteLocked': value['isNetsuiteLocked'],
|
|
497
|
-
'isPrivilegedAdmin': value['isPrivilegedAdmin'],
|
|
498
489
|
'subtotal': value['subtotal'],
|
|
499
490
|
'productDiscountAmount': value['productDiscountAmount'],
|
|
500
491
|
'subtotalDiscountAmount': value['subtotalDiscountAmount'],
|
|
@@ -0,0 +1,170 @@
|
|
|
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 { SiteLiteResource } from './SiteLiteResource';
|
|
17
|
+
import {
|
|
18
|
+
SiteLiteResourceFromJSON,
|
|
19
|
+
SiteLiteResourceFromJSONTyped,
|
|
20
|
+
SiteLiteResourceToJSON,
|
|
21
|
+
SiteLiteResourceToJSONTyped,
|
|
22
|
+
} from './SiteLiteResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CouponListResource
|
|
28
|
+
*/
|
|
29
|
+
export interface CouponListResource {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof CouponListResource
|
|
34
|
+
*/
|
|
35
|
+
id?: number | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CouponListResource
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CouponListResource
|
|
46
|
+
*/
|
|
47
|
+
code: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof CouponListResource
|
|
52
|
+
*/
|
|
53
|
+
type: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof CouponListResource
|
|
58
|
+
*/
|
|
59
|
+
discountType: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof CouponListResource
|
|
64
|
+
*/
|
|
65
|
+
discountAmount: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof CouponListResource
|
|
70
|
+
*/
|
|
71
|
+
startDate?: Date | null;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {Date}
|
|
75
|
+
* @memberof CouponListResource
|
|
76
|
+
*/
|
|
77
|
+
endDate?: Date | null;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {boolean}
|
|
81
|
+
* @memberof CouponListResource
|
|
82
|
+
*/
|
|
83
|
+
isAbandonedCart: boolean;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {SiteLiteResource}
|
|
87
|
+
* @memberof CouponListResource
|
|
88
|
+
*/
|
|
89
|
+
site: SiteLiteResource | null;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof CouponListResource
|
|
94
|
+
*/
|
|
95
|
+
ordersCount: number;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {number}
|
|
99
|
+
* @memberof CouponListResource
|
|
100
|
+
*/
|
|
101
|
+
cartsCount: number;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Check if a given object implements the CouponListResource interface.
|
|
106
|
+
*/
|
|
107
|
+
export function instanceOfCouponListResource(value: object): value is CouponListResource {
|
|
108
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
109
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
110
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
111
|
+
if (!('discountType' in value) || value['discountType'] === undefined) return false;
|
|
112
|
+
if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
|
|
113
|
+
if (!('isAbandonedCart' in value) || value['isAbandonedCart'] === undefined) return false;
|
|
114
|
+
if (!('site' in value) || value['site'] === undefined) return false;
|
|
115
|
+
if (!('ordersCount' in value) || value['ordersCount'] === undefined) return false;
|
|
116
|
+
if (!('cartsCount' in value) || value['cartsCount'] === undefined) return false;
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function CouponListResourceFromJSON(json: any): CouponListResource {
|
|
121
|
+
return CouponListResourceFromJSONTyped(json, false);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function CouponListResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponListResource {
|
|
125
|
+
if (json == null) {
|
|
126
|
+
return json;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
|
|
130
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
131
|
+
'name': json['name'],
|
|
132
|
+
'code': json['code'],
|
|
133
|
+
'type': json['type'],
|
|
134
|
+
'discountType': json['discountType'],
|
|
135
|
+
'discountAmount': json['discountAmount'],
|
|
136
|
+
'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
|
|
137
|
+
'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
|
|
138
|
+
'isAbandonedCart': json['isAbandonedCart'],
|
|
139
|
+
'site': SiteLiteResourceFromJSON(json['site']),
|
|
140
|
+
'ordersCount': json['ordersCount'],
|
|
141
|
+
'cartsCount': json['cartsCount'],
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function CouponListResourceToJSON(json: any): CouponListResource {
|
|
146
|
+
return CouponListResourceToJSONTyped(json, false);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function CouponListResourceToJSONTyped(value?: CouponListResource | null, ignoreDiscriminator: boolean = false): any {
|
|
150
|
+
if (value == null) {
|
|
151
|
+
return value;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
|
|
156
|
+
'id': value['id'],
|
|
157
|
+
'name': value['name'],
|
|
158
|
+
'code': value['code'],
|
|
159
|
+
'type': value['type'],
|
|
160
|
+
'discountType': value['discountType'],
|
|
161
|
+
'discountAmount': value['discountAmount'],
|
|
162
|
+
'startDate': value['startDate'] === null ? null : ((value['startDate'] as any)?.toISOString()),
|
|
163
|
+
'endDate': value['endDate'] === null ? null : ((value['endDate'] as any)?.toISOString()),
|
|
164
|
+
'isAbandonedCart': value['isAbandonedCart'],
|
|
165
|
+
'site': SiteLiteResourceToJSON(value['site']),
|
|
166
|
+
'ordersCount': value['ordersCount'],
|
|
167
|
+
'cartsCount': value['cartsCount'],
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
@@ -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 { CouponListResource } from './CouponListResource';
|
|
17
|
+
import {
|
|
18
|
+
CouponListResourceFromJSON,
|
|
19
|
+
CouponListResourceFromJSONTyped,
|
|
20
|
+
CouponListResourceToJSON,
|
|
21
|
+
CouponListResourceToJSONTyped,
|
|
22
|
+
} from './CouponListResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CouponListResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface CouponListResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<CouponListResource>}
|
|
33
|
+
* @memberof CouponListResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<CouponListResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CouponListResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCouponListResourceArrayResponse(value: object): value is CouponListResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CouponListResourceArrayResponseFromJSON(json: any): CouponListResourceArrayResponse {
|
|
46
|
+
return CouponListResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CouponListResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponListResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CouponListResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CouponListResourceArrayResponseToJSON(json: any): CouponListResourceArrayResponse {
|
|
60
|
+
return CouponListResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function CouponListResourceArrayResponseToJSONTyped(value?: CouponListResourceArrayResponse | 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(CouponListResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|