@digital8/lighting-illusions-ts-sdk 0.0.2436 → 0.0.2437
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 -4
- 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 -1
- package/dist/apis/index.js +1 -1
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- 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 +2 -2
- package/dist/models/OrderFulfillmentResource.js +3 -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/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 +2 -6
- 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 -3
- package/dist/models/index.js +14 -3
- package/package.json +1 -1
- package/src/apis/CouponsApi.ts +286 -0
- package/src/apis/index.ts +1 -1
- package/src/models/AddressResource.ts +3 -2
- 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 +5 -5
- 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/StoreListResource.ts +3 -2
- package/src/models/StoreResource.ts +4 -6
- package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
- package/src/models/UpdateCouponRequest.ts +198 -0
- package/src/models/index.ts +14 -3
- package/dist/apis/AuspostApi.d.ts +0 -29
- package/dist/apis/AuspostApi.js +0 -125
- package/dist/models/SuburbValidationResource.d.ts +0 -32
- package/dist/models/SuburbValidationResource.js +0 -51
- package/dist/models/SuburbValidationResourceArrayResponse.d.ts +0 -33
- package/dist/models/SuburbValidationResourceArrayResponse.js +0 -50
- package/dist/models/ValidateSuburbRequest.d.ts +0 -50
- package/dist/models/ValidateSuburbRequest.js +0 -63
- package/src/apis/AuspostApi.ts +0 -69
- package/src/models/SuburbValidationResource.ts +0 -66
- package/src/models/SuburbValidationResourceArrayResponse.ts +0 -73
- package/src/models/ValidateSuburbRequest.ts +0 -93
|
@@ -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
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
export * from './AdminApi';
|
|
4
4
|
export * from './AssetApi';
|
|
5
5
|
export * from './AttributeApi';
|
|
6
|
-
export * from './AuspostApi';
|
|
7
6
|
export * from './BlogCategoryApi';
|
|
8
7
|
export * from './CartsApi';
|
|
8
|
+
export * from './CouponsApi';
|
|
9
9
|
export * from './CustomersApi';
|
|
10
10
|
export * from './DefinitionApi';
|
|
11
11
|
export * from './DocumentApi';
|
|
@@ -60,7 +60,7 @@ export interface AddressResource {
|
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof AddressResource
|
|
62
62
|
*/
|
|
63
|
-
line2
|
|
63
|
+
line2: string;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
@@ -99,6 +99,7 @@ export interface AddressResource {
|
|
|
99
99
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
100
100
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
101
101
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
102
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
102
103
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
103
104
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
104
105
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -123,7 +124,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
123
124
|
'addresseeName': json['addresseeName'],
|
|
124
125
|
'company': json['company'] == null ? undefined : json['company'],
|
|
125
126
|
'line1': json['line1'],
|
|
126
|
-
'line2': json['line2']
|
|
127
|
+
'line2': json['line2'],
|
|
127
128
|
'postcode': json['postcode'],
|
|
128
129
|
'suburb': json['suburb'],
|
|
129
130
|
'country': json['country'],
|
|
@@ -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
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
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 CouponLiteResource
|
|
20
|
+
*/
|
|
21
|
+
export interface CouponLiteResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CouponLiteResource
|
|
26
|
+
*/
|
|
27
|
+
id?: number | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CouponLiteResource
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CouponLiteResource
|
|
38
|
+
*/
|
|
39
|
+
code: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CouponLiteResource interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCouponLiteResource(value: object): value is CouponLiteResource {
|
|
46
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
47
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CouponLiteResourceFromJSON(json: any): CouponLiteResource {
|
|
52
|
+
return CouponLiteResourceFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CouponLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponLiteResource {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
62
|
+
'name': json['name'],
|
|
63
|
+
'code': json['code'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function CouponLiteResourceToJSON(json: any): CouponLiteResource {
|
|
68
|
+
return CouponLiteResourceToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function CouponLiteResourceToJSONTyped(value?: CouponLiteResource | null, ignoreDiscriminator: boolean = false): any {
|
|
72
|
+
if (value == null) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'id': value['id'],
|
|
79
|
+
'name': value['name'],
|
|
80
|
+
'code': value['code'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|