@digital8/lighting-illusions-ts-sdk 0.0.2303 → 0.0.2304

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.
Files changed (182) hide show
  1. package/.openapi-generator/FILES +32 -14
  2. package/README.md +23 -9
  3. package/dist/apis/CouponsApi.d.ts +116 -0
  4. package/dist/apis/CouponsApi.js +440 -0
  5. package/dist/apis/index.d.ts +1 -1
  6. package/dist/apis/index.js +1 -1
  7. package/dist/models/AddressFrontendResource.d.ts +1 -1
  8. package/dist/models/AddressFrontendResource.js +3 -1
  9. package/dist/models/AddressResource.d.ts +3 -3
  10. package/dist/models/AddressResource.js +5 -7
  11. package/dist/models/AdminOrderResource.d.ts +3 -2
  12. package/dist/models/AdminOrderResource.js +3 -2
  13. package/dist/models/CartListResource.d.ts +0 -6
  14. package/dist/models/CartListResource.js +0 -4
  15. package/dist/models/CategoryAutomationFieldType.d.ts +0 -2
  16. package/dist/models/CategoryAutomationFieldType.js +1 -3
  17. package/dist/models/CouponListResource.d.ts +99 -0
  18. package/dist/models/CouponListResource.js +90 -0
  19. package/dist/models/CouponListResourceArrayResponse.d.ts +33 -0
  20. package/dist/models/CouponListResourceArrayResponse.js +50 -0
  21. package/dist/models/CouponLiteResource.d.ts +44 -0
  22. package/dist/models/CouponLiteResource.js +57 -0
  23. package/dist/models/CouponLiteResourceArrayResponse.d.ts +33 -0
  24. package/dist/models/CouponLiteResourceArrayResponse.js +50 -0
  25. package/dist/models/CouponResource.d.ts +169 -0
  26. package/dist/models/CouponResource.js +138 -0
  27. package/dist/models/CouponResourceArrayResponse.d.ts +33 -0
  28. package/dist/models/CouponResourceArrayResponse.js +50 -0
  29. package/dist/models/CouponType.d.ts +26 -0
  30. package/dist/models/CouponType.js +52 -0
  31. package/dist/models/CreateCouponRequest.d.ts +134 -0
  32. package/dist/models/CreateCouponRequest.js +114 -0
  33. package/dist/models/CreateCouponRequestCouponablesInner.d.ts +48 -0
  34. package/dist/models/CreateCouponRequestCouponablesInner.js +61 -0
  35. package/dist/models/CreatePageComponentRequest.d.ts +4 -4
  36. package/dist/models/CreatePageComponentRequest.js +4 -4
  37. package/dist/models/CreateProductCategoryRequestAutomationRulesInner.d.ts +0 -2
  38. package/dist/models/CreateProductCategoryRequestAutomationRulesInner.js +1 -3
  39. package/dist/models/CreateSupplierRequest.d.ts +0 -6
  40. package/dist/models/CreateSupplierRequest.js +0 -2
  41. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  42. package/dist/models/ExternalApiLogResource.js +1 -3
  43. package/dist/models/FrontendCartResource.d.ts +0 -18
  44. package/dist/models/FrontendCartResource.js +0 -12
  45. package/dist/models/OrderFulfillmentResource.d.ts +3 -3
  46. package/dist/models/OrderFulfillmentResource.js +4 -6
  47. package/dist/models/OrderStatusWithCountResource.d.ts +0 -12
  48. package/dist/models/OrderStatusWithCountResource.js +0 -8
  49. package/dist/models/PaginatedCouponListResourceResponse.d.ts +40 -0
  50. package/dist/models/PaginatedCouponListResourceResponse.js +57 -0
  51. package/dist/models/PaginatedCouponLiteResourceResponse.d.ts +40 -0
  52. package/dist/models/PaginatedCouponLiteResourceResponse.js +57 -0
  53. package/dist/models/PaginatedCouponResourceResponse.d.ts +40 -0
  54. package/dist/models/PaginatedCouponResourceResponse.js +57 -0
  55. package/dist/models/ProductClassResource.d.ts +2 -2
  56. package/dist/models/SearchAllCouponsRequest.d.ts +101 -0
  57. package/dist/models/SearchAllCouponsRequest.js +85 -0
  58. package/dist/models/SearchAllOrdersRequest.d.ts +0 -6
  59. package/dist/models/SearchAllOrdersRequest.js +0 -2
  60. package/dist/models/SearchCartsRequest.d.ts +6 -0
  61. package/dist/models/SearchCartsRequest.js +2 -0
  62. package/dist/models/SearchCouponsRequest.d.ts +137 -0
  63. package/dist/models/SearchCouponsRequest.js +97 -0
  64. package/dist/models/SearchOrdersRequest.d.ts +6 -6
  65. package/dist/models/SearchOrdersRequest.js +2 -2
  66. package/dist/models/StoreFrontendResource.d.ts +1 -1
  67. package/dist/models/StoreFrontendResource.js +1 -3
  68. package/dist/models/StoreResource.d.ts +2 -2
  69. package/dist/models/StoreResource.js +4 -4
  70. package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
  71. package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
  72. package/dist/models/StoreSpecialDateResource.d.ts +2 -2
  73. package/dist/models/StoreSpecialDateResource.js +3 -1
  74. package/dist/models/SupplierFrontendResource.d.ts +0 -6
  75. package/dist/models/SupplierFrontendResource.js +0 -4
  76. package/dist/models/SupplierResource.d.ts +0 -6
  77. package/dist/models/SupplierResource.js +0 -4
  78. package/dist/models/UpdateCouponRequest.d.ts +128 -0
  79. package/dist/models/UpdateCouponRequest.js +110 -0
  80. package/dist/models/UpdatePageComponentRequest.d.ts +4 -4
  81. package/dist/models/UpdatePageComponentRequest.js +4 -4
  82. package/dist/models/UpdateSupplierRequest.d.ts +0 -6
  83. package/dist/models/UpdateSupplierRequest.js +0 -2
  84. package/dist/models/index.d.ts +15 -6
  85. package/dist/models/index.js +15 -6
  86. package/docs/AdminOrderResource.md +1 -1
  87. package/docs/CartListResource.md +0 -2
  88. package/docs/CouponListResource.md +56 -0
  89. package/docs/{OrderCouponResourceArrayResponse.md → CouponListResourceArrayResponse.md} +5 -5
  90. package/docs/{OrderCouponResource.md → CouponLiteResource.md} +6 -8
  91. package/docs/{ProductClassLiteResourceArrayResponse.md → CouponLiteResourceArrayResponse.md} +5 -5
  92. package/docs/CouponResource.md +78 -0
  93. package/docs/CouponResourceArrayResponse.md +34 -0
  94. package/docs/CouponType.md +32 -0
  95. package/docs/CouponsApi.md +407 -0
  96. package/docs/CreateCouponRequest.md +62 -0
  97. package/docs/{ProductClassLiteResource.md → CreateCouponRequestCouponablesInner.md} +6 -8
  98. package/docs/CreatePageComponentRequest.md +2 -2
  99. package/docs/CreateSupplierRequest.md +0 -2
  100. package/docs/FrontendCartResource.md +0 -6
  101. package/docs/OrderStatusWithCountResource.md +0 -4
  102. package/docs/{PaginatedProductClassLiteResourceResponse.md → PaginatedCouponListResourceResponse.md} +5 -5
  103. package/docs/PaginatedCouponLiteResourceResponse.md +36 -0
  104. package/docs/PaginatedCouponResourceResponse.md +36 -0
  105. package/docs/ProductClassResource.md +1 -1
  106. package/docs/{SearchAllProductClassesRequest.md → SearchAllCouponsRequest.md} +10 -4
  107. package/docs/SearchAllOrdersRequest.md +0 -2
  108. package/docs/SearchCartsRequest.md +2 -0
  109. package/docs/SearchCouponsRequest.md +62 -0
  110. package/docs/SearchOrdersRequest.md +2 -2
  111. package/docs/StoreSpecialDateFrontendResource.md +1 -1
  112. package/docs/StoreSpecialDateResource.md +1 -1
  113. package/docs/SupplierFrontendResource.md +0 -2
  114. package/docs/SupplierResource.md +0 -2
  115. package/docs/UpdateCouponRequest.md +60 -0
  116. package/docs/UpdatePageComponentRequest.md +2 -2
  117. package/docs/UpdateSupplierRequest.md +0 -2
  118. package/package.json +1 -1
  119. package/src/apis/CouponsApi.ts +345 -0
  120. package/src/apis/index.ts +1 -1
  121. package/src/models/AddressFrontendResource.ts +3 -2
  122. package/src/models/AddressResource.ts +7 -8
  123. package/src/models/AdminOrderResource.ts +11 -4
  124. package/src/models/CartListResource.ts +0 -9
  125. package/src/models/CategoryAutomationFieldType.ts +1 -3
  126. package/src/models/CouponListResource.ts +170 -0
  127. package/src/models/CouponListResourceArrayResponse.ts +73 -0
  128. package/src/models/CouponLiteResource.ts +83 -0
  129. package/src/models/CouponLiteResourceArrayResponse.ts +73 -0
  130. package/src/models/CouponResource.ts +297 -0
  131. package/src/models/CouponResourceArrayResponse.ts +73 -0
  132. package/src/models/CouponType.ts +54 -0
  133. package/src/models/CreateCouponRequest.ts +216 -0
  134. package/src/models/CreateCouponRequestCouponablesInner.ts +86 -0
  135. package/src/models/CreatePageComponentRequest.ts +8 -8
  136. package/src/models/CreateProductCategoryRequestAutomationRulesInner.ts +1 -3
  137. package/src/models/CreateSupplierRequest.ts +0 -8
  138. package/src/models/ExternalApiLogResource.ts +2 -3
  139. package/src/models/FrontendCartResource.ts +0 -27
  140. package/src/models/OrderFulfillmentResource.ts +7 -8
  141. package/src/models/OrderStatusWithCountResource.ts +0 -18
  142. package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
  143. package/src/models/PaginatedCouponLiteResourceResponse.ts +90 -0
  144. package/src/models/PaginatedCouponResourceResponse.ts +90 -0
  145. package/src/models/ProductClassResource.ts +2 -2
  146. package/src/models/SearchAllCouponsRequest.ts +154 -0
  147. package/src/models/SearchAllOrdersRequest.ts +0 -8
  148. package/src/models/SearchCartsRequest.ts +8 -0
  149. package/src/models/SearchCouponsRequest.ts +202 -0
  150. package/src/models/SearchOrdersRequest.ts +8 -8
  151. package/src/models/StoreFrontendResource.ts +2 -3
  152. package/src/models/StoreResource.ts +5 -5
  153. package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
  154. package/src/models/StoreSpecialDateResource.ts +4 -3
  155. package/src/models/SupplierFrontendResource.ts +0 -9
  156. package/src/models/SupplierResource.ts +0 -9
  157. package/src/models/UpdateCouponRequest.ts +207 -0
  158. package/src/models/UpdatePageComponentRequest.ts +8 -8
  159. package/src/models/UpdateSupplierRequest.ts +0 -8
  160. package/src/models/index.ts +15 -6
  161. package/dist/apis/ProductClassApi.d.ts +0 -34
  162. package/dist/apis/ProductClassApi.js +0 -139
  163. package/dist/models/OrderCouponResource.d.ts +0 -50
  164. package/dist/models/OrderCouponResource.js +0 -63
  165. package/dist/models/OrderCouponResourceArrayResponse.d.ts +0 -33
  166. package/dist/models/OrderCouponResourceArrayResponse.js +0 -50
  167. package/dist/models/PaginatedProductClassLiteResourceResponse.d.ts +0 -40
  168. package/dist/models/PaginatedProductClassLiteResourceResponse.js +0 -57
  169. package/dist/models/ProductClassLiteResource.d.ts +0 -44
  170. package/dist/models/ProductClassLiteResource.js +0 -57
  171. package/dist/models/ProductClassLiteResourceArrayResponse.d.ts +0 -33
  172. package/dist/models/ProductClassLiteResourceArrayResponse.js +0 -50
  173. package/dist/models/SearchAllProductClassesRequest.d.ts +0 -78
  174. package/dist/models/SearchAllProductClassesRequest.js +0 -74
  175. package/docs/ProductClassApi.md +0 -74
  176. package/src/apis/ProductClassApi.ts +0 -76
  177. package/src/models/OrderCouponResource.ts +0 -93
  178. package/src/models/OrderCouponResourceArrayResponse.ts +0 -73
  179. package/src/models/PaginatedProductClassLiteResourceResponse.ts +0 -90
  180. package/src/models/ProductClassLiteResource.ts +0 -83
  181. package/src/models/ProductClassLiteResourceArrayResponse.ts +0 -73
  182. package/src/models/SearchAllProductClassesRequest.ts +0 -125
