@digital8/lighting-illusions-ts-sdk 0.0.2425 → 0.0.2427
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/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 +0 -6
- package/dist/models/AdminOrderResource.js +0 -4
- 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/OrderFulfillmentResource.d.ts +1 -1
- package/dist/models/OrderFulfillmentResource.js +1 -3
- 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/ProductCategoryLiteResource.d.ts +6 -0
- package/dist/models/ProductCategoryLiteResource.js +4 -0
- package/dist/models/ProductChildListResource.d.ts +6 -0
- package/dist/models/ProductChildListResource.js +4 -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 +3 -1
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
- 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/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +4 -6
- package/src/models/AdminOrderResource.ts +0 -9
- 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/OrderFulfillmentResource.ts +2 -3
- package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
- package/src/models/PaginatedCouponResourceResponse.ts +90 -0
- package/src/models/ProductCategoryLiteResource.ts +9 -0
- package/src/models/ProductChildListResource.ts +9 -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 +3 -2
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
- package/src/models/UpdateCouponRequest.ts +198 -0
- package/src/models/index.ts +14 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SearchCouponsRequestSortDirectionEnum = exports.SearchCouponsRequestSortByEnum = void 0;
|
|
17
|
+
exports.instanceOfSearchCouponsRequest = instanceOfSearchCouponsRequest;
|
|
18
|
+
exports.SearchCouponsRequestFromJSON = SearchCouponsRequestFromJSON;
|
|
19
|
+
exports.SearchCouponsRequestFromJSONTyped = SearchCouponsRequestFromJSONTyped;
|
|
20
|
+
exports.SearchCouponsRequestToJSON = SearchCouponsRequestToJSON;
|
|
21
|
+
exports.SearchCouponsRequestToJSONTyped = SearchCouponsRequestToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.SearchCouponsRequestSortByEnum = {
|
|
26
|
+
Id: 'id',
|
|
27
|
+
Name: 'name',
|
|
28
|
+
Code: 'code',
|
|
29
|
+
Type: 'type',
|
|
30
|
+
StartDate: 'start_date',
|
|
31
|
+
EndDate: 'end_date',
|
|
32
|
+
CreatedAt: 'created_at'
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @export
|
|
36
|
+
*/
|
|
37
|
+
exports.SearchCouponsRequestSortDirectionEnum = {
|
|
38
|
+
Asc: 'asc',
|
|
39
|
+
Desc: 'desc'
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Check if a given object implements the SearchCouponsRequest interface.
|
|
43
|
+
*/
|
|
44
|
+
function instanceOfSearchCouponsRequest(value) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
function SearchCouponsRequestFromJSON(json) {
|
|
48
|
+
return SearchCouponsRequestFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function SearchCouponsRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'search': json['search'] == null ? undefined : json['search'],
|
|
56
|
+
'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
|
|
57
|
+
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
58
|
+
'perPage': json['per_page'] == null ? undefined : json['per_page'],
|
|
59
|
+
'page': json['page'] == null ? undefined : json['page'],
|
|
60
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
61
|
+
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
62
|
+
'isAbandonedCart': json['is_abandoned_cart'] == null ? undefined : json['is_abandoned_cart'],
|
|
63
|
+
'beforeStartDate': json['before_start_date'] == null ? undefined : (new Date(json['before_start_date'])),
|
|
64
|
+
'afterStartDate': json['after_start_date'] == null ? undefined : (new Date(json['after_start_date'])),
|
|
65
|
+
'beforeEndDate': json['before_end_date'] == null ? undefined : (new Date(json['before_end_date'])),
|
|
66
|
+
'afterEndDate': json['after_end_date'] == null ? undefined : (new Date(json['after_end_date'])),
|
|
67
|
+
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
68
|
+
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
69
|
+
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function SearchCouponsRequestToJSON(json) {
|
|
73
|
+
return SearchCouponsRequestToJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
function SearchCouponsRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
76
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
'search': value['search'],
|
|
82
|
+
'sortBy': value['sortBy'],
|
|
83
|
+
'sortDirection': value['sortDirection'],
|
|
84
|
+
'per_page': value['perPage'],
|
|
85
|
+
'page': value['page'],
|
|
86
|
+
'type': value['type'],
|
|
87
|
+
'site_id': value['siteId'],
|
|
88
|
+
'is_abandoned_cart': value['isAbandonedCart'],
|
|
89
|
+
'before_start_date': value['beforeStartDate'] == null ? undefined : ((value['beforeStartDate']).toISOString()),
|
|
90
|
+
'after_start_date': value['afterStartDate'] == null ? undefined : ((value['afterStartDate']).toISOString()),
|
|
91
|
+
'before_end_date': value['beforeEndDate'] == null ? undefined : ((value['beforeEndDate']).toISOString()),
|
|
92
|
+
'after_end_date': value['afterEndDate'] == null ? undefined : ((value['afterEndDate']).toISOString()),
|
|
93
|
+
'related_id': value['relatedId'],
|
|
94
|
+
'related_type': value['relatedType'],
|
|
95
|
+
'includes_relations': value['includesRelations'],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
@@ -129,6 +129,12 @@ export interface SearchOrdersRequest {
|
|
|
129
129
|
* @memberof SearchOrdersRequest
|
|
130
130
|
*/
|
|
131
131
|
includesRelations?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @type {number}
|
|
135
|
+
* @memberof SearchOrdersRequest
|
|
136
|
+
*/
|
|
137
|
+
couponId?: number | null;
|
|
132
138
|
}
|
|
133
139
|
/**
|
|
134
140
|
* @export
|
|
@@ -69,6 +69,7 @@ function SearchOrdersRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
69
69
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
70
70
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
71
71
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
72
|
+
'couponId': json['coupon_id'] == null ? undefined : json['coupon_id'],
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
function SearchOrdersRequestToJSON(json) {
|
|
@@ -99,5 +100,6 @@ function SearchOrdersRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
99
100
|
'related_id': value['relatedId'],
|
|
100
101
|
'related_type': value['relatedType'],
|
|
101
102
|
'includes_relations': value['includesRelations'],
|
|
103
|
+
'coupon_id': value['couponId'],
|
|
102
104
|
};
|
|
103
105
|
}
|
|
@@ -34,6 +34,8 @@ function instanceOfStoreFrontendResource(value) {
|
|
|
34
34
|
return false;
|
|
35
35
|
if (!('longitude' in value) || value['longitude'] === undefined)
|
|
36
36
|
return false;
|
|
37
|
+
if (!('tagLine' in value) || value['tagLine'] === undefined)
|
|
38
|
+
return false;
|
|
37
39
|
if (!('specialDates' in value) || value['specialDates'] === undefined)
|
|
38
40
|
return false;
|
|
39
41
|
if (!('suppliers' in value) || value['suppliers'] === undefined)
|
|
@@ -57,7 +59,7 @@ function StoreFrontendResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
59
|
'address': json['address'] == null ? undefined : json['address'],
|
|
58
60
|
'latitude': json['latitude'],
|
|
59
61
|
'longitude': json['longitude'],
|
|
60
|
-
'tagLine': json['tagLine']
|
|
62
|
+
'tagLine': json['tagLine'],
|
|
61
63
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
62
64
|
'specialDates': json['specialDates'],
|
|
63
65
|
'suppliers': json['suppliers'],
|
|
@@ -37,6 +37,8 @@ function instanceOfStoreListResource(value) {
|
|
|
37
37
|
return false;
|
|
38
38
|
if (!('email' in value) || value['email'] === undefined)
|
|
39
39
|
return false;
|
|
40
|
+
if (!('website' in value) || value['website'] === undefined)
|
|
41
|
+
return false;
|
|
40
42
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined)
|
|
41
43
|
return false;
|
|
42
44
|
if (!('displayNetsuiteId' in value) || value['displayNetsuiteId'] === undefined)
|
|
@@ -59,7 +61,7 @@ function StoreListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
61
|
'latitude': json['latitude'],
|
|
60
62
|
'tagLine': json['tagLine'],
|
|
61
63
|
'email': json['email'],
|
|
62
|
-
'website': json['website']
|
|
64
|
+
'website': json['website'],
|
|
63
65
|
'netsuiteId': json['netsuiteId'],
|
|
64
66
|
'displayNetsuiteId': json['displayNetsuiteId'],
|
|
65
67
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
@@ -35,10 +35,10 @@ export interface StoreSpecialDateFrontendResource {
|
|
|
35
35
|
hours: string;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
|
-
* @type {
|
|
38
|
+
* @type {object}
|
|
39
39
|
* @memberof StoreSpecialDateFrontendResource
|
|
40
40
|
*/
|
|
41
|
-
date
|
|
41
|
+
date: object;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
44
44
|
* @type {boolean}
|
|
@@ -26,6 +26,8 @@ function instanceOfStoreSpecialDateFrontendResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('hours' in value) || value['hours'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('date' in value) || value['date'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
if (!('closed' in value) || value['closed'] === undefined)
|
|
30
32
|
return false;
|
|
31
33
|
if (!('displayStartDate' in value) || value['displayStartDate'] === undefined)
|
|
@@ -45,7 +47,7 @@ function StoreSpecialDateFrontendResourceFromJSONTyped(json, ignoreDiscriminator
|
|
|
45
47
|
'id': json['id'] == null ? undefined : json['id'],
|
|
46
48
|
'name': json['name'],
|
|
47
49
|
'hours': json['hours'],
|
|
48
|
-
'date': json['date']
|
|
50
|
+
'date': json['date'],
|
|
49
51
|
'closed': json['closed'],
|
|
50
52
|
'displayStartDate': json['displayStartDate'],
|
|
51
53
|
'displayEndDate': json['displayEndDate'],
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { CreateCouponRequestCouponablesInner } from './CreateCouponRequestCouponablesInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UpdateCouponRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface UpdateCouponRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UpdateCouponRequest
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UpdateCouponRequest
|
|
29
|
+
*/
|
|
30
|
+
code: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof UpdateCouponRequest
|
|
35
|
+
*/
|
|
36
|
+
type: UpdateCouponRequestTypeEnum;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof UpdateCouponRequest
|
|
41
|
+
*/
|
|
42
|
+
discountType: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof UpdateCouponRequest
|
|
47
|
+
*/
|
|
48
|
+
discountAmount: number;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof UpdateCouponRequest
|
|
53
|
+
*/
|
|
54
|
+
minAmount: number;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof UpdateCouponRequest
|
|
59
|
+
*/
|
|
60
|
+
minProducts: number;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof UpdateCouponRequest
|
|
65
|
+
*/
|
|
66
|
+
totalUseLimit: number;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof UpdateCouponRequest
|
|
71
|
+
*/
|
|
72
|
+
customerUseLimit: number;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof UpdateCouponRequest
|
|
77
|
+
*/
|
|
78
|
+
startDate?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof UpdateCouponRequest
|
|
83
|
+
*/
|
|
84
|
+
endDate?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {boolean}
|
|
88
|
+
* @memberof UpdateCouponRequest
|
|
89
|
+
*/
|
|
90
|
+
isForAllProducts?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {boolean}
|
|
94
|
+
* @memberof UpdateCouponRequest
|
|
95
|
+
*/
|
|
96
|
+
isForAllCustomers?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @type {Array<CreateCouponRequestCouponablesInner>}
|
|
100
|
+
* @memberof UpdateCouponRequest
|
|
101
|
+
*/
|
|
102
|
+
couponables?: Array<CreateCouponRequestCouponablesInner>;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @export
|
|
106
|
+
*/
|
|
107
|
+
export declare const UpdateCouponRequestTypeEnum: {
|
|
108
|
+
readonly Subtotal: "subtotal";
|
|
109
|
+
readonly Product: "product";
|
|
110
|
+
readonly Shipping: "shipping";
|
|
111
|
+
};
|
|
112
|
+
export type UpdateCouponRequestTypeEnum = typeof UpdateCouponRequestTypeEnum[keyof typeof UpdateCouponRequestTypeEnum];
|
|
113
|
+
/**
|
|
114
|
+
* Check if a given object implements the UpdateCouponRequest interface.
|
|
115
|
+
*/
|
|
116
|
+
export declare function instanceOfUpdateCouponRequest(value: object): value is UpdateCouponRequest;
|
|
117
|
+
export declare function UpdateCouponRequestFromJSON(json: any): UpdateCouponRequest;
|
|
118
|
+
export declare function UpdateCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateCouponRequest;
|
|
119
|
+
export declare function UpdateCouponRequestToJSON(json: any): UpdateCouponRequest;
|
|
120
|
+
export declare function UpdateCouponRequestToJSONTyped(value?: UpdateCouponRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateCouponRequestTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfUpdateCouponRequest = instanceOfUpdateCouponRequest;
|
|
18
|
+
exports.UpdateCouponRequestFromJSON = UpdateCouponRequestFromJSON;
|
|
19
|
+
exports.UpdateCouponRequestFromJSONTyped = UpdateCouponRequestFromJSONTyped;
|
|
20
|
+
exports.UpdateCouponRequestToJSON = UpdateCouponRequestToJSON;
|
|
21
|
+
exports.UpdateCouponRequestToJSONTyped = UpdateCouponRequestToJSONTyped;
|
|
22
|
+
var CreateCouponRequestCouponablesInner_1 = require("./CreateCouponRequestCouponablesInner");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.UpdateCouponRequestTypeEnum = {
|
|
27
|
+
Subtotal: 'subtotal',
|
|
28
|
+
Product: 'product',
|
|
29
|
+
Shipping: 'shipping'
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the UpdateCouponRequest interface.
|
|
33
|
+
*/
|
|
34
|
+
function instanceOfUpdateCouponRequest(value) {
|
|
35
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('code' in value) || value['code'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('discountType' in value) || value['discountType'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('discountAmount' in value) || value['discountAmount'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('minAmount' in value) || value['minAmount'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('minProducts' in value) || value['minProducts'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('totalUseLimit' in value) || value['totalUseLimit'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('customerUseLimit' in value) || value['customerUseLimit'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function UpdateCouponRequestFromJSON(json) {
|
|
56
|
+
return UpdateCouponRequestFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function UpdateCouponRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'name': json['name'],
|
|
64
|
+
'code': json['code'],
|
|
65
|
+
'type': json['type'],
|
|
66
|
+
'discountType': json['discount_type'],
|
|
67
|
+
'discountAmount': json['discount_amount'],
|
|
68
|
+
'minAmount': json['min_amount'],
|
|
69
|
+
'minProducts': json['min_products'],
|
|
70
|
+
'totalUseLimit': json['total_use_limit'],
|
|
71
|
+
'customerUseLimit': json['customer_use_limit'],
|
|
72
|
+
'startDate': json['start_date'] == null ? undefined : json['start_date'],
|
|
73
|
+
'endDate': json['end_date'] == null ? undefined : json['end_date'],
|
|
74
|
+
'isForAllProducts': json['is_for_all_products'] == null ? undefined : json['is_for_all_products'],
|
|
75
|
+
'isForAllCustomers': json['is_for_all_customers'] == null ? undefined : json['is_for_all_customers'],
|
|
76
|
+
'couponables': json['couponables'] == null ? undefined : (json['couponables'].map(CreateCouponRequestCouponablesInner_1.CreateCouponRequestCouponablesInnerFromJSON)),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function UpdateCouponRequestToJSON(json) {
|
|
80
|
+
return UpdateCouponRequestToJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
function UpdateCouponRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
83
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
'name': value['name'],
|
|
89
|
+
'code': value['code'],
|
|
90
|
+
'type': value['type'],
|
|
91
|
+
'discount_type': value['discountType'],
|
|
92
|
+
'discount_amount': value['discountAmount'],
|
|
93
|
+
'min_amount': value['minAmount'],
|
|
94
|
+
'min_products': value['minProducts'],
|
|
95
|
+
'total_use_limit': value['totalUseLimit'],
|
|
96
|
+
'customer_use_limit': value['customerUseLimit'],
|
|
97
|
+
'start_date': value['startDate'],
|
|
98
|
+
'end_date': value['endDate'],
|
|
99
|
+
'is_for_all_products': value['isForAllProducts'],
|
|
100
|
+
'is_for_all_customers': value['isForAllCustomers'],
|
|
101
|
+
'couponables': value['couponables'] == null ? undefined : (value['couponables'].map(CreateCouponRequestCouponablesInner_1.CreateCouponRequestCouponablesInnerToJSON)),
|
|
102
|
+
};
|
|
103
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -79,6 +79,13 @@ export * from './CategoryFrontendResourceArrayResponse';
|
|
|
79
79
|
export * from './CategoryWithChildrenFrontendResource';
|
|
80
80
|
export * from './CategoryWithChildrenFrontendResourceArrayResponse';
|
|
81
81
|
export * from './CouponDiscountType';
|
|
82
|
+
export * from './CouponListResource';
|
|
83
|
+
export * from './CouponListResourceArrayResponse';
|
|
84
|
+
export * from './CouponLiteResource';
|
|
85
|
+
export * from './CouponLiteResourceArrayResponse';
|
|
86
|
+
export * from './CouponResource';
|
|
87
|
+
export * from './CouponResourceArrayResponse';
|
|
88
|
+
export * from './CouponType';
|
|
82
89
|
export * from './CreateAssetFileRequest';
|
|
83
90
|
export * from './CreateAssetForAssetableRequest';
|
|
84
91
|
export * from './CreateAttributeRequest';
|
|
@@ -89,6 +96,8 @@ export * from './CreateBlogCategoryRequestSeoInner';
|
|
|
89
96
|
export * from './CreateCartRequest';
|
|
90
97
|
export * from './CreateCartRequestItemsInner';
|
|
91
98
|
export * from './CreateCartRequestShippingAddress';
|
|
99
|
+
export * from './CreateCouponRequest';
|
|
100
|
+
export * from './CreateCouponRequestCouponablesInner';
|
|
92
101
|
export * from './CreateCustomerRequest';
|
|
93
102
|
export * from './CreateDefinitionRequest';
|
|
94
103
|
export * from './CreateDocumentFileRequest';
|
|
@@ -280,6 +289,8 @@ export * from './PaginatedBlogCategoryResourceResponse';
|
|
|
280
289
|
export * from './PaginatedBlogFrontendResourceResponse';
|
|
281
290
|
export * from './PaginatedCartListResourceResponse';
|
|
282
291
|
export * from './PaginatedCategoryFrontendResourceResponse';
|
|
292
|
+
export * from './PaginatedCouponListResourceResponse';
|
|
293
|
+
export * from './PaginatedCouponResourceResponse';
|
|
283
294
|
export * from './PaginatedCustomerListResourceResponse';
|
|
284
295
|
export * from './PaginatedCustomerReviewableItemFrontendResourceResponse';
|
|
285
296
|
export * from './PaginatedDefinitionListResourceResponse';
|
|
@@ -483,6 +494,7 @@ export * from './SearchAdminNotesRequest';
|
|
|
483
494
|
export * from './SearchAllAttributeValuesRequest';
|
|
484
495
|
export * from './SearchAllAttributesRequest';
|
|
485
496
|
export * from './SearchAllBlogCategoriesRequest';
|
|
497
|
+
export * from './SearchAllCouponsRequest';
|
|
486
498
|
export * from './SearchAllDefinitionsRequest';
|
|
487
499
|
export * from './SearchAllDocumentsRequest';
|
|
488
500
|
export * from './SearchAllFrontendComponentsRequest';
|
|
@@ -505,6 +517,7 @@ export * from './SearchAttributeValuesRequest';
|
|
|
505
517
|
export * from './SearchAttributesRequest';
|
|
506
518
|
export * from './SearchBlogCategoriesRequest';
|
|
507
519
|
export * from './SearchCartsRequest';
|
|
520
|
+
export * from './SearchCouponsRequest';
|
|
508
521
|
export * from './SearchCustomersRequest';
|
|
509
522
|
export * from './SearchDefinitionsRequest';
|
|
510
523
|
export * from './SearchDocumentsRequest';
|
|
@@ -602,6 +615,7 @@ export * from './UpdateAttributeRequest';
|
|
|
602
615
|
export * from './UpdateAttributeValueRequest';
|
|
603
616
|
export * from './UpdateBlogCategoryRequest';
|
|
604
617
|
export * from './UpdateCartRequest';
|
|
618
|
+
export * from './UpdateCouponRequest';
|
|
605
619
|
export * from './UpdateDefinitionRequest';
|
|
606
620
|
export * from './UpdateDocumentRequest';
|
|
607
621
|
export * from './UpdateLabelRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -97,6 +97,13 @@ __exportStar(require("./CategoryFrontendResourceArrayResponse"), exports);
|
|
|
97
97
|
__exportStar(require("./CategoryWithChildrenFrontendResource"), exports);
|
|
98
98
|
__exportStar(require("./CategoryWithChildrenFrontendResourceArrayResponse"), exports);
|
|
99
99
|
__exportStar(require("./CouponDiscountType"), exports);
|
|
100
|
+
__exportStar(require("./CouponListResource"), exports);
|
|
101
|
+
__exportStar(require("./CouponListResourceArrayResponse"), exports);
|
|
102
|
+
__exportStar(require("./CouponLiteResource"), exports);
|
|
103
|
+
__exportStar(require("./CouponLiteResourceArrayResponse"), exports);
|
|
104
|
+
__exportStar(require("./CouponResource"), exports);
|
|
105
|
+
__exportStar(require("./CouponResourceArrayResponse"), exports);
|
|
106
|
+
__exportStar(require("./CouponType"), exports);
|
|
100
107
|
__exportStar(require("./CreateAssetFileRequest"), exports);
|
|
101
108
|
__exportStar(require("./CreateAssetForAssetableRequest"), exports);
|
|
102
109
|
__exportStar(require("./CreateAttributeRequest"), exports);
|
|
@@ -107,6 +114,8 @@ __exportStar(require("./CreateBlogCategoryRequestSeoInner"), exports);
|
|
|
107
114
|
__exportStar(require("./CreateCartRequest"), exports);
|
|
108
115
|
__exportStar(require("./CreateCartRequestItemsInner"), exports);
|
|
109
116
|
__exportStar(require("./CreateCartRequestShippingAddress"), exports);
|
|
117
|
+
__exportStar(require("./CreateCouponRequest"), exports);
|
|
118
|
+
__exportStar(require("./CreateCouponRequestCouponablesInner"), exports);
|
|
110
119
|
__exportStar(require("./CreateCustomerRequest"), exports);
|
|
111
120
|
__exportStar(require("./CreateDefinitionRequest"), exports);
|
|
112
121
|
__exportStar(require("./CreateDocumentFileRequest"), exports);
|
|
@@ -298,6 +307,8 @@ __exportStar(require("./PaginatedBlogCategoryResourceResponse"), exports);
|
|
|
298
307
|
__exportStar(require("./PaginatedBlogFrontendResourceResponse"), exports);
|
|
299
308
|
__exportStar(require("./PaginatedCartListResourceResponse"), exports);
|
|
300
309
|
__exportStar(require("./PaginatedCategoryFrontendResourceResponse"), exports);
|
|
310
|
+
__exportStar(require("./PaginatedCouponListResourceResponse"), exports);
|
|
311
|
+
__exportStar(require("./PaginatedCouponResourceResponse"), exports);
|
|
301
312
|
__exportStar(require("./PaginatedCustomerListResourceResponse"), exports);
|
|
302
313
|
__exportStar(require("./PaginatedCustomerReviewableItemFrontendResourceResponse"), exports);
|
|
303
314
|
__exportStar(require("./PaginatedDefinitionListResourceResponse"), exports);
|
|
@@ -501,6 +512,7 @@ __exportStar(require("./SearchAdminNotesRequest"), exports);
|
|
|
501
512
|
__exportStar(require("./SearchAllAttributeValuesRequest"), exports);
|
|
502
513
|
__exportStar(require("./SearchAllAttributesRequest"), exports);
|
|
503
514
|
__exportStar(require("./SearchAllBlogCategoriesRequest"), exports);
|
|
515
|
+
__exportStar(require("./SearchAllCouponsRequest"), exports);
|
|
504
516
|
__exportStar(require("./SearchAllDefinitionsRequest"), exports);
|
|
505
517
|
__exportStar(require("./SearchAllDocumentsRequest"), exports);
|
|
506
518
|
__exportStar(require("./SearchAllFrontendComponentsRequest"), exports);
|
|
@@ -523,6 +535,7 @@ __exportStar(require("./SearchAttributeValuesRequest"), exports);
|
|
|
523
535
|
__exportStar(require("./SearchAttributesRequest"), exports);
|
|
524
536
|
__exportStar(require("./SearchBlogCategoriesRequest"), exports);
|
|
525
537
|
__exportStar(require("./SearchCartsRequest"), exports);
|
|
538
|
+
__exportStar(require("./SearchCouponsRequest"), exports);
|
|
526
539
|
__exportStar(require("./SearchCustomersRequest"), exports);
|
|
527
540
|
__exportStar(require("./SearchDefinitionsRequest"), exports);
|
|
528
541
|
__exportStar(require("./SearchDocumentsRequest"), exports);
|
|
@@ -620,6 +633,7 @@ __exportStar(require("./UpdateAttributeRequest"), exports);
|
|
|
620
633
|
__exportStar(require("./UpdateAttributeValueRequest"), exports);
|
|
621
634
|
__exportStar(require("./UpdateBlogCategoryRequest"), exports);
|
|
622
635
|
__exportStar(require("./UpdateCartRequest"), exports);
|
|
636
|
+
__exportStar(require("./UpdateCouponRequest"), exports);
|
|
623
637
|
__exportStar(require("./UpdateDefinitionRequest"), exports);
|
|
624
638
|
__exportStar(require("./UpdateDocumentRequest"), exports);
|
|
625
639
|
__exportStar(require("./UpdateLabelRequest"), exports);
|