@digital8/lighting-illusions-ts-sdk 0.0.2520 → 0.0.2521
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +0 -15
- package/README.md +2 -2
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -1
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +3 -1
- package/dist/models/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +3 -3
- package/dist/models/AppliedCouponResource.d.ts +0 -30
- package/dist/models/AppliedCouponResource.js +0 -20
- package/dist/models/FrontendCartResource.d.ts +0 -6
- package/dist/models/FrontendCartResource.js +0 -2
- package/dist/models/OrderFulfillmentResource.d.ts +1 -1
- package/dist/models/OrderFulfillmentResource.js +3 -1
- package/dist/models/ProductCategoryLiteResource.d.ts +0 -6
- package/dist/models/ProductCategoryLiteResource.js +0 -4
- package/dist/models/ProductChildListResource.d.ts +0 -6
- package/dist/models/ProductChildListResource.js +0 -4
- package/dist/models/SearchCartsRequest.d.ts +0 -6
- package/dist/models/SearchCartsRequest.js +0 -2
- package/dist/models/SearchOrdersRequest.d.ts +0 -6
- package/dist/models/SearchOrdersRequest.js +0 -2
- 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 +1 -3
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
- package/dist/models/index.d.ts +0 -14
- package/dist/models/index.js +0 -14
- package/package.json +1 -1
- package/src/apis/index.ts +0 -1
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +5 -5
- package/src/models/AppliedCouponResource.ts +0 -45
- package/src/models/FrontendCartResource.ts +0 -8
- package/src/models/OrderFulfillmentResource.ts +3 -2
- package/src/models/ProductCategoryLiteResource.ts +0 -9
- package/src/models/ProductChildListResource.ts +0 -9
- package/src/models/SearchCartsRequest.ts +0 -8
- package/src/models/SearchOrdersRequest.ts +0 -8
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreResource.ts +3 -2
- package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
- package/src/models/index.ts +0 -14
- package/dist/apis/CouponsApi.d.ts +0 -85
- package/dist/apis/CouponsApi.js +0 -355
- package/dist/models/CouponListResource.d.ts +0 -99
- package/dist/models/CouponListResource.js +0 -91
- package/dist/models/CouponListResourceArrayResponse.d.ts +0 -33
- package/dist/models/CouponListResourceArrayResponse.js +0 -50
- package/dist/models/CouponLiteResource.d.ts +0 -44
- package/dist/models/CouponLiteResource.js +0 -57
- package/dist/models/CouponLiteResourceArrayResponse.d.ts +0 -33
- package/dist/models/CouponLiteResourceArrayResponse.js +0 -50
- package/dist/models/CouponResource.d.ts +0 -163
- package/dist/models/CouponResource.js +0 -135
- package/dist/models/CouponResourceArrayResponse.d.ts +0 -33
- package/dist/models/CouponResourceArrayResponse.js +0 -50
- package/dist/models/CouponType.d.ts +0 -26
- package/dist/models/CouponType.js +0 -52
- package/dist/models/CreateCouponRequest.d.ts +0 -126
- package/dist/models/CreateCouponRequest.js +0 -107
- package/dist/models/CreateCouponRequestCouponablesInner.d.ts +0 -48
- package/dist/models/CreateCouponRequestCouponablesInner.js +0 -61
- package/dist/models/PaginatedCouponListResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedCouponListResourceResponse.js +0 -57
- package/dist/models/PaginatedCouponResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedCouponResourceResponse.js +0 -57
- package/dist/models/SearchAllCouponsRequest.d.ts +0 -101
- package/dist/models/SearchAllCouponsRequest.js +0 -85
- package/dist/models/SearchCouponsRequest.d.ts +0 -137
- package/dist/models/SearchCouponsRequest.js +0 -97
- package/dist/models/UpdateCouponRequest.d.ts +0 -120
- package/dist/models/UpdateCouponRequest.js +0 -103
- package/src/apis/CouponsApi.ts +0 -286
- package/src/models/CouponListResource.ts +0 -170
- package/src/models/CouponListResourceArrayResponse.ts +0 -73
- package/src/models/CouponLiteResource.ts +0 -83
- package/src/models/CouponLiteResourceArrayResponse.ts +0 -73
- package/src/models/CouponResource.ts +0 -288
- package/src/models/CouponResourceArrayResponse.ts +0 -73
- package/src/models/CouponType.ts +0 -54
- package/src/models/CreateCouponRequest.ts +0 -207
- package/src/models/CreateCouponRequestCouponablesInner.ts +0 -86
- package/src/models/PaginatedCouponListResourceResponse.ts +0 -90
- package/src/models/PaginatedCouponResourceResponse.ts +0 -90
- package/src/models/SearchAllCouponsRequest.ts +0 -154
- package/src/models/SearchCouponsRequest.ts +0 -202
- package/src/models/UpdateCouponRequest.ts +0 -198
|
@@ -1,288 +0,0 @@
|
|
|
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 { ProductCategoryListResource } from './ProductCategoryListResource';
|
|
17
|
-
import {
|
|
18
|
-
ProductCategoryListResourceFromJSON,
|
|
19
|
-
ProductCategoryListResourceFromJSONTyped,
|
|
20
|
-
ProductCategoryListResourceToJSON,
|
|
21
|
-
ProductCategoryListResourceToJSONTyped,
|
|
22
|
-
} from './ProductCategoryListResource';
|
|
23
|
-
import type { SiteLiteResource } from './SiteLiteResource';
|
|
24
|
-
import {
|
|
25
|
-
SiteLiteResourceFromJSON,
|
|
26
|
-
SiteLiteResourceFromJSONTyped,
|
|
27
|
-
SiteLiteResourceToJSON,
|
|
28
|
-
SiteLiteResourceToJSONTyped,
|
|
29
|
-
} from './SiteLiteResource';
|
|
30
|
-
import type { SupplierListResource } from './SupplierListResource';
|
|
31
|
-
import {
|
|
32
|
-
SupplierListResourceFromJSON,
|
|
33
|
-
SupplierListResourceFromJSONTyped,
|
|
34
|
-
SupplierListResourceToJSON,
|
|
35
|
-
SupplierListResourceToJSONTyped,
|
|
36
|
-
} from './SupplierListResource';
|
|
37
|
-
import type { ProductChildLiteResource } from './ProductChildLiteResource';
|
|
38
|
-
import {
|
|
39
|
-
ProductChildLiteResourceFromJSON,
|
|
40
|
-
ProductChildLiteResourceFromJSONTyped,
|
|
41
|
-
ProductChildLiteResourceToJSON,
|
|
42
|
-
ProductChildLiteResourceToJSONTyped,
|
|
43
|
-
} from './ProductChildLiteResource';
|
|
44
|
-
import type { CustomerListResource } from './CustomerListResource';
|
|
45
|
-
import {
|
|
46
|
-
CustomerListResourceFromJSON,
|
|
47
|
-
CustomerListResourceFromJSONTyped,
|
|
48
|
-
CustomerListResourceToJSON,
|
|
49
|
-
CustomerListResourceToJSONTyped,
|
|
50
|
-
} from './CustomerListResource';
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @export
|
|
55
|
-
* @interface CouponResource
|
|
56
|
-
*/
|
|
57
|
-
export interface CouponResource {
|
|
58
|
-
/**
|
|
59
|
-
*
|
|
60
|
-
* @type {number}
|
|
61
|
-
* @memberof CouponResource
|
|
62
|
-
*/
|
|
63
|
-
id?: number | null;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @type {string}
|
|
67
|
-
* @memberof CouponResource
|
|
68
|
-
*/
|
|
69
|
-
name: string;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @type {string}
|
|
73
|
-
* @memberof CouponResource
|
|
74
|
-
*/
|
|
75
|
-
code: string;
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
* @type {string}
|
|
79
|
-
* @memberof CouponResource
|
|
80
|
-
*/
|
|
81
|
-
type: string;
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @type {string}
|
|
85
|
-
* @memberof CouponResource
|
|
86
|
-
*/
|
|
87
|
-
discountType: string;
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* @type {number}
|
|
91
|
-
* @memberof CouponResource
|
|
92
|
-
*/
|
|
93
|
-
discountAmount: number;
|
|
94
|
-
/**
|
|
95
|
-
*
|
|
96
|
-
* @type {number}
|
|
97
|
-
* @memberof CouponResource
|
|
98
|
-
*/
|
|
99
|
-
minAmount: number;
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* @type {number}
|
|
103
|
-
* @memberof CouponResource
|
|
104
|
-
*/
|
|
105
|
-
minProducts: number;
|
|
106
|
-
/**
|
|
107
|
-
*
|
|
108
|
-
* @type {number}
|
|
109
|
-
* @memberof CouponResource
|
|
110
|
-
*/
|
|
111
|
-
totalUseLimit: number;
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
* @type {number}
|
|
115
|
-
* @memberof CouponResource
|
|
116
|
-
*/
|
|
117
|
-
customerUseLimit: number;
|
|
118
|
-
/**
|
|
119
|
-
*
|
|
120
|
-
* @type {boolean}
|
|
121
|
-
* @memberof CouponResource
|
|
122
|
-
*/
|
|
123
|
-
isAbandonedCart: boolean;
|
|
124
|
-
/**
|
|
125
|
-
*
|
|
126
|
-
* @type {boolean}
|
|
127
|
-
* @memberof CouponResource
|
|
128
|
-
*/
|
|
129
|
-
isForAllProducts: boolean;
|
|
130
|
-
/**
|
|
131
|
-
*
|
|
132
|
-
* @type {boolean}
|
|
133
|
-
* @memberof CouponResource
|
|
134
|
-
*/
|
|
135
|
-
isForAllCustomers: boolean;
|
|
136
|
-
/**
|
|
137
|
-
*
|
|
138
|
-
* @type {Date}
|
|
139
|
-
* @memberof CouponResource
|
|
140
|
-
*/
|
|
141
|
-
startDate?: Date | null;
|
|
142
|
-
/**
|
|
143
|
-
*
|
|
144
|
-
* @type {Date}
|
|
145
|
-
* @memberof CouponResource
|
|
146
|
-
*/
|
|
147
|
-
endDate?: Date | null;
|
|
148
|
-
/**
|
|
149
|
-
*
|
|
150
|
-
* @type {SiteLiteResource}
|
|
151
|
-
* @memberof CouponResource
|
|
152
|
-
*/
|
|
153
|
-
site: SiteLiteResource | null;
|
|
154
|
-
/**
|
|
155
|
-
*
|
|
156
|
-
* @type {Array<ProductChildLiteResource>}
|
|
157
|
-
* @memberof CouponResource
|
|
158
|
-
*/
|
|
159
|
-
productChildren: Array<ProductChildLiteResource> | null;
|
|
160
|
-
/**
|
|
161
|
-
*
|
|
162
|
-
* @type {Array<ProductCategoryListResource>}
|
|
163
|
-
* @memberof CouponResource
|
|
164
|
-
*/
|
|
165
|
-
categories: Array<ProductCategoryListResource> | null;
|
|
166
|
-
/**
|
|
167
|
-
*
|
|
168
|
-
* @type {Array<SupplierListResource>}
|
|
169
|
-
* @memberof CouponResource
|
|
170
|
-
*/
|
|
171
|
-
suppliers: Array<SupplierListResource> | null;
|
|
172
|
-
/**
|
|
173
|
-
*
|
|
174
|
-
* @type {Array<CustomerListResource>}
|
|
175
|
-
* @memberof CouponResource
|
|
176
|
-
*/
|
|
177
|
-
customers: Array<CustomerListResource> | null;
|
|
178
|
-
/**
|
|
179
|
-
*
|
|
180
|
-
* @type {number}
|
|
181
|
-
* @memberof CouponResource
|
|
182
|
-
*/
|
|
183
|
-
ordersCount: number;
|
|
184
|
-
/**
|
|
185
|
-
*
|
|
186
|
-
* @type {number}
|
|
187
|
-
* @memberof CouponResource
|
|
188
|
-
*/
|
|
189
|
-
cartsCount: number;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Check if a given object implements the CouponResource interface.
|
|
194
|
-
*/
|
|
195
|
-
export function instanceOfCouponResource(value: object): value is CouponResource {
|
|
196
|
-
if (!('name' in value) || value['name'] === undefined) return false;
|
|
197
|
-
if (!('code' in value) || value['code'] === undefined) return false;
|
|
198
|
-
if (!('type' in value) || value['type'] === undefined) return false;
|
|
199
|
-
if (!('discountType' in value) || value['discountType'] === undefined) return false;
|
|
200
|
-
if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
|
|
201
|
-
if (!('minAmount' in value) || value['minAmount'] === undefined) return false;
|
|
202
|
-
if (!('minProducts' in value) || value['minProducts'] === undefined) return false;
|
|
203
|
-
if (!('totalUseLimit' in value) || value['totalUseLimit'] === undefined) return false;
|
|
204
|
-
if (!('customerUseLimit' in value) || value['customerUseLimit'] === undefined) return false;
|
|
205
|
-
if (!('isAbandonedCart' in value) || value['isAbandonedCart'] === undefined) return false;
|
|
206
|
-
if (!('isForAllProducts' in value) || value['isForAllProducts'] === undefined) return false;
|
|
207
|
-
if (!('isForAllCustomers' in value) || value['isForAllCustomers'] === undefined) return false;
|
|
208
|
-
if (!('site' in value) || value['site'] === undefined) return false;
|
|
209
|
-
if (!('productChildren' in value) || value['productChildren'] === undefined) return false;
|
|
210
|
-
if (!('categories' in value) || value['categories'] === undefined) return false;
|
|
211
|
-
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
212
|
-
if (!('customers' in value) || value['customers'] === undefined) return false;
|
|
213
|
-
if (!('ordersCount' in value) || value['ordersCount'] === undefined) return false;
|
|
214
|
-
if (!('cartsCount' in value) || value['cartsCount'] === undefined) return false;
|
|
215
|
-
return true;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export function CouponResourceFromJSON(json: any): CouponResource {
|
|
219
|
-
return CouponResourceFromJSONTyped(json, false);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export function CouponResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponResource {
|
|
223
|
-
if (json == null) {
|
|
224
|
-
return json;
|
|
225
|
-
}
|
|
226
|
-
return {
|
|
227
|
-
|
|
228
|
-
'id': json['id'] == null ? undefined : json['id'],
|
|
229
|
-
'name': json['name'],
|
|
230
|
-
'code': json['code'],
|
|
231
|
-
'type': json['type'],
|
|
232
|
-
'discountType': json['discountType'],
|
|
233
|
-
'discountAmount': json['discountAmount'],
|
|
234
|
-
'minAmount': json['minAmount'],
|
|
235
|
-
'minProducts': json['minProducts'],
|
|
236
|
-
'totalUseLimit': json['totalUseLimit'],
|
|
237
|
-
'customerUseLimit': json['customerUseLimit'],
|
|
238
|
-
'isAbandonedCart': json['isAbandonedCart'],
|
|
239
|
-
'isForAllProducts': json['isForAllProducts'],
|
|
240
|
-
'isForAllCustomers': json['isForAllCustomers'],
|
|
241
|
-
'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
|
|
242
|
-
'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
|
|
243
|
-
'site': SiteLiteResourceFromJSON(json['site']),
|
|
244
|
-
'productChildren': (json['productChildren'] == null ? null : (json['productChildren'] as Array<any>).map(ProductChildLiteResourceFromJSON)),
|
|
245
|
-
'categories': (json['categories'] == null ? null : (json['categories'] as Array<any>).map(ProductCategoryListResourceFromJSON)),
|
|
246
|
-
'suppliers': (json['suppliers'] == null ? null : (json['suppliers'] as Array<any>).map(SupplierListResourceFromJSON)),
|
|
247
|
-
'customers': (json['customers'] == null ? null : (json['customers'] as Array<any>).map(CustomerListResourceFromJSON)),
|
|
248
|
-
'ordersCount': json['ordersCount'],
|
|
249
|
-
'cartsCount': json['cartsCount'],
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export function CouponResourceToJSON(json: any): CouponResource {
|
|
254
|
-
return CouponResourceToJSONTyped(json, false);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export function CouponResourceToJSONTyped(value?: CouponResource | null, ignoreDiscriminator: boolean = false): any {
|
|
258
|
-
if (value == null) {
|
|
259
|
-
return value;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
return {
|
|
263
|
-
|
|
264
|
-
'id': value['id'],
|
|
265
|
-
'name': value['name'],
|
|
266
|
-
'code': value['code'],
|
|
267
|
-
'type': value['type'],
|
|
268
|
-
'discountType': value['discountType'],
|
|
269
|
-
'discountAmount': value['discountAmount'],
|
|
270
|
-
'minAmount': value['minAmount'],
|
|
271
|
-
'minProducts': value['minProducts'],
|
|
272
|
-
'totalUseLimit': value['totalUseLimit'],
|
|
273
|
-
'customerUseLimit': value['customerUseLimit'],
|
|
274
|
-
'isAbandonedCart': value['isAbandonedCart'],
|
|
275
|
-
'isForAllProducts': value['isForAllProducts'],
|
|
276
|
-
'isForAllCustomers': value['isForAllCustomers'],
|
|
277
|
-
'startDate': value['startDate'] === null ? null : ((value['startDate'] as any)?.toISOString()),
|
|
278
|
-
'endDate': value['endDate'] === null ? null : ((value['endDate'] as any)?.toISOString()),
|
|
279
|
-
'site': SiteLiteResourceToJSON(value['site']),
|
|
280
|
-
'productChildren': (value['productChildren'] == null ? null : (value['productChildren'] as Array<any>).map(ProductChildLiteResourceToJSON)),
|
|
281
|
-
'categories': (value['categories'] == null ? null : (value['categories'] as Array<any>).map(ProductCategoryListResourceToJSON)),
|
|
282
|
-
'suppliers': (value['suppliers'] == null ? null : (value['suppliers'] as Array<any>).map(SupplierListResourceToJSON)),
|
|
283
|
-
'customers': (value['customers'] == null ? null : (value['customers'] as Array<any>).map(CustomerListResourceToJSON)),
|
|
284
|
-
'ordersCount': value['ordersCount'],
|
|
285
|
-
'cartsCount': value['cartsCount'],
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
|
|
@@ -1,73 +0,0 @@
|
|
|
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 { CouponResource } from './CouponResource';
|
|
17
|
-
import {
|
|
18
|
-
CouponResourceFromJSON,
|
|
19
|
-
CouponResourceFromJSONTyped,
|
|
20
|
-
CouponResourceToJSON,
|
|
21
|
-
CouponResourceToJSONTyped,
|
|
22
|
-
} from './CouponResource';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @export
|
|
27
|
-
* @interface CouponResourceArrayResponse
|
|
28
|
-
*/
|
|
29
|
-
export interface CouponResourceArrayResponse {
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @type {Array<CouponResource>}
|
|
33
|
-
* @memberof CouponResourceArrayResponse
|
|
34
|
-
*/
|
|
35
|
-
data?: Array<CouponResource>;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Check if a given object implements the CouponResourceArrayResponse interface.
|
|
40
|
-
*/
|
|
41
|
-
export function instanceOfCouponResourceArrayResponse(value: object): value is CouponResourceArrayResponse {
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function CouponResourceArrayResponseFromJSON(json: any): CouponResourceArrayResponse {
|
|
46
|
-
return CouponResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function CouponResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponResourceArrayResponse {
|
|
50
|
-
if (json == null) {
|
|
51
|
-
return json;
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
|
|
55
|
-
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CouponResourceFromJSON)),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function CouponResourceArrayResponseToJSON(json: any): CouponResourceArrayResponse {
|
|
60
|
-
return CouponResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function CouponResourceArrayResponseToJSONTyped(value?: CouponResourceArrayResponse | 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(CouponResourceToJSON)),
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
package/src/models/CouponType.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
*/
|
|
20
|
-
export const CouponType = {
|
|
21
|
-
Subtotal: 'subtotal',
|
|
22
|
-
Product: 'product',
|
|
23
|
-
Shipping: 'shipping'
|
|
24
|
-
} as const;
|
|
25
|
-
export type CouponType = typeof CouponType[keyof typeof CouponType];
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export function instanceOfCouponType(value: any): boolean {
|
|
29
|
-
for (const key in CouponType) {
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(CouponType, key)) {
|
|
31
|
-
if (CouponType[key as keyof typeof CouponType] === value) {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function CouponTypeFromJSON(json: any): CouponType {
|
|
40
|
-
return CouponTypeFromJSONTyped(json, false);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function CouponTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponType {
|
|
44
|
-
return json as CouponType;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function CouponTypeToJSON(value?: CouponType | null): any {
|
|
48
|
-
return value as any;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function CouponTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CouponType {
|
|
52
|
-
return value as CouponType;
|
|
53
|
-
}
|
|
54
|
-
|
|
@@ -1,207 +0,0 @@
|
|
|
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 { CreateCouponRequestCouponablesInner } from './CreateCouponRequestCouponablesInner';
|
|
17
|
-
import {
|
|
18
|
-
CreateCouponRequestCouponablesInnerFromJSON,
|
|
19
|
-
CreateCouponRequestCouponablesInnerFromJSONTyped,
|
|
20
|
-
CreateCouponRequestCouponablesInnerToJSON,
|
|
21
|
-
CreateCouponRequestCouponablesInnerToJSONTyped,
|
|
22
|
-
} from './CreateCouponRequestCouponablesInner';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @export
|
|
27
|
-
* @interface CreateCouponRequest
|
|
28
|
-
*/
|
|
29
|
-
export interface CreateCouponRequest {
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @type {number}
|
|
33
|
-
* @memberof CreateCouponRequest
|
|
34
|
-
*/
|
|
35
|
-
siteId: number;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @type {string}
|
|
39
|
-
* @memberof CreateCouponRequest
|
|
40
|
-
*/
|
|
41
|
-
name: string;
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* @type {string}
|
|
45
|
-
* @memberof CreateCouponRequest
|
|
46
|
-
*/
|
|
47
|
-
code: string;
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* @type {string}
|
|
51
|
-
* @memberof CreateCouponRequest
|
|
52
|
-
*/
|
|
53
|
-
type: CreateCouponRequestTypeEnum;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @type {string}
|
|
57
|
-
* @memberof CreateCouponRequest
|
|
58
|
-
*/
|
|
59
|
-
discountType: string;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @type {number}
|
|
63
|
-
* @memberof CreateCouponRequest
|
|
64
|
-
*/
|
|
65
|
-
discountAmount: number;
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
* @type {number}
|
|
69
|
-
* @memberof CreateCouponRequest
|
|
70
|
-
*/
|
|
71
|
-
minAmount: number;
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @type {number}
|
|
75
|
-
* @memberof CreateCouponRequest
|
|
76
|
-
*/
|
|
77
|
-
minProducts: number;
|
|
78
|
-
/**
|
|
79
|
-
*
|
|
80
|
-
* @type {number}
|
|
81
|
-
* @memberof CreateCouponRequest
|
|
82
|
-
*/
|
|
83
|
-
totalUseLimit: number;
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
* @type {number}
|
|
87
|
-
* @memberof CreateCouponRequest
|
|
88
|
-
*/
|
|
89
|
-
customerUseLimit: number;
|
|
90
|
-
/**
|
|
91
|
-
*
|
|
92
|
-
* @type {string}
|
|
93
|
-
* @memberof CreateCouponRequest
|
|
94
|
-
*/
|
|
95
|
-
startDate?: string | null;
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
98
|
-
* @type {string}
|
|
99
|
-
* @memberof CreateCouponRequest
|
|
100
|
-
*/
|
|
101
|
-
endDate?: string | null;
|
|
102
|
-
/**
|
|
103
|
-
*
|
|
104
|
-
* @type {boolean}
|
|
105
|
-
* @memberof CreateCouponRequest
|
|
106
|
-
*/
|
|
107
|
-
isForAllProducts?: boolean;
|
|
108
|
-
/**
|
|
109
|
-
*
|
|
110
|
-
* @type {boolean}
|
|
111
|
-
* @memberof CreateCouponRequest
|
|
112
|
-
*/
|
|
113
|
-
isForAllCustomers?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
*
|
|
116
|
-
* @type {Array<CreateCouponRequestCouponablesInner>}
|
|
117
|
-
* @memberof CreateCouponRequest
|
|
118
|
-
*/
|
|
119
|
-
couponables?: Array<CreateCouponRequestCouponablesInner>;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* @export
|
|
125
|
-
*/
|
|
126
|
-
export const CreateCouponRequestTypeEnum = {
|
|
127
|
-
Subtotal: 'subtotal',
|
|
128
|
-
Product: 'product',
|
|
129
|
-
Shipping: 'shipping'
|
|
130
|
-
} as const;
|
|
131
|
-
export type CreateCouponRequestTypeEnum = typeof CreateCouponRequestTypeEnum[keyof typeof CreateCouponRequestTypeEnum];
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Check if a given object implements the CreateCouponRequest interface.
|
|
136
|
-
*/
|
|
137
|
-
export function instanceOfCreateCouponRequest(value: object): value is CreateCouponRequest {
|
|
138
|
-
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
139
|
-
if (!('name' in value) || value['name'] === undefined) return false;
|
|
140
|
-
if (!('code' in value) || value['code'] === undefined) return false;
|
|
141
|
-
if (!('type' in value) || value['type'] === undefined) return false;
|
|
142
|
-
if (!('discountType' in value) || value['discountType'] === undefined) return false;
|
|
143
|
-
if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
|
|
144
|
-
if (!('minAmount' in value) || value['minAmount'] === undefined) return false;
|
|
145
|
-
if (!('minProducts' in value) || value['minProducts'] === undefined) return false;
|
|
146
|
-
if (!('totalUseLimit' in value) || value['totalUseLimit'] === undefined) return false;
|
|
147
|
-
if (!('customerUseLimit' in value) || value['customerUseLimit'] === undefined) return false;
|
|
148
|
-
return true;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export function CreateCouponRequestFromJSON(json: any): CreateCouponRequest {
|
|
152
|
-
return CreateCouponRequestFromJSONTyped(json, false);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export function CreateCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCouponRequest {
|
|
156
|
-
if (json == null) {
|
|
157
|
-
return json;
|
|
158
|
-
}
|
|
159
|
-
return {
|
|
160
|
-
|
|
161
|
-
'siteId': json['site_id'],
|
|
162
|
-
'name': json['name'],
|
|
163
|
-
'code': json['code'],
|
|
164
|
-
'type': json['type'],
|
|
165
|
-
'discountType': json['discount_type'],
|
|
166
|
-
'discountAmount': json['discount_amount'],
|
|
167
|
-
'minAmount': json['min_amount'],
|
|
168
|
-
'minProducts': json['min_products'],
|
|
169
|
-
'totalUseLimit': json['total_use_limit'],
|
|
170
|
-
'customerUseLimit': json['customer_use_limit'],
|
|
171
|
-
'startDate': json['start_date'] == null ? undefined : json['start_date'],
|
|
172
|
-
'endDate': json['end_date'] == null ? undefined : json['end_date'],
|
|
173
|
-
'isForAllProducts': json['is_for_all_products'] == null ? undefined : json['is_for_all_products'],
|
|
174
|
-
'isForAllCustomers': json['is_for_all_customers'] == null ? undefined : json['is_for_all_customers'],
|
|
175
|
-
'couponables': json['couponables'] == null ? undefined : ((json['couponables'] as Array<any>).map(CreateCouponRequestCouponablesInnerFromJSON)),
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export function CreateCouponRequestToJSON(json: any): CreateCouponRequest {
|
|
180
|
-
return CreateCouponRequestToJSONTyped(json, false);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export function CreateCouponRequestToJSONTyped(value?: CreateCouponRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
184
|
-
if (value == null) {
|
|
185
|
-
return value;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return {
|
|
189
|
-
|
|
190
|
-
'site_id': value['siteId'],
|
|
191
|
-
'name': value['name'],
|
|
192
|
-
'code': value['code'],
|
|
193
|
-
'type': value['type'],
|
|
194
|
-
'discount_type': value['discountType'],
|
|
195
|
-
'discount_amount': value['discountAmount'],
|
|
196
|
-
'min_amount': value['minAmount'],
|
|
197
|
-
'min_products': value['minProducts'],
|
|
198
|
-
'total_use_limit': value['totalUseLimit'],
|
|
199
|
-
'customer_use_limit': value['customerUseLimit'],
|
|
200
|
-
'start_date': value['startDate'],
|
|
201
|
-
'end_date': value['endDate'],
|
|
202
|
-
'is_for_all_products': value['isForAllProducts'],
|
|
203
|
-
'is_for_all_customers': value['isForAllCustomers'],
|
|
204
|
-
'couponables': value['couponables'] == null ? undefined : ((value['couponables'] as Array<any>).map(CreateCouponRequestCouponablesInnerToJSON)),
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
|