@@ -1,22 +1,22 @@
1
1
 
2
- # OrderCouponResourceArrayResponse
2
+ # CouponListResourceArrayResponse
3
3
 
4
4
 
5
5
  ## Properties
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `data` | [Array<OrderCouponResource>](OrderCouponResource.md)
9
+ `data` | [Array<CouponListResource>](CouponListResource.md)
10
10
 
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import type { OrderCouponResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
14
+ import type { CouponListResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
15
 
16
16
  // TODO: Update the object below with actual values
17
17
  const example = {
18
18
  "data": null,
19
- } satisfies OrderCouponResourceArrayResponse
19
+ } satisfies CouponListResourceArrayResponse
20
20
 
21
21
  console.log(example)
22
22
 
@@ -25,7 +25,7 @@ const exampleJSON: string = JSON.stringify(example)
25
25
  console.log(exampleJSON)
26
26
 
27
27
  // Parse the JSON string back to an object
28
- const exampleParsed = JSON.parse(exampleJSON) as OrderCouponResourceArrayResponse
28
+ const exampleParsed = JSON.parse(exampleJSON) as CouponListResourceArrayResponse
29
29
  console.log(exampleParsed)
30
30
  ```
31
31
 
@@ -1,5 +1,5 @@
1
1
 
2
- # OrderCouponResource
2
+ # CouponLiteResource
3
3
 
4
4
 
5
5
  ## Properties
@@ -7,22 +7,20 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | number
10
- `code` | string
11
10
  `name` | string
12
- `discountTotal` | number
11
+ `code` | string
13
12
 
14
13
  ## Example
15
14
 
16
15
  ```typescript
17
- import type { OrderCouponResource } from '@digital8/lighting-illusions-ts-sdk'
16
+ import type { CouponLiteResource } from '@digital8/lighting-illusions-ts-sdk'
18
17
 
19
18
  // TODO: Update the object below with actual values
20
19
  const example = {
21
20
  "id": null,
22
- "code": null,
23
21
  "name": null,
24
- "discountTotal": null,
25
- } satisfies OrderCouponResource
22
+ "code": null,
23
+ } satisfies CouponLiteResource
26
24
 
