@digital8/lighting-illusions-ts-sdk 0.0.2500 → 0.0.2501

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 (120) hide show
  1. package/.openapi-generator/FILES +15 -9
  2. package/README.md +2 -2
  3. package/dist/apis/CouponsApi.d.ts +85 -0
  4. package/dist/apis/CouponsApi.js +355 -0
  5. package/dist/apis/index.d.ts +1 -1
  6. package/dist/apis/index.js +1 -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 +30 -0
  10. package/dist/models/AppliedCouponResource.js +20 -0
  11. package/dist/models/CouponListResource.d.ts +99 -0
  12. package/dist/models/CouponListResource.js +91 -0
  13. package/dist/models/CouponListResourceArrayResponse.d.ts +33 -0
  14. package/dist/models/CouponListResourceArrayResponse.js +50 -0
  15. package/dist/models/CouponLiteResource.d.ts +44 -0
  16. package/dist/models/CouponLiteResource.js +57 -0
  17. package/dist/models/CouponLiteResourceArrayResponse.d.ts +33 -0
  18. package/dist/models/CouponLiteResourceArrayResponse.js +50 -0
  19. package/dist/models/CouponResource.d.ts +163 -0
  20. package/dist/models/CouponResource.js +135 -0
  21. package/dist/models/CouponResourceArrayResponse.d.ts +33 -0
  22. package/dist/models/CouponResourceArrayResponse.js +50 -0
  23. package/dist/models/CouponType.d.ts +26 -0
  24. package/dist/models/CouponType.js +52 -0
  25. package/dist/models/CreateCouponRequest.d.ts +126 -0
  26. package/dist/models/CreateCouponRequest.js +107 -0
  27. package/dist/models/CreateCouponRequestCouponablesInner.d.ts +48 -0
  28. package/dist/models/CreateCouponRequestCouponablesInner.js +61 -0
  29. package/dist/models/FrontendCartResource.d.ts +6 -0
  30. package/dist/models/FrontendCartResource.js +2 -0
  31. package/dist/models/FrontendOrderResource.d.ts +0 -7
  32. package/dist/models/FrontendOrderResource.js +0 -5
  33. package/dist/models/OrderFulfillmentResource.d.ts +2 -2
  34. package/dist/models/OrderFulfillmentResource.js +6 -2
  35. package/dist/models/PaginatedCouponListResourceResponse.d.ts +40 -0
  36. package/dist/models/PaginatedCouponListResourceResponse.js +57 -0
  37. package/dist/models/PaginatedCouponResourceResponse.d.ts +40 -0
  38. package/dist/models/PaginatedCouponResourceResponse.js +57 -0
  39. package/dist/models/ProductCategoryLiteResource.d.ts +6 -0
  40. package/dist/models/ProductCategoryLiteResource.js +4 -0
  41. package/dist/models/ProductChildListResource.d.ts +6 -0
  42. package/dist/models/ProductChildListResource.js +4 -0
  43. package/dist/models/SearchAllCouponsRequest.d.ts +101 -0
  44. package/dist/models/SearchAllCouponsRequest.js +85 -0
  45. package/dist/models/SearchCartsRequest.d.ts +6 -0
  46. package/dist/models/SearchCartsRequest.js +2 -0
  47. package/dist/models/SearchCouponsRequest.d.ts +137 -0
  48. package/dist/models/SearchCouponsRequest.js +97 -0
  49. package/dist/models/SearchOrdersRequest.d.ts +6 -0
  50. package/dist/models/SearchOrdersRequest.js +2 -0
  51. package/dist/models/StoreFrontendResource.d.ts +1 -1
  52. package/dist/models/StoreFrontendResource.js +3 -1
  53. package/dist/models/StoreListResource.d.ts +2 -2
  54. package/dist/models/StoreListResource.js +4 -4
  55. package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
  56. package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
  57. package/dist/models/StoreSpecialDateResource.d.ts +2 -2
  58. package/dist/models/StoreSpecialDateResource.js +1 -3
  59. package/dist/models/UpdateCouponRequest.d.ts +120 -0
  60. package/dist/models/UpdateCouponRequest.js +103 -0
  61. package/dist/models/index.d.ts +14 -8
  62. package/dist/models/index.js +14 -8
  63. package/package.json +1 -1
  64. package/src/apis/CouponsApi.ts +286 -0
  65. package/src/apis/index.ts +1 -1
  66. package/src/models/AddressResource.ts +2 -3
  67. package/src/models/AppliedCouponResource.ts +45 -0
  68. package/src/models/CouponListResource.ts +170 -0
  69. package/src/models/CouponListResourceArrayResponse.ts +73 -0
  70. package/src/models/CouponLiteResource.ts +83 -0
  71. package/src/models/CouponLiteResourceArrayResponse.ts +73 -0
  72. package/src/models/CouponResource.ts +288 -0
  73. package/src/models/CouponResourceArrayResponse.ts +73 -0
  74. package/src/models/CouponType.ts +54 -0
  75. package/src/models/CreateCouponRequest.ts +207 -0
  76. package/src/models/CreateCouponRequestCouponablesInner.ts +86 -0
  77. package/src/models/FrontendCartResource.ts +8 -0
  78. package/src/models/FrontendOrderResource.ts +0 -16
  79. package/src/models/OrderFulfillmentResource.ts +6 -4
  80. package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
  81. package/src/models/PaginatedCouponResourceResponse.ts +90 -0
  82. package/src/models/ProductCategoryLiteResource.ts +9 -0
  83. package/src/models/ProductChildListResource.ts +9 -0
  84. package/src/models/SearchAllCouponsRequest.ts +154 -0
  85. package/src/models/SearchCartsRequest.ts +8 -0
  86. package/src/models/SearchCouponsRequest.ts +202 -0
  87. package/src/models/SearchOrdersRequest.ts +8 -0
  88. package/src/models/StoreFrontendResource.ts +3 -2
  89. package/src/models/StoreListResource.ts +5 -5
  90. package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
  91. package/src/models/StoreSpecialDateResource.ts +3 -4
  92. package/src/models/UpdateCouponRequest.ts +198 -0
  93. package/src/models/index.ts +14 -8
  94. package/dist/apis/AuspostApi.d.ts +0 -29
  95. package/dist/apis/AuspostApi.js +0 -125
  96. package/dist/models/FrontendOrderFulfillmentResource.d.ts +0 -62
  97. package/dist/models/FrontendOrderFulfillmentResource.js +0 -71
  98. package/dist/models/FrontendOrderFulfillmentResourceArrayResponse.d.ts +0 -33
  99. package/dist/models/FrontendOrderFulfillmentResourceArrayResponse.js +0 -50
  100. package/dist/models/FrontendOrderListResource.d.ts +0 -70
  101. package/dist/models/FrontendOrderListResource.js +0 -77
  102. package/dist/models/FrontendOrderListResourceArrayResponse.d.ts +0 -33
  103. package/dist/models/FrontendOrderListResourceArrayResponse.js +0 -50
  104. package/dist/models/PaginatedFrontendOrderListResourceResponse.d.ts +0 -40
  105. package/dist/models/PaginatedFrontendOrderListResourceResponse.js +0 -57
  106. package/dist/models/SuburbValidationResource.d.ts +0 -32
  107. package/dist/models/SuburbValidationResource.js +0 -51
  108. package/dist/models/SuburbValidationResourceArrayResponse.d.ts +0 -33
  109. package/dist/models/SuburbValidationResourceArrayResponse.js +0 -50
  110. package/dist/models/ValidateSuburbRequest.d.ts +0 -50
  111. package/dist/models/ValidateSuburbRequest.js +0 -63
  112. package/src/apis/AuspostApi.ts +0 -69
  113. package/src/models/FrontendOrderFulfillmentResource.ts +0 -111
  114. package/src/models/FrontendOrderFulfillmentResourceArrayResponse.ts +0 -73
  115. package/src/models/FrontendOrderListResource.ts +0 -135
  116. package/src/models/FrontendOrderListResourceArrayResponse.ts +0 -73
  117. package/src/models/PaginatedFrontendOrderListResourceResponse.ts +0 -90
  118. package/src/models/SuburbValidationResource.ts +0 -66
  119. package/src/models/SuburbValidationResourceArrayResponse.ts +0 -73
  120. package/src/models/ValidateSuburbRequest.ts +0 -93
