@digital8/lighting-illusions-ts-sdk 0.0.2362 → 0.0.2364
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/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +1 -3
- package/dist/models/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/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 +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/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/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +1 -3
- package/dist/models/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +2 -6
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
- package/dist/models/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/StoreSpecialDateFrontendResource.md +1 -1
- package/docs/UpdateCouponRequest.md +60 -0
- package/package.json +1 -1
- package/src/apis/CouponsApi.ts +345 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressResource.ts +2 -3
- 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/FrontendOrderResource.ts +11 -11
- package/src/models/OrderFulfillmentResource.ts +2 -3
- package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
- package/src/models/PaginatedCouponResourceResponse.ts +90 -0
- package/src/models/SearchAllCouponsRequest.ts +154 -0
- package/src/models/SearchCartsRequest.ts +8 -0
- package/src/models/SearchCouponsRequest.ts +202 -0
- package/src/models/SearchOrdersRequest.ts +8 -0
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreResource.ts +4 -6
- package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
- 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,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
|
+
|
|
@@ -20,13 +20,6 @@ import {
|
|
|
20
20
|
FrontendLineItemResourceToJSON,
|
|
21
21
|
FrontendLineItemResourceToJSONTyped,
|
|
22
22
|
} from './FrontendLineItemResource';
|
|
23
|
-
import type { CartCouponLiteResource } from './CartCouponLiteResource';
|
|
24
|
-
import {
|
|
25
|
-
CartCouponLiteResourceFromJSON,
|
|
26
|
-
CartCouponLiteResourceFromJSONTyped,
|
|
27
|
-
CartCouponLiteResourceToJSON,
|
|
28
|
-
CartCouponLiteResourceToJSONTyped,
|
|
29
|
-
} from './CartCouponLiteResource';
|
|
30
23
|
import type { CustomerListResource } from './CustomerListResource';
|
|
31
24
|
import {
|
|
32
25
|
CustomerListResourceFromJSON,
|
|
@@ -34,6 +27,13 @@ import {
|
|
|
34
27
|
CustomerListResourceToJSON,
|
|
35
28
|
CustomerListResourceToJSONTyped,
|
|
36
29
|
} from './CustomerListResource';
|
|
30
|
+
import type { FrontendCartResourceCouponsInner } from './FrontendCartResourceCouponsInner';
|
|
31
|
+
import {
|
|
32
|
+
FrontendCartResourceCouponsInnerFromJSON,
|
|
33
|
+
FrontendCartResourceCouponsInnerFromJSONTyped,
|
|
34
|
+
FrontendCartResourceCouponsInnerToJSON,
|
|
35
|
+
FrontendCartResourceCouponsInnerToJSONTyped,
|
|
36
|
+
} from './FrontendCartResourceCouponsInner';
|
|
37
37
|
import type { AddressResource } from './AddressResource';
|
|
38
38
|
import {
|
|
39
39
|
AddressResourceFromJSON,
|
|
@@ -128,10 +128,10 @@ export interface FrontendOrderResource {
|
|
|
128
128
|
lineItems: Array<FrontendLineItemResource> | null;
|
|
129
129
|
/**
|
|
130
130
|
*
|
|
131
|
-
* @type {Array<
|
|
131
|
+
* @type {Array<FrontendCartResourceCouponsInner>}
|
|
132
132
|
* @memberof FrontendOrderResource
|
|
133
133
|
*/
|
|
134
|
-
coupons: Array<
|
|
134
|
+
coupons: Array<FrontendCartResourceCouponsInner>;
|
|
135
135
|
/**
|
|
136
136
|
*
|
|
137
137
|
* @type {number}
|
|
@@ -245,7 +245,7 @@ export function FrontendOrderResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
245
245
|
'shippingAddress': AddressResourceFromJSON(json['shippingAddress']),
|
|
246
246
|
'billingAddress': AddressResourceFromJSON(json['billingAddress']),
|
|
247
247
|
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(FrontendLineItemResourceFromJSON)),
|
|
248
|
-
'coupons': (
|
|
248
|
+
'coupons': ((json['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerFromJSON)),
|
|
249
249
|
'subtotal': json['subtotal'],
|
|
250
250
|
'promotionalDiscount': json['promotionalDiscount'],
|
|
251
251
|
'couponSubtotalDiscount': json['couponSubtotalDiscount'],
|
|
@@ -283,7 +283,7 @@ export function FrontendOrderResourceToJSONTyped(value?: FrontendOrderResource |
|
|
|
283
283
|
'shippingAddress': AddressResourceToJSON(value['shippingAddress']),
|
|
284
284
|
'billingAddress': AddressResourceToJSON(value['billingAddress']),
|
|
285
285
|
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(FrontendLineItemResourceToJSON)),
|
|
286
|
-
'coupons': (
|
|
286
|
+
'coupons': ((value['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerToJSON)),
|
|
287
287
|
'subtotal': value['subtotal'],
|
|
288
288
|
'promotionalDiscount': value['promotionalDiscount'],
|
|
289
289
|
'couponSubtotalDiscount': value['couponSubtotalDiscount'],
|
|
@@ -56,7 +56,7 @@ export interface OrderFulfillmentResource {
|
|
|
56
56
|
* @type {string}
|
|
57
57
|
* @memberof OrderFulfillmentResource
|
|
58
58
|
*/
|
|
59
|
-
trackingUrl
|
|
59
|
+
trackingUrl?: string | null;
|
|
60
60
|
/**
|
|
61
61
|
*
|
|
62
62
|
* @type {string}
|
|
@@ -103,7 +103,6 @@ export function instanceOfOrderFulfillmentResource(value: object): value is Orde
|
|
|
103
103
|
if (!('orderId' in value) || value['orderId'] === undefined) return false;
|
|
104
104
|
if (!('dateShipped' in value) || value['dateShipped'] === undefined) return false;
|
|
105
105
|
if (!('trackingNumber' in value) || value['trackingNumber'] === undefined) return false;
|
|
106
|
-
if (!('trackingUrl' in value) || value['trackingUrl'] === undefined) return false;
|
|
107
106
|
if (!('trackingCompany' in value) || value['trackingCompany'] === undefined) return false;
|
|
108
107
|
if (!('docnum' in value) || value['docnum'] === undefined) return false;
|
|
109
108
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false;
|
|
@@ -125,7 +124,7 @@ export function OrderFulfillmentResourceFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
125
124
|
'orderId': json['orderId'],
|
|
126
125
|
'dateShipped': (new Date(json['dateShipped'])),
|
|
127
126
|
'trackingNumber': json['trackingNumber'],
|
|
128
|
-
'trackingUrl': json['trackingUrl'],
|
|
127
|
+
'trackingUrl': json['trackingUrl'] == null ? undefined : json['trackingUrl'],
|
|
129
128
|
'trackingCompany': json['trackingCompany'],
|
|
130
129
|
'docnum': json['docnum'],
|
|
131
130
|
'netsuiteId': json['netsuiteId'],
|
|
@@ -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
|
+
|
|
@@ -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 { CouponResource } from './CouponResource';
|
|
24
|
+
import {
|
|
25
|
+
CouponResourceFromJSON,
|
|
26
|
+
CouponResourceFromJSONTyped,
|
|
27
|
+
CouponResourceToJSON,
|
|
28
|
+
CouponResourceToJSONTyped,
|
|
29
|
+
} from './CouponResource';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PaginatedCouponResourceResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface PaginatedCouponResourceResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<CouponResource>}
|
|
40
|
+
* @memberof PaginatedCouponResourceResponse
|
|
41
|
+
*/
|
|
42
|
+
data: Array<CouponResource>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {PagingMetadata}
|
|
46
|
+
* @memberof PaginatedCouponResourceResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: PagingMetadata;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the PaginatedCouponResourceResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfPaginatedCouponResourceResponse(value: object): value is PaginatedCouponResourceResponse {
|
|
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 PaginatedCouponResourceResponseFromJSON(json: any): PaginatedCouponResourceResponse {
|
|
61
|
+
return PaginatedCouponResourceResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function PaginatedCouponResourceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedCouponResourceResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': ((json['data'] as Array<any>).map(CouponResourceFromJSON)),
|
|
71
|
+
'meta': PagingMetadataFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function PaginatedCouponResourceResponseToJSON(json: any): PaginatedCouponResourceResponse {
|
|
76
|
+
return PaginatedCouponResourceResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function PaginatedCouponResourceResponseToJSONTyped(value?: PaginatedCouponResourceResponse | 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(CouponResourceToJSON)),
|
|
87
|
+
'meta': PagingMetadataToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SearchAllCouponsRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SearchAllCouponsRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SearchAllCouponsRequest
|
|
26
|
+
*/
|
|
27
|
+
search?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {SearchAllCouponsRequestSortByEnum}
|
|
31
|
+
* @memberof SearchAllCouponsRequest
|
|
32
|
+
*/
|
|
33
|
+
sortBy?: SearchAllCouponsRequestSortByEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {SearchAllCouponsRequestSortDirectionEnum}
|
|
37
|
+
* @memberof SearchAllCouponsRequest
|
|
38
|
+
*/
|
|
39
|
+
sortDirection?: SearchAllCouponsRequestSortDirectionEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SearchAllCouponsRequest
|
|
44
|
+
*/
|
|
45
|
+
relatedId?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SearchAllCouponsRequest
|
|
50
|
+
*/
|
|
51
|
+
relatedType?: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof SearchAllCouponsRequest
|
|
56
|
+
*/
|
|
57
|
+
includesRelations?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<string>}
|
|
61
|
+
* @memberof SearchAllCouponsRequest
|
|
62
|
+
*/
|
|
63
|
+
type?: Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Array<string>}
|
|
67
|
+
* @memberof SearchAllCouponsRequest
|
|
68
|
+
*/
|
|
69
|
+
siteId?: Array<string>;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {Array<string>}
|
|
73
|
+
* @memberof SearchAllCouponsRequest
|
|
74
|
+
*/
|
|
75
|
+
isAbandonedCart?: Array<string>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @export
|
|
81
|
+
*/
|
|
82
|
+
export const SearchAllCouponsRequestSortByEnum = {
|
|
83
|
+
Id: 'id',
|
|
84
|
+
Name: 'name',
|
|
85
|
+
Code: 'code',
|
|
86
|
+
Type: 'type',
|
|
87
|
+
StartDate: 'start_date',
|
|
88
|
+
EndDate: 'end_date',
|
|
89
|
+
CreatedAt: 'created_at'
|
|
90
|
+
} as const;
|
|
91
|
+
export type SearchAllCouponsRequestSortByEnum = typeof SearchAllCouponsRequestSortByEnum[keyof typeof SearchAllCouponsRequestSortByEnum];
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export const SearchAllCouponsRequestSortDirectionEnum = {
|
|
97
|
+
Asc: 'asc',
|
|
98
|
+
Desc: 'desc'
|
|
99
|
+
} as const;
|
|
100
|
+
export type SearchAllCouponsRequestSortDirectionEnum = typeof SearchAllCouponsRequestSortDirectionEnum[keyof typeof SearchAllCouponsRequestSortDirectionEnum];
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Check if a given object implements the SearchAllCouponsRequest interface.
|
|
105
|
+
*/
|
|
106
|
+
export function instanceOfSearchAllCouponsRequest(value: object): value is SearchAllCouponsRequest {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function SearchAllCouponsRequestFromJSON(json: any): SearchAllCouponsRequest {
|
|
111
|
+
return SearchAllCouponsRequestFromJSONTyped(json, false);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function SearchAllCouponsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchAllCouponsRequest {
|
|
115
|
+
if (json == null) {
|
|
116
|
+
return json;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'search': json['search'] == null ? undefined : json['search'],
|
|
121
|
+
'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
|
|
122
|
+
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
123
|
+
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
124
|
+
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
125
|
+
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
126
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
127
|
+
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
128
|
+
'isAbandonedCart': json['is_abandoned_cart'] == null ? undefined : json['is_abandoned_cart'],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function SearchAllCouponsRequestToJSON(json: any): SearchAllCouponsRequest {
|
|
133
|
+
return SearchAllCouponsRequestToJSONTyped(json, false);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function SearchAllCouponsRequestToJSONTyped(value?: SearchAllCouponsRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
137
|
+
if (value == null) {
|
|
138
|
+
return value;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
|
|
143
|
+
'search': value['search'],
|
|
144
|
+
'sortBy': value['sortBy'],
|
|
145
|
+
'sortDirection': value['sortDirection'],
|
|
146
|
+
'related_id': value['relatedId'],
|
|
147
|
+
'related_type': value['relatedType'],
|
|
148
|
+
'includes_relations': value['includesRelations'],
|
|
149
|
+
'type': value['type'],
|
|
150
|
+
'site_id': value['siteId'],
|
|
151
|
+
'is_abandoned_cart': value['isAbandonedCart'],
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
@@ -121,6 +121,12 @@ export interface SearchCartsRequest {
|
|
|
121
121
|
* @memberof SearchCartsRequest
|
|
122
122
|
*/
|
|
123
123
|
includesRelations?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {number}
|
|
127
|
+
* @memberof SearchCartsRequest
|
|
128
|
+
*/
|
|
129
|
+
couponId?: number | null;
|
|
124
130
|
}
|
|
125
131
|
|
|
126
132
|
|
|
@@ -179,6 +185,7 @@ export function SearchCartsRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
179
185
|
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
180
186
|
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
181
187
|
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
188
|
+
'couponId': json['coupon_id'] == null ? undefined : json['coupon_id'],
|
|
182
189
|
};
|
|
183
190
|
}
|
|
184
191
|
|
|
@@ -210,6 +217,7 @@ export function SearchCartsRequestToJSONTyped(value?: SearchCartsRequest | null,
|
|
|
210
217
|
'related_id': value['relatedId'],
|
|
211
218
|
'related_type': value['relatedType'],
|
|
212
219
|
'includes_relations': value['includesRelations'],
|
|
220
|
+
'coupon_id': value['couponId'],
|
|
213
221
|
};
|
|
214
222
|
}
|
|
215
223
|
|