@digital8/lighting-illusions-ts-sdk 0.0.2340 → 0.0.2342

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 (181) hide show
  1. package/.openapi-generator/FILES +36 -14
  2. package/README.md +25 -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 +1 -3
  9. package/dist/models/AddressResource.d.ts +1 -1
  10. package/dist/models/AddressResource.js +1 -3
  11. package/dist/models/AdminOrderResource.d.ts +3 -2
  12. package/dist/models/AdminOrderResource.js +3 -2
  13. package/dist/models/CartCouponResource.d.ts +50 -0
  14. package/dist/models/{AppliedCouponResource.js → CartCouponResource.js} +13 -13
  15. package/dist/models/CartCouponResourceArrayResponse.d.ts +33 -0
  16. package/dist/models/CartCouponResourceArrayResponse.js +50 -0
  17. package/dist/models/CartListResource.d.ts +0 -6
  18. package/dist/models/CartListResource.js +0 -4
  19. package/dist/models/CategoryAutomationFieldType.d.ts +0 -2
  20. package/dist/models/CategoryAutomationFieldType.js +1 -3
  21. package/dist/models/CouponListResource.d.ts +99 -0
  22. package/dist/models/CouponListResource.js +90 -0
  23. package/dist/models/CouponListResourceArrayResponse.d.ts +33 -0
  24. package/dist/models/CouponListResourceArrayResponse.js +50 -0
  25. package/dist/models/CouponLiteResource.d.ts +44 -0
  26. package/dist/models/CouponLiteResource.js +57 -0
  27. package/dist/models/CouponLiteResourceArrayResponse.d.ts +33 -0
  28. package/dist/models/CouponLiteResourceArrayResponse.js +50 -0
  29. package/dist/models/CouponResource.d.ts +169 -0
  30. package/dist/models/CouponResource.js +138 -0
  31. package/dist/models/CouponResourceArrayResponse.d.ts +33 -0
  32. package/dist/models/CouponResourceArrayResponse.js +50 -0
  33. package/dist/models/CouponType.d.ts +26 -0
  34. package/dist/models/CouponType.js +52 -0
  35. package/dist/models/CreateCouponRequest.d.ts +134 -0
  36. package/dist/models/CreateCouponRequest.js +114 -0
  37. package/dist/models/CreateCouponRequestCouponablesInner.d.ts +48 -0
  38. package/dist/models/CreateCouponRequestCouponablesInner.js +61 -0
  39. package/dist/models/CreatePageComponentRequest.d.ts +4 -4
  40. package/dist/models/CreatePageComponentRequest.js +4 -4
  41. package/dist/models/CreateProductCategoryRequestAutomationRulesInner.d.ts +0 -2
  42. package/dist/models/CreateProductCategoryRequestAutomationRulesInner.js +1 -3
  43. package/dist/models/CreateSupplierRequest.d.ts +0 -6
  44. package/dist/models/CreateSupplierRequest.js +0 -2
  45. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  46. package/dist/models/ExternalApiLogResource.js +3 -1
  47. package/dist/models/FrontendCartResource.d.ts +0 -18
  48. package/dist/models/FrontendCartResource.js +0 -12
  49. package/dist/models/FrontendOrderResource.d.ts +3 -3
  50. package/dist/models/FrontendOrderResource.js +3 -3
  51. package/dist/models/OrderFulfillmentResource.d.ts +2 -2
  52. package/dist/models/OrderFulfillmentResource.js +3 -3
  53. package/dist/models/OrderStatusWithCountResource.d.ts +0 -12
  54. package/dist/models/OrderStatusWithCountResource.js +0 -8
  55. package/dist/models/PaginatedCouponListResourceResponse.d.ts +40 -0
  56. package/dist/models/PaginatedCouponListResourceResponse.js +57 -0
  57. package/dist/models/PaginatedCouponLiteResourceResponse.d.ts +40 -0
  58. package/dist/models/PaginatedCouponLiteResourceResponse.js +57 -0
  59. package/dist/models/PaginatedCouponResourceResponse.d.ts +40 -0
  60. package/dist/models/PaginatedCouponResourceResponse.js +57 -0
  61. package/dist/models/ProductClassResource.d.ts +2 -2
  62. package/dist/models/SearchAllCouponsRequest.d.ts +101 -0
  63. package/dist/models/SearchAllCouponsRequest.js +85 -0
  64. package/dist/models/SearchAllOrdersRequest.d.ts +0 -6
  65. package/dist/models/SearchAllOrdersRequest.js +0 -2
  66. package/dist/models/SearchCartsRequest.d.ts +6 -0
  67. package/dist/models/SearchCartsRequest.js +2 -0
  68. package/dist/models/SearchCouponsRequest.d.ts +137 -0
  69. package/dist/models/SearchCouponsRequest.js +97 -0
  70. package/dist/models/SearchOrdersRequest.d.ts +6 -6
  71. package/dist/models/SearchOrdersRequest.js +2 -2
  72. package/dist/models/StoreListResource.d.ts +1 -1
  73. package/dist/models/StoreListResource.js +1 -3
  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 +17 -6
  85. package/dist/models/index.js +17 -6
  86. package/docs/AdminOrderResource.md +1 -1
  87. package/docs/{AppliedCouponResource.md → CartCouponResource.md} +4 -4
  88. package/docs/{AppliedCouponResourceArrayResponse.md → CartCouponResourceArrayResponse.md} +5 -5
  89. package/docs/CartListResource.md +0 -2
  90. package/docs/CouponListResource.md +56 -0
  91. package/docs/{ProductClassLiteResourceArrayResponse.md → CouponListResourceArrayResponse.md} +5 -5
  92. package/docs/{ProductClassLiteResource.md → CouponLiteResource.md} +6 -6
  93. package/docs/CouponLiteResourceArrayResponse.md +34 -0
  94. package/docs/CouponResource.md +78 -0
  95. package/docs/CouponResourceArrayResponse.md +34 -0
  96. package/docs/CouponType.md +32 -0
  97. package/docs/CouponsApi.md +407 -0
  98. package/docs/CreateCouponRequest.md +62 -0
  99. package/docs/CreateCouponRequestCouponablesInner.md +36 -0
  100. package/docs/CreatePageComponentRequest.md +2 -2
  101. package/docs/CreateSupplierRequest.md +0 -2
  102. package/docs/FrontendCartResource.md +0 -6
  103. package/docs/FrontendOrderResource.md +1 -1
  104. package/docs/OrderStatusWithCountResource.md +0 -4
  105. package/docs/{PaginatedProductClassLiteResourceResponse.md → PaginatedCouponListResourceResponse.md} +5 -5
  106. package/docs/PaginatedCouponLiteResourceResponse.md +36 -0
  107. package/docs/PaginatedCouponResourceResponse.md +36 -0
  108. package/docs/ProductClassResource.md +1 -1
  109. package/docs/{SearchAllProductClassesRequest.md → SearchAllCouponsRequest.md} +10 -4
  110. package/docs/SearchAllOrdersRequest.md +0 -2
  111. package/docs/SearchCartsRequest.md +2 -0
  112. package/docs/SearchCouponsRequest.md +62 -0
  113. package/docs/SearchOrdersRequest.md +2 -2
  114. package/docs/SupplierFrontendResource.md +0 -2
  115. package/docs/SupplierResource.md +0 -2
  116. package/docs/UpdateCouponRequest.md +60 -0
  117. package/docs/UpdatePageComponentRequest.md +2 -2
  118. package/docs/UpdateSupplierRequest.md +0 -2
  119. package/package.json +1 -1
  120. package/src/apis/CouponsApi.ts +345 -0
  121. package/src/apis/index.ts +1 -1
  122. package/src/models/AddressFrontendResource.ts +2 -3
  123. package/src/models/AddressResource.ts +2 -3
  124. package/src/models/AdminOrderResource.ts +11 -4
  125. package/src/models/{AppliedCouponResource.ts → CartCouponResource.ts} +14 -14
  126. package/src/models/CartCouponResourceArrayResponse.ts +73 -0
  127. package/src/models/CartListResource.ts +0 -9
  128. package/src/models/CategoryAutomationFieldType.ts +1 -3
  129. package/src/models/CouponListResource.ts +170 -0
  130. package/src/models/CouponListResourceArrayResponse.ts +73 -0
  131. package/src/models/CouponLiteResource.ts +83 -0
  132. package/src/models/CouponLiteResourceArrayResponse.ts +73 -0
  133. package/src/models/CouponResource.ts +297 -0
  134. package/src/models/CouponResourceArrayResponse.ts +73 -0
  135. package/src/models/CouponType.ts +54 -0
  136. package/src/models/CreateCouponRequest.ts +216 -0
  137. package/src/models/CreateCouponRequestCouponablesInner.ts +86 -0
  138. package/src/models/CreatePageComponentRequest.ts +8 -8
  139. package/src/models/CreateProductCategoryRequestAutomationRulesInner.ts +1 -3
  140. package/src/models/CreateSupplierRequest.ts +0 -8
  141. package/src/models/ExternalApiLogResource.ts +3 -2
  142. package/src/models/FrontendCartResource.ts +0 -27
  143. package/src/models/FrontendOrderResource.ts +11 -11
  144. package/src/models/OrderFulfillmentResource.ts +5 -5
  145. package/src/models/OrderStatusWithCountResource.ts +0 -18
  146. package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
  147. package/src/models/PaginatedCouponLiteResourceResponse.ts +90 -0
  148. package/src/models/PaginatedCouponResourceResponse.ts +90 -0
  149. package/src/models/ProductClassResource.ts +2 -2
  150. package/src/models/SearchAllCouponsRequest.ts +154 -0
  151. package/src/models/SearchAllOrdersRequest.ts +0 -8
  152. package/src/models/SearchCartsRequest.ts +8 -0
  153. package/src/models/SearchCouponsRequest.ts +202 -0
  154. package/src/models/SearchOrdersRequest.ts +8 -8
  155. package/src/models/StoreListResource.ts +2 -3
  156. package/src/models/SupplierFrontendResource.ts +0 -9
  157. package/src/models/SupplierResource.ts +0 -9
  158. package/src/models/UpdateCouponRequest.ts +207 -0
  159. package/src/models/UpdatePageComponentRequest.ts +8 -8
  160. package/src/models/UpdateSupplierRequest.ts +0 -8
  161. package/src/models/index.ts +17 -6
  162. package/dist/apis/ProductClassApi.d.ts +0 -34
  163. package/dist/apis/ProductClassApi.js +0 -139
  164. package/dist/models/AppliedCouponResource.d.ts +0 -50
  165. package/dist/models/AppliedCouponResourceArrayResponse.d.ts +0 -33
  166. package/dist/models/AppliedCouponResourceArrayResponse.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/AppliedCouponResourceArrayResponse.ts +0 -73
  178. package/src/models/PaginatedProductClassLiteResourceResponse.ts +0 -90
  179. package/src/models/ProductClassLiteResource.ts +0 -83
  180. package/src/models/ProductClassLiteResourceArrayResponse.ts +0 -73
  181. package/src/models/SearchAllProductClassesRequest.ts +0 -125