@@ -0,0 +1,135 @@
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.instanceOfCouponResource = instanceOfCouponResource;
17
+ exports.CouponResourceFromJSON = CouponResourceFromJSON;
18
+ exports.CouponResourceFromJSONTyped = CouponResourceFromJSONTyped;
19
+ exports.CouponResourceToJSON = CouponResourceToJSON;
20
+ exports.CouponResourceToJSONTyped = CouponResourceToJSONTyped;
21
+ var ProductCategoryListResource_1 = require("./ProductCategoryListResource");
22
+ var SiteLiteResource_1 = require("./SiteLiteResource");
23
+ var SupplierListResource_1 = require("./SupplierListResource");
24
+ var ProductChildLiteResource_1 = require("./ProductChildLiteResource");
25
+ var CustomerListResource_1 = require("./CustomerListResource");
26
+ /**
27
+ * Check if a given object implements the CouponResource interface.
28
+ */
29
+ function instanceOfCouponResource(value) {
30
+ if (!('name' in value) || value['name'] === undefined)
31
+ return false;
32
+ if (!('code' in value) || value['code'] === undefined)
33
+ return false;
34
+ if (!('type' in value) || value['type'] === undefined)
35
+ return false;
36
+ if (!('discountType' in value) || value['discountType'] === undefined)
37
+ return false;
38
+ if (!('discountAmount' in value) || value['discountAmount'] === undefined)
39
+ return false;
40
+ if (!('minAmount' in value) || value['minAmount'] === undefined)
41
+ return false;
42
+ if (!('minProducts' in value) || value['minProducts'] === undefined)
43
+ return false;
44
+ if (!('totalUseLimit' in value) || value['totalUseLimit'] === undefined)
45
+ return false;
46
+ if (!('customerUseLimit' in value) || value['customerUseLimit'] === undefined)
47
+ return false;
48
+ if (!('isAbandonedCart' in value) || value['isAbandonedCart'] === undefined)
49
+ return false;
50
+ if (!('isForAllProducts' in value) || value['isForAllProducts'] === undefined)
51
+ return false;
52
+ if (!('isForAllCustomers' in value) || value['isForAllCustomers'] === undefined)
53
+ return false;
54
+ if (!('site' in value) || value['site'] === undefined)
55
+ return false;
56
+ if (!('productChildren' in value) || value['productChildren'] === undefined)
57
+ return false;
58
+ if (!('categories' in value) || value['categories'] === undefined)
59
+ return false;
60
+ if (!('suppliers' in value) || value['suppliers'] === undefined)
61
+ return false;
62
+ if (!('customers' in value) || value['customers'] === undefined)
63
+ return false;
64
+ if (!('ordersCount' in value) || value['ordersCount'] === undefined)
65
+ return false;
66
+ if (!('cartsCount' in value) || value['cartsCount'] === undefined)
67
+ return false;
68
+ return true;
69
+ }
70
+ function CouponResourceFromJSON(json) {
71
+ return CouponResourceFromJSONTyped(json, false);
72
+ }
73
+ function CouponResourceFromJSONTyped(json, ignoreDiscriminator) {
74
+ if (json == null) {
75
+ return json;
76
+ }
77
+ return {
78
+ 'id': json['id'] == null ? undefined : json['id'],
79
+ 'name': json['name'],
80
+ 'code': json['code'],
81
+ 'type': json['type'],
82
+ 'discountType': json['discountType'],
83
+ 'discountAmount': json['discountAmount'],
84
+ 'minAmount': json['minAmount'],
85
+ 'minProducts': json['minProducts'],
86
+ 'totalUseLimit': json['totalUseLimit'],
87
+ 'customerUseLimit': json['customerUseLimit'],
88
+ 'isAbandonedCart': json['isAbandonedCart'],
89
+ 'isForAllProducts': json['isForAllProducts'],
90
+ 'isForAllCustomers': json['isForAllCustomers'],
91
+ 'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
92
+ 'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
93
+ 'site': (0, SiteLiteResource_1.SiteLiteResourceFromJSON)(json['site']),
94
+ 'productChildren': (json['productChildren'] == null ? null : json['productChildren'].map(ProductChildLiteResource_1.ProductChildLiteResourceFromJSON)),
95
+ 'categories': (json['categories'] == null ? null : json['categories'].map(ProductCategoryListResource_1.ProductCategoryListResourceFromJSON)),
96
+ 'suppliers': (json['suppliers'] == null ? null : json['suppliers'].map(SupplierListResource_1.SupplierListResourceFromJSON)),
97
+ 'customers': (json['customers'] == null ? null : json['customers'].map(CustomerListResource_1.CustomerListResourceFromJSON)),
98
+ 'ordersCount': json['ordersCount'],
99
+ 'cartsCount': json['cartsCount'],
100
+ };
101
+ }
102
+ function CouponResourceToJSON(json) {
103
+ return CouponResourceToJSONTyped(json, false);
104
+ }
105
+ function CouponResourceToJSONTyped(value, ignoreDiscriminator) {
106
+ var _a, _b;
107
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
108
+ if (value == null) {
109
+ return value;
110
+ }
111
+ return {
112
+ 'id': value['id'],
113
+ 'name': value['name'],
114
+ 'code': value['code'],
115
+ 'type': value['type'],
116
+ 'discountType': value['discountType'],
117
+ 'discountAmount': value['discountAmount'],
118
+ 'minAmount': value['minAmount'],
119
+ 'minProducts': value['minProducts'],
120
+ 'totalUseLimit': value['totalUseLimit'],
121
+ 'customerUseLimit': value['customerUseLimit'],
122
+ 'isAbandonedCart': value['isAbandonedCart'],
123
+ 'isForAllProducts': value['isForAllProducts'],
124
+ 'isForAllCustomers': value['isForAllCustomers'],
125
+ 'startDate': value['startDate'] === null ? null : ((_a = value['startDate']) === null || _a === void 0 ? void 0 : _a.toISOString()),
126
+ 'endDate': value['endDate'] === null ? null : ((_b = value['endDate']) === null || _b === void 0 ? void 0 : _b.toISOString()),
127
+ 'site': (0, SiteLiteResource_1.SiteLiteResourceToJSON)(value['site']),
128
+ 'productChildren': (value['productChildren'] == null ? null : value['productChildren'].map(ProductChildLiteResource_1.ProductChildLiteResourceToJSON)),
129
+ 'categories': (value['categories'] == null ? null : value['categories'].map(ProductCategoryListResource_1.ProductCategoryListResourceToJSON)),
130
+ 'suppliers': (value['suppliers'] == null ? null : value['suppliers'].map(SupplierListResource_1.SupplierListResourceToJSON)),
131
+ 'customers': (value['customers'] == null ? null : value['customers'].map(CustomerListResource_1.CustomerListResourceToJSON)),
132
+ 'ordersCount': value['ordersCount'],
133
+ 'cartsCount': value['cartsCount'],
134
+ };
135
+ }
@@ -0,0 +1,33 @@
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 { CouponResource } from './CouponResource';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CouponResourceArrayResponse
17
+ */
18
+ export interface CouponResourceArrayResponse {
19
+ /**
20
+ *
21
+ * @type {Array<CouponResource>}
22
+ * @memberof CouponResourceArrayResponse
23
+ */
24
+ data?: Array<CouponResource>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the CouponResourceArrayResponse interface.
28
+ */
29
+ export declare function instanceOfCouponResourceArrayResponse(value: object): value is CouponResourceArrayResponse;
30
+ export declare function CouponResourceArrayResponseFromJSON(json: any): CouponResourceArrayResponse;
31
+ export declare function CouponResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponResourceArrayResponse;
32
+ export declare function CouponResourceArrayResponseToJSON(json: any): CouponResourceArrayResponse;
33
+ export declare function CouponResourceArrayResponseToJSONTyped(value?: CouponResourceArrayResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfCouponResourceArrayResponse = instanceOfCouponResourceArrayResponse;
17
+ exports.CouponResourceArrayResponseFromJSON = CouponResourceArrayResponseFromJSON;
18
+ exports.CouponResourceArrayResponseFromJSONTyped = CouponResourceArrayResponseFromJSONTyped;
19
+ exports.CouponResourceArrayResponseToJSON = CouponResourceArrayResponseToJSON;
20
+ exports.CouponResourceArrayResponseToJSONTyped = CouponResourceArrayResponseToJSONTyped;
21
+ var CouponResource_1 = require("./CouponResource");
22
+ /**
23
+ * Check if a given object implements the CouponResourceArrayResponse interface.
24
+ */
25
+ function instanceOfCouponResourceArrayResponse(value) {
26
+ return true;
27
+ }
28
+ function CouponResourceArrayResponseFromJSON(json) {
29
+ return CouponResourceArrayResponseFromJSONTyped(json, false);
30
+ }
31
+ function CouponResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'data': json['data'] == null ? undefined : (json['data'].map(CouponResource_1.CouponResourceFromJSON)),
37
+ };
38
+ }
39
+ function CouponResourceArrayResponseToJSON(json) {
40
+ return CouponResourceArrayResponseToJSONTyped(json, false);
41
+ }
42
+ function CouponResourceArrayResponseToJSONTyped(value, ignoreDiscriminator) {
43
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'data': value['data'] == null ? undefined : (value['data'].map(CouponResource_1.CouponResourceToJSON)),
49
+ };
50
+ }
@@ -0,0 +1,26 @@
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
+ /**
13
+ *
14
+ * @export
15
+ */
16
+ export declare const CouponType: {
17
+ readonly Subtotal: "subtotal";
18
+ readonly Product: "product";
19
+ readonly Shipping: "shipping";
20
+ };
21
+ export type CouponType = typeof CouponType[keyof typeof CouponType];
22
+ export declare function instanceOfCouponType(value: any): boolean;
23
+ export declare function CouponTypeFromJSON(json: any): CouponType;
24
+ export declare function CouponTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponType;
25
+ export declare function CouponTypeToJSON(value?: CouponType | null): any;
26
+ export declare function CouponTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CouponType;
@@ -0,0 +1,52 @@
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.CouponType = void 0;
17
+ exports.instanceOfCouponType = instanceOfCouponType;
18
+ exports.CouponTypeFromJSON = CouponTypeFromJSON;
19
+ exports.CouponTypeFromJSONTyped = CouponTypeFromJSONTyped;
20
+ exports.CouponTypeToJSON = CouponTypeToJSON;
21
+ exports.CouponTypeToJSONTyped = CouponTypeToJSONTyped;
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.CouponType = {
27
+ Subtotal: 'subtotal',
28
+ Product: 'product',
29
+ Shipping: 'shipping'
30
+ };
31
+ function instanceOfCouponType(value) {
32
+ for (var key in exports.CouponType) {
33
+ if (Object.prototype.hasOwnProperty.call(exports.CouponType, key)) {
34
+ if (exports.CouponType[key] === value) {
35
+ return true;
36
+ }
37
+ }
38
+ }
39
+ return false;
40
+ }
41
+ function CouponTypeFromJSON(json) {
42
+ return CouponTypeFromJSONTyped(json, false);
43
+ }
44
+ function CouponTypeFromJSONTyped(json, ignoreDiscriminator) {
45
+ return json;
46
+ }
47
+ function CouponTypeToJSON(value) {
48
+ return value;
49
+ }
50
+ function CouponTypeToJSONTyped(value, ignoreDiscriminator) {
51
+ return value;
52
+ }
@@ -0,0 +1,126 @@
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 CreateCouponRequest
17
+ */
18
+ export interface CreateCouponRequest {
19
+ /**
20
+ *
21
+ * @type {number}
22
+ * @memberof CreateCouponRequest
23
+ */
24
+ siteId: number;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof CreateCouponRequest
29
+ */
30
+ name: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof CreateCouponRequest
35
+ */
36
+ code: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof CreateCouponRequest
41
+ */
42
+ type: CreateCouponRequestTypeEnum;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof CreateCouponRequest
47
+ */
48
+ discountType: string;
49
+ /**
50
+ *
51
+ * @type {number}
52
+ * @memberof CreateCouponRequest
53
+ */
54
+ discountAmount: number;
55
+ /**
56
+ *
57
+ * @type {number}
58
+ * @memberof CreateCouponRequest
59
+ */
60
+ minAmount: number;
61
+ /**
62
+ *
63
+ * @type {number}
64
+ * @memberof CreateCouponRequest
65
+ */
66
+ minProducts: number;
67
+ /**
68
+ *
69
+ * @type {number}
70
+ * @memberof CreateCouponRequest
71
+ */
72
+ totalUseLimit: number;
73
+ /**
74
+ *
75
+ * @type {number}
76
+ * @memberof CreateCouponRequest
77
+ */
78
+ customerUseLimit: number;
79
+ /**
80
+ *
81
+ * @type {string}
82
+ * @memberof CreateCouponRequest
83
+ */
84
+ startDate?: string | null;
85
+ /**
86
+ *
87
+ * @type {string}
88
+ * @memberof CreateCouponRequest
89
+ */
90
+ endDate?: string | null;
91
+ /**
92
+ *
93
+ * @type {boolean}
94
+ * @memberof CreateCouponRequest
95
+ */
96
+ isForAllProducts?: boolean;
97
+ /**
98
+ *
99
+ * @type {boolean}
100
+ * @memberof CreateCouponRequest
101
+ */
102
+ isForAllCustomers?: boolean;
103
+ /**
104
+ *
105
+ * @type {Array<CreateCouponRequestCouponablesInner>}
106
+ * @memberof CreateCouponRequest
107
+ */
108
+ couponables?: Array<CreateCouponRequestCouponablesInner>;
109
+ }
110
+ /**
111
+ * @export
112
+ */
113
+ export declare const CreateCouponRequestTypeEnum: {
114
+ readonly Subtotal: "subtotal";
115
+ readonly Product: "product";
116
+ readonly Shipping: "shipping";
117
+ };
118
+ export type CreateCouponRequestTypeEnum = typeof CreateCouponRequestTypeEnum[keyof typeof CreateCouponRequestTypeEnum];
119
+ /**
120
+ * Check if a given object implements the CreateCouponRequest interface.
121
+ */
122
+ export declare function instanceOfCreateCouponRequest(value: object): value is CreateCouponRequest;
123
+ export declare function CreateCouponRequestFromJSON(json: any): CreateCouponRequest;
124
+ export declare function CreateCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCouponRequest;
125
+ export declare function CreateCouponRequestToJSON(json: any): CreateCouponRequest;
126
+ export declare function CreateCouponRequestToJSONTyped(value?: CreateCouponRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,107 @@
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.CreateCouponRequestTypeEnum = void 0;
17
+ exports.instanceOfCreateCouponRequest = instanceOfCreateCouponRequest;
18
+ exports.CreateCouponRequestFromJSON = CreateCouponRequestFromJSON;
19
+ exports.CreateCouponRequestFromJSONTyped = CreateCouponRequestFromJSONTyped;
20
+ exports.CreateCouponRequestToJSON = CreateCouponRequestToJSON;
21
+ exports.CreateCouponRequestToJSONTyped = CreateCouponRequestToJSONTyped;
22
+ var CreateCouponRequestCouponablesInner_1 = require("./CreateCouponRequestCouponablesInner");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.CreateCouponRequestTypeEnum = {
27
+ Subtotal: 'subtotal',
28
+ Product: 'product',
29
+ Shipping: 'shipping'
30
+ };
31
+ /**
32
+ * Check if a given object implements the CreateCouponRequest interface.
33
+ */
34
+ function instanceOfCreateCouponRequest(value) {
35
+ if (!('siteId' in value) || value['siteId'] === undefined)
36
+ return false;
37
+ if (!('name' in value) || value['name'] === undefined)
38
+ return false;
39
+ if (!('code' in value) || value['code'] === undefined)
40
+ return false;
41
+ if (!('type' in value) || value['type'] === undefined)
42
+ return false;
43
+ if (!('discountType' in value) || value['discountType'] === undefined)
44
+ return false;
45
+ if (!('discountAmount' in value) || value['discountAmount'] === undefined)
46
+ return false;
47
+ if (!('minAmount' in value) || value['minAmount'] === undefined)
48
+ return false;
49
+ if (!('minProducts' in value) || value['minProducts'] === undefined)
50
+ return false;
51
+ if (!('totalUseLimit' in value) || value['totalUseLimit'] === undefined)
52
+ return false;
53
+ if (!('customerUseLimit' in value) || value['customerUseLimit'] === undefined)
54
+ return false;
55
+ return true;
56
+ }
57
+ function CreateCouponRequestFromJSON(json) {
58
+ return CreateCouponRequestFromJSONTyped(json, false);
59
+ }
60
+ function CreateCouponRequestFromJSONTyped(json, ignoreDiscriminator) {
61
+ if (json == null) {
62
+ return json;
63
+ }
64
+ return {
65
+ 'siteId': json['site_id'],
66
+ 'name': json['name'],
67
+ 'code': json['code'],
68
+ 'type': json['type'],
69
+ 'discountType': json['discount_type'],
70
+ 'discountAmount': json['discount_amount'],
71
+ 'minAmount': json['min_amount'],
72
+ 'minProducts': json['min_products'],
73
+ 'totalUseLimit': json['total_use_limit'],
74
+ 'customerUseLimit': json['customer_use_limit'],
75
+ 'startDate': json['start_date'] == null ? undefined : json['start_date'],
76
+ 'endDate': json['end_date'] == null ? undefined : json['end_date'],
77
+ 'isForAllProducts': json['is_for_all_products'] == null ? undefined : json['is_for_all_products'],
78
+ 'isForAllCustomers': json['is_for_all_customers'] == null ? undefined : json['is_for_all_customers'],
79
+ 'couponables': json['couponables'] == null ? undefined : (json['couponables'].map(CreateCouponRequestCouponablesInner_1.CreateCouponRequestCouponablesInnerFromJSON)),
80
+ };
81
+ }
82
+ function CreateCouponRequestToJSON(json) {
83
+ return CreateCouponRequestToJSONTyped(json, false);
84
+ }
85
+ function CreateCouponRequestToJSONTyped(value, ignoreDiscriminator) {
86
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
87
+ if (value == null) {
88
+ return value;
89
+ }
90
+ return {
91
+ 'site_id': value['siteId'],
92
+ 'name': value['name'],
93
+ 'code': value['code'],
94
+ 'type': value['type'],
95
+ 'discount_type': value['discountType'],
96
+ 'discount_amount': value['discountAmount'],
97
+ 'min_amount': value['minAmount'],
98
+ 'min_products': value['minProducts'],
99
+ 'total_use_limit': value['totalUseLimit'],
100
+ 'customer_use_limit': value['customerUseLimit'],
101
+ 'start_date': value['startDate'],
102
+ 'end_date': value['endDate'],
103
+ 'is_for_all_products': value['isForAllProducts'],
104
+ 'is_for_all_customers': value['isForAllCustomers'],
105
+ 'couponables': value['couponables'] == null ? undefined : (value['couponables'].map(CreateCouponRequestCouponablesInner_1.CreateCouponRequestCouponablesInnerToJSON)),
106
+ };
107
+ }
@@ -0,0 +1,48 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreateCouponRequestCouponablesInner
16
+ */
17
+ export interface CreateCouponRequestCouponablesInner {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof CreateCouponRequestCouponablesInner
22
+ */
23
+ type?: CreateCouponRequestCouponablesInnerTypeEnum;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof CreateCouponRequestCouponablesInner
28
+ */
29
+ id?: number;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const CreateCouponRequestCouponablesInnerTypeEnum: {
35
+ readonly ProductChild: "productChild";
36
+ readonly ProductCategory: "productCategory";
37
+ readonly Supplier: "supplier";
38
+ readonly Customer: "customer";
39
+ };
40
+ export type CreateCouponRequestCouponablesInnerTypeEnum = typeof CreateCouponRequestCouponablesInnerTypeEnum[keyof typeof CreateCouponRequestCouponablesInnerTypeEnum];
41
+ /**
42
+ * Check if a given object implements the CreateCouponRequestCouponablesInner interface.
43
+ */
44
+ export declare function instanceOfCreateCouponRequestCouponablesInner(value: object): value is CreateCouponRequestCouponablesInner;
45
+ export declare function CreateCouponRequestCouponablesInnerFromJSON(json: any): CreateCouponRequestCouponablesInner;
46
+ export declare function CreateCouponRequestCouponablesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCouponRequestCouponablesInner;
47
+ export declare function CreateCouponRequestCouponablesInnerToJSON(json: any): CreateCouponRequestCouponablesInner;
48
+ export declare function CreateCouponRequestCouponablesInnerToJSONTyped(value?: CreateCouponRequestCouponablesInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,61 @@
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.CreateCouponRequestCouponablesInnerTypeEnum = void 0;
17
+ exports.instanceOfCreateCouponRequestCouponablesInner = instanceOfCreateCouponRequestCouponablesInner;
18
+ exports.CreateCouponRequestCouponablesInnerFromJSON = CreateCouponRequestCouponablesInnerFromJSON;
19
+ exports.CreateCouponRequestCouponablesInnerFromJSONTyped = CreateCouponRequestCouponablesInnerFromJSONTyped;
20
+ exports.CreateCouponRequestCouponablesInnerToJSON = CreateCouponRequestCouponablesInnerToJSON;
21
+ exports.CreateCouponRequestCouponablesInnerToJSONTyped = CreateCouponRequestCouponablesInnerToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.CreateCouponRequestCouponablesInnerTypeEnum = {
26
+ ProductChild: 'productChild',
27
+ ProductCategory: 'productCategory',
28
+ Supplier: 'supplier',
29
+ Customer: 'customer'
30
+ };
31
+ /**
32
+ * Check if a given object implements the CreateCouponRequestCouponablesInner interface.
33
+ */
34
+ function instanceOfCreateCouponRequestCouponablesInner(value) {
35
+ return true;
36
+ }
37
+ function CreateCouponRequestCouponablesInnerFromJSON(json) {
38
+ return CreateCouponRequestCouponablesInnerFromJSONTyped(json, false);
39
+ }
40
+ function CreateCouponRequestCouponablesInnerFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'type': json['type'] == null ? undefined : json['type'],
46
+ 'id': json['id'] == null ? undefined : json['id'],
47
+ };
48
+ }
49
+ function CreateCouponRequestCouponablesInnerToJSON(json) {
50
+ return CreateCouponRequestCouponablesInnerToJSONTyped(json, false);
51
+ }
52
+ function CreateCouponRequestCouponablesInnerToJSONTyped(value, ignoreDiscriminator) {
53
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'type': value['type'],
59
+ 'id': value['id'],
60
+ };
61
+ }
@@ -85,6 +85,12 @@ export interface FrontendCartResource {
85
85
  * @memberof FrontendCartResource
86
86
  */
87
87
  coupons: Array<FrontendCartResourceCouponsInner>;
88
+ /**
89
+ *
90
+ * @type {string}
91
+ * @memberof FrontendCartResource
92
+ */
93
+ couponWarning?: string | null;
88
94
  /**
89
95
  *
90
96
  * @type {number}
@@ -85,6 +85,7 @@ function FrontendCartResourceFromJSONTyped(json, ignoreDiscriminator) {
85
85
  'billingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['billingAddress']),
86
86
  'lineItems': (json['lineItems'] == null ? null : json['lineItems'].map(FrontendLineItemResource_1.FrontendLineItemResourceFromJSON)),
87
87
  'coupons': (json['coupons'].map(FrontendCartResourceCouponsInner_1.FrontendCartResourceCouponsInnerFromJSON)),
88
+ 'couponWarning': json['couponWarning'] == null ? undefined : json['couponWarning'],
88
89
  'subtotal': json['subtotal'],
89
90
  'subtotalAfterDiscounts': json['subtotalAfterDiscounts'],
90
91
  'promotionalDiscount': json['promotionalDiscount'],
@@ -118,6 +119,7 @@ function FrontendCartResourceToJSONTyped(value, ignoreDiscriminator) {
118
119
  'billingAddress': (0, AddressResource_1.AddressResourceToJSON)(value['billingAddress']),
119
120
  'lineItems': (value['lineItems'] == null ? null : value['lineItems'].map(FrontendLineItemResource_1.FrontendLineItemResourceToJSON)),
120
121
  'coupons': (value['coupons'].map(FrontendCartResourceCouponsInner_1.FrontendCartResourceCouponsInnerToJSON)),
122
+ 'couponWarning': value['couponWarning'],
121
123
  'subtotal': value['subtotal'],
122
124
  'subtotalAfterDiscounts': value['subtotalAfterDiscounts'],
123
125
  'promotionalDiscount': value['promotionalDiscount'],