@digital8/lighting-illusions-ts-sdk 0.0.2519 → 0.0.2521

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.
Files changed (87) hide show
  1. package/.openapi-generator/FILES +0 -15
  2. package/README.md +2 -2
  3. package/dist/apis/index.d.ts +0 -1
  4. package/dist/apis/index.js +0 -1
  5. package/dist/models/AddressFrontendResource.d.ts +1 -1
  6. package/dist/models/AddressFrontendResource.js +3 -1
  7. package/dist/models/AddressResource.d.ts +1 -1
  8. package/dist/models/AddressResource.js +1 -3
  9. package/dist/models/AppliedCouponResource.d.ts +0 -30
  10. package/dist/models/AppliedCouponResource.js +0 -20
  11. package/dist/models/FrontendCartResource.d.ts +0 -6
  12. package/dist/models/FrontendCartResource.js +0 -2
  13. package/dist/models/OrderFulfillmentResource.d.ts +2 -2
  14. package/dist/models/OrderFulfillmentResource.js +6 -2
  15. package/dist/models/ProductCategoryLiteResource.d.ts +0 -6
  16. package/dist/models/ProductCategoryLiteResource.js +0 -4
  17. package/dist/models/ProductChildListResource.d.ts +0 -6
  18. package/dist/models/ProductChildListResource.js +0 -4
  19. package/dist/models/SearchCartsRequest.d.ts +0 -6
  20. package/dist/models/SearchCartsRequest.js +0 -2
  21. package/dist/models/SearchOrdersRequest.d.ts +0 -6
  22. package/dist/models/SearchOrdersRequest.js +0 -2
  23. package/dist/models/StoreFrontendResource.d.ts +1 -1
  24. package/dist/models/StoreFrontendResource.js +3 -1
  25. package/dist/models/StoreResource.d.ts +2 -2
  26. package/dist/models/StoreResource.js +4 -4
  27. package/dist/models/index.d.ts +0 -14
  28. package/dist/models/index.js +0 -14
  29. package/package.json +1 -1
  30. package/src/apis/index.ts +0 -1
  31. package/src/models/AddressFrontendResource.ts +3 -2
  32. package/src/models/AddressResource.ts +2 -3
  33. package/src/models/AppliedCouponResource.ts +0 -45
  34. package/src/models/FrontendCartResource.ts +0 -8
  35. package/src/models/OrderFulfillmentResource.ts +6 -4
  36. package/src/models/ProductCategoryLiteResource.ts +0 -9
  37. package/src/models/ProductChildListResource.ts +0 -9
  38. package/src/models/SearchCartsRequest.ts +0 -8
  39. package/src/models/SearchOrdersRequest.ts +0 -8
  40. package/src/models/StoreFrontendResource.ts +3 -2
  41. package/src/models/StoreResource.ts +5 -5
  42. package/src/models/index.ts +0 -14
  43. package/dist/apis/CouponsApi.d.ts +0 -85
  44. package/dist/apis/CouponsApi.js +0 -355
  45. package/dist/models/CouponListResource.d.ts +0 -99
  46. package/dist/models/CouponListResource.js +0 -91
  47. package/dist/models/CouponListResourceArrayResponse.d.ts +0 -33
  48. package/dist/models/CouponListResourceArrayResponse.js +0 -50
  49. package/dist/models/CouponLiteResource.d.ts +0 -44
  50. package/dist/models/CouponLiteResource.js +0 -57
  51. package/dist/models/CouponLiteResourceArrayResponse.d.ts +0 -33
  52. package/dist/models/CouponLiteResourceArrayResponse.js +0 -50
  53. package/dist/models/CouponResource.d.ts +0 -163
  54. package/dist/models/CouponResource.js +0 -135
  55. package/dist/models/CouponResourceArrayResponse.d.ts +0 -33
  56. package/dist/models/CouponResourceArrayResponse.js +0 -50
  57. package/dist/models/CouponType.d.ts +0 -26
  58. package/dist/models/CouponType.js +0 -52
  59. package/dist/models/CreateCouponRequest.d.ts +0 -126
  60. package/dist/models/CreateCouponRequest.js +0 -107
  61. package/dist/models/CreateCouponRequestCouponablesInner.d.ts +0 -48
  62. package/dist/models/CreateCouponRequestCouponablesInner.js +0 -61
  63. package/dist/models/PaginatedCouponListResourceResponse.d.ts +0 -40
  64. package/dist/models/PaginatedCouponListResourceResponse.js +0 -57
  65. package/dist/models/PaginatedCouponResourceResponse.d.ts +0 -40
  66. package/dist/models/PaginatedCouponResourceResponse.js +0 -57
  67. package/dist/models/SearchAllCouponsRequest.d.ts +0 -101
  68. package/dist/models/SearchAllCouponsRequest.js +0 -85
  69. package/dist/models/SearchCouponsRequest.d.ts +0 -137
  70. package/dist/models/SearchCouponsRequest.js +0 -97
  71. package/dist/models/UpdateCouponRequest.d.ts +0 -120
  72. package/dist/models/UpdateCouponRequest.js +0 -103
  73. package/src/apis/CouponsApi.ts +0 -286
  74. package/src/models/CouponListResource.ts +0 -170
  75. package/src/models/CouponListResourceArrayResponse.ts +0 -73
  76. package/src/models/CouponLiteResource.ts +0 -83
  77. package/src/models/CouponLiteResourceArrayResponse.ts +0 -73
  78. package/src/models/CouponResource.ts +0 -288
  79. package/src/models/CouponResourceArrayResponse.ts +0 -73
  80. package/src/models/CouponType.ts +0 -54
  81. package/src/models/CreateCouponRequest.ts +0 -207
  82. package/src/models/CreateCouponRequestCouponablesInner.ts +0 -86
  83. package/src/models/PaginatedCouponListResourceResponse.ts +0 -90
  84. package/src/models/PaginatedCouponResourceResponse.ts +0 -90
  85. package/src/models/SearchAllCouponsRequest.ts +0 -154
  86. package/src/models/SearchCouponsRequest.ts +0 -202
  87. package/src/models/UpdateCouponRequest.ts +0 -198