27
25
  console.log(example)
28
26
 
@@ -31,7 +29,7 @@ const exampleJSON: string = JSON.stringify(example)
31
29
  console.log(exampleJSON)
32
30
 
33
31
  // Parse the JSON string back to an object
34
- const exampleParsed = JSON.parse(exampleJSON) as OrderCouponResource
32
+ const exampleParsed = JSON.parse(exampleJSON) as CouponLiteResource
35
33
  console.log(exampleParsed)
36
34
  ```
37
35
 
@@ -1,22 +1,22 @@
1
1
 
2
- # ProductClassLiteResourceArrayResponse
2
+ # CouponLiteResourceArrayResponse
3
3
 
4
4
 
5
5
  ## Properties
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `data` | [Array<ProductClassLiteResource>](ProductClassLiteResource.md)
9
+ `data` | [Array<CouponLiteResource>](CouponLiteResource.md)
10
10
 
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import type { ProductClassLiteResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
14
+ import type { CouponLiteResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
15
 
16
16
  // TODO: Update the object below with actual values
17
17
  const example = {
18
18
  "data": null,
19
- } satisfies ProductClassLiteResourceArrayResponse
19
+ } satisfies CouponLiteResourceArrayResponse
20
20
 
21
21
  console.log(example)
22
22
 
@@ -25,7 +25,7 @@ const exampleJSON: string = JSON.stringify(example)
25
25
  console.log(exampleJSON)
26
26
 
27
27
  // Parse the JSON string back to an object
28
- const exampleParsed = JSON.parse(exampleJSON) as ProductClassLiteResourceArrayResponse
28
+ const exampleParsed = JSON.parse(exampleJSON) as CouponLiteResourceArrayResponse
29
29
  console.log(exampleParsed)
30
30
  ```
