@digital8/lighting-illusions-ts-sdk 0.0.2177 → 0.0.2178
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 +32 -18
- package/README.md +23 -12
- package/dist/apis/CouponsApi.d.ts +116 -0
- package/dist/apis/CouponsApi.js +440 -0
- package/dist/apis/OrdersApi.d.ts +0 -15
- package/dist/apis/OrdersApi.js +0 -59
- 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/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +6 -2
- package/dist/models/CouponListResource.d.ts +87 -0
- package/dist/models/CouponListResource.js +82 -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 +166 -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/CreateCartRequest.d.ts +0 -1
- package/dist/models/CreateCartRequest.js +0 -1
- 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/OrderFulfillmentResource.d.ts +2 -2
- package/dist/models/OrderFulfillmentResource.js +3 -3
- package/dist/models/OrderStatusId.d.ts +6 -2
- package/dist/models/OrderStatusId.js +6 -2
- package/dist/models/PaginatedCouponListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedCouponListResourceResponse.js +57 -0
- package/dist/models/PaginatedCouponLiteResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedCouponLiteResourceResponse.js +57 -0
- package/dist/models/PaginatedCouponResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedCouponResourceResponse.js +57 -0
- package/dist/models/PaymentSource.d.ts +0 -1
- package/dist/models/PaymentSource.js +1 -2
- package/dist/models/ProductChildLineItemLiteResource.d.ts +0 -18
- package/dist/models/ProductChildLineItemLiteResource.js +0 -12
- package/dist/models/ProductChildResource.d.ts +0 -6
- package/dist/models/ProductChildResource.js +0 -4
- package/dist/models/SearchAllCouponsRequest.d.ts +101 -0
- package/dist/models/SearchAllCouponsRequest.js +85 -0
- package/dist/models/SearchCouponsRequest.d.ts +137 -0
- package/dist/models/SearchCouponsRequest.js +97 -0
- package/dist/models/ShippingType.d.ts +0 -1
- package/dist/models/ShippingType.js +0 -1
- package/dist/models/StoreListResource.d.ts +2 -2
- package/dist/models/StoreListResource.js +6 -2
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +3 -1
- package/dist/models/UpdateCartRequest.d.ts +0 -1
- package/dist/models/UpdateCartRequest.js +0 -1
- package/dist/models/UpdateCouponRequest.d.ts +128 -0
- package/dist/models/UpdateCouponRequest.js +110 -0
- package/dist/models/UpdateOrderRequest.d.ts +0 -1
- package/dist/models/UpdateOrderRequest.js +0 -1
- package/dist/models/index.d.ts +15 -9
- package/dist/models/index.js +15 -9
- package/docs/{FrontendCartResourceCouponsInner.md → CouponListResource.md} +20 -10
- package/docs/{FrontendCartResourceArrayResponse.md → CouponListResourceArrayResponse.md} +5 -5
- package/docs/{CartCouponLiteResource.md → CouponLiteResource.md} +6 -10
- package/docs/{FrontendOrderResourceArrayResponse.md → CouponLiteResourceArrayResponse.md} +5 -5
- package/docs/CouponResource.md +78 -0
- package/docs/{FrontendLineItemResourceArrayResponse.md → CouponResourceArrayResponse.md} +5 -5
- package/docs/CouponType.md +32 -0
- package/docs/CouponsApi.md +407 -0
- package/docs/CreateCouponRequest.md +62 -0
- package/docs/{CartCouponLiteResourceArrayResponse.md → CreateCouponRequestCouponablesInner.md} +8 -6
- package/docs/OrdersApi.md +0 -66
- package/docs/PaginatedCouponListResourceResponse.md +36 -0
- package/docs/PaginatedCouponLiteResourceResponse.md +36 -0
- package/docs/PaginatedCouponResourceResponse.md +36 -0
- package/docs/ProductChildLineItemLiteResource.md +0 -6
- package/docs/ProductChildResource.md +0 -2
- package/docs/SearchAllCouponsRequest.md +50 -0
- package/docs/SearchCouponsRequest.md +62 -0
- package/docs/StoreSpecialDateResource.md +1 -1
- package/docs/UpdateCouponRequest.md +60 -0
- package/package.json +1 -1
- package/src/apis/CouponsApi.ts +345 -0
- package/src/apis/OrdersApi.ts +0 -49
- package/src/apis/index.ts +1 -0
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +6 -4
- package/src/models/CouponListResource.ts +152 -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 +276 -0
- package/src/models/CouponResourceArrayResponse.ts +73 -0
- package/src/models/CouponType.ts +54 -0
- package/src/models/CreateCartRequest.ts +0 -1
- package/src/models/CreateCouponRequest.ts +216 -0
- package/src/models/CreateCouponRequestCouponablesInner.ts +86 -0
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/OrderFulfillmentResource.ts +5 -5
- package/src/models/OrderStatusId.ts +6 -2
- package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
- package/src/models/PaginatedCouponLiteResourceResponse.ts +90 -0
- package/src/models/PaginatedCouponResourceResponse.ts +90 -0
- package/src/models/PaymentSource.ts +1 -2
- package/src/models/ProductChildLineItemLiteResource.ts +0 -27
- package/src/models/ProductChildResource.ts +0 -9
- package/src/models/SearchAllCouponsRequest.ts +154 -0
- package/src/models/SearchCouponsRequest.ts +202 -0
- package/src/models/ShippingType.ts +0 -1
- package/src/models/StoreListResource.ts +6 -4
- package/src/models/StoreSpecialDateResource.ts +4 -3
- package/src/models/UpdateCartRequest.ts +0 -1
- package/src/models/UpdateCouponRequest.ts +207 -0
- package/src/models/UpdateOrderRequest.ts +0 -1
- package/src/models/index.ts +15 -9
- package/dist/models/CartCouponLiteResource.d.ts +0 -56
- package/dist/models/CartCouponLiteResource.js +0 -67
- package/dist/models/CartCouponLiteResourceArrayResponse.d.ts +0 -33
- package/dist/models/CartCouponLiteResourceArrayResponse.js +0 -50
- package/dist/models/FrontendCartResource.d.ts +0 -144
- package/dist/models/FrontendCartResource.js +0 -121
- package/dist/models/FrontendCartResourceArrayResponse.d.ts +0 -33
- package/dist/models/FrontendCartResourceArrayResponse.js +0 -50
- package/dist/models/FrontendCartResourceCouponsInner.d.ts +0 -56
- package/dist/models/FrontendCartResourceCouponsInner.js +0 -57
- package/dist/models/FrontendLineItemResource.d.ts +0 -81
- package/dist/models/FrontendLineItemResource.js +0 -82
- package/dist/models/FrontendLineItemResourceArrayResponse.d.ts +0 -33
- package/dist/models/FrontendLineItemResourceArrayResponse.js +0 -50
- package/dist/models/FrontendOrderResource.d.ts +0 -174
- package/dist/models/FrontendOrderResource.js +0 -141
- package/dist/models/FrontendOrderResourceArrayResponse.d.ts +0 -33
- package/dist/models/FrontendOrderResourceArrayResponse.js +0 -50
- package/docs/FrontendCartResource.md +0 -70
- package/docs/FrontendLineItemResource.md +0 -50
- package/docs/FrontendOrderResource.md +0 -80
- package/src/models/CartCouponLiteResource.ts +0 -102
- package/src/models/CartCouponLiteResourceArrayResponse.ts +0 -73
- package/src/models/FrontendCartResource.ts +0 -254
- package/src/models/FrontendCartResourceArrayResponse.ts +0 -73
- package/src/models/FrontendCartResourceCouponsInner.ts +0 -97
- package/src/models/FrontendLineItemResource.ts +0 -145
- package/src/models/FrontendLineItemResourceArrayResponse.ts +0 -73
- package/src/models/FrontendOrderResource.ts +0 -299
- package/src/models/FrontendOrderResourceArrayResponse.ts +0 -73
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CouponResource } from './CouponResource';
|
|
17
|
+
import {
|
|
18
|
+
CouponResourceFromJSON,
|
|
19
|
+
CouponResourceFromJSONTyped,
|
|
20
|
+
CouponResourceToJSON,
|
|
21
|
+
CouponResourceToJSONTyped,
|
|
22
|
+
} from './CouponResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CouponResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface CouponResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<CouponResource>}
|
|
33
|
+
* @memberof CouponResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<CouponResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CouponResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCouponResourceArrayResponse(value: object): value is CouponResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CouponResourceArrayResponseFromJSON(json: any): CouponResourceArrayResponse {
|
|
46
|
+
return CouponResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CouponResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CouponResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CouponResourceArrayResponseToJSON(json: any): CouponResourceArrayResponse {
|
|
60
|
+
return CouponResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function CouponResourceArrayResponseToJSONTyped(value?: CouponResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(CouponResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CouponType = {
|
|
21
|
+
Subtotal: 'subtotal',
|
|
22
|
+
Product: 'product',
|
|
23
|
+
Shipping: 'shipping'
|
|
24
|
+
} as const;
|
|
25
|
+
export type CouponType = typeof CouponType[keyof typeof CouponType];
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export function instanceOfCouponType(value: any): boolean {
|
|
29
|
+
for (const key in CouponType) {
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(CouponType, key)) {
|
|
31
|
+
if (CouponType[key as keyof typeof CouponType] === value) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function CouponTypeFromJSON(json: any): CouponType {
|
|
40
|
+
return CouponTypeFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function CouponTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponType {
|
|
44
|
+
return json as CouponType;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function CouponTypeToJSON(value?: CouponType | null): any {
|
|
48
|
+
return value as any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CouponTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CouponType {
|
|
52
|
+
return value as CouponType;
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -172,7 +172,6 @@ export type CreateCartRequestSourceEnum = typeof CreateCartRequestSourceEnum[key
|
|
|
172
172
|
export const CreateCartRequestShippingTypeEnum = {
|
|
173
173
|
Pickup: 'pickup',
|
|
174
174
|
Delivery: 'delivery',
|
|
175
|
-
AuspostStandard: 'auspost_standard',
|
|
176
175
|
Express: 'express',
|
|
177
176
|
Courier: 'courier',
|
|
178
177
|
DontShip: 'dont_ship'
|
|
@@ -0,0 +1,216 @@
|
|
|
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 CreateCouponRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateCouponRequest {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof CreateCouponRequest
|
|
34
|
+
*/
|
|
35
|
+
siteId: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateCouponRequest
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateCouponRequest
|
|
46
|
+
*/
|
|
47
|
+
code: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {CreateCouponRequestTypeEnum}
|
|
51
|
+
* @memberof CreateCouponRequest
|
|
52
|
+
*/
|
|
53
|
+
type: CreateCouponRequestTypeEnum;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {CreateCouponRequestDiscountTypeEnum}
|
|
57
|
+
* @memberof CreateCouponRequest
|
|
58
|
+
*/
|
|
59
|
+
discountType: CreateCouponRequestDiscountTypeEnum;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof CreateCouponRequest
|
|
64
|
+
*/
|
|
65
|
+
discountAmount: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof CreateCouponRequest
|
|
70
|
+
*/
|
|
71
|
+
minAmount: number;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof CreateCouponRequest
|
|
76
|
+
*/
|
|
77
|
+
minProducts: number;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {number}
|
|
81
|
+
* @memberof CreateCouponRequest
|
|
82
|
+
*/
|
|
83
|
+
totalUseLimit: number;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {number}
|
|
87
|
+
* @memberof CreateCouponRequest
|
|
88
|
+
*/
|
|
89
|
+
customerUseLimit: number;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {Date}
|
|
93
|
+
* @memberof CreateCouponRequest
|
|
94
|
+
*/
|
|
95
|
+
startDate?: Date | null;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {Date}
|
|
99
|
+
* @memberof CreateCouponRequest
|
|
100
|
+
*/
|
|
101
|
+
endDate?: Date | null;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof CreateCouponRequest
|
|
106
|
+
*/
|
|
107
|
+
isForAllProducts?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {boolean}
|
|
111
|
+
* @memberof CreateCouponRequest
|
|
112
|
+
*/
|
|
113
|
+
isForAllCustomers?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {Array<CreateCouponRequestCouponablesInner>}
|
|
117
|
+
* @memberof CreateCouponRequest
|
|
118
|
+
*/
|
|
119
|
+
couponables?: Array<CreateCouponRequestCouponablesInner>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @export
|
|
125
|
+
*/
|
|
126
|
+
export const CreateCouponRequestTypeEnum = {
|
|
127
|
+
Subtotal: 'subtotal',
|
|
128
|
+
Product: 'product',
|
|
129
|
+
Shipping: 'shipping'
|
|
130
|
+
} as const;
|
|
131
|
+
export type CreateCouponRequestTypeEnum = typeof CreateCouponRequestTypeEnum[keyof typeof CreateCouponRequestTypeEnum];
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @export
|
|
135
|
+
*/
|
|
136
|
+
export const CreateCouponRequestDiscountTypeEnum = {
|
|
137
|
+
Dollar: '$',
|
|
138
|
+
Percent: '%'
|
|
139
|
+
} as const;
|
|
140
|
+
export type CreateCouponRequestDiscountTypeEnum = typeof CreateCouponRequestDiscountTypeEnum[keyof typeof CreateCouponRequestDiscountTypeEnum];
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Check if a given object implements the CreateCouponRequest interface.
|
|
145
|
+
*/
|
|
146
|
+
export function instanceOfCreateCouponRequest(value: object): value is CreateCouponRequest {
|
|
147
|
+
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
148
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
149
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
150
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
151
|
+
if (!('discountType' in value) || value['discountType'] === undefined) return false;
|
|
152
|
+
if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
|
|
153
|
+
if (!('minAmount' in value) || value['minAmount'] === undefined) return false;
|
|
154
|
+
if (!('minProducts' in value) || value['minProducts'] === undefined) return false;
|
|
155
|
+
if (!('totalUseLimit' in value) || value['totalUseLimit'] === undefined) return false;
|
|
156
|
+
if (!('customerUseLimit' in value) || value['customerUseLimit'] === undefined) return false;
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function CreateCouponRequestFromJSON(json: any): CreateCouponRequest {
|
|
161
|
+
return CreateCouponRequestFromJSONTyped(json, false);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function CreateCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCouponRequest {
|
|
165
|
+
if (json == null) {
|
|
166
|
+
return json;
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
|
|
170
|
+
'siteId': json['site_id'],
|
|
171
|
+
'name': json['name'],
|
|
172
|
+
'code': json['code'],
|
|
173
|
+
'type': json['type'],
|
|
174
|
+
'discountType': json['discount_type'],
|
|
175
|
+
'discountAmount': json['discount_amount'],
|
|
176
|
+
'minAmount': json['min_amount'],
|
|
177
|
+
'minProducts': json['min_products'],
|
|
178
|
+
'totalUseLimit': json['total_use_limit'],
|
|
179
|
+
'customerUseLimit': json['customer_use_limit'],
|
|
180
|
+
'startDate': json['start_date'] == null ? undefined : (new Date(json['start_date'])),
|
|
181
|
+
'endDate': json['end_date'] == null ? undefined : (new Date(json['end_date'])),
|
|
182
|
+
'isForAllProducts': json['is_for_all_products'] == null ? undefined : json['is_for_all_products'],
|
|
183
|
+
'isForAllCustomers': json['is_for_all_customers'] == null ? undefined : json['is_for_all_customers'],
|
|
184
|
+
'couponables': json['couponables'] == null ? undefined : ((json['couponables'] as Array<any>).map(CreateCouponRequestCouponablesInnerFromJSON)),
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export function CreateCouponRequestToJSON(json: any): CreateCouponRequest {
|
|
189
|
+
return CreateCouponRequestToJSONTyped(json, false);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export function CreateCouponRequestToJSONTyped(value?: CreateCouponRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
193
|
+
if (value == null) {
|
|
194
|
+
return value;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return {
|
|
198
|
+
|
|
199
|
+
'site_id': value['siteId'],
|
|
200
|
+
'name': value['name'],
|
|
201
|
+
'code': value['code'],
|
|
202
|
+
'type': value['type'],
|
|
203
|
+
'discount_type': value['discountType'],
|
|
204
|
+
'discount_amount': value['discountAmount'],
|
|
205
|
+
'min_amount': value['minAmount'],
|
|
206
|
+
'min_products': value['minProducts'],
|
|
207
|
+
'total_use_limit': value['totalUseLimit'],
|
|
208
|
+
'customer_use_limit': value['customerUseLimit'],
|
|
209
|
+
'start_date': value['startDate'] == null ? value['startDate'] : value['startDate'].toISOString(),
|
|
210
|
+
'end_date': value['endDate'] == null ? value['endDate'] : value['endDate'].toISOString(),
|
|
211
|
+
'is_for_all_products': value['isForAllProducts'],
|
|
212
|
+
'is_for_all_customers': value['isForAllCustomers'],
|
|
213
|
+
'couponables': value['couponables'] == null ? undefined : ((value['couponables'] as Array<any>).map(CreateCouponRequestCouponablesInnerToJSON)),
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
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 CreateCouponRequestCouponablesInner
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateCouponRequestCouponablesInner {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {CreateCouponRequestCouponablesInnerTypeEnum}
|
|
25
|
+
* @memberof CreateCouponRequestCouponablesInner
|
|
26
|
+
*/
|
|
27
|
+
type?: CreateCouponRequestCouponablesInnerTypeEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof CreateCouponRequestCouponablesInner
|
|
32
|
+
*/
|
|
33
|
+
id?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export const CreateCouponRequestCouponablesInnerTypeEnum = {
|
|
41
|
+
ProductChild: 'productChild',
|
|
42
|
+
ProductCategory: 'productCategory',
|
|
43
|
+
Supplier: 'supplier',
|
|
44
|
+
Customer: 'customer'
|
|
45
|
+
} as const;
|
|
46
|
+
export type CreateCouponRequestCouponablesInnerTypeEnum = typeof CreateCouponRequestCouponablesInnerTypeEnum[keyof typeof CreateCouponRequestCouponablesInnerTypeEnum];
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the CreateCouponRequestCouponablesInner interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfCreateCouponRequestCouponablesInner(value: object): value is CreateCouponRequestCouponablesInner {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function CreateCouponRequestCouponablesInnerFromJSON(json: any): CreateCouponRequestCouponablesInner {
|
|
57
|
+
return CreateCouponRequestCouponablesInnerFromJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function CreateCouponRequestCouponablesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCouponRequestCouponablesInner {
|
|
61
|
+
if (json == null) {
|
|
62
|
+
return json;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
67
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function CreateCouponRequestCouponablesInnerToJSON(json: any): CreateCouponRequestCouponablesInner {
|
|
72
|
+
return CreateCouponRequestCouponablesInnerToJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function CreateCouponRequestCouponablesInnerToJSONTyped(value?: CreateCouponRequestCouponablesInner | null, ignoreDiscriminator: boolean = false): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'type': value['type'],
|
|
83
|
+
'id': value['id'],
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload?: string | null;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,7 +106,6 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
|
|
|
106
106
|
if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
|
|
107
107
|
if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
|
|
108
108
|
if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
|
|
109
|
-
if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
|
|
110
109
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
111
110
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
112
111
|
return true;
|
|
@@ -129,7 +128,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
129
128
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
130
129
|
'endpoint': json['endpoint'],
|
|
131
130
|
'responseCode': json['responseCode'],
|
|
132
|
-
'requestPayload': json['requestPayload'],
|
|
131
|
+
'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
|
|
133
132
|
'responsePayload': json['responsePayload'],
|
|
134
133
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
135
134
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
@@ -50,13 +50,13 @@ export interface OrderFulfillmentResource {
|
|
|
50
50
|
* @type {string}
|
|
51
51
|
* @memberof OrderFulfillmentResource
|
|
52
52
|
*/
|
|
53
|
-
trackingNumber
|
|
53
|
+
trackingNumber?: string | null;
|
|
54
54
|
/**
|
|
55
55
|
*
|
|
56
56
|
* @type {string}
|
|
57
57
|
* @memberof OrderFulfillmentResource
|
|
58
58
|
*/
|
|
59
|
-
trackingUrl
|
|
59
|
+
trackingUrl: string;
|
|
60
60
|
/**
|
|
61
61
|
*
|
|
62
62
|
* @type {string}
|
|
@@ -102,7 +102,7 @@ export function instanceOfOrderFulfillmentResource(value: object): value is Orde
|
|
|
102
102
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
103
103
|
if (!('orderId' in value) || value['orderId'] === undefined) return false;
|
|
104
104
|
if (!('dateShipped' in value) || value['dateShipped'] === undefined) return false;
|
|
105
|
-
if (!('
|
|
105
|
+
if (!('trackingUrl' in value) || value['trackingUrl'] === undefined) return false;
|
|
106
106
|
if (!('trackingCompany' in value) || value['trackingCompany'] === undefined) return false;
|
|
107
107
|
if (!('docnum' in value) || value['docnum'] === undefined) return false;
|
|
108
108
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false;
|
|
@@ -123,8 +123,8 @@ export function OrderFulfillmentResourceFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
123
123
|
'id': json['id'],
|
|
124
124
|
'orderId': json['orderId'],
|
|
125
125
|
'dateShipped': (new Date(json['dateShipped'])),
|
|
126
|
-
'trackingNumber': json['trackingNumber'],
|
|
127
|
-
'trackingUrl': json['trackingUrl']
|
|
126
|
+
'trackingNumber': json['trackingNumber'] == null ? undefined : json['trackingNumber'],
|
|
127
|
+
'trackingUrl': json['trackingUrl'],
|
|
128
128
|
'trackingCompany': json['trackingCompany'],
|
|
129
129
|
'docnum': json['docnum'],
|
|
130
130
|
'netsuiteId': json['netsuiteId'],
|
|
@@ -18,15 +18,19 @@
|
|
|
18
18
|
* @export
|
|
19
19
|
*/
|
|
20
20
|
export const OrderStatusId = {
|
|
21
|
-
_1: '1',
|
|
22
21
|
_2: '2',
|
|
23
22
|
_3: '3',
|
|
24
23
|
_4: '4',
|
|
25
|
-
|
|
24
|
+
_6: '6',
|
|
26
25
|
_7: '7',
|
|
27
26
|
_9: '9',
|
|
27
|
+
_10: '10',
|
|
28
28
|
_11: '11',
|
|
29
|
+
_12: '12',
|
|
29
30
|
_13: '13',
|
|
31
|
+
_14: '14',
|
|
32
|
+
_15: '15',
|
|
33
|
+
_16: '16',
|
|
30
34
|
_17: '17'
|
|
31
35
|
} as const;
|
|
32
36
|
export type OrderStatusId = typeof OrderStatusId[keyof typeof OrderStatusId];
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { PagingMetadata } from './PagingMetadata';
|
|
17
|
+
import {
|
|
18
|
+
PagingMetadataFromJSON,
|
|
19
|
+
PagingMetadataFromJSONTyped,
|
|
20
|
+
PagingMetadataToJSON,
|
|
21
|
+
PagingMetadataToJSONTyped,
|
|
22
|
+
} from './PagingMetadata';
|
|
23
|
+
import type { CouponListResource } from './CouponListResource';
|
|
24
|
+
import {
|
|
25
|
+
CouponListResourceFromJSON,
|
|
26
|
+
CouponListResourceFromJSONTyped,
|
|
27
|
+
CouponListResourceToJSON,
|
|
28
|
+
CouponListResourceToJSONTyped,
|
|
29
|
+
} from './CouponListResource';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PaginatedCouponListResourceResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface PaginatedCouponListResourceResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<CouponListResource>}
|
|
40
|
+
* @memberof PaginatedCouponListResourceResponse
|
|
41
|
+
*/
|
|
42
|
+
data: Array<CouponListResource>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {PagingMetadata}
|
|
46
|
+
* @memberof PaginatedCouponListResourceResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: PagingMetadata;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the PaginatedCouponListResourceResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfPaginatedCouponListResourceResponse(value: object): value is PaginatedCouponListResourceResponse {
|
|
55
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
56
|
+
if (!('meta' in value) || value['meta'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function PaginatedCouponListResourceResponseFromJSON(json: any): PaginatedCouponListResourceResponse {
|
|
61
|
+
return PaginatedCouponListResourceResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function PaginatedCouponListResourceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedCouponListResourceResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': ((json['data'] as Array<any>).map(CouponListResourceFromJSON)),
|
|
71
|
+
'meta': PagingMetadataFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function PaginatedCouponListResourceResponseToJSON(json: any): PaginatedCouponListResourceResponse {
|
|
76
|
+
return PaginatedCouponListResourceResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function PaginatedCouponListResourceResponseToJSONTyped(value?: PaginatedCouponListResourceResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': ((value['data'] as Array<any>).map(CouponListResourceToJSON)),
|
|
87
|
+
'meta': PagingMetadataToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|