@digital8/lighting-illusions-ts-sdk 0.0.2369 → 0.0.2371
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 -4
- package/README.md +24 -4
- package/dist/apis/CouponsApi.d.ts +116 -0
- package/dist/apis/CouponsApi.js +440 -0
- package/dist/apis/SupplierApi.js +1 -1
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +3 -1
- package/dist/models/AdminOrderResource.d.ts +2 -3
- package/dist/models/AdminOrderResource.js +2 -3
- package/dist/models/AppliedCouponResource.d.ts +50 -0
- package/dist/models/{CartCouponResource.js → AppliedCouponResource.js} +13 -13
- package/dist/models/AppliedCouponResourceArrayResponse.d.ts +33 -0
- package/dist/models/AppliedCouponResourceArrayResponse.js +50 -0
- 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/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/FrontendOrderResource.d.ts +3 -3
- package/dist/models/FrontendOrderResource.js +3 -3
- package/dist/models/OrderFulfillmentResource.d.ts +1 -1
- package/dist/models/OrderFulfillmentResource.js +3 -1
- 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/SearchAllRolesRequest.d.ts +2 -0
- package/dist/models/SearchAllRolesRequest.js +3 -1
- 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/SearchRolesRequest.d.ts +2 -0
- package/dist/models/SearchRolesRequest.js +3 -1
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +1 -3
- package/dist/models/StoreListResource.d.ts +2 -2
- package/dist/models/StoreListResource.js +6 -2
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +1 -3
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +3 -1
- package/dist/models/UpdateCouponRequest.d.ts +128 -0
- package/dist/models/UpdateCouponRequest.js +110 -0
- package/dist/models/index.d.ts +16 -2
- package/dist/models/index.js +16 -2
- package/docs/AdminOrderResource.md +1 -1
- package/docs/{CartCouponResource.md → AppliedCouponResource.md} +4 -4
- package/docs/AppliedCouponResourceArrayResponse.md +34 -0
- package/docs/CouponListResource.md +56 -0
- package/docs/{CartCouponResourceArrayResponse.md → CouponListResourceArrayResponse.md} +5 -5
- package/docs/CouponLiteResource.md +38 -0
- 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/FrontendOrderResource.md +1 -1
- package/docs/PaginatedCouponListResourceResponse.md +36 -0
- package/docs/PaginatedCouponResourceResponse.md +36 -0
- package/docs/SearchAllCouponsRequest.md +50 -0
- package/docs/SearchCartsRequest.md +2 -0
- package/docs/SearchCouponsRequest.md +62 -0
- package/docs/SearchOrdersRequest.md +2 -0
- package/docs/StoreSpecialDateResource.md +1 -1
- package/docs/SupplierApi.md +2 -2
- package/docs/UpdateCouponRequest.md +60 -0
- package/package.json +1 -1
- package/src/apis/CouponsApi.ts +345 -0
- package/src/apis/SupplierApi.ts +1 -1
- package/src/apis/index.ts +1 -0
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AdminOrderResource.ts +4 -11
- package/src/models/{CartCouponResource.ts → AppliedCouponResource.ts} +14 -14
- package/src/models/AppliedCouponResourceArrayResponse.ts +73 -0
- 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/ExternalApiLogResource.ts +2 -3
- package/src/models/FrontendOrderResource.ts +11 -11
- package/src/models/OrderFulfillmentResource.ts +3 -2
- package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
- package/src/models/PaginatedCouponResourceResponse.ts +90 -0
- package/src/models/SearchAllCouponsRequest.ts +154 -0
- package/src/models/SearchAllRolesRequest.ts +3 -1
- package/src/models/SearchCartsRequest.ts +8 -0
- package/src/models/SearchCouponsRequest.ts +202 -0
- package/src/models/SearchOrdersRequest.ts +8 -0
- package/src/models/SearchRolesRequest.ts +3 -1
- package/src/models/StoreFrontendResource.ts +2 -3
- package/src/models/StoreListResource.ts +6 -4
- package/src/models/StoreResource.ts +2 -3
- package/src/models/StoreSpecialDateResource.ts +4 -3
- package/src/models/UpdateCouponRequest.ts +207 -0
- package/src/models/index.ts +16 -2
- package/dist/models/CartCouponResource.d.ts +0 -50
- package/dist/models/CartCouponResourceArrayResponse.d.ts +0 -33
- package/dist/models/CartCouponResourceArrayResponse.js +0 -50
- package/src/models/CartCouponResourceArrayResponse.ts +0 -73
|
@@ -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 {SearchCouponsRequestSortByEnum}
|
|
31
|
+
* @memberof SearchCouponsRequest
|
|
32
|
+
*/
|
|
33
|
+
sortBy?: SearchCouponsRequestSortByEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {SearchCouponsRequestSortDirectionEnum}
|
|
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 ? value['beforeStartDate'] : value['beforeStartDate'].toISOString(),
|
|
194
|
+
'after_start_date': value['afterStartDate'] == null ? value['afterStartDate'] : value['afterStartDate'].toISOString(),
|
|
195
|
+
'before_end_date': value['beforeEndDate'] == null ? value['beforeEndDate'] : value['beforeEndDate'].toISOString(),
|
|
196
|
+
'after_end_date': value['afterEndDate'] == null ? value['afterEndDate'] : 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
|
|
|
@@ -89,7 +89,9 @@ export const SearchRolesRequestSortByEnum = {
|
|
|
89
89
|
Id: 'id',
|
|
90
90
|
Name: 'name',
|
|
91
91
|
CreatedAt: 'created_at',
|
|
92
|
-
UpdatedAt: 'updated_at'
|
|
92
|
+
UpdatedAt: 'updated_at',
|
|
93
|
+
AdminsCount: 'admins_count',
|
|
94
|
+
UsersCount: 'users_count'
|
|
93
95
|
} as const;
|
|
94
96
|
export type SearchRolesRequestSortByEnum = typeof SearchRolesRequestSortByEnum[keyof typeof SearchRolesRequestSortByEnum];
|
|
95
97
|
|
|
@@ -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}
|
|
@@ -109,7 +109,6 @@ export function instanceOfStoreFrontendResource(value: object): value is StoreFr
|
|
|
109
109
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
110
110
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
111
111
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
112
|
-
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
113
112
|
if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
|
|
114
113
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
115
114
|
return true;
|
|
@@ -134,7 +133,7 @@ export function StoreFrontendResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
134
133
|
'address': json['address'] == null ? undefined : json['address'],
|
|
135
134
|
'latitude': json['latitude'],
|
|
136
135
|
'longitude': json['longitude'],
|
|
137
|
-
'tagLine': json['tagLine'],
|
|
136
|
+
'tagLine': json['tagLine'] == null ? undefined : json['tagLine'],
|
|
138
137
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
139
138
|
'specialDates': json['specialDates'],
|
|
140
139
|
'suppliers': json['suppliers'],
|
|
@@ -68,7 +68,7 @@ export interface StoreListResource {
|
|
|
68
68
|
* @type {string}
|
|
69
69
|
* @memberof StoreListResource
|
|
70
70
|
*/
|
|
71
|
-
tagLine
|
|
71
|
+
tagLine: string;
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
74
|
* @type {string}
|
|
@@ -80,7 +80,7 @@ export interface StoreListResource {
|
|
|
80
80
|
* @type {string}
|
|
81
81
|
* @memberof StoreListResource
|
|
82
82
|
*/
|
|
83
|
-
website
|
|
83
|
+
website: string;
|
|
84
84
|
/**
|
|
85
85
|
*
|
|
86
86
|
* @type {number}
|
|
@@ -110,7 +110,9 @@ export function instanceOfStoreListResource(value: object): value is StoreListRe
|
|
|
110
110
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
111
111
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
112
112
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
113
|
+
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
113
114
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
115
|
+
if (!('website' in value) || value['website'] === undefined) return false;
|
|
114
116
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false;
|
|
115
117
|
if (!('displayNetsuiteId' in value) || value['displayNetsuiteId'] === undefined) return false;
|
|
116
118
|
return true;
|
|
@@ -132,9 +134,9 @@ export function StoreListResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
132
134
|
'phone': json['phone'],
|
|
133
135
|
'longitude': json['longitude'],
|
|
134
136
|
'latitude': json['latitude'],
|
|
135
|
-
'tagLine': json['tagLine']
|
|
137
|
+
'tagLine': json['tagLine'],
|
|
136
138
|
'email': json['email'],
|
|
137
|
-
'website': json['website']
|
|
139
|
+
'website': json['website'],
|
|
138
140
|
'netsuiteId': json['netsuiteId'],
|
|
139
141
|
'displayNetsuiteId': json['displayNetsuiteId'],
|
|
140
142
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
@@ -101,7 +101,7 @@ export interface StoreResource {
|
|
|
101
101
|
* @type {string}
|
|
102
102
|
* @memberof StoreResource
|
|
103
103
|
*/
|
|
104
|
-
website
|
|
104
|
+
website?: string | null;
|
|
105
105
|
/**
|
|
106
106
|
*
|
|
107
107
|
* @type {number}
|
|
@@ -151,7 +151,6 @@ export function instanceOfStoreResource(value: object): value is StoreResource {
|
|
|
151
151
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
152
152
|
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
153
153
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
154
|
-
if (!('website' in value) || value['website'] === undefined) return false;
|
|
155
154
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false;
|
|
156
155
|
if (!('displayNetsuiteId' in value) || value['displayNetsuiteId'] === undefined) return false;
|
|
157
156
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
@@ -178,7 +177,7 @@ export function StoreResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
178
177
|
'latitude': json['latitude'],
|
|
179
178
|
'tagLine': json['tagLine'],
|
|
180
179
|
'email': json['email'],
|
|
181
|
-
'website': json['website'],
|
|
180
|
+
'website': json['website'] == null ? undefined : json['website'],
|
|
182
181
|
'netsuiteId': json['netsuiteId'],
|
|
183
182
|
'displayNetsuiteId': json['displayNetsuiteId'],
|
|
184
183
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
@@ -39,10 +39,10 @@ export interface StoreSpecialDateResource {
|
|
|
39
39
|
hours: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
|
-
* @type {
|
|
42
|
+
* @type {object}
|
|
43
43
|
* @memberof StoreSpecialDateResource
|
|
44
44
|
*/
|
|
45
|
-
date
|
|
45
|
+
date: object;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {boolean}
|
|
@@ -69,6 +69,7 @@ export interface StoreSpecialDateResource {
|
|
|
69
69
|
export function instanceOfStoreSpecialDateResource(value: object): value is StoreSpecialDateResource {
|
|
70
70
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
71
71
|
if (!('hours' in value) || value['hours'] === undefined) return false;
|
|
72
|
+
if (!('date' in value) || value['date'] === undefined) return false;
|
|
72
73
|
if (!('closed' in value) || value['closed'] === undefined) return false;
|
|
73
74
|
if (!('displayStartDate' in value) || value['displayStartDate'] === undefined) return false;
|
|
74
75
|
if (!('displayEndDate' in value) || value['displayEndDate'] === undefined) return false;
|
|
@@ -88,7 +89,7 @@ export function StoreSpecialDateResourceFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
88
89
|
'id': json['id'] == null ? undefined : json['id'],
|
|
89
90
|
'name': json['name'],
|
|
90
91
|
'hours': json['hours'],
|
|
91
|
-
'date': json['date']
|
|
92
|
+
'date': json['date'],
|
|
92
93
|
'closed': json['closed'],
|
|
93
94
|
'displayStartDate': json['displayStartDate'],
|
|
94
95
|
'displayEndDate': json['displayEndDate'],
|
|
@@ -0,0 +1,207 @@
|
|
|
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 {UpdateCouponRequestTypeEnum}
|
|
45
|
+
* @memberof UpdateCouponRequest
|
|
46
|
+
*/
|
|
47
|
+
type: UpdateCouponRequestTypeEnum;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {UpdateCouponRequestDiscountTypeEnum}
|
|
51
|
+
* @memberof UpdateCouponRequest
|
|
52
|
+
*/
|
|
53
|
+
discountType: UpdateCouponRequestDiscountTypeEnum;
|
|
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
|
+
* @export
|
|
129
|
+
*/
|
|
130
|
+
export const UpdateCouponRequestDiscountTypeEnum = {
|
|
131
|
+
Dollar: '$',
|
|
132
|
+
Percent: '%'
|
|
133
|
+
} as const;
|
|
134
|
+
export type UpdateCouponRequestDiscountTypeEnum = typeof UpdateCouponRequestDiscountTypeEnum[keyof typeof UpdateCouponRequestDiscountTypeEnum];
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Check if a given object implements the UpdateCouponRequest interface.
|
|
139
|
+
*/
|
|
140
|
+
export function instanceOfUpdateCouponRequest(value: object): value is UpdateCouponRequest {
|
|
141
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
142
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
143
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
144
|
+
if (!('discountType' in value) || value['discountType'] === undefined) return false;
|
|
145
|
+
if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
|
|
146
|
+
if (!('minAmount' in value) || value['minAmount'] === undefined) return false;
|
|
147
|
+
if (!('minProducts' in value) || value['minProducts'] === undefined) return false;
|
|
148
|
+
if (!('totalUseLimit' in value) || value['totalUseLimit'] === undefined) return false;
|
|
149
|
+
if (!('customerUseLimit' in value) || value['customerUseLimit'] === undefined) return false;
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function UpdateCouponRequestFromJSON(json: any): UpdateCouponRequest {
|
|
154
|
+
return UpdateCouponRequestFromJSONTyped(json, false);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function UpdateCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateCouponRequest {
|
|
158
|
+
if (json == null) {
|
|
159
|
+
return json;
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
|
|
163
|
+
'name': json['name'],
|
|
164
|
+
'code': json['code'],
|
|
165
|
+
'type': json['type'],
|
|
166
|
+
'discountType': json['discount_type'],
|
|
167
|
+
'discountAmount': json['discount_amount'],
|
|
168
|
+
'minAmount': json['min_amount'],
|
|
169
|
+
'minProducts': json['min_products'],
|
|
170
|
+
'totalUseLimit': json['total_use_limit'],
|
|
171
|
+
'customerUseLimit': json['customer_use_limit'],
|
|
172
|
+
'startDate': json['start_date'] == null ? undefined : json['start_date'],
|
|
173
|
+
'endDate': json['end_date'] == null ? undefined : json['end_date'],
|
|
174
|
+
'isForAllProducts': json['is_for_all_products'] == null ? undefined : json['is_for_all_products'],
|
|
175
|
+
'isForAllCustomers': json['is_for_all_customers'] == null ? undefined : json['is_for_all_customers'],
|
|
176
|
+
'couponables': json['couponables'] == null ? undefined : ((json['couponables'] as Array<any>).map(CreateCouponRequestCouponablesInnerFromJSON)),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function UpdateCouponRequestToJSON(json: any): UpdateCouponRequest {
|
|
181
|
+
return UpdateCouponRequestToJSONTyped(json, false);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function UpdateCouponRequestToJSONTyped(value?: UpdateCouponRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
185
|
+
if (value == null) {
|
|
186
|
+
return value;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
|
|
191
|
+
'name': value['name'],
|
|
192
|
+
'code': value['code'],
|
|
193
|
+
'type': value['type'],
|
|
194
|
+
'discount_type': value['discountType'],
|
|
195
|
+
'discount_amount': value['discountAmount'],
|
|
196
|
+
'min_amount': value['minAmount'],
|
|
197
|
+
'min_products': value['minProducts'],
|
|
198
|
+
'total_use_limit': value['totalUseLimit'],
|
|
199
|
+
'customer_use_limit': value['customerUseLimit'],
|
|
200
|
+
'start_date': value['startDate'],
|
|
201
|
+
'end_date': value['endDate'],
|
|
202
|
+
'is_for_all_products': value['isForAllProducts'],
|
|
203
|
+
'is_for_all_customers': value['isForAllCustomers'],
|
|
204
|
+
'couponables': value['couponables'] == null ? undefined : ((value['couponables'] as Array<any>).map(CreateCouponRequestCouponablesInnerToJSON)),
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -21,6 +21,8 @@ export * from './AdminResource';
|
|
|
21
21
|
export * from './AdminResourceArrayResponse';
|
|
22
22
|
export * from './AdminUserLiteResource';
|
|
23
23
|
export * from './AdminUserLiteResourceArrayResponse';
|
|
24
|
+
export * from './AppliedCouponResource';
|
|
25
|
+
export * from './AppliedCouponResourceArrayResponse';
|
|
24
26
|
export * from './AssetFileForUploadResource';
|
|
25
27
|
export * from './AssetFileForUploadResourceArrayResponse';
|
|
26
28
|
export * from './AssetFrontendResource';
|
|
@@ -74,8 +76,6 @@ export * from './BlogResource';
|
|
|
74
76
|
export * from './BlogResourceArrayResponse';
|
|
75
77
|
export * from './CartCouponLiteResource';
|
|
76
78
|
export * from './CartCouponLiteResourceArrayResponse';
|
|
77
|
-
export * from './CartCouponResource';
|
|
78
|
-
export * from './CartCouponResourceArrayResponse';
|
|
79
79
|
export * from './CartListResource';
|
|
80
80
|
export * from './CartListResourceArrayResponse';
|
|
81
81
|
export * from './CartOrderSource';
|
|
@@ -94,6 +94,13 @@ export * from './CategoryWithChildrenFrontendResourceArrayResponse';
|
|
|
94
94
|
export * from './CheckEmailFrontendResource';
|
|
95
95
|
export * from './CheckEmailFrontendResourceArrayResponse';
|
|
96
96
|
export * from './CouponDiscountType';
|
|
97
|
+
export * from './CouponListResource';
|
|
98
|
+
export * from './CouponListResourceArrayResponse';
|
|
99
|
+
export * from './CouponLiteResource';
|
|
100
|
+
export * from './CouponLiteResourceArrayResponse';
|
|
101
|
+
export * from './CouponResource';
|
|
102
|
+
export * from './CouponResourceArrayResponse';
|
|
103
|
+
export * from './CouponType';
|
|
97
104
|
export * from './CreateAdminUserRequest';
|
|
98
105
|
export * from './CreateAssetFileRequest';
|
|
99
106
|
export * from './CreateAssetForAssetableRequest';
|
|
@@ -105,6 +112,8 @@ export * from './CreateBlogCategoryRequestSeoInner';
|
|
|
105
112
|
export * from './CreateCartRequest';
|
|
106
113
|
export * from './CreateCartRequestItemsInner';
|
|
107
114
|
export * from './CreateCartRequestShippingAddress';
|
|
115
|
+
export * from './CreateCouponRequest';
|
|
116
|
+
export * from './CreateCouponRequestCouponablesInner';
|
|
108
117
|
export * from './CreateCustomerAddressRequest';
|
|
109
118
|
export * from './CreateCustomerRequest';
|
|
110
119
|
export * from './CreateDefinitionRequest';
|
|
@@ -311,6 +320,8 @@ export * from './PaginatedBlogCategoryResourceResponse';
|
|
|
311
320
|
export * from './PaginatedBlogFrontendResourceResponse';
|
|
312
321
|
export * from './PaginatedCartListResourceResponse';
|
|
313
322
|
export * from './PaginatedCategoryFrontendResourceResponse';
|
|
323
|
+
export * from './PaginatedCouponListResourceResponse';
|
|
324
|
+
export * from './PaginatedCouponResourceResponse';
|
|
314
325
|
export * from './PaginatedCustomerListResourceResponse';
|
|
315
326
|
export * from './PaginatedCustomerReviewableItemFrontendResourceResponse';
|
|
316
327
|
export * from './PaginatedDefinitionListResourceResponse';
|
|
@@ -531,6 +542,7 @@ export * from './SearchAllAdminUsersRequest';
|
|
|
531
542
|
export * from './SearchAllAttributeValuesRequest';
|
|
532
543
|
export * from './SearchAllAttributesRequest';
|
|
533
544
|
export * from './SearchAllBlogCategoriesRequest';
|
|
545
|
+
export * from './SearchAllCouponsRequest';
|
|
534
546
|
export * from './SearchAllCustomersRequest';
|
|
535
547
|
export * from './SearchAllDefinitionsRequest';
|
|
536
548
|
export * from './SearchAllDocumentsRequest';
|
|
@@ -556,6 +568,7 @@ export * from './SearchAttributeValuesRequest';
|
|
|
556
568
|
export * from './SearchAttributesRequest';
|
|
557
569
|
export * from './SearchBlogCategoriesRequest';
|
|
558
570
|
export * from './SearchCartsRequest';
|
|
571
|
+
export * from './SearchCouponsRequest';
|
|
559
572
|
export * from './SearchCustomersRequest';
|
|
560
573
|
export * from './SearchDefinitionsRequest';
|
|
561
574
|
export * from './SearchDocumentsRequest';
|
|
@@ -658,6 +671,7 @@ export * from './UpdateAttributeRequest';
|
|
|
658
671
|
export * from './UpdateAttributeValueRequest';
|
|
659
672
|
export * from './UpdateBlogCategoryRequest';
|
|
660
673
|
export * from './UpdateCartRequest';
|
|
674
|
+
export * from './UpdateCouponRequest';
|
|
661
675
|
export * from './UpdateCustomerAddressRequest';
|
|
662
676
|
export * from './UpdateCustomerRequest';
|
|
663
677
|
export * from './UpdateDefinitionRequest';
|