@@ -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 { CouponLiteResource } from './CouponLiteResource';
17
+ import {
18
+ CouponLiteResourceFromJSON,
19
+ CouponLiteResourceFromJSONTyped,
20
+ CouponLiteResourceToJSON,
21
+ CouponLiteResourceToJSONTyped,
22
+ } from './CouponLiteResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CouponLiteResourceArrayResponse
28
+ */
29
+ export interface CouponLiteResourceArrayResponse {
30
+ /**
31
+ *
32
+ * @type {Array<CouponLiteResource>}
33
+ * @memberof CouponLiteResourceArrayResponse
34
+ */
35
+ data?: Array<CouponLiteResource>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the CouponLiteResourceArrayResponse interface.
40
+ */
41
+ export function instanceOfCouponLiteResourceArrayResponse(value: object): value is CouponLiteResourceArrayResponse {
42
+ return true;
43
+ }
44
+
45
+ export function CouponLiteResourceArrayResponseFromJSON(json: any): CouponLiteResourceArrayResponse {
46
+ return CouponLiteResourceArrayResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function CouponLiteResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponLiteResourceArrayResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CouponLiteResourceFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function CouponLiteResourceArrayResponseToJSON(json: any): CouponLiteResourceArrayResponse {
60
+ return CouponLiteResourceArrayResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function CouponLiteResourceArrayResponseToJSONTyped(value?: CouponLiteResourceArrayResponse | 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(CouponLiteResourceToJSON)),
71
+ };
72
+ }
73
+
@@ -0,0 +1,297 @@
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 {number}
67
+ * @memberof CouponResource
68
+ */
69
+ siteId: number;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof CouponResource
74
+ */
75
+ name: string;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof CouponResource
80
+ */
81
+ code: string;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof CouponResource
86
+ */
87
+ type: string;
88
+ /**
89
+ *
90
+ * @type {string}
91
+ * @memberof CouponResource
92
+ */
93
+ discountType: string;
94
+ /**
95
+ *
96
+ * @type {number}
97
+ * @memberof CouponResource
98
+ */
99
+ discountAmount: number;
100
+ /**
101
+ *
102
+ * @type {number}
103
+ * @memberof CouponResource
104
+ */
105
+ minAmount: number;
106
+ /**
107
+ *
108
+ * @type {number}
109
+ * @memberof CouponResource
110
+ */
111
+ minProducts: number;
112
+ /**
113
+ *
114
+ * @type {number}
115
+ * @memberof CouponResource
116
+ */
117
+ totalUseLimit: number;
118
+ /**
119
+ *
120
+ * @type {number}
121
+ * @memberof CouponResource
122
+ */
123
+ customerUseLimit: number;
124
+ /**
125
+ *
126
+ * @type {boolean}
127
+ * @memberof CouponResource
128
+ */
129
+ isAbandonedCart: boolean;
130
+ /**
131
+ *
132
+ * @type {boolean}
133
+ * @memberof CouponResource
134
+ */
135
+ isForAllProducts: boolean;
136
+ /**
137
+ *
138
+ * @type {boolean}
139
+ * @memberof CouponResource
140
+ */
141
+ isForAllCustomers: boolean;
142
+ /**
143
+ *
144
+ * @type {Date}
145
+ * @memberof CouponResource
146
+ */
147
+ startDate?: Date | null;
148
+ /**
149
+ *
150
+ * @type {Date}
151
+ * @memberof CouponResource
152
+ */
153
+ endDate?: Date | null;
154
+ /**
155
+ *
156
+ * @type {SiteLiteResource}
157
+ * @memberof CouponResource
158
+ */
159
+ site: SiteLiteResource | null;
160
+ /**
161
+ *
162
+ * @type {Array<ProductChildLiteResource>}
163
+ * @memberof CouponResource
164
+ */
165
+ productChildren: Array<ProductChildLiteResource> | null;
166
+ /**
167
+ *
168
+ * @type {Array<ProductCategoryListResource>}
169
+ * @memberof CouponResource
170
+ */
171
+ categories: Array<ProductCategoryListResource> | null;
172
+ /**
173
+ *
174
+ * @type {Array<SupplierListResource>}
175
+ * @memberof CouponResource
176
+ */
177
+ suppliers: Array<SupplierListResource> | null;
178
+ /**
179
+ *
180
+ * @type {Array<CustomerListResource>}
181
+ * @memberof CouponResource
182
+ */
183
+ customers: Array<CustomerListResource> | null;
184
+ /**
185
+ *
186
+ * @type {number}
187
+ * @memberof CouponResource
188
+ */
189
+ ordersCount: number;
190
+ /**
191
+ *
192
+ * @type {number}
193
+ * @memberof CouponResource
194
+ */
195
+ cartsCount: number;
196
+ }
197
+
198
+ /**
199
+ * Check if a given object implements the CouponResource interface.
200
+ */
201
+ export function instanceOfCouponResource(value: object): value is CouponResource {
202
+ if (!('siteId' in value) || value['siteId'] === undefined) return false;
203
+ if (!('name' in value) || value['name'] === undefined) return false;
204
+ if (!('code' in value) || value['code'] === undefined) return false;
205
+ if (!('type' in value) || value['type'] === undefined) return false;
206
+ if (!('discountType' in value) || value['discountType'] === undefined) return false;
207
+ if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
208
+ if (!('minAmount' in value) || value['minAmount'] === undefined) return false;
209
+ if (!('minProducts' in value) || value['minProducts'] === undefined) return false;
210
+ if (!('totalUseLimit' in value) || value['totalUseLimit'] === undefined) return false;
211
+ if (!('customerUseLimit' in value) || value['customerUseLimit'] === undefined) return false;
212
+ if (!('isAbandonedCart' in value) || value['isAbandonedCart'] === undefined) return false;
213
+ if (!('isForAllProducts' in value) || value['isForAllProducts'] === undefined) return false;
214
+ if (!('isForAllCustomers' in value) || value['isForAllCustomers'] === undefined) return false;
215
+ if (!('site' in value) || value['site'] === undefined) return false;
216
+ if (!('productChildren' in value) || value['productChildren'] === undefined) return false;
217
+ if (!('categories' in value) || value['categories'] === undefined) return false;
218
+ if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
219
+ if (!('customers' in value) || value['customers'] === undefined) return false;
220
+ if (!('ordersCount' in value) || value['ordersCount'] === undefined) return false;
221
+ if (!('cartsCount' in value) || value['cartsCount'] === undefined) return false;
222
+ return true;
223
+ }
224
+
225
+ export function CouponResourceFromJSON(json: any): CouponResource {
226
+ return CouponResourceFromJSONTyped(json, false);
227
+ }
228
+
229
+ export function CouponResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponResource {
230
+ if (json == null) {
231
+ return json;
232
+ }
233
+ return {
234
+
235
+ 'id': json['id'] == null ? undefined : json['id'],
236
+ 'siteId': json['siteId'],
237
+ 'name': json['name'],
238
+ 'code': json['code'],
239
+ 'type': json['type'],
240
+ 'discountType': json['discountType'],
241
+ 'discountAmount': json['discountAmount'],
242
+ 'minAmount': json['minAmount'],
243
+ 'minProducts': json['minProducts'],
244
+ 'totalUseLimit': json['totalUseLimit'],
245
+ 'customerUseLimit': json['customerUseLimit'],
246
+ 'isAbandonedCart': json['isAbandonedCart'],
247
+ 'isForAllProducts': json['isForAllProducts'],
248
+ 'isForAllCustomers': json['isForAllCustomers'],
249
+ 'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
250
+ 'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
251
+ 'site': SiteLiteResourceFromJSON(json['site']),
252
+ 'productChildren': (json['productChildren'] == null ? null : (json['productChildren'] as Array<any>).map(ProductChildLiteResourceFromJSON)),
253
+ 'categories': (json['categories'] == null ? null : (json['categories'] as Array<any>).map(ProductCategoryListResourceFromJSON)),
254
+ 'suppliers': (json['suppliers'] == null ? null : (json['suppliers'] as Array<any>).map(SupplierListResourceFromJSON)),
255
+ 'customers': (json['customers'] == null ? null : (json['customers'] as Array<any>).map(CustomerListResourceFromJSON)),
256
+ 'ordersCount': json['ordersCount'],
257
+ 'cartsCount': json['cartsCount'],
258
+ };
259
+ }
260
+
261
+ export function CouponResourceToJSON(json: any): CouponResource {
262
+ return CouponResourceToJSONTyped(json, false);
263
+ }
264
+
265
+ export function CouponResourceToJSONTyped(value?: CouponResource | null, ignoreDiscriminator: boolean = false): any {
266
+ if (value == null) {
267
+ return value;
268
+ }
269
+
270
+ return {
271
+
272
+ 'id': value['id'],
273
+ 'siteId': value['siteId'],
274
+ 'name': value['name'],
275
+ 'code': value['code'],
276
+ 'type': value['type'],
277
+ 'discountType': value['discountType'],
278
+ 'discountAmount': value['discountAmount'],
279
+ 'minAmount': value['minAmount'],
280
+ 'minProducts': value['minProducts'],
281
+ 'totalUseLimit': value['totalUseLimit'],
282
+ 'customerUseLimit': value['customerUseLimit'],
283
+ 'isAbandonedCart': value['isAbandonedCart'],
284
+ 'isForAllProducts': value['isForAllProducts'],
285
+ 'isForAllCustomers': value['isForAllCustomers'],
286
+ 'startDate': value['startDate'] == null ? value['startDate'] : value['startDate'].toISOString(),
287
+ 'endDate': value['endDate'] == null ? value['endDate'] : value['endDate'].toISOString(),
288
+ 'site': SiteLiteResourceToJSON(value['site']),
289
+ 'productChildren': (value['productChildren'] == null ? null : (value['productChildren'] as Array<any>).map(ProductChildLiteResourceToJSON)),
290
+ 'categories': (value['categories'] == null ? null : (value['categories'] as Array<any>).map(ProductCategoryListResourceToJSON)),
291
+ 'suppliers': (value['suppliers'] == null ? null : (value['suppliers'] as Array<any>).map(SupplierListResourceToJSON)),
292
+ 'customers': (value['customers'] == null ? null : (value['customers'] as Array<any>).map(CustomerListResourceToJSON)),
293
+ 'ordersCount': value['ordersCount'],
294
+ 'cartsCount': value['cartsCount'],
295
+ };
296
+ }
297
+
@@ -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 { 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
+
@@ -0,0 +1,54 @@
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
+