@@ -1,86 +0,0 @@
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 {string}
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
-
@@ -1,90 +0,0 @@
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
-
@@ -1,90 +0,0 @@
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
-
@@ -1,154 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * My API
5
- * API documentation for my Laravel app
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
- import { mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface SearchAllCouponsRequest
20
- */
21
- export interface SearchAllCouponsRequest {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof SearchAllCouponsRequest
26
- */
27
- search?: string | null;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof SearchAllCouponsRequest
32
- */
33
- sortBy?: SearchAllCouponsRequestSortByEnum;
34
- /**
35
- *
36
- * @type {string}
37
- * @memberof SearchAllCouponsRequest
38
- */
39
- sortDirection?: SearchAllCouponsRequestSortDirectionEnum;
40
- /**
41
- *
42
- * @type {number}
43
- * @memberof SearchAllCouponsRequest
44
- */
45
- relatedId?: number;
46
- /**
47
- *
48
- * @type {string}
49
- * @memberof SearchAllCouponsRequest
50
- */
51
- relatedType?: string;
52
- /**
53
- *
54
- * @type {boolean}
55
- * @memberof SearchAllCouponsRequest
56
- */
57
- includesRelations?: boolean;
58
- /**
59
- *
60
- * @type {Array<string>}
61
- * @memberof SearchAllCouponsRequest
62
- */
63
- type?: Array<string>;
64
- /**
65
- *
66
- * @type {Array<string>}
67
- * @memberof SearchAllCouponsRequest
68
- */
69
- siteId?: Array<string>;
70
- /**
71
- *
72
- * @type {Array<string>}
73
- * @memberof SearchAllCouponsRequest
74
- */
75
- isAbandonedCart?: Array<string>;
76
- }
77
-
78
-
79
- /**
80
- * @export
81
- */
82
- export const SearchAllCouponsRequestSortByEnum = {
83
- Id: 'id',
84
- Name: 'name',
85
- Code: 'code',
86
- Type: 'type',
87
- StartDate: 'start_date',
88
- EndDate: 'end_date',
89
- CreatedAt: 'created_at'
90
- } as const;
91
- export type SearchAllCouponsRequestSortByEnum = typeof SearchAllCouponsRequestSortByEnum[keyof typeof SearchAllCouponsRequestSortByEnum];
92
-
93
- /**
94
- * @export
95
- */
96
- export const SearchAllCouponsRequestSortDirectionEnum = {
97
- Asc: 'asc',
98
- Desc: 'desc'
99
- } as const;
100
- export type SearchAllCouponsRequestSortDirectionEnum = typeof SearchAllCouponsRequestSortDirectionEnum[keyof typeof SearchAllCouponsRequestSortDirectionEnum];
101
-
102
-
103
- /**
104
- * Check if a given object implements the SearchAllCouponsRequest interface.
105
- */
106
- export function instanceOfSearchAllCouponsRequest(value: object): value is SearchAllCouponsRequest {
107
- return true;
108
- }
109
-
110
- export function SearchAllCouponsRequestFromJSON(json: any): SearchAllCouponsRequest {
111
- return SearchAllCouponsRequestFromJSONTyped(json, false);
112
- }
113
-
114
- export function SearchAllCouponsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchAllCouponsRequest {
115
- if (json == null) {
116
- return json;
117
- }
118
- return {
119
-
120
- 'search': json['search'] == null ? undefined : json['search'],
121
- 'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
122
- 'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
123
- 'relatedId': json['related_id'] == null ? undefined : json['related_id'],
124
- 'relatedType': json['related_type'] == null ? undefined : json['related_type'],
125
- 'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
126
- 'type': json['type'] == null ? undefined : json['type'],
127
- 'siteId': json['site_id'] == null ? undefined : json['site_id'],
128
- 'isAbandonedCart': json['is_abandoned_cart'] == null ? undefined : json['is_abandoned_cart'],
129
- };
130
- }
131
-
132
- export function SearchAllCouponsRequestToJSON(json: any): SearchAllCouponsRequest {
133
- return SearchAllCouponsRequestToJSONTyped(json, false);
134
- }
135
-
136
- export function SearchAllCouponsRequestToJSONTyped(value?: SearchAllCouponsRequest | null, ignoreDiscriminator: boolean = false): any {
137
- if (value == null) {
138
- return value;
139
- }
140
-
141
- return {
142
-
143
- 'search': value['search'],
144
- 'sortBy': value['sortBy'],
145
- 'sortDirection': value['sortDirection'],
146
- 'related_id': value['relatedId'],
147
- 'related_type': value['relatedType'],
148
- 'includes_relations': value['includesRelations'],
149
- 'type': value['type'],
150
- 'site_id': value['siteId'],
151
- 'is_abandoned_cart': value['isAbandonedCart'],
152
- };
153
- }
154
-
@@ -1,202 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * My API
5
- * API documentation for my Laravel app
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
- import { mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface SearchCouponsRequest
20
- */
21
- export interface SearchCouponsRequest {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof SearchCouponsRequest
26
- */
27
- search?: string | null;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof SearchCouponsRequest
32
- */
33
- sortBy?: SearchCouponsRequestSortByEnum;
34
- /**
35
- *
36
- * @type {string}
37
- * @memberof SearchCouponsRequest
38
- */
39
- sortDirection?: SearchCouponsRequestSortDirectionEnum;
40
- /**
41
- *
42
- * @type {number}
43
- * @memberof SearchCouponsRequest
44
- */
45
- perPage?: number;
46
- /**
47
- *
48
- * @type {number}
49
- * @memberof SearchCouponsRequest
50
- */
51
- page?: number;
52
- /**
53
- *
54
- * @type {Array<string>}
55
- * @memberof SearchCouponsRequest
56
- */
57
- type?: Array<string>;
58
- /**
59
- *
60
- * @type {Array<string>}
61
- * @memberof SearchCouponsRequest
62
- */
63
- siteId?: Array<string>;
64
- /**
65
- *
66
- * @type {Array<string>}
67
- * @memberof SearchCouponsRequest
68
- */
69
- isAbandonedCart?: Array<string>;
70
- /**
71
- *
72
- * @type {Date}
73
- * @memberof SearchCouponsRequest
74
- */
75
- beforeStartDate?: Date;
76
- /**
77
- *
78
- * @type {Date}
79
- * @memberof SearchCouponsRequest
80
- */
81
- afterStartDate?: Date;
82
- /**
83
- *
84
- * @type {Date}
85
- * @memberof SearchCouponsRequest
86
- */
87
- beforeEndDate?: Date;
88
- /**
89
- *
90
- * @type {Date}
91
- * @memberof SearchCouponsRequest
92
- */
93
- afterEndDate?: Date;
94
- /**
95
- *
96
- * @type {number}
97
- * @memberof SearchCouponsRequest
98
- */
99
- relatedId?: number;
100
- /**
101
- *
102
- * @type {string}
103
- * @memberof SearchCouponsRequest
104
- */
105
- relatedType?: string;
106
- /**
107
- *
108
- * @type {boolean}
109
- * @memberof SearchCouponsRequest
110
- */
111
- includesRelations?: boolean;
112
- }
113
-
114
-
115
- /**
116
- * @export
117
- */
118
- export const SearchCouponsRequestSortByEnum = {
119
- Id: 'id',
120
- Name: 'name',
121
- Code: 'code',
122
- Type: 'type',
123
- StartDate: 'start_date',
124
- EndDate: 'end_date',
125
- CreatedAt: 'created_at'
126
- } as const;
127
- export type SearchCouponsRequestSortByEnum = typeof SearchCouponsRequestSortByEnum[keyof typeof SearchCouponsRequestSortByEnum];
128
-
129
- /**
130
- * @export
131
- */
132
- export const SearchCouponsRequestSortDirectionEnum = {
133
- Asc: 'asc',
134
- Desc: 'desc'
135
- } as const;
136
- export type SearchCouponsRequestSortDirectionEnum = typeof SearchCouponsRequestSortDirectionEnum[keyof typeof SearchCouponsRequestSortDirectionEnum];
137
-
138
-
139
- /**
140
- * Check if a given object implements the SearchCouponsRequest interface.
141
- */
142
- export function instanceOfSearchCouponsRequest(value: object): value is SearchCouponsRequest {
143
- return true;
144
- }
145
-
146
- export function SearchCouponsRequestFromJSON(json: any): SearchCouponsRequest {
147
- return SearchCouponsRequestFromJSONTyped(json, false);
148
- }
149
-
150
- export function SearchCouponsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchCouponsRequest {
151
- if (json == null) {
152
- return json;
153
- }
154
- return {
155
-
156
- 'search': json['search'] == null ? undefined : json['search'],
157
- 'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
158
- 'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
159
- 'perPage': json['per_page'] == null ? undefined : json['per_page'],
160
- 'page': json['page'] == null ? undefined : json['page'],
161
- 'type': json['type'] == null ? undefined : json['type'],
162
- 'siteId': json['site_id'] == null ? undefined : json['site_id'],
163
- 'isAbandonedCart': json['is_abandoned_cart'] == null ? undefined : json['is_abandoned_cart'],
164
- 'beforeStartDate': json['before_start_date'] == null ? undefined : (new Date(json['before_start_date'])),
165
- 'afterStartDate': json['after_start_date'] == null ? undefined : (new Date(json['after_start_date'])),
166
- 'beforeEndDate': json['before_end_date'] == null ? undefined : (new Date(json['before_end_date'])),
167
- 'afterEndDate': json['after_end_date'] == null ? undefined : (new Date(json['after_end_date'])),
168
- 'relatedId': json['related_id'] == null ? undefined : json['related_id'],
169
- 'relatedType': json['related_type'] == null ? undefined : json['related_type'],
170
- 'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
171
- };
172
- }
173
-
174
- export function SearchCouponsRequestToJSON(json: any): SearchCouponsRequest {
175
- return SearchCouponsRequestToJSONTyped(json, false);
176
- }
177
-
178
- export function SearchCouponsRequestToJSONTyped(value?: SearchCouponsRequest | null, ignoreDiscriminator: boolean = false): any {
179
- if (value == null) {
180
- return value;
181
- }
182
-
183
- return {
184
-
185
- 'search': value['search'],
186
- 'sortBy': value['sortBy'],
187
- 'sortDirection': value['sortDirection'],
188
- 'per_page': value['perPage'],
189
- 'page': value['page'],
190
- 'type': value['type'],
191
- 'site_id': value['siteId'],
192
- 'is_abandoned_cart': value['isAbandonedCart'],
193
- 'before_start_date': value['beforeStartDate'] == null ? undefined : ((value['beforeStartDate']).toISOString()),
194
- 'after_start_date': value['afterStartDate'] == null ? undefined : ((value['afterStartDate']).toISOString()),
195
- 'before_end_date': value['beforeEndDate'] == null ? undefined : ((value['beforeEndDate']).toISOString()),
196
- 'after_end_date': value['afterEndDate'] == null ? undefined : ((value['afterEndDate']).toISOString()),
197
- 'related_id': value['relatedId'],
198
- 'related_type': value['relatedType'],
199
- 'includes_relations': value['includesRelations'],
200
- };
201
- }
202
-