@digital8/lighting-illusions-ts-sdk 0.0.2502 → 0.0.2504
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +15 -4
- package/README.md +2 -2
- package/dist/apis/CartsApi.d.ts +11 -0
- package/dist/apis/CartsApi.js +46 -0
- package/dist/apis/CouponsApi.d.ts +85 -0
- package/dist/apis/CouponsApi.js +355 -0
- package/dist/apis/OrdersApi.d.ts +11 -0
- package/dist/apis/OrdersApi.js +46 -0
- package/dist/apis/index.d.ts +1 -1
- package/dist/apis/index.js +1 -1
- package/dist/models/AddressFrontendResource.d.ts +2 -2
- package/dist/models/AddressFrontendResource.js +2 -6
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/AdminOrderResource.d.ts +0 -6
- package/dist/models/AdminOrderResource.js +0 -4
- package/dist/models/AppliedCouponResource.d.ts +30 -0
- package/dist/models/AppliedCouponResource.js +20 -0
- package/dist/models/CartResource.d.ts +6 -0
- package/dist/models/CartResource.js +4 -0
- package/dist/models/CouponListResource.d.ts +99 -0
- package/dist/models/CouponListResource.js +91 -0
- package/dist/models/CouponListResourceArrayResponse.d.ts +33 -0
- package/dist/models/CouponListResourceArrayResponse.js +50 -0
- package/dist/models/CouponLiteResource.d.ts +44 -0
- package/dist/models/CouponLiteResource.js +57 -0
- package/dist/models/CouponLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/CouponLiteResourceArrayResponse.js +50 -0
- package/dist/models/CouponResource.d.ts +163 -0
- package/dist/models/CouponResource.js +135 -0
- package/dist/models/CouponResourceArrayResponse.d.ts +33 -0
- package/dist/models/CouponResourceArrayResponse.js +50 -0
- package/dist/models/CouponType.d.ts +26 -0
- package/dist/models/CouponType.js +52 -0
- package/dist/models/CreateCouponRequest.d.ts +126 -0
- package/dist/models/CreateCouponRequest.js +107 -0
- package/dist/models/CreateCouponRequestCouponablesInner.d.ts +48 -0
- package/dist/models/CreateCouponRequestCouponablesInner.js +61 -0
- package/dist/models/FrontendCartResource.d.ts +6 -0
- package/dist/models/FrontendCartResource.js +2 -0
- package/dist/models/FrontendOrderResource.d.ts +0 -6
- package/dist/models/FrontendOrderResource.js +0 -4
- 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/PaymentTotalsResource.d.ts +0 -6
- package/dist/models/PaymentTotalsResource.js +0 -4
- package/dist/models/ProductCategoryLiteResource.d.ts +6 -0
- package/dist/models/ProductCategoryLiteResource.js +4 -0
- package/dist/models/ProductChildListResource.d.ts +6 -0
- package/dist/models/ProductChildListResource.js +4 -0
- package/dist/models/SearchAllCouponsRequest.d.ts +101 -0
- package/dist/models/SearchAllCouponsRequest.js +85 -0
- package/dist/models/SearchCartsRequest.d.ts +6 -0
- package/dist/models/SearchCartsRequest.js +2 -0
- package/dist/models/SearchCouponsRequest.d.ts +137 -0
- package/dist/models/SearchCouponsRequest.js +97 -0
- package/dist/models/SearchOrdersRequest.d.ts +6 -0
- package/dist/models/SearchOrdersRequest.js +2 -0
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreListResource.d.ts +2 -2
- package/dist/models/StoreListResource.js +2 -6
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/UpdateCouponRequest.d.ts +120 -0
- package/dist/models/UpdateCouponRequest.js +103 -0
- package/dist/models/index.d.ts +14 -3
- package/dist/models/index.js +14 -3
- package/package.json +1 -1
- package/src/apis/CartsApi.ts +41 -0
- package/src/apis/CouponsApi.ts +286 -0
- package/src/apis/OrdersApi.ts +41 -0
- package/src/apis/index.ts +1 -1
- package/src/models/AddressFrontendResource.ts +4 -6
- package/src/models/AddressResource.ts +3 -2
- package/src/models/AdminOrderResource.ts +0 -9
- package/src/models/AppliedCouponResource.ts +45 -0
- package/src/models/CartResource.ts +9 -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 +207 -0
- package/src/models/CreateCouponRequestCouponablesInner.ts +86 -0
- package/src/models/FrontendCartResource.ts +8 -0
- package/src/models/FrontendOrderResource.ts +0 -9
- package/src/models/OrderFulfillmentResource.ts +2 -3
- package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
- package/src/models/PaginatedCouponResourceResponse.ts +90 -0
- package/src/models/PaymentTotalsResource.ts +0 -9
- package/src/models/ProductCategoryLiteResource.ts +9 -0
- package/src/models/ProductChildListResource.ts +9 -0
- package/src/models/SearchAllCouponsRequest.ts +154 -0
- package/src/models/SearchCartsRequest.ts +8 -0
- package/src/models/SearchCouponsRequest.ts +202 -0
- package/src/models/SearchOrdersRequest.ts +8 -0
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreListResource.ts +4 -6
- package/src/models/StoreResource.ts +3 -2
- package/src/models/UpdateCouponRequest.ts +198 -0
- package/src/models/index.ts +14 -3
- package/dist/apis/AuspostApi.d.ts +0 -29
- package/dist/apis/AuspostApi.js +0 -125
- package/dist/models/SuburbValidationResource.d.ts +0 -32
- package/dist/models/SuburbValidationResource.js +0 -51
- package/dist/models/SuburbValidationResourceArrayResponse.d.ts +0 -33
- package/dist/models/SuburbValidationResourceArrayResponse.js +0 -50
- package/dist/models/ValidateSuburbRequest.d.ts +0 -50
- package/dist/models/ValidateSuburbRequest.js +0 -63
- package/src/apis/AuspostApi.ts +0 -69
- package/src/models/SuburbValidationResource.ts +0 -66
- package/src/models/SuburbValidationResourceArrayResponse.ts +0 -73
- package/src/models/ValidateSuburbRequest.ts +0 -93
package/dist/apis/OrdersApi.js
CHANGED
|
@@ -630,6 +630,52 @@ var OrdersApi = /** @class */ (function (_super) {
|
|
|
630
630
|
});
|
|
631
631
|
});
|
|
632
632
|
};
|
|
633
|
+
/**
|
|
634
|
+
* Auto-generated: syncToNetSuiteOrder
|
|
635
|
+
*/
|
|
636
|
+
OrdersApi.prototype.syncToNetSuiteOrderRaw = function (requestParameters, initOverrides) {
|
|
637
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
638
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
639
|
+
return __generator(this, function (_a) {
|
|
640
|
+
switch (_a.label) {
|
|
641
|
+
case 0:
|
|
642
|
+
if (requestParameters['order'] == null) {
|
|
643
|
+
throw new runtime.RequiredError('order', 'Required parameter "order" was null or undefined when calling syncToNetSuiteOrder().');
|
|
644
|
+
}
|
|
645
|
+
queryParameters = {};
|
|
646
|
+
headerParameters = {};
|
|
647
|
+
urlPath = "/admin-api/orders/{order}/sync-netsuite";
|
|
648
|
+
urlPath = urlPath.replace("{".concat("order", "}"), encodeURIComponent(String(requestParameters['order'])));
|
|
649
|
+
return [4 /*yield*/, this.request({
|
|
650
|
+
path: urlPath,
|
|
651
|
+
method: 'POST',
|
|
652
|
+
headers: headerParameters,
|
|
653
|
+
query: queryParameters,
|
|
654
|
+
}, initOverrides)];
|
|
655
|
+
case 1:
|
|
656
|
+
response = _a.sent();
|
|
657
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AdminOrderResourceFromJSON)(jsonValue); })];
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
});
|
|
661
|
+
};
|
|
662
|
+
/**
|
|
663
|
+
* Auto-generated: syncToNetSuiteOrder
|
|
664
|
+
*/
|
|
665
|
+
OrdersApi.prototype.syncToNetSuiteOrder = function (requestParameters, initOverrides) {
|
|
666
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
667
|
+
var response;
|
|
668
|
+
return __generator(this, function (_a) {
|
|
669
|
+
switch (_a.label) {
|
|
670
|
+
case 0: return [4 /*yield*/, this.syncToNetSuiteOrderRaw(requestParameters, initOverrides)];
|
|
671
|
+
case 1:
|
|
672
|
+
response = _a.sent();
|
|
673
|
+
return [4 /*yield*/, response.value()];
|
|
674
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
});
|
|
678
|
+
};
|
|
633
679
|
/**
|
|
634
680
|
* Auto-generated: updateItemOrder
|
|
635
681
|
*/
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from './AdminApi';
|
|
2
2
|
export * from './AssetApi';
|
|
3
3
|
export * from './AttributeApi';
|
|
4
|
-
export * from './AuspostApi';
|
|
5
4
|
export * from './BlogCategoryApi';
|
|
6
5
|
export * from './CartsApi';
|
|
6
|
+
export * from './CouponsApi';
|
|
7
7
|
export * from './CustomersApi';
|
|
8
8
|
export * from './DefinitionApi';
|
|
9
9
|
export * from './DocumentApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -19,9 +19,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
__exportStar(require("./AdminApi"), exports);
|
|
20
20
|
__exportStar(require("./AssetApi"), exports);
|
|
21
21
|
__exportStar(require("./AttributeApi"), exports);
|
|
22
|
-
__exportStar(require("./AuspostApi"), exports);
|
|
23
22
|
__exportStar(require("./BlogCategoryApi"), exports);
|
|
24
23
|
__exportStar(require("./CartsApi"), exports);
|
|
24
|
+
__exportStar(require("./CouponsApi"), exports);
|
|
25
25
|
__exportStar(require("./CustomersApi"), exports);
|
|
26
26
|
__exportStar(require("./DefinitionApi"), exports);
|
|
27
27
|
__exportStar(require("./DocumentApi"), exports);
|
|
@@ -20,7 +20,7 @@ export interface AddressFrontendResource {
|
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof AddressFrontendResource
|
|
22
22
|
*/
|
|
23
|
-
company
|
|
23
|
+
company?: string | null;
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
* @type {string}
|
|
@@ -32,7 +32,7 @@ export interface AddressFrontendResource {
|
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof AddressFrontendResource
|
|
34
34
|
*/
|
|
35
|
-
line2
|
|
35
|
+
line2?: string | null;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @type {string}
|
|
@@ -22,12 +22,8 @@ exports.AddressFrontendResourceToJSONTyped = AddressFrontendResourceToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the AddressFrontendResource interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfAddressFrontendResource(value) {
|
|
25
|
-
if (!('company' in value) || value['company'] === undefined)
|
|
26
|
-
return false;
|
|
27
25
|
if (!('line1' in value) || value['line1'] === undefined)
|
|
28
26
|
return false;
|
|
29
|
-
if (!('line2' in value) || value['line2'] === undefined)
|
|
30
|
-
return false;
|
|
31
27
|
if (!('postcode' in value) || value['postcode'] === undefined)
|
|
32
28
|
return false;
|
|
33
29
|
if (!('suburb' in value) || value['suburb'] === undefined)
|
|
@@ -48,9 +44,9 @@ function AddressFrontendResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
44
|
return json;
|
|
49
45
|
}
|
|
50
46
|
return {
|
|
51
|
-
'company': json['company'],
|
|
47
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
52
48
|
'line1': json['line1'],
|
|
53
|
-
'line2': json['line2'],
|
|
49
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
54
50
|
'postcode': json['postcode'],
|
|
55
51
|
'suburb': json['suburb'],
|
|
56
52
|
'country': json['country'],
|
|
@@ -28,6 +28,8 @@ function instanceOfAddressResource(value) {
|
|
|
28
28
|
return false;
|
|
29
29
|
if (!('line1' in value) || value['line1'] === undefined)
|
|
30
30
|
return false;
|
|
31
|
+
if (!('line2' in value) || value['line2'] === undefined)
|
|
32
|
+
return false;
|
|
31
33
|
if (!('postcode' in value) || value['postcode'] === undefined)
|
|
32
34
|
return false;
|
|
33
35
|
if (!('suburb' in value) || value['suburb'] === undefined)
|
|
@@ -54,7 +56,7 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
56
|
'addresseeName': json['addresseeName'],
|
|
55
57
|
'company': json['company'],
|
|
56
58
|
'line1': json['line1'],
|
|
57
|
-
'line2': json['line2']
|
|
59
|
+
'line2': json['line2'],
|
|
58
60
|
'postcode': json['postcode'],
|
|
59
61
|
'suburb': json['suburb'],
|
|
60
62
|
'country': json['country'],
|
|
@@ -199,12 +199,6 @@ export interface AdminOrderResource {
|
|
|
199
199
|
* @memberof AdminOrderResource
|
|
200
200
|
*/
|
|
201
201
|
totalPaid: number;
|
|
202
|
-
/**
|
|
203
|
-
*
|
|
204
|
-
* @type {number}
|
|
205
|
-
* @memberof AdminOrderResource
|
|
206
|
-
*/
|
|
207
|
-
totalSurchargePaid: number;
|
|
208
202
|
/**
|
|
209
203
|
*
|
|
210
204
|
* @type {number}
|
|
@@ -80,8 +80,6 @@ function instanceOfAdminOrderResource(value) {
|
|
|
80
80
|
return false;
|
|
81
81
|
if (!('totalPaid' in value) || value['totalPaid'] === undefined)
|
|
82
82
|
return false;
|
|
83
|
-
if (!('totalSurchargePaid' in value) || value['totalSurchargePaid'] === undefined)
|
|
84
|
-
return false;
|
|
85
83
|
if (!('totalOutstanding' in value) || value['totalOutstanding'] === undefined)
|
|
86
84
|
return false;
|
|
87
85
|
if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined)
|
|
@@ -153,7 +151,6 @@ function AdminOrderResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
153
151
|
'totalShipping': json['totalShipping'],
|
|
154
152
|
'grandTotal': json['grandTotal'],
|
|
155
153
|
'totalPaid': json['totalPaid'],
|
|
156
|
-
'totalSurchargePaid': json['totalSurchargePaid'],
|
|
157
154
|
'totalOutstanding': json['totalOutstanding'],
|
|
158
155
|
'insuranceEstimate': json['insuranceEstimate'],
|
|
159
156
|
'site': (0, SiteLiteResource_1.SiteLiteResourceFromJSON)(json['site']),
|
|
@@ -211,7 +208,6 @@ function AdminOrderResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
211
208
|
'totalShipping': value['totalShipping'],
|
|
212
209
|
'grandTotal': value['grandTotal'],
|
|
213
210
|
'totalPaid': value['totalPaid'],
|
|
214
|
-
'totalSurchargePaid': value['totalSurchargePaid'],
|
|
215
211
|
'totalOutstanding': value['totalOutstanding'],
|
|
216
212
|
'insuranceEstimate': value['insuranceEstimate'],
|
|
217
213
|
'site': (0, SiteLiteResource_1.SiteLiteResourceToJSON)(value['site']),
|
|
@@ -33,6 +33,36 @@ export interface AppliedCouponResource {
|
|
|
33
33
|
* @memberof AppliedCouponResource
|
|
34
34
|
*/
|
|
35
35
|
name: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof AppliedCouponResource
|
|
40
|
+
*/
|
|
41
|
+
type: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof AppliedCouponResource
|
|
46
|
+
*/
|
|
47
|
+
discountType: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof AppliedCouponResource
|
|
52
|
+
*/
|
|
53
|
+
discountAmount: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof AppliedCouponResource
|
|
58
|
+
*/
|
|
59
|
+
minAmount: number;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof AppliedCouponResource
|
|
64
|
+
*/
|
|
65
|
+
minProducts: number;
|
|
36
66
|
/**
|
|
37
67
|
*
|
|
38
68
|
* @type {number}
|
|
@@ -28,6 +28,16 @@ function instanceOfAppliedCouponResource(value) {
|
|
|
28
28
|
return false;
|
|
29
29
|
if (!('name' in value) || value['name'] === undefined)
|
|
30
30
|
return false;
|
|
31
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('discountType' in value) || value['discountType'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('discountAmount' in value) || value['discountAmount'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('minAmount' in value) || value['minAmount'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('minProducts' in value) || value['minProducts'] === undefined)
|
|
40
|
+
return false;
|
|
31
41
|
if (!('discountTotal' in value) || value['discountTotal'] === undefined)
|
|
32
42
|
return false;
|
|
33
43
|
return true;
|
|
@@ -43,6 +53,11 @@ function AppliedCouponResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
53
|
'id': json['id'],
|
|
44
54
|
'code': json['code'],
|
|
45
55
|
'name': json['name'],
|
|
56
|
+
'type': json['type'],
|
|
57
|
+
'discountType': json['discountType'],
|
|
58
|
+
'discountAmount': json['discountAmount'],
|
|
59
|
+
'minAmount': json['minAmount'],
|
|
60
|
+
'minProducts': json['minProducts'],
|
|
46
61
|
'discountTotal': json['discountTotal'],
|
|
47
62
|
};
|
|
48
63
|
}
|
|
@@ -58,6 +73,11 @@ function AppliedCouponResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
58
73
|
'id': value['id'],
|
|
59
74
|
'code': value['code'],
|
|
60
75
|
'name': value['name'],
|
|
76
|
+
'type': value['type'],
|
|
77
|
+
'discountType': value['discountType'],
|
|
78
|
+
'discountAmount': value['discountAmount'],
|
|
79
|
+
'minAmount': value['minAmount'],
|
|
80
|
+
'minProducts': value['minProducts'],
|
|
61
81
|
'discountTotal': value['discountTotal'],
|
|
62
82
|
};
|
|
63
83
|
}
|
|
@@ -224,6 +224,12 @@ export interface CartResource {
|
|
|
224
224
|
* @memberof CartResource
|
|
225
225
|
*/
|
|
226
226
|
status: string;
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
* @type {boolean}
|
|
230
|
+
* @memberof CartResource
|
|
231
|
+
*/
|
|
232
|
+
isPrivilegedAdmin: boolean;
|
|
227
233
|
}
|
|
228
234
|
/**
|
|
229
235
|
* Check if a given object implements the CartResource interface.
|
|
@@ -77,6 +77,8 @@ function instanceOfCartResource(value) {
|
|
|
77
77
|
return false;
|
|
78
78
|
if (!('status' in value) || value['status'] === undefined)
|
|
79
79
|
return false;
|
|
80
|
+
if (!('isPrivilegedAdmin' in value) || value['isPrivilegedAdmin'] === undefined)
|
|
81
|
+
return false;
|
|
80
82
|
return true;
|
|
81
83
|
}
|
|
82
84
|
function CartResourceFromJSON(json) {
|
|
@@ -121,6 +123,7 @@ function CartResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
121
123
|
'subtotalDiscountAmount': json['subtotalDiscountAmount'],
|
|
122
124
|
'finalTotalAmount': json['finalTotalAmount'],
|
|
123
125
|
'status': json['status'],
|
|
126
|
+
'isPrivilegedAdmin': json['isPrivilegedAdmin'],
|
|
124
127
|
};
|
|
125
128
|
}
|
|
126
129
|
function CartResourceToJSON(json) {
|
|
@@ -167,5 +170,6 @@ function CartResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
167
170
|
'subtotalDiscountAmount': value['subtotalDiscountAmount'],
|
|
168
171
|
'finalTotalAmount': value['finalTotalAmount'],
|
|
169
172
|
'status': value['status'],
|
|
173
|
+
'isPrivilegedAdmin': value['isPrivilegedAdmin'],
|
|
170
174
|
};
|
|
171
175
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 { SiteLiteResource } from './SiteLiteResource';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface CouponListResource
|
|
17
|
+
*/
|
|
18
|
+
export interface CouponListResource {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof CouponListResource
|
|
23
|
+
*/
|
|
24
|
+
id?: number | null;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof CouponListResource
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof CouponListResource
|
|
35
|
+
*/
|
|
36
|
+
code: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof CouponListResource
|
|
41
|
+
*/
|
|
42
|
+
type: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof CouponListResource
|
|
47
|
+
*/
|
|
48
|
+
discountType: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof CouponListResource
|
|
53
|
+
*/
|
|
54
|
+
discountAmount: number;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Date}
|
|
58
|
+
* @memberof CouponListResource
|
|
59
|
+
*/
|
|
60
|
+
startDate?: Date | null;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {Date}
|
|
64
|
+
* @memberof CouponListResource
|
|
65
|
+
*/
|
|
66
|
+
endDate?: Date | null;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {boolean}
|
|
70
|
+
* @memberof CouponListResource
|
|
71
|
+
*/
|
|
72
|
+
isAbandonedCart: boolean;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {SiteLiteResource}
|
|
76
|
+
* @memberof CouponListResource
|
|
77
|
+
*/
|
|
78
|
+
site: SiteLiteResource | null;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof CouponListResource
|
|
83
|
+
*/
|
|
84
|
+
ordersCount: number;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof CouponListResource
|
|
89
|
+
*/
|
|
90
|
+
cartsCount: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Check if a given object implements the CouponListResource interface.
|
|
94
|
+
*/
|
|
95
|
+
export declare function instanceOfCouponListResource(value: object): value is CouponListResource;
|
|
96
|
+
export declare function CouponListResourceFromJSON(json: any): CouponListResource;
|
|
97
|
+
export declare function CouponListResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponListResource;
|
|
98
|
+
export declare function CouponListResourceToJSON(json: any): CouponListResource;
|
|
99
|
+
export declare function CouponListResourceToJSONTyped(value?: CouponListResource | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,91 @@
|
|
|
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.instanceOfCouponListResource = instanceOfCouponListResource;
|
|
17
|
+
exports.CouponListResourceFromJSON = CouponListResourceFromJSON;
|
|
18
|
+
exports.CouponListResourceFromJSONTyped = CouponListResourceFromJSONTyped;
|
|
19
|
+
exports.CouponListResourceToJSON = CouponListResourceToJSON;
|
|
20
|
+
exports.CouponListResourceToJSONTyped = CouponListResourceToJSONTyped;
|
|
21
|
+
var SiteLiteResource_1 = require("./SiteLiteResource");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the CouponListResource interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfCouponListResource(value) {
|
|
26
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('code' in value) || value['code'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('discountType' in value) || value['discountType'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('discountAmount' in value) || value['discountAmount'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('isAbandonedCart' in value) || value['isAbandonedCart'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('site' in value) || value['site'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('ordersCount' in value) || value['ordersCount'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('cartsCount' in value) || value['cartsCount'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
function CouponListResourceFromJSON(json) {
|
|
47
|
+
return CouponListResourceFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function CouponListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
55
|
+
'name': json['name'],
|
|
56
|
+
'code': json['code'],
|
|
57
|
+
'type': json['type'],
|
|
58
|
+
'discountType': json['discountType'],
|
|
59
|
+
'discountAmount': json['discountAmount'],
|
|
60
|
+
'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
|
|
61
|
+
'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
|
|
62
|
+
'isAbandonedCart': json['isAbandonedCart'],
|
|
63
|
+
'site': (0, SiteLiteResource_1.SiteLiteResourceFromJSON)(json['site']),
|
|
64
|
+
'ordersCount': json['ordersCount'],
|
|
65
|
+
'cartsCount': json['cartsCount'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function CouponListResourceToJSON(json) {
|
|
69
|
+
return CouponListResourceToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
function CouponListResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
74
|
+
if (value == null) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
'id': value['id'],
|
|
79
|
+
'name': value['name'],
|
|
80
|
+
'code': value['code'],
|
|
81
|
+
'type': value['type'],
|
|
82
|
+
'discountType': value['discountType'],
|
|
83
|
+
'discountAmount': value['discountAmount'],
|
|
84
|
+
'startDate': value['startDate'] === null ? null : ((_a = value['startDate']) === null || _a === void 0 ? void 0 : _a.toISOString()),
|
|
85
|
+
'endDate': value['endDate'] === null ? null : ((_b = value['endDate']) === null || _b === void 0 ? void 0 : _b.toISOString()),
|
|
86
|
+
'isAbandonedCart': value['isAbandonedCart'],
|
|
87
|
+
'site': (0, SiteLiteResource_1.SiteLiteResourceToJSON)(value['site']),
|
|
88
|
+
'ordersCount': value['ordersCount'],
|
|
89
|
+
'cartsCount': value['cartsCount'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -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 { CouponListResource } from './CouponListResource';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface CouponListResourceArrayResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface CouponListResourceArrayResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<CouponListResource>}
|
|
22
|
+
* @memberof CouponListResourceArrayResponse
|
|
23
|
+
*/
|
|
24
|
+
data?: Array<CouponListResource>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the CouponListResourceArrayResponse interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfCouponListResourceArrayResponse(value: object): value is CouponListResourceArrayResponse;
|
|
30
|
+
export declare function CouponListResourceArrayResponseFromJSON(json: any): CouponListResourceArrayResponse;
|
|
31
|
+
export declare function CouponListResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponListResourceArrayResponse;
|
|
32
|
+
export declare function CouponListResourceArrayResponseToJSON(json: any): CouponListResourceArrayResponse;
|
|
33
|
+
export declare function CouponListResourceArrayResponseToJSONTyped(value?: CouponListResourceArrayResponse | 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.instanceOfCouponListResourceArrayResponse = instanceOfCouponListResourceArrayResponse;
|
|
17
|
+
exports.CouponListResourceArrayResponseFromJSON = CouponListResourceArrayResponseFromJSON;
|
|
18
|
+
exports.CouponListResourceArrayResponseFromJSONTyped = CouponListResourceArrayResponseFromJSONTyped;
|
|
19
|
+
exports.CouponListResourceArrayResponseToJSON = CouponListResourceArrayResponseToJSON;
|
|
20
|
+
exports.CouponListResourceArrayResponseToJSONTyped = CouponListResourceArrayResponseToJSONTyped;
|
|
21
|
+
var CouponListResource_1 = require("./CouponListResource");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the CouponListResourceArrayResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfCouponListResourceArrayResponse(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function CouponListResourceArrayResponseFromJSON(json) {
|
|
29
|
+
return CouponListResourceArrayResponseFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function CouponListResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'data': json['data'] == null ? undefined : (json['data'].map(CouponListResource_1.CouponListResourceFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function CouponListResourceArrayResponseToJSON(json) {
|
|
40
|
+
return CouponListResourceArrayResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function CouponListResourceArrayResponseToJSONTyped(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(CouponListResource_1.CouponListResourceToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 CouponLiteResource
|
|
16
|
+
*/
|
|
17
|
+
export interface CouponLiteResource {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof CouponLiteResource
|
|
22
|
+
*/
|
|
23
|
+
id?: number | null;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CouponLiteResource
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CouponLiteResource
|
|
34
|
+
*/
|
|
35
|
+
code: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the CouponLiteResource interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfCouponLiteResource(value: object): value is CouponLiteResource;
|
|
41
|
+
export declare function CouponLiteResourceFromJSON(json: any): CouponLiteResource;
|
|
42
|
+
export declare function CouponLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponLiteResource;
|
|
43
|
+
export declare function CouponLiteResourceToJSON(json: any): CouponLiteResource;
|
|
44
|
+
export declare function CouponLiteResourceToJSONTyped(value?: CouponLiteResource | null, ignoreDiscriminator?: boolean): any;
|