@digital8/lighting-illusions-ts-sdk 0.0.2398 → 0.0.2400
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +15 -0
- package/README.md +2 -2
- package/dist/apis/CouponsApi.d.ts +85 -0
- package/dist/apis/CouponsApi.js +355 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +1 -3
- package/dist/models/CouponListResource.d.ts +99 -0
- package/dist/models/CouponListResource.js +91 -0
- package/dist/models/CouponListResourceArrayResponse.d.ts +33 -0
- package/dist/models/CouponListResourceArrayResponse.js +50 -0
- package/dist/models/CouponLiteResource.d.ts +44 -0
- package/dist/models/CouponLiteResource.js +57 -0
- package/dist/models/CouponLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/CouponLiteResourceArrayResponse.js +50 -0
- package/dist/models/CouponResource.d.ts +163 -0
- package/dist/models/CouponResource.js +135 -0
- package/dist/models/CouponResourceArrayResponse.d.ts +33 -0
- package/dist/models/CouponResourceArrayResponse.js +50 -0
- package/dist/models/CouponType.d.ts +26 -0
- package/dist/models/CouponType.js +52 -0
- package/dist/models/CreateCouponRequest.d.ts +126 -0
- package/dist/models/CreateCouponRequest.js +107 -0
- package/dist/models/CreateCouponRequestCouponablesInner.d.ts +48 -0
- package/dist/models/CreateCouponRequestCouponablesInner.js +61 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/OrderFulfillmentResource.d.ts +2 -2
- package/dist/models/OrderFulfillmentResource.js +6 -2
- 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/SearchAllCouponsRequest.d.ts +101 -0
- package/dist/models/SearchAllCouponsRequest.js +85 -0
- package/dist/models/SearchCartsRequest.d.ts +6 -0
- package/dist/models/SearchCartsRequest.js +2 -0
- package/dist/models/SearchCouponsRequest.d.ts +137 -0
- package/dist/models/SearchCouponsRequest.js +97 -0
- package/dist/models/SearchOrdersRequest.d.ts +6 -0
- package/dist/models/SearchOrdersRequest.js +2 -0
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +1 -3
- package/dist/models/UpdateCouponRequest.d.ts +120 -0
- package/dist/models/UpdateCouponRequest.js +103 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/index.js +14 -0
- package/package.json +1 -1
- package/src/apis/CouponsApi.ts +286 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressResource.ts +2 -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 +207 -0
- package/src/models/CreateCouponRequestCouponablesInner.ts +86 -0
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/OrderFulfillmentResource.ts +6 -4
- package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
- package/src/models/PaginatedCouponResourceResponse.ts +90 -0
- package/src/models/SearchAllCouponsRequest.ts +154 -0
- package/src/models/SearchCartsRequest.ts +8 -0
- package/src/models/SearchCouponsRequest.ts +202 -0
- package/src/models/SearchOrdersRequest.ts +8 -0
- package/src/models/StoreFrontendResource.ts +2 -3
- package/src/models/UpdateCouponRequest.ts +198 -0
- package/src/models/index.ts +14 -0
|
@@ -0,0 +1,154 @@
|
|
|
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 SearchAllCouponsRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SearchAllCouponsRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SearchAllCouponsRequest
|
|
26
|
+
*/
|
|
27
|
+
search?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SearchAllCouponsRequest
|
|
32
|
+
*/
|
|
33
|
+
sortBy?: SearchAllCouponsRequestSortByEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SearchAllCouponsRequest
|
|
38
|
+
*/
|
|
39
|
+
sortDirection?: SearchAllCouponsRequestSortDirectionEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SearchAllCouponsRequest
|
|
44
|
+
*/
|
|
45
|
+
relatedId?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SearchAllCouponsRequest
|
|
50
|
+
*/
|
|
51
|
+
relatedType?: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof SearchAllCouponsRequest
|
|
56
|
+
*/
|
|
57
|
+
includesRelations?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<string>}
|
|
61
|
+
* @memberof SearchAllCouponsRequest
|
|
62
|
+
*/
|
|
63
|
+
type?: Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Array<string>}
|
|
67
|
+
* @memberof SearchAllCouponsRequest
|
|
68
|
+
*/
|
|
69
|
+
siteId?: Array<string>;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {Array<string>}
|
|
73
|
+
* @memberof SearchAllCouponsRequest
|
|
74
|
+
*/
|
|
75
|
+
isAbandonedCart?: Array<string>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @export
|
|
81
|
+
*/
|
|
82
|
+
export const SearchAllCouponsRequestSortByEnum = {
|
|
83
|
+
Id: 'id',
|
|
84
|
+
Name: 'name',
|
|
85
|
+
Code: 'code',
|
|
86
|
+
Type: 'type',
|
|
87
|
+
StartDate: 'start_date',
|
|
88
|
+
EndDate: 'end_date',
|
|
89
|
+
CreatedAt: 'created_at'
|
|
90
|
+
} as const;
|
|
91
|
+
export type SearchAllCouponsRequestSortByEnum = typeof SearchAllCouponsRequestSortByEnum[keyof typeof SearchAllCouponsRequestSortByEnum];
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export const SearchAllCouponsRequestSortDirectionEnum = {
|
|
97
|
+
Asc: 'asc',
|
|
98
|
+
Desc: 'desc'
|
|
99
|
+
} as const;
|
|
100
|
+
export type SearchAllCouponsRequestSortDirectionEnum = typeof SearchAllCouponsRequestSortDirectionEnum[keyof typeof SearchAllCouponsRequestSortDirectionEnum];
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Check if a given object implements the SearchAllCouponsRequest interface.
|
|
105
|
+
*/
|
|
106
|
+
export function instanceOfSearchAllCouponsRequest(value: object): value is SearchAllCouponsRequest {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function SearchAllCouponsRequestFromJSON(json: any): SearchAllCouponsRequest {
|
|
111
|
+
return SearchAllCouponsRequestFromJSONTyped(json, false);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function SearchAllCouponsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchAllCouponsRequest {
|
|
115
|
+
if (json == null) {
|
|
116
|
+
return json;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'search': json['search'] == null ? undefined : json['search'],
|
|
121
|
+
'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
|
|
122
|
+
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
123
|
+
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
124
|
+
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
125
|
+
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
126
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
127
|
+
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
128
|
+
'isAbandonedCart': json['is_abandoned_cart'] == null ? undefined : json['is_abandoned_cart'],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function SearchAllCouponsRequestToJSON(json: any): SearchAllCouponsRequest {
|
|
133
|
+
return SearchAllCouponsRequestToJSONTyped(json, false);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function SearchAllCouponsRequestToJSONTyped(value?: SearchAllCouponsRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
137
|
+
if (value == null) {
|
|
138
|
+
return value;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
|
|
143
|
+
'search': value['search'],
|
|
144
|
+
'sortBy': value['sortBy'],
|
|
145
|
+
'sortDirection': value['sortDirection'],
|
|
146
|
+
'related_id': value['relatedId'],
|
|
147
|
+
'related_type': value['relatedType'],
|
|
148
|
+
'includes_relations': value['includesRelations'],
|
|
149
|
+
'type': value['type'],
|
|
150
|
+
'site_id': value['siteId'],
|
|
151
|
+
'is_abandoned_cart': value['isAbandonedCart'],
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
@@ -121,6 +121,12 @@ export interface SearchCartsRequest {
|
|
|
121
121
|
* @memberof SearchCartsRequest
|
|
122
122
|
*/
|
|
123
123
|
includesRelations?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {number}
|
|
127
|
+
* @memberof SearchCartsRequest
|
|
128
|
+
*/
|
|
129
|
+
couponId?: number | null;
|
|
124
130
|
}
|
|
125
131
|
|
|
126
132
|
|
|
@@ -179,6 +185,7 @@ export function SearchCartsRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
179
185
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
180
186
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
181
187
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
188
|
+
'couponId': json['coupon_id'] == null ? undefined : json['coupon_id'],
|
|
182
189
|
};
|
|
183
190
|
}
|
|
184
191
|
|
|
@@ -210,6 +217,7 @@ export function SearchCartsRequestToJSONTyped(value?: SearchCartsRequest | null,
|
|
|
210
217
|
'related_id': value['relatedId'],
|
|
211
218
|
'related_type': value['relatedType'],
|
|
212
219
|
'includes_relations': value['includesRelations'],
|
|
220
|
+
'coupon_id': value['couponId'],
|
|
213
221
|
};
|
|
214
222
|
}
|
|
215
223
|
|
|
@@ -0,0 +1,202 @@
|
|
|
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 SearchCouponsRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SearchCouponsRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SearchCouponsRequest
|
|
26
|
+
*/
|
|
27
|
+
search?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SearchCouponsRequest
|
|
32
|
+
*/
|
|
33
|
+
sortBy?: SearchCouponsRequestSortByEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SearchCouponsRequest
|
|
38
|
+
*/
|
|
39
|
+
sortDirection?: SearchCouponsRequestSortDirectionEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SearchCouponsRequest
|
|
44
|
+
*/
|
|
45
|
+
perPage?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof SearchCouponsRequest
|
|
50
|
+
*/
|
|
51
|
+
page?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Array<string>}
|
|
55
|
+
* @memberof SearchCouponsRequest
|
|
56
|
+
*/
|
|
57
|
+
type?: Array<string>;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<string>}
|
|
61
|
+
* @memberof SearchCouponsRequest
|
|
62
|
+
*/
|
|
63
|
+
siteId?: Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Array<string>}
|
|
67
|
+
* @memberof SearchCouponsRequest
|
|
68
|
+
*/
|
|
69
|
+
isAbandonedCart?: Array<string>;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {Date}
|
|
73
|
+
* @memberof SearchCouponsRequest
|
|
74
|
+
*/
|
|
75
|
+
beforeStartDate?: Date;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {Date}
|
|
79
|
+
* @memberof SearchCouponsRequest
|
|
80
|
+
*/
|
|
81
|
+
afterStartDate?: Date;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {Date}
|
|
85
|
+
* @memberof SearchCouponsRequest
|
|
86
|
+
*/
|
|
87
|
+
beforeEndDate?: Date;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {Date}
|
|
91
|
+
* @memberof SearchCouponsRequest
|
|
92
|
+
*/
|
|
93
|
+
afterEndDate?: Date;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof SearchCouponsRequest
|
|
98
|
+
*/
|
|
99
|
+
relatedId?: number;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {string}
|
|
103
|
+
* @memberof SearchCouponsRequest
|
|
104
|
+
*/
|
|
105
|
+
relatedType?: string;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {boolean}
|
|
109
|
+
* @memberof SearchCouponsRequest
|
|
110
|
+
*/
|
|
111
|
+
includesRelations?: boolean;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @export
|
|
117
|
+
*/
|
|
118
|
+
export const SearchCouponsRequestSortByEnum = {
|
|
119
|
+
Id: 'id',
|
|
120
|
+
Name: 'name',
|
|
121
|
+
Code: 'code',
|
|
122
|
+
Type: 'type',
|
|
123
|
+
StartDate: 'start_date',
|
|
124
|
+
EndDate: 'end_date',
|
|
125
|
+
CreatedAt: 'created_at'
|
|
126
|
+
} as const;
|
|
127
|
+
export type SearchCouponsRequestSortByEnum = typeof SearchCouponsRequestSortByEnum[keyof typeof SearchCouponsRequestSortByEnum];
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @export
|
|
131
|
+
*/
|
|
132
|
+
export const SearchCouponsRequestSortDirectionEnum = {
|
|
133
|
+
Asc: 'asc',
|
|
134
|
+
Desc: 'desc'
|
|
135
|
+
} as const;
|
|
136
|
+
export type SearchCouponsRequestSortDirectionEnum = typeof SearchCouponsRequestSortDirectionEnum[keyof typeof SearchCouponsRequestSortDirectionEnum];
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Check if a given object implements the SearchCouponsRequest interface.
|
|
141
|
+
*/
|
|
142
|
+
export function instanceOfSearchCouponsRequest(value: object): value is SearchCouponsRequest {
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function SearchCouponsRequestFromJSON(json: any): SearchCouponsRequest {
|
|
147
|
+
return SearchCouponsRequestFromJSONTyped(json, false);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function SearchCouponsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchCouponsRequest {
|
|
151
|
+
if (json == null) {
|
|
152
|
+
return json;
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
|
|
156
|
+
'search': json['search'] == null ? undefined : json['search'],
|
|
157
|
+
'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
|
|
158
|
+
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
159
|
+
'perPage': json['per_page'] == null ? undefined : json['per_page'],
|
|
160
|
+
'page': json['page'] == null ? undefined : json['page'],
|
|
161
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
162
|
+
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
163
|
+
'isAbandonedCart': json['is_abandoned_cart'] == null ? undefined : json['is_abandoned_cart'],
|
|
164
|
+
'beforeStartDate': json['before_start_date'] == null ? undefined : (new Date(json['before_start_date'])),
|
|
165
|
+
'afterStartDate': json['after_start_date'] == null ? undefined : (new Date(json['after_start_date'])),
|
|
166
|
+
'beforeEndDate': json['before_end_date'] == null ? undefined : (new Date(json['before_end_date'])),
|
|
167
|
+
'afterEndDate': json['after_end_date'] == null ? undefined : (new Date(json['after_end_date'])),
|
|
168
|
+
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
169
|
+
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
170
|
+
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function SearchCouponsRequestToJSON(json: any): SearchCouponsRequest {
|
|
175
|
+
return SearchCouponsRequestToJSONTyped(json, false);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function SearchCouponsRequestToJSONTyped(value?: SearchCouponsRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
179
|
+
if (value == null) {
|
|
180
|
+
return value;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return {
|
|
184
|
+
|
|
185
|
+
'search': value['search'],
|
|
186
|
+
'sortBy': value['sortBy'],
|
|
187
|
+
'sortDirection': value['sortDirection'],
|
|
188
|
+
'per_page': value['perPage'],
|
|
189
|
+
'page': value['page'],
|
|
190
|
+
'type': value['type'],
|
|
191
|
+
'site_id': value['siteId'],
|
|
192
|
+
'is_abandoned_cart': value['isAbandonedCart'],
|
|
193
|
+
'before_start_date': value['beforeStartDate'] == null ? undefined : ((value['beforeStartDate']).toISOString()),
|
|
194
|
+
'after_start_date': value['afterStartDate'] == null ? undefined : ((value['afterStartDate']).toISOString()),
|
|
195
|
+
'before_end_date': value['beforeEndDate'] == null ? undefined : ((value['beforeEndDate']).toISOString()),
|
|
196
|
+
'after_end_date': value['afterEndDate'] == null ? undefined : ((value['afterEndDate']).toISOString()),
|
|
197
|
+
'related_id': value['relatedId'],
|
|
198
|
+
'related_type': value['relatedType'],
|
|
199
|
+
'includes_relations': value['includesRelations'],
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
@@ -133,6 +133,12 @@ export interface SearchOrdersRequest {
|
|
|
133
133
|
* @memberof SearchOrdersRequest
|
|
134
134
|
*/
|
|
135
135
|
includesRelations?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
* @type {number}
|
|
139
|
+
* @memberof SearchOrdersRequest
|
|
140
|
+
*/
|
|
141
|
+
couponId?: number | null;
|
|
136
142
|
}
|
|
137
143
|
|
|
138
144
|
|
|
@@ -194,6 +200,7 @@ export function SearchOrdersRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
194
200
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
195
201
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
196
202
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
203
|
+
'couponId': json['coupon_id'] == null ? undefined : json['coupon_id'],
|
|
197
204
|
};
|
|
198
205
|
}
|
|
199
206
|
|
|
@@ -227,6 +234,7 @@ export function SearchOrdersRequestToJSONTyped(value?: SearchOrdersRequest | nul
|
|
|
227
234
|
'related_id': value['relatedId'],
|
|
228
235
|
'related_type': value['relatedType'],
|
|
229
236
|
'includes_relations': value['includesRelations'],
|
|
237
|
+
'coupon_id': value['couponId'],
|
|
230
238
|
};
|
|
231
239
|
}
|
|
232
240
|
|
|
@@ -78,7 +78,7 @@ export interface StoreFrontendResource {
|
|
|
78
78
|
* @type {string}
|
|
79
79
|
* @memberof StoreFrontendResource
|
|
80
80
|
*/
|
|
81
|
-
tagLine
|
|
81
|
+
tagLine?: string | null;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
84
|
* @type {string}
|
|
@@ -110,7 +110,6 @@ export function instanceOfStoreFrontendResource(value: object): value is StoreFr
|
|
|
110
110
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
111
111
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
112
112
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
113
|
-
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
114
113
|
if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
|
|
115
114
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
116
115
|
return true;
|
|
@@ -135,7 +134,7 @@ export function StoreFrontendResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
135
134
|
'address': json['address'] == null ? undefined : json['address'],
|
|
136
135
|
'latitude': json['latitude'],
|
|
137
136
|
'longitude': json['longitude'],
|
|
138
|
-
'tagLine': json['tagLine'],
|
|
137
|
+
'tagLine': json['tagLine'] == null ? undefined : json['tagLine'],
|
|
139
138
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
140
139
|
'specialDates': json['specialDates'],
|
|
141
140
|
'suppliers': json['suppliers'],
|
|
@@ -0,0 +1,198 @@
|
|
|
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 { CreateCouponRequestCouponablesInner } from './CreateCouponRequestCouponablesInner';
|
|
17
|
+
import {
|
|
18
|
+
CreateCouponRequestCouponablesInnerFromJSON,
|
|
19
|
+
CreateCouponRequestCouponablesInnerFromJSONTyped,
|
|
20
|
+
CreateCouponRequestCouponablesInnerToJSON,
|
|
21
|
+
CreateCouponRequestCouponablesInnerToJSONTyped,
|
|
22
|
+
} from './CreateCouponRequestCouponablesInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UpdateCouponRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface UpdateCouponRequest {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateCouponRequest
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UpdateCouponRequest
|
|
40
|
+
*/
|
|
41
|
+
code: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof UpdateCouponRequest
|
|
46
|
+
*/
|
|
47
|
+
type: UpdateCouponRequestTypeEnum;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof UpdateCouponRequest
|
|
52
|
+
*/
|
|
53
|
+
discountType: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof UpdateCouponRequest
|
|
58
|
+
*/
|
|
59
|
+
discountAmount: number;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof UpdateCouponRequest
|
|
64
|
+
*/
|
|
65
|
+
minAmount: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof UpdateCouponRequest
|
|
70
|
+
*/
|
|
71
|
+
minProducts: number;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof UpdateCouponRequest
|
|
76
|
+
*/
|
|
77
|
+
totalUseLimit: number;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {number}
|
|
81
|
+
* @memberof UpdateCouponRequest
|
|
82
|
+
*/
|
|
83
|
+
customerUseLimit: number;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof UpdateCouponRequest
|
|
88
|
+
*/
|
|
89
|
+
startDate?: string | null;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof UpdateCouponRequest
|
|
94
|
+
*/
|
|
95
|
+
endDate?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {boolean}
|
|
99
|
+
* @memberof UpdateCouponRequest
|
|
100
|
+
*/
|
|
101
|
+
isForAllProducts?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof UpdateCouponRequest
|
|
106
|
+
*/
|
|
107
|
+
isForAllCustomers?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {Array<CreateCouponRequestCouponablesInner>}
|
|
111
|
+
* @memberof UpdateCouponRequest
|
|
112
|
+
*/
|
|
113
|
+
couponables?: Array<CreateCouponRequestCouponablesInner>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @export
|
|
119
|
+
*/
|
|
120
|
+
export const UpdateCouponRequestTypeEnum = {
|
|
121
|
+
Subtotal: 'subtotal',
|
|
122
|
+
Product: 'product',
|
|
123
|
+
Shipping: 'shipping'
|
|
124
|
+
} as const;
|
|
125
|
+
export type UpdateCouponRequestTypeEnum = typeof UpdateCouponRequestTypeEnum[keyof typeof UpdateCouponRequestTypeEnum];
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Check if a given object implements the UpdateCouponRequest interface.
|
|
130
|
+
*/
|
|
131
|
+
export function instanceOfUpdateCouponRequest(value: object): value is UpdateCouponRequest {
|
|
132
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
133
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
134
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
135
|
+
if (!('discountType' in value) || value['discountType'] === undefined) return false;
|
|
136
|
+
if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
|
|
137
|
+
if (!('minAmount' in value) || value['minAmount'] === undefined) return false;
|
|
138
|
+
if (!('minProducts' in value) || value['minProducts'] === undefined) return false;
|
|
139
|
+
if (!('totalUseLimit' in value) || value['totalUseLimit'] === undefined) return false;
|
|
140
|
+
if (!('customerUseLimit' in value) || value['customerUseLimit'] === undefined) return false;
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function UpdateCouponRequestFromJSON(json: any): UpdateCouponRequest {
|
|
145
|
+
return UpdateCouponRequestFromJSONTyped(json, false);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function UpdateCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateCouponRequest {
|
|
149
|
+
if (json == null) {
|
|
150
|
+
return json;
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
|
|
154
|
+
'name': json['name'],
|
|
155
|
+
'code': json['code'],
|
|
156
|
+
'type': json['type'],
|
|
157
|
+
'discountType': json['discount_type'],
|
|
158
|
+
'discountAmount': json['discount_amount'],
|
|
159
|
+
'minAmount': json['min_amount'],
|
|
160
|
+
'minProducts': json['min_products'],
|
|
161
|
+
'totalUseLimit': json['total_use_limit'],
|
|
162
|
+
'customerUseLimit': json['customer_use_limit'],
|
|
163
|
+
'startDate': json['start_date'] == null ? undefined : json['start_date'],
|
|
164
|
+
'endDate': json['end_date'] == null ? undefined : json['end_date'],
|
|
165
|
+
'isForAllProducts': json['is_for_all_products'] == null ? undefined : json['is_for_all_products'],
|
|
166
|
+
'isForAllCustomers': json['is_for_all_customers'] == null ? undefined : json['is_for_all_customers'],
|
|
167
|
+
'couponables': json['couponables'] == null ? undefined : ((json['couponables'] as Array<any>).map(CreateCouponRequestCouponablesInnerFromJSON)),
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function UpdateCouponRequestToJSON(json: any): UpdateCouponRequest {
|
|
172
|
+
return UpdateCouponRequestToJSONTyped(json, false);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export function UpdateCouponRequestToJSONTyped(value?: UpdateCouponRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
176
|
+
if (value == null) {
|
|
177
|
+
return value;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return {
|
|
181
|
+
|
|
182
|
+
'name': value['name'],
|
|
183
|
+
'code': value['code'],
|
|
184
|
+
'type': value['type'],
|
|
185
|
+
'discount_type': value['discountType'],
|
|
186
|
+
'discount_amount': value['discountAmount'],
|
|
187
|
+
'min_amount': value['minAmount'],
|
|
188
|
+
'min_products': value['minProducts'],
|
|
189
|
+
'total_use_limit': value['totalUseLimit'],
|
|
190
|
+
'customer_use_limit': value['customerUseLimit'],
|
|
191
|
+
'start_date': value['startDate'],
|
|
192
|
+
'end_date': value['endDate'],
|
|
193
|
+
'is_for_all_products': value['isForAllProducts'],
|
|
194
|
+
'is_for_all_customers': value['isForAllCustomers'],
|
|
195
|
+
'couponables': value['couponables'] == null ? undefined : ((value['couponables'] as Array<any>).map(CreateCouponRequestCouponablesInnerToJSON)),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -81,6 +81,13 @@ export * from './CategoryFrontendResourceArrayResponse';
|
|
|
81
81
|
export * from './CategoryWithChildrenFrontendResource';
|
|
82
82
|
export * from './CategoryWithChildrenFrontendResourceArrayResponse';
|
|
83
83
|
export * from './CouponDiscountType';
|
|
84
|
+
export * from './CouponListResource';
|
|
85
|
+
export * from './CouponListResourceArrayResponse';
|
|
86
|
+
export * from './CouponLiteResource';
|
|
87
|
+
export * from './CouponLiteResourceArrayResponse';
|
|
88
|
+
export * from './CouponResource';
|
|
89
|
+
export * from './CouponResourceArrayResponse';
|
|
90
|
+
export * from './CouponType';
|
|
84
91
|
export * from './CreateAssetFileRequest';
|
|
85
92
|
export * from './CreateAssetForAssetableRequest';
|
|
86
93
|
export * from './CreateAttributeRequest';
|
|
@@ -91,6 +98,8 @@ export * from './CreateBlogCategoryRequestSeoInner';
|
|
|
91
98
|
export * from './CreateCartRequest';
|
|
92
99
|
export * from './CreateCartRequestItemsInner';
|
|
93
100
|
export * from './CreateCartRequestShippingAddress';
|
|
101
|
+
export * from './CreateCouponRequest';
|
|
102
|
+
export * from './CreateCouponRequestCouponablesInner';
|
|
94
103
|
export * from './CreateCustomerRequest';
|
|
95
104
|
export * from './CreateDefinitionRequest';
|
|
96
105
|
export * from './CreateDocumentFileRequest';
|
|
@@ -282,6 +291,8 @@ export * from './PaginatedBlogCategoryResourceResponse';
|
|
|
282
291
|
export * from './PaginatedBlogFrontendResourceResponse';
|
|
283
292
|
export * from './PaginatedCartListResourceResponse';
|
|
284
293
|
export * from './PaginatedCategoryFrontendResourceResponse';
|
|
294
|
+
export * from './PaginatedCouponListResourceResponse';
|
|
295
|
+
export * from './PaginatedCouponResourceResponse';
|
|
285
296
|
export * from './PaginatedCustomerListResourceResponse';
|
|
286
297
|
export * from './PaginatedCustomerReviewableItemFrontendResourceResponse';
|
|
287
298
|
export * from './PaginatedDefinitionListResourceResponse';
|
|
@@ -485,6 +496,7 @@ export * from './SearchAdminNotesRequest';
|
|
|
485
496
|
export * from './SearchAllAttributeValuesRequest';
|
|
486
497
|
export * from './SearchAllAttributesRequest';
|
|
487
498
|
export * from './SearchAllBlogCategoriesRequest';
|
|
499
|
+
export * from './SearchAllCouponsRequest';
|
|
488
500
|
export * from './SearchAllDefinitionsRequest';
|
|
489
501
|
export * from './SearchAllDocumentsRequest';
|
|
490
502
|
export * from './SearchAllFrontendComponentsRequest';
|
|
@@ -507,6 +519,7 @@ export * from './SearchAttributeValuesRequest';
|
|
|
507
519
|
export * from './SearchAttributesRequest';
|
|
508
520
|
export * from './SearchBlogCategoriesRequest';
|
|
509
521
|
export * from './SearchCartsRequest';
|
|
522
|
+
export * from './SearchCouponsRequest';
|
|
510
523
|
export * from './SearchCustomersRequest';
|
|
511
524
|
export * from './SearchDefinitionsRequest';
|
|
512
525
|
export * from './SearchDocumentsRequest';
|
|
@@ -604,6 +617,7 @@ export * from './UpdateAttributeRequest';
|
|
|
604
617
|
export * from './UpdateAttributeValueRequest';
|
|
605
618
|
export * from './UpdateBlogCategoryRequest';
|
|
606
619
|
export * from './UpdateCartRequest';
|
|
620
|
+
export * from './UpdateCouponRequest';
|
|
607
621
|
export * from './UpdateDefinitionRequest';
|
|
608
622
|
export * from './UpdateDocumentRequest';
|
|
609
623
|
export * from './UpdateLabelRequest';
|