@digital8/lighting-illusions-ts-sdk 0.0.2364 → 0.0.2366
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 +4 -34
- package/README.md +4 -24
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -1
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/AdminOrderResource.d.ts +3 -2
- package/dist/models/AdminOrderResource.js +3 -2
- package/dist/models/CartCouponResource.d.ts +50 -0
- package/dist/models/{AppliedCouponResource.js → CartCouponResource.js} +13 -13
- package/dist/models/CartCouponResourceArrayResponse.d.ts +33 -0
- package/dist/models/CartCouponResourceArrayResponse.js +50 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/FrontendOrderResource.d.ts +3 -3
- package/dist/models/FrontendOrderResource.js +3 -3
- package/dist/models/OrderFulfillmentResource.d.ts +2 -2
- package/dist/models/OrderFulfillmentResource.js +3 -3
- 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/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +6 -2
- package/dist/models/index.d.ts +2 -16
- package/dist/models/index.js +2 -16
- package/docs/AdminOrderResource.md +1 -1
- package/docs/{AppliedCouponResource.md → CartCouponResource.md} +4 -4
- package/docs/{CouponLiteResourceArrayResponse.md → CartCouponResourceArrayResponse.md} +5 -5
- package/docs/FrontendOrderResource.md +1 -1
- package/docs/SearchCartsRequest.md +0 -2
- package/docs/SearchOrdersRequest.md +0 -2
- package/package.json +1 -1
- package/src/apis/index.ts +0 -1
- package/src/models/AddressResource.ts +3 -2
- package/src/models/AdminOrderResource.ts +11 -4
- package/src/models/{AppliedCouponResource.ts → CartCouponResource.ts} +14 -14
- package/src/models/CartCouponResourceArrayResponse.ts +73 -0
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/FrontendOrderResource.ts +11 -11
- package/src/models/OrderFulfillmentResource.ts +5 -5
- package/src/models/SearchCartsRequest.ts +0 -8
- package/src/models/SearchOrdersRequest.ts +0 -8
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreResource.ts +6 -4
- package/src/models/index.ts +2 -16
- package/dist/apis/CouponsApi.d.ts +0 -116
- package/dist/apis/CouponsApi.js +0 -440
- package/dist/models/AppliedCouponResource.d.ts +0 -50
- package/dist/models/AppliedCouponResourceArrayResponse.d.ts +0 -33
- package/dist/models/AppliedCouponResourceArrayResponse.js +0 -50
- package/dist/models/CouponListResource.d.ts +0 -99
- package/dist/models/CouponListResource.js +0 -90
- 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 -134
- 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 -134
- package/dist/models/CreateCouponRequest.js +0 -114
- 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 -128
- package/dist/models/UpdateCouponRequest.js +0 -110
- package/docs/AppliedCouponResourceArrayResponse.md +0 -34
- package/docs/CouponListResource.md +0 -56
- package/docs/CouponListResourceArrayResponse.md +0 -34
- package/docs/CouponLiteResource.md +0 -38
- package/docs/CouponResource.md +0 -76
- package/docs/CouponResourceArrayResponse.md +0 -34
- package/docs/CouponType.md +0 -32
- package/docs/CouponsApi.md +0 -407
- package/docs/CreateCouponRequest.md +0 -62
- package/docs/CreateCouponRequestCouponablesInner.md +0 -36
- package/docs/PaginatedCouponListResourceResponse.md +0 -36
- package/docs/PaginatedCouponResourceResponse.md +0 -36
- package/docs/SearchAllCouponsRequest.md +0 -50
- package/docs/SearchCouponsRequest.md +0 -62
- package/docs/UpdateCouponRequest.md +0 -60
- package/src/apis/CouponsApi.ts +0 -345
- package/src/models/AppliedCouponResourceArrayResponse.ts +0 -73
- 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 -216
- 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 -207
package/docs/CouponsApi.md
DELETED
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
# CouponsApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *http://localhost/api*
|
|
4
|
-
|
|
5
|
-
| Method | HTTP request | Description |
|
|
6
|
-
|------------- | ------------- | -------------|
|
|
7
|
-
| [**destroyCoupon**](CouponsApi.md#destroycoupon) | **DELETE** /admin-api/coupons/{coupon}/delete | Auto-generated: destroyCoupon |
|
|
8
|
-
| [**getAllCoupon**](CouponsApi.md#getallcoupon) | **POST** /admin-api/coupons/all | Auto-generated: getAllCoupon |
|
|
9
|
-
| [**indexCoupon**](CouponsApi.md#indexcoupon) | **POST** /admin-api/coupons/list | Auto-generated: indexCoupon |
|
|
10
|
-
| [**showCoupon**](CouponsApi.md#showcoupon) | **GET** /admin-api/coupons/{coupon} | Auto-generated: showCoupon |
|
|
11
|
-
| [**storeCoupon**](CouponsApi.md#storecoupon) | **POST** /admin-api/coupons/create | Auto-generated: storeCoupon |
|
|
12
|
-
| [**updateCoupon**](CouponsApi.md#updatecouponoperation) | **PUT** /admin-api/coupons/{coupon}/update | Auto-generated: updateCoupon |
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## destroyCoupon
|
|
17
|
-
|
|
18
|
-
> GenericResponse destroyCoupon(coupon)
|
|
19
|
-
|
|
20
|
-
Auto-generated: destroyCoupon
|
|
21
|
-
|
|
22
|
-
### Example
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
import {
|
|
26
|
-
Configuration,
|
|
27
|
-
CouponsApi,
|
|
28
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
29
|
-
import type { DestroyCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
30
|
-
|
|
31
|
-
async function example() {
|
|
32
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
33
|
-
const api = new CouponsApi();
|
|
34
|
-
|
|
35
|
-
const body = {
|
|
36
|
-
// number | The id of the coupon
|
|
37
|
-
coupon: 56,
|
|
38
|
-
} satisfies DestroyCouponRequest;
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
const data = await api.destroyCoupon(body);
|
|
42
|
-
console.log(data);
|
|
43
|
-
} catch (error) {
|
|
44
|
-
console.error(error);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Run the test
|
|
49
|
-
example().catch(console.error);
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Parameters
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| Name | Type | Description | Notes |
|
|
56
|
-
|------------- | ------------- | ------------- | -------------|
|
|
57
|
-
| **coupon** | `number` | The id of the coupon | [Defaults to `undefined`] |
|
|
58
|
-
|
|
59
|
-
### Return type
|
|
60
|
-
|
|
61
|
-
[**GenericResponse**](GenericResponse.md)
|
|
62
|
-
|
|
63
|
-
### Authorization
|
|
64
|
-
|
|
65
|
-
No authorization required
|
|
66
|
-
|
|
67
|
-
### HTTP request headers
|
|
68
|
-
|
|
69
|
-
- **Content-Type**: Not defined
|
|
70
|
-
- **Accept**: `application/json`
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### HTTP response details
|
|
74
|
-
| Status code | Description | Response headers |
|
|
75
|
-
|-------------|-------------|------------------|
|
|
76
|
-
| **200** | \\JsonResponse | - |
|
|
77
|
-
|
|
78
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## getAllCoupon
|
|
82
|
-
|
|
83
|
-
> CouponLiteResourceArrayResponse getAllCoupon(searchAllCouponsRequest)
|
|
84
|
-
|
|
85
|
-
Auto-generated: getAllCoupon
|
|
86
|
-
|
|
87
|
-
### Example
|
|
88
|
-
|
|
89
|
-
```ts
|
|
90
|
-
import {
|
|
91
|
-
Configuration,
|
|
92
|
-
CouponsApi,
|
|
93
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
94
|
-
import type { GetAllCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
95
|
-
|
|
96
|
-
async function example() {
|
|
97
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
98
|
-
const api = new CouponsApi();
|
|
99
|
-
|
|
100
|
-
const body = {
|
|
101
|
-
// SearchAllCouponsRequest (optional)
|
|
102
|
-
searchAllCouponsRequest: ...,
|
|
103
|
-
} satisfies GetAllCouponRequest;
|
|
104
|
-
|
|
105
|
-
try {
|
|
106
|
-
const data = await api.getAllCoupon(body);
|
|
107
|
-
console.log(data);
|
|
108
|
-
} catch (error) {
|
|
109
|
-
console.error(error);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// Run the test
|
|
114
|
-
example().catch(console.error);
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Parameters
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
| Name | Type | Description | Notes |
|
|
121
|
-
|------------- | ------------- | ------------- | -------------|
|
|
122
|
-
| **searchAllCouponsRequest** | [SearchAllCouponsRequest](SearchAllCouponsRequest.md) | | [Optional] |
|
|
123
|
-
|
|
124
|
-
### Return type
|
|
125
|
-
|
|
126
|
-
[**CouponLiteResourceArrayResponse**](CouponLiteResourceArrayResponse.md)
|
|
127
|
-
|
|
128
|
-
### Authorization
|
|
129
|
-
|
|
130
|
-
No authorization required
|
|
131
|
-
|
|
132
|
-
### HTTP request headers
|
|
133
|
-
|
|
134
|
-
- **Content-Type**: `application/json`
|
|
135
|
-
- **Accept**: `application/json`
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
### HTTP response details
|
|
139
|
-
| Status code | Description | Response headers |
|
|
140
|
-
|-------------|-------------|------------------|
|
|
141
|
-
| **200** | Successful resource response | - |
|
|
142
|
-
|
|
143
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
## indexCoupon
|
|
147
|
-
|
|
148
|
-
> PaginatedCouponListResourceResponse indexCoupon(searchCouponsRequest)
|
|
149
|
-
|
|
150
|
-
Auto-generated: indexCoupon
|
|
151
|
-
|
|
152
|
-
### Example
|
|
153
|
-
|
|
154
|
-
```ts
|
|
155
|
-
import {
|
|
156
|
-
Configuration,
|
|
157
|
-
CouponsApi,
|
|
158
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
159
|
-
import type { IndexCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
160
|
-
|
|
161
|
-
async function example() {
|
|
162
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
163
|
-
const api = new CouponsApi();
|
|
164
|
-
|
|
165
|
-
const body = {
|
|
166
|
-
// SearchCouponsRequest (optional)
|
|
167
|
-
searchCouponsRequest: ...,
|
|
168
|
-
} satisfies IndexCouponRequest;
|
|
169
|
-
|
|
170
|
-
try {
|
|
171
|
-
const data = await api.indexCoupon(body);
|
|
172
|
-
console.log(data);
|
|
173
|
-
} catch (error) {
|
|
174
|
-
console.error(error);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// Run the test
|
|
179
|
-
example().catch(console.error);
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Parameters
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
| Name | Type | Description | Notes |
|
|
186
|
-
|------------- | ------------- | ------------- | -------------|
|
|
187
|
-
| **searchCouponsRequest** | [SearchCouponsRequest](SearchCouponsRequest.md) | | [Optional] |
|
|
188
|
-
|
|
189
|
-
### Return type
|
|
190
|
-
|
|
191
|
-
[**PaginatedCouponListResourceResponse**](PaginatedCouponListResourceResponse.md)
|
|
192
|
-
|
|
193
|
-
### Authorization
|
|
194
|
-
|
|
195
|
-
No authorization required
|
|
196
|
-
|
|
197
|
-
### HTTP request headers
|
|
198
|
-
|
|
199
|
-
- **Content-Type**: `application/json`
|
|
200
|
-
- **Accept**: `application/json`
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
### HTTP response details
|
|
204
|
-
| Status code | Description | Response headers |
|
|
205
|
-
|-------------|-------------|------------------|
|
|
206
|
-
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\CouponListResource[]>> | - |
|
|
207
|
-
|
|
208
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
## showCoupon
|
|
212
|
-
|
|
213
|
-
> CouponResource showCoupon(coupon)
|
|
214
|
-
|
|
215
|
-
Auto-generated: showCoupon
|
|
216
|
-
|
|
217
|
-
### Example
|
|
218
|
-
|
|
219
|
-
```ts
|
|
220
|
-
import {
|
|
221
|
-
Configuration,
|
|
222
|
-
CouponsApi,
|
|
223
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
224
|
-
import type { ShowCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
225
|
-
|
|
226
|
-
async function example() {
|
|
227
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
228
|
-
const api = new CouponsApi();
|
|
229
|
-
|
|
230
|
-
const body = {
|
|
231
|
-
// number | The id of the coupon
|
|
232
|
-
coupon: 56,
|
|
233
|
-
} satisfies ShowCouponRequest;
|
|
234
|
-
|
|
235
|
-
try {
|
|
236
|
-
const data = await api.showCoupon(body);
|
|
237
|
-
console.log(data);
|
|
238
|
-
} catch (error) {
|
|
239
|
-
console.error(error);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// Run the test
|
|
244
|
-
example().catch(console.error);
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### Parameters
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
| Name | Type | Description | Notes |
|
|
251
|
-
|------------- | ------------- | ------------- | -------------|
|
|
252
|
-
| **coupon** | `number` | The id of the coupon | [Defaults to `undefined`] |
|
|
253
|
-
|
|
254
|
-
### Return type
|
|
255
|
-
|
|
256
|
-
[**CouponResource**](CouponResource.md)
|
|
257
|
-
|
|
258
|
-
### Authorization
|
|
259
|
-
|
|
260
|
-
No authorization required
|
|
261
|
-
|
|
262
|
-
### HTTP request headers
|
|
263
|
-
|
|
264
|
-
- **Content-Type**: Not defined
|
|
265
|
-
- **Accept**: `application/json`
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
### HTTP response details
|
|
269
|
-
| Status code | Description | Response headers |
|
|
270
|
-
|-------------|-------------|------------------|
|
|
271
|
-
| **200** | Successful resource response | - |
|
|
272
|
-
|
|
273
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
## storeCoupon
|
|
277
|
-
|
|
278
|
-
> CouponResource storeCoupon(createCouponRequest)
|
|
279
|
-
|
|
280
|
-
Auto-generated: storeCoupon
|
|
281
|
-
|
|
282
|
-
### Example
|
|
283
|
-
|
|
284
|
-
```ts
|
|
285
|
-
import {
|
|
286
|
-
Configuration,
|
|
287
|
-
CouponsApi,
|
|
288
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
289
|
-
import type { StoreCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
290
|
-
|
|
291
|
-
async function example() {
|
|
292
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
293
|
-
const api = new CouponsApi();
|
|
294
|
-
|
|
295
|
-
const body = {
|
|
296
|
-
// CreateCouponRequest (optional)
|
|
297
|
-
createCouponRequest: ...,
|
|
298
|
-
} satisfies StoreCouponRequest;
|
|
299
|
-
|
|
300
|
-
try {
|
|
301
|
-
const data = await api.storeCoupon(body);
|
|
302
|
-
console.log(data);
|
|
303
|
-
} catch (error) {
|
|
304
|
-
console.error(error);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// Run the test
|
|
309
|
-
example().catch(console.error);
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
### Parameters
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
| Name | Type | Description | Notes |
|
|
316
|
-
|------------- | ------------- | ------------- | -------------|
|
|
317
|
-
| **createCouponRequest** | [CreateCouponRequest](CreateCouponRequest.md) | | [Optional] |
|
|
318
|
-
|
|
319
|
-
### Return type
|
|
320
|
-
|
|
321
|
-
[**CouponResource**](CouponResource.md)
|
|
322
|
-
|
|
323
|
-
### Authorization
|
|
324
|
-
|
|
325
|
-
No authorization required
|
|
326
|
-
|
|
327
|
-
### HTTP request headers
|
|
328
|
-
|
|
329
|
-
- **Content-Type**: `application/json`
|
|
330
|
-
- **Accept**: `application/json`
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
### HTTP response details
|
|
334
|
-
| Status code | Description | Response headers |
|
|
335
|
-
|-------------|-------------|------------------|
|
|
336
|
-
| **200** | Successful resource response | - |
|
|
337
|
-
|
|
338
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
## updateCoupon
|
|
342
|
-
|
|
343
|
-
> CouponResource updateCoupon(coupon, updateCouponRequest)
|
|
344
|
-
|
|
345
|
-
Auto-generated: updateCoupon
|
|
346
|
-
|
|
347
|
-
### Example
|
|
348
|
-
|
|
349
|
-
```ts
|
|
350
|
-
import {
|
|
351
|
-
Configuration,
|
|
352
|
-
CouponsApi,
|
|
353
|
-
} from '@digital8/lighting-illusions-ts-sdk';
|
|
354
|
-
import type { UpdateCouponOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
355
|
-
|
|
356
|
-
async function example() {
|
|
357
|
-
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
358
|
-
const api = new CouponsApi();
|
|
359
|
-
|
|
360
|
-
const body = {
|
|
361
|
-
// number | The id of the coupon
|
|
362
|
-
coupon: 56,
|
|
363
|
-
// UpdateCouponRequest (optional)
|
|
364
|
-
updateCouponRequest: ...,
|
|
365
|
-
} satisfies UpdateCouponOperationRequest;
|
|
366
|
-
|
|
367
|
-
try {
|
|
368
|
-
const data = await api.updateCoupon(body);
|
|
369
|
-
console.log(data);
|
|
370
|
-
} catch (error) {
|
|
371
|
-
console.error(error);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
// Run the test
|
|
376
|
-
example().catch(console.error);
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
### Parameters
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
| Name | Type | Description | Notes |
|
|
383
|
-
|------------- | ------------- | ------------- | -------------|
|
|
384
|
-
| **coupon** | `number` | The id of the coupon | [Defaults to `undefined`] |
|
|
385
|
-
| **updateCouponRequest** | [UpdateCouponRequest](UpdateCouponRequest.md) | | [Optional] |
|
|
386
|
-
|
|
387
|
-
### Return type
|
|
388
|
-
|
|
389
|
-
[**CouponResource**](CouponResource.md)
|
|
390
|
-
|
|
391
|
-
### Authorization
|
|
392
|
-
|
|
393
|
-
No authorization required
|
|
394
|
-
|
|
395
|
-
### HTTP request headers
|
|
396
|
-
|
|
397
|
-
- **Content-Type**: `application/json`
|
|
398
|
-
- **Accept**: `application/json`
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
### HTTP response details
|
|
402
|
-
| Status code | Description | Response headers |
|
|
403
|
-
|-------------|-------------|------------------|
|
|
404
|
-
| **200** | Successful resource response | - |
|
|
405
|
-
|
|
406
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
407
|
-
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# CreateCouponRequest
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type
|
|
8
|
-
------------ | -------------
|
|
9
|
-
`siteId` | number
|
|
10
|
-
`name` | string
|
|
11
|
-
`code` | string
|
|
12
|
-
`type` | string
|
|
13
|
-
`discountType` | string
|
|
14
|
-
`discountAmount` | number
|
|
15
|
-
`minAmount` | number
|
|
16
|
-
`minProducts` | number
|
|
17
|
-
`totalUseLimit` | number
|
|
18
|
-
`customerUseLimit` | number
|
|
19
|
-
`startDate` | string
|
|
20
|
-
`endDate` | string
|
|
21
|
-
`isForAllProducts` | boolean
|
|
22
|
-
`isForAllCustomers` | boolean
|
|
23
|
-
`couponables` | [Array<CreateCouponRequestCouponablesInner>](CreateCouponRequestCouponablesInner.md)
|
|
24
|
-
|
|
25
|
-
## Example
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
import type { CreateCouponRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
29
|
-
|
|
30
|
-
// TODO: Update the object below with actual values
|
|
31
|
-
const example = {
|
|
32
|
-
"siteId": null,
|
|
33
|
-
"name": null,
|
|
34
|
-
"code": null,
|
|
35
|
-
"type": null,
|
|
36
|
-
"discountType": null,
|
|
37
|
-
"discountAmount": null,
|
|
38
|
-
"minAmount": null,
|
|
39
|
-
"minProducts": null,
|
|
40
|
-
"totalUseLimit": null,
|
|
41
|
-
"customerUseLimit": null,
|
|
42
|
-
"startDate": null,
|
|
43
|
-
"endDate": null,
|
|
44
|
-
"isForAllProducts": null,
|
|
45
|
-
"isForAllCustomers": null,
|
|
46
|
-
"couponables": null,
|
|
47
|
-
} satisfies CreateCouponRequest
|
|
48
|
-
|
|
49
|
-
console.log(example)
|
|
50
|
-
|
|
51
|
-
// Convert the instance to a JSON string
|
|
52
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
53
|
-
console.log(exampleJSON)
|
|
54
|
-
|
|
55
|
-
// Parse the JSON string back to an object
|
|
56
|
-
const exampleParsed = JSON.parse(exampleJSON) as CreateCouponRequest
|
|
57
|
-
console.log(exampleParsed)
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
61
|
-
|
|
62
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# CreateCouponRequestCouponablesInner
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type
|
|
8
|
-
------------ | -------------
|
|
9
|
-
`type` | string
|
|
10
|
-
`id` | number
|
|
11
|
-
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import type { CreateCouponRequestCouponablesInner } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
|
-
|
|
17
|
-
// TODO: Update the object below with actual values
|
|
18
|
-
const example = {
|
|
19
|
-
"type": null,
|
|
20
|
-
"id": null,
|
|
21
|
-
} satisfies CreateCouponRequestCouponablesInner
|
|
22
|
-
|
|
23
|
-
console.log(example)
|
|
24
|
-
|
|
25
|
-
// Convert the instance to a JSON string
|
|
26
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
-
console.log(exampleJSON)
|
|
28
|
-
|
|
29
|
-
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as CreateCouponRequestCouponablesInner
|
|
31
|
-
console.log(exampleParsed)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
-
|
|
36
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# PaginatedCouponListResourceResponse
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type
|
|
8
|
-
------------ | -------------
|
|
9
|
-
`data` | [Array<CouponListResource>](CouponListResource.md)
|
|
10
|
-
`meta` | [PagingMetadata](PagingMetadata.md)
|
|
11
|
-
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import type { PaginatedCouponListResourceResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
|
-
|
|
17
|
-
// TODO: Update the object below with actual values
|
|
18
|
-
const example = {
|
|
19
|
-
"data": null,
|
|
20
|
-
"meta": null,
|
|
21
|
-
} satisfies PaginatedCouponListResourceResponse
|
|
22
|
-
|
|
23
|
-
console.log(example)
|
|
24
|
-
|
|
25
|
-
// Convert the instance to a JSON string
|
|
26
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
-
console.log(exampleJSON)
|
|
28
|
-
|
|
29
|
-
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as PaginatedCouponListResourceResponse
|
|
31
|
-
console.log(exampleParsed)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
-
|
|
36
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# PaginatedCouponResourceResponse
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type
|
|
8
|
-
------------ | -------------
|
|
9
|
-
`data` | [Array<CouponResource>](CouponResource.md)
|
|
10
|
-
`meta` | [PagingMetadata](PagingMetadata.md)
|
|
11
|
-
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import type { PaginatedCouponResourceResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
|
-
|
|
17
|
-
// TODO: Update the object below with actual values
|
|
18
|
-
const example = {
|
|
19
|
-
"data": null,
|
|
20
|
-
"meta": null,
|
|
21
|
-
} satisfies PaginatedCouponResourceResponse
|
|
22
|
-
|
|
23
|
-
console.log(example)
|
|
24
|
-
|
|
25
|
-
// Convert the instance to a JSON string
|
|
26
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
-
console.log(exampleJSON)
|
|
28
|
-
|
|
29
|
-
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as PaginatedCouponResourceResponse
|
|
31
|
-
console.log(exampleParsed)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
-
|
|
36
|
-
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# SearchAllCouponsRequest
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type
|
|
8
|
-
------------ | -------------
|
|
9
|
-
`search` | string
|
|
10
|
-
`sortBy` | string
|
|
11
|
-
`sortDirection` | string
|
|
12
|
-
`relatedId` | number
|
|
13
|
-
`relatedType` | string
|
|
14
|
-
`includesRelations` | boolean
|
|
15
|
-
`type` | Array<string>
|
|
16
|
-
`siteId` | Array<string>
|
|
17
|
-
`isAbandonedCart` | Array<string>
|
|
18
|
-
|
|
19
|
-
## Example
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import type { SearchAllCouponsRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
23
|
-
|
|
24
|
-
// TODO: Update the object below with actual values
|
|
25
|
-
const example = {
|
|
26
|
-
"search": null,
|
|
27
|
-
"sortBy": null,
|
|
28
|
-
"sortDirection": null,
|
|
29
|
-
"relatedId": null,
|
|
30
|
-
"relatedType": null,
|
|
31
|
-
"includesRelations": null,
|
|
32
|
-
"type": null,
|
|
33
|
-
"siteId": null,
|
|
34
|
-
"isAbandonedCart": null,
|
|
35
|
-
} satisfies SearchAllCouponsRequest
|
|
36
|
-
|
|
37
|
-
console.log(example)
|
|
38
|
-
|
|
39
|
-
// Convert the instance to a JSON string
|
|
40
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
41
|
-
console.log(exampleJSON)
|
|
42
|
-
|
|
43
|
-
// Parse the JSON string back to an object
|
|
44
|
-
const exampleParsed = JSON.parse(exampleJSON) as SearchAllCouponsRequest
|
|
45
|
-
console.log(exampleParsed)
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
49
|
-
|
|
50
|
-
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# SearchCouponsRequest
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type
|
|
8
|
-
------------ | -------------
|
|
9
|
-
`search` | string
|
|
10
|
-
`sortBy` | string
|
|
11
|
-
`sortDirection` | string
|
|
12
|
-
`perPage` | number
|
|
13
|
-
`page` | number
|
|
14
|
-
`type` | Array<string>
|
|
15
|
-
`siteId` | Array<string>
|
|
16
|
-
`isAbandonedCart` | Array<string>
|
|
17
|
-
`beforeStartDate` | Date
|
|
18
|
-
`afterStartDate` | Date
|
|
19
|
-
`beforeEndDate` | Date
|
|
20
|
-
`afterEndDate` | Date
|
|
21
|
-
`relatedId` | number
|
|
22
|
-
`relatedType` | string
|
|
23
|
-
`includesRelations` | boolean
|
|
24
|
-
|
|
25
|
-
## Example
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
import type { SearchCouponsRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
29
|
-
|
|
30
|
-
// TODO: Update the object below with actual values
|
|
31
|
-
const example = {
|
|
32
|
-
"search": null,
|
|
33
|
-
"sortBy": null,
|
|
34
|
-
"sortDirection": null,
|
|
35
|
-
"perPage": null,
|
|
36
|
-
"page": null,
|
|
37
|
-
"type": null,
|
|
38
|
-
"siteId": null,
|
|
39
|
-
"isAbandonedCart": null,
|
|
40
|
-
"beforeStartDate": null,
|
|
41
|
-
"afterStartDate": null,
|
|
42
|
-
"beforeEndDate": null,
|
|
43
|
-
"afterEndDate": null,
|
|
44
|
-
"relatedId": null,
|
|
45
|
-
"relatedType": null,
|
|
46
|
-
"includesRelations": null,
|
|
47
|
-
} satisfies SearchCouponsRequest
|
|
48
|
-
|
|
49
|
-
console.log(example)
|
|
50
|
-
|
|
51
|
-
// Convert the instance to a JSON string
|
|
52
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
53
|
-
console.log(exampleJSON)
|
|
54
|
-
|
|
55
|
-
// Parse the JSON string back to an object
|
|
56
|
-
const exampleParsed = JSON.parse(exampleJSON) as SearchCouponsRequest
|
|
57
|
-
console.log(exampleParsed)
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
61
|
-
|
|
62
|
-
|