@digital8/lighting-illusions-ts-sdk 0.0.2348 → 0.0.2349
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 +34 -14
- package/README.md +24 -9
- package/dist/apis/CouponsApi.d.ts +116 -0
- package/dist/apis/CouponsApi.js +440 -0
- package/dist/apis/index.d.ts +1 -1
- package/dist/apis/index.js +1 -1
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +2 -6
- 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/CartListResource.d.ts +0 -6
- package/dist/models/CartListResource.js +0 -4
- package/dist/models/CategoryAutomationFieldType.d.ts +0 -2
- package/dist/models/CategoryAutomationFieldType.js +1 -3
- package/dist/models/CouponListResource.d.ts +99 -0
- package/dist/models/CouponListResource.js +90 -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 +134 -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 +134 -0
- package/dist/models/CreateCouponRequest.js +114 -0
- package/dist/models/CreateCouponRequestCouponablesInner.d.ts +48 -0
- package/dist/models/CreateCouponRequestCouponablesInner.js +61 -0
- package/dist/models/CreatePageComponentRequest.d.ts +4 -4
- package/dist/models/CreatePageComponentRequest.js +4 -4
- package/dist/models/CreateProductCategoryRequestAutomationRulesInner.d.ts +0 -2
- package/dist/models/CreateProductCategoryRequestAutomationRulesInner.js +1 -3
- package/dist/models/CreateSupplierRequest.d.ts +0 -6
- package/dist/models/CreateSupplierRequest.js +0 -2
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/FrontendCartResource.d.ts +0 -18
- package/dist/models/FrontendCartResource.js +0 -12
- package/dist/models/FrontendOrderResource.d.ts +3 -3
- package/dist/models/FrontendOrderResource.js +3 -3
- package/dist/models/OrderFulfillmentResource.d.ts +3 -3
- package/dist/models/OrderFulfillmentResource.js +6 -4
- package/dist/models/OrderStatusWithCountResource.d.ts +0 -12
- package/dist/models/OrderStatusWithCountResource.js +0 -8
- 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/ProductClassResource.d.ts +2 -2
- package/dist/models/SearchAllCouponsRequest.d.ts +101 -0
- package/dist/models/SearchAllCouponsRequest.js +85 -0
- package/dist/models/SearchAllOrdersRequest.d.ts +0 -6
- package/dist/models/SearchAllOrdersRequest.js +0 -2
- 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 -6
- package/dist/models/SearchOrdersRequest.js +2 -2
- package/dist/models/StoreFrontendResource.d.ts +2 -2
- package/dist/models/StoreFrontendResource.js +4 -4
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +1 -3
- 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 +1 -3
- package/dist/models/SupplierFrontendResource.d.ts +0 -6
- package/dist/models/SupplierFrontendResource.js +0 -4
- package/dist/models/SupplierResource.d.ts +0 -6
- package/dist/models/SupplierResource.js +0 -4
- package/dist/models/UpdateCouponRequest.d.ts +128 -0
- package/dist/models/UpdateCouponRequest.js +110 -0
- package/dist/models/UpdatePageComponentRequest.d.ts +4 -4
- package/dist/models/UpdatePageComponentRequest.js +4 -4
- package/dist/models/UpdateSupplierRequest.d.ts +0 -6
- package/dist/models/UpdateSupplierRequest.js +0 -2
- package/dist/models/index.d.ts +16 -6
- package/dist/models/index.js +16 -6
- package/docs/AdminOrderResource.md +1 -1
- package/docs/{AppliedCouponResource.md → CartCouponResource.md} +4 -4
- package/docs/{AppliedCouponResourceArrayResponse.md → CartCouponResourceArrayResponse.md} +5 -5
- package/docs/CartListResource.md +0 -2
- package/docs/CouponListResource.md +56 -0
- package/docs/{ProductClassLiteResourceArrayResponse.md → CouponListResourceArrayResponse.md} +5 -5
- package/docs/{ProductClassLiteResource.md → CouponLiteResource.md} +6 -6
- package/docs/CouponLiteResourceArrayResponse.md +34 -0
- package/docs/CouponResource.md +76 -0
- package/docs/CouponResourceArrayResponse.md +34 -0
- package/docs/CouponType.md +32 -0
- package/docs/CouponsApi.md +407 -0
- package/docs/CreateCouponRequest.md +62 -0
- package/docs/CreateCouponRequestCouponablesInner.md +36 -0
- package/docs/CreatePageComponentRequest.md +2 -2
- package/docs/CreateSupplierRequest.md +0 -2
- package/docs/FrontendCartResource.md +0 -6
- package/docs/FrontendOrderResource.md +1 -1
- package/docs/OrderStatusWithCountResource.md +0 -4
- package/docs/{PaginatedProductClassLiteResourceResponse.md → PaginatedCouponListResourceResponse.md} +5 -5
- package/docs/PaginatedCouponResourceResponse.md +36 -0
- package/docs/ProductClassResource.md +1 -1
- package/docs/{SearchAllProductClassesRequest.md → SearchAllCouponsRequest.md} +10 -4
- package/docs/SearchAllOrdersRequest.md +0 -2
- package/docs/SearchCartsRequest.md +2 -0
- package/docs/SearchCouponsRequest.md +62 -0
- package/docs/SearchOrdersRequest.md +2 -2
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/docs/SupplierFrontendResource.md +0 -2
- package/docs/SupplierResource.md +0 -2
- package/docs/UpdateCouponRequest.md +60 -0
- package/docs/UpdatePageComponentRequest.md +2 -2
- package/docs/UpdateSupplierRequest.md +0 -2
- package/package.json +1 -1
- package/src/apis/CouponsApi.ts +345 -0
- package/src/apis/index.ts +1 -1
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +4 -6
- 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/CartListResource.ts +0 -9
- package/src/models/CategoryAutomationFieldType.ts +1 -3
- 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 +216 -0
- package/src/models/CreateCouponRequestCouponablesInner.ts +86 -0
- package/src/models/CreatePageComponentRequest.ts +8 -8
- package/src/models/CreateProductCategoryRequestAutomationRulesInner.ts +1 -3
- package/src/models/CreateSupplierRequest.ts +0 -8
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/FrontendCartResource.ts +0 -27
- package/src/models/FrontendOrderResource.ts +11 -11
- package/src/models/OrderFulfillmentResource.ts +8 -7
- package/src/models/OrderStatusWithCountResource.ts +0 -18
- package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
- package/src/models/PaginatedCouponResourceResponse.ts +90 -0
- package/src/models/ProductClassResource.ts +2 -2
- package/src/models/SearchAllCouponsRequest.ts +154 -0
- package/src/models/SearchAllOrdersRequest.ts +0 -8
- package/src/models/SearchCartsRequest.ts +8 -0
- package/src/models/SearchCouponsRequest.ts +202 -0
- package/src/models/SearchOrdersRequest.ts +8 -8
- package/src/models/StoreFrontendResource.ts +5 -5
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreResource.ts +4 -6
- package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
- package/src/models/SupplierFrontendResource.ts +0 -9
- package/src/models/SupplierResource.ts +0 -9
- package/src/models/UpdateCouponRequest.ts +207 -0
- package/src/models/UpdatePageComponentRequest.ts +8 -8
- package/src/models/UpdateSupplierRequest.ts +0 -8
- package/src/models/index.ts +16 -6
- package/dist/apis/ProductClassApi.d.ts +0 -34
- package/dist/apis/ProductClassApi.js +0 -139
- 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/PaginatedProductClassLiteResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedProductClassLiteResourceResponse.js +0 -57
- package/dist/models/ProductClassLiteResource.d.ts +0 -44
- package/dist/models/ProductClassLiteResource.js +0 -57
- package/dist/models/ProductClassLiteResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductClassLiteResourceArrayResponse.js +0 -50
- package/dist/models/SearchAllProductClassesRequest.d.ts +0 -78
- package/dist/models/SearchAllProductClassesRequest.js +0 -74
- package/docs/ProductClassApi.md +0 -74
- package/src/apis/ProductClassApi.ts +0 -76
- package/src/models/AppliedCouponResourceArrayResponse.ts +0 -73
- package/src/models/PaginatedProductClassLiteResourceResponse.ts +0 -90
- package/src/models/ProductClassLiteResource.ts +0 -83
- package/src/models/ProductClassLiteResourceArrayResponse.ts +0 -73
- package/src/models/SearchAllProductClassesRequest.ts +0 -125
|
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof AddressFrontendResource
|
|
26
26
|
*/
|
|
27
|
-
company
|
|
27
|
+
company?: string | null;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -73,7 +73,6 @@ export interface AddressFrontendResource {
|
|
|
73
73
|
* Check if a given object implements the AddressFrontendResource interface.
|
|
74
74
|
*/
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
|
-
if (!('company' in value) || value['company'] === undefined) return false;
|
|
77
76
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
77
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
79
78
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
@@ -93,7 +92,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
93
92
|
}
|
|
94
93
|
return {
|
|
95
94
|
|
|
96
|
-
'company': json['company'],
|
|
95
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
97
96
|
'line1': json['line1'],
|
|
98
97
|
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
99
98
|
'postcode': json['postcode'],
|
|
@@ -48,7 +48,7 @@ export interface AddressResource {
|
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof AddressResource
|
|
50
50
|
*/
|
|
51
|
-
company
|
|
51
|
+
company?: string | null;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {string}
|
|
@@ -60,7 +60,7 @@ export interface AddressResource {
|
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof AddressResource
|
|
62
62
|
*/
|
|
63
|
-
line2
|
|
63
|
+
line2?: string | null;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
@@ -98,9 +98,7 @@ export interface AddressResource {
|
|
|
98
98
|
*/
|
|
99
99
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
100
100
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
101
|
-
if (!('company' in value) || value['company'] === undefined) return false;
|
|
102
101
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
103
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
104
102
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
105
103
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
106
104
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -123,9 +121,9 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
123
121
|
'type': json['type'] == null ? undefined : json['type'],
|
|
124
122
|
'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
|
|
125
123
|
'addresseeName': json['addresseeName'],
|
|
126
|
-
'company': json['company'],
|
|
124
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
127
125
|
'line1': json['line1'],
|
|
128
|
-
'line2': json['line2'],
|
|
126
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
129
127
|
'postcode': json['postcode'],
|
|
130
128
|
'suburb': json['suburb'],
|
|
131
129
|
'country': json['country'],
|
|
@@ -55,6 +55,13 @@ import {
|
|
|
55
55
|
OrderStatusLiteResourceToJSON,
|
|
56
56
|
OrderStatusLiteResourceToJSONTyped,
|
|
57
57
|
} from './OrderStatusLiteResource';
|
|
58
|
+
import type { CartCouponResource } from './CartCouponResource';
|
|
59
|
+
import {
|
|
60
|
+
CartCouponResourceFromJSON,
|
|
61
|
+
CartCouponResourceFromJSONTyped,
|
|
62
|
+
CartCouponResourceToJSON,
|
|
63
|
+
CartCouponResourceToJSONTyped,
|
|
64
|
+
} from './CartCouponResource';
|
|
58
65
|
import type { CustomerResource } from './CustomerResource';
|
|
59
66
|
import {
|
|
60
67
|
CustomerResourceFromJSON,
|
|
@@ -320,10 +327,10 @@ export interface AdminOrderResource {
|
|
|
320
327
|
lineItems: Array<AdminOrderLineItemResource> | null;
|
|
321
328
|
/**
|
|
322
329
|
*
|
|
323
|
-
* @type {
|
|
330
|
+
* @type {Array<CartCouponResource>}
|
|
324
331
|
* @memberof AdminOrderResource
|
|
325
332
|
*/
|
|
326
|
-
coupons:
|
|
333
|
+
coupons: Array<CartCouponResource> | null;
|
|
327
334
|
/**
|
|
328
335
|
*
|
|
329
336
|
* @type {Array<DiscountResource>}
|
|
@@ -450,7 +457,7 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
450
457
|
'admin': LiAdminUserLiteResourceFromJSON(json['admin']),
|
|
451
458
|
'status': OrderStatusLiteResourceFromJSON(json['status']),
|
|
452
459
|
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(AdminOrderLineItemResourceFromJSON)),
|
|
453
|
-
'coupons': json['coupons'],
|
|
460
|
+
'coupons': (json['coupons'] == null ? null : (json['coupons'] as Array<any>).map(CartCouponResourceFromJSON)),
|
|
454
461
|
'discounts': (json['discounts'] == null ? null : (json['discounts'] as Array<any>).map(DiscountResourceFromJSON)),
|
|
455
462
|
'transactions': (json['transactions'] == null ? null : (json['transactions'] as Array<any>).map(TransactionLiteResourceFromJSON)),
|
|
456
463
|
'shippingAddress': AddressResourceFromJSON(json['shippingAddress']),
|
|
@@ -508,7 +515,7 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
|
|
|
508
515
|
'admin': LiAdminUserLiteResourceToJSON(value['admin']),
|
|
509
516
|
'status': OrderStatusLiteResourceToJSON(value['status']),
|
|
510
517
|
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(AdminOrderLineItemResourceToJSON)),
|
|
511
|
-
'coupons': value['coupons'],
|
|
518
|
+
'coupons': (value['coupons'] == null ? null : (value['coupons'] as Array<any>).map(CartCouponResourceToJSON)),
|
|
512
519
|
'discounts': (value['discounts'] == null ? null : (value['discounts'] as Array<any>).map(DiscountResourceToJSON)),
|
|
513
520
|
'transactions': (value['transactions'] == null ? null : (value['transactions'] as Array<any>).map(TransactionLiteResourceToJSON)),
|
|
514
521
|
'shippingAddress': AddressResourceToJSON(value['shippingAddress']),
|
|
@@ -16,39 +16,39 @@ import { mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface CartCouponResource
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface CartCouponResource {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* @type {number}
|
|
25
|
-
* @memberof
|
|
25
|
+
* @memberof CartCouponResource
|
|
26
26
|
*/
|
|
27
27
|
id: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
|
-
* @memberof
|
|
31
|
+
* @memberof CartCouponResource
|
|
32
32
|
*/
|
|
33
33
|
code: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
|
-
* @memberof
|
|
37
|
+
* @memberof CartCouponResource
|
|
38
38
|
*/
|
|
39
39
|
name: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {number}
|
|
43
|
-
* @memberof
|
|
43
|
+
* @memberof CartCouponResource
|
|
44
44
|
*/
|
|
45
45
|
discountTotal: number;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* Check if a given object implements the
|
|
49
|
+
* Check if a given object implements the CartCouponResource interface.
|
|
50
50
|
*/
|
|
51
|
-
export function
|
|
51
|
+
export function instanceOfCartCouponResource(value: object): value is CartCouponResource {
|
|
52
52
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
53
53
|
if (!('code' in value) || value['code'] === undefined) return false;
|
|
54
54
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
@@ -56,11 +56,11 @@ export function instanceOfAppliedCouponResource(value: object): value is Applied
|
|
|
56
56
|
return true;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export function
|
|
60
|
-
return
|
|
59
|
+
export function CartCouponResourceFromJSON(json: any): CartCouponResource {
|
|
60
|
+
return CartCouponResourceFromJSONTyped(json, false);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export function
|
|
63
|
+
export function CartCouponResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponResource {
|
|
64
64
|
if (json == null) {
|
|
65
65
|
return json;
|
|
66
66
|
}
|
|
@@ -73,11 +73,11 @@ export function AppliedCouponResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
export function
|
|
77
|
-
return
|
|
76
|
+
export function CartCouponResourceToJSON(json: any): CartCouponResource {
|
|
77
|
+
return CartCouponResourceToJSONTyped(json, false);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
export function
|
|
80
|
+
export function CartCouponResourceToJSONTyped(value?: CartCouponResource | null, ignoreDiscriminator: boolean = false): any {
|
|
81
81
|
if (value == null) {
|
|
82
82
|
return value;
|
|
83
83
|
}
|
|
@@ -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 { CartCouponResource } from './CartCouponResource';
|
|
17
|
+
import {
|
|
18
|
+
CartCouponResourceFromJSON,
|
|
19
|
+
CartCouponResourceFromJSONTyped,
|
|
20
|
+
CartCouponResourceToJSON,
|
|
21
|
+
CartCouponResourceToJSONTyped,
|
|
22
|
+
} from './CartCouponResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CartCouponResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface CartCouponResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<CartCouponResource>}
|
|
33
|
+
* @memberof CartCouponResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<CartCouponResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CartCouponResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCartCouponResourceArrayResponse(value: object): value is CartCouponResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CartCouponResourceArrayResponseFromJSON(json: any): CartCouponResourceArrayResponse {
|
|
46
|
+
return CartCouponResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CartCouponResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CartCouponResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CartCouponResourceArrayResponseToJSON(json: any): CartCouponResourceArrayResponse {
|
|
60
|
+
return CartCouponResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function CartCouponResourceArrayResponseToJSONTyped(value?: CartCouponResourceArrayResponse | 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(CartCouponResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -71,12 +71,6 @@ export interface CartListResource {
|
|
|
71
71
|
* @memberof CartListResource
|
|
72
72
|
*/
|
|
73
73
|
createdAt?: Date | null;
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* @type {Date}
|
|
77
|
-
* @memberof CartListResource
|
|
78
|
-
*/
|
|
79
|
-
expiryDate: Date;
|
|
80
74
|
/**
|
|
81
75
|
*
|
|
82
76
|
* @type {SiteLiteResource}
|
|
@@ -114,7 +108,6 @@ export interface CartListResource {
|
|
|
114
108
|
*/
|
|
115
109
|
export function instanceOfCartListResource(value: object): value is CartListResource {
|
|
116
110
|
if (!('source' in value) || value['source'] === undefined) return false;
|
|
117
|
-
if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
|
|
118
111
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
119
112
|
if (!('customer' in value) || value['customer'] === undefined) return false;
|
|
120
113
|
if (!('lineItems' in value) || value['lineItems'] === undefined) return false;
|
|
@@ -138,7 +131,6 @@ export function CartListResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
138
131
|
'source': json['source'],
|
|
139
132
|
'checkoutCompletedAt': json['checkoutCompletedAt'] == null ? undefined : (new Date(json['checkoutCompletedAt'])),
|
|
140
133
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
141
|
-
'expiryDate': (new Date(json['expiryDate'])),
|
|
142
134
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
143
135
|
'customer': CustomerListResourceFromJSON(json['customer']),
|
|
144
136
|
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(LineItemListResourceFromJSON)),
|
|
@@ -163,7 +155,6 @@ export function CartListResourceToJSONTyped(value?: CartListResource | null, ign
|
|
|
163
155
|
'source': value['source'],
|
|
164
156
|
'checkoutCompletedAt': value['checkoutCompletedAt'] == null ? value['checkoutCompletedAt'] : value['checkoutCompletedAt'].toISOString(),
|
|
165
157
|
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
166
|
-
'expiryDate': value['expiryDate'].toISOString(),
|
|
167
158
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
168
159
|
'customer': CustomerListResourceToJSON(value['customer']),
|
|
169
160
|
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(LineItemListResourceToJSON)),
|
|
@@ -24,9 +24,7 @@ export const CategoryAutomationFieldType = {
|
|
|
24
24
|
Attribute: 'attribute',
|
|
25
25
|
Tag: 'tag',
|
|
26
26
|
Supplier: 'supplier',
|
|
27
|
-
Label: 'label'
|
|
28
|
-
ProductType: 'product_type',
|
|
29
|
-
ProductClass: 'product_class'
|
|
27
|
+
Label: 'label'
|
|
30
28
|
} as const;
|
|
31
29
|
export type CategoryAutomationFieldType = typeof CategoryAutomationFieldType[keyof typeof CategoryAutomationFieldType];
|
|
32
30
|
|
|
@@ -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 ? value['startDate'] : value['startDate'].toISOString(),
|
|
163
|
+
'endDate': value['endDate'] == null ? value['endDate'] : value['endDate'].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
|
+
|