31
31
 
@@ -0,0 +1,78 @@
1
+
2
+ # CouponResource
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | number
10
+ `siteId` | number
11
+ `name` | string
12
+ `code` | string
13
+ `type` | string
14
+ `discountType` | string
15
+ `discountAmount` | number
16
+ `minAmount` | number
17
+ `minProducts` | number
18
+ `totalUseLimit` | number
19
+ `customerUseLimit` | number
20
+ `isAbandonedCart` | boolean
21
+ `isForAllProducts` | boolean
22
+ `isForAllCustomers` | boolean
23
+ `startDate` | Date
24
+ `endDate` | Date
25
+ `site` | [SiteLiteResource](SiteLiteResource.md)
26
+ `productChildren` | [Array<ProductChildLiteResource>](ProductChildLiteResource.md)
27
+ `categories` | [Array<ProductCategoryLiteResource>](ProductCategoryLiteResource.md)
28
+ `suppliers` | [Array<SupplierLiteResource>](SupplierLiteResource.md)
29
+ `customers` | [Array<CustomerListResource>](CustomerListResource.md)
30
+ `ordersCount` | number
31
+ `cartsCount` | number
32
+
33
+ ## Example
34
+
35
+ ```typescript
36
+ import type { CouponResource } from '@digital8/lighting-illusions-ts-sdk'
37
+
38
+ // TODO: Update the object below with actual values
39
+ const example = {
40
+ "id": null,
41
+ "siteId": null,
42
+ "name": null,
43
+ "code": null,
44
+ "type": null,
45
+ "discountType": null,
46
+ "discountAmount": null,
47
+ "minAmount": null,
48
+ "minProducts": null,
49
+ "totalUseLimit": null,
50
+ "customerUseLimit": null,
51
+ "isAbandonedCart": null,
52
+ "isForAllProducts": null,
53
+ "isForAllCustomers": null,
54
+ "startDate": null,
55
+ "endDate": null,
56
+ "site": null,
57
+ "productChildren": null,
58
+ "categories": null,
59
+ "suppliers": null,
60
+ "customers": null,
61
+ "ordersCount": null,
62
+ "cartsCount": null,
63
+ } satisfies CouponResource
64
+
65
+ console.log(example)
66
+
67
+ // Convert the instance to a JSON string
68
+ const exampleJSON: string = JSON.stringify(example)
69
+ console.log(exampleJSON)
70
+
71
+ // Parse the JSON string back to an object
72
+ const exampleParsed = JSON.parse(exampleJSON) as CouponResource
73
+ console.log(exampleParsed)
74
+ ```
75
+
76
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
77
+
78
+
@@ -0,0 +1,34 @@
1
+
2
+ # CouponResourceArrayResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<CouponResource>](CouponResource.md)
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { CouponResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "data": null,
19
+ } satisfies CouponResourceArrayResponse
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as CouponResourceArrayResponse
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
@@ -0,0 +1,32 @@
1
+
2
+ # CouponType
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import type { CouponType } from '@digital8/lighting-illusions-ts-sdk'
14
+
15
+ // TODO: Update the object below with actual values
16
+ const example = {
17
+ } satisfies CouponType
18
+
19
+ console.log(example)
20
+
21
+ // Convert the instance to a JSON string
22
+ const exampleJSON: string = JSON.stringify(example)
23
+ console.log(exampleJSON)
24
+
25
+ // Parse the JSON string back to an object
26
+ const exampleParsed = JSON.parse(exampleJSON) as CouponType
27
+ console.log(exampleParsed)
28
+ ```
29
+
30
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
31
+
32
+
@@ -0,0 +1,407 @@
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
+