@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.
- package/.openapi-generator/FILES +0 -15
- package/README.md +2 -2
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -1
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +3 -1
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +1 -3
- package/dist/models/AppliedCouponResource.d.ts +0 -30
- package/dist/models/AppliedCouponResource.js +0 -20
- package/dist/models/FrontendCartResource.d.ts +0 -6
- package/dist/models/FrontendCartResource.js +0 -2
- package/dist/models/OrderFulfillmentResource.d.ts +2 -2
- package/dist/models/OrderFulfillmentResource.js +6 -2
- package/dist/models/ProductCategoryLiteResource.d.ts +0 -6
- package/dist/models/ProductCategoryLiteResource.js +0 -4
- package/dist/models/ProductChildListResource.d.ts +0 -6
- package/dist/models/ProductChildListResource.js +0 -4
- package/dist/models/SearchCartsRequest.d.ts +0 -6
- package/dist/models/SearchCartsRequest.js +0 -2
- package/dist/models/SearchOrdersRequest.d.ts +0 -6
- package/dist/models/SearchOrdersRequest.js +0 -2
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +4 -4
- package/dist/models/index.d.ts +0 -14
- package/dist/models/index.js +0 -14
- package/package.json +1 -1
- package/src/apis/index.ts +0 -1
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +2 -3
- package/src/models/AppliedCouponResource.ts +0 -45
- package/src/models/FrontendCartResource.ts +0 -8
- package/src/models/OrderFulfillmentResource.ts +6 -4
- package/src/models/ProductCategoryLiteResource.ts +0 -9
- package/src/models/ProductChildListResource.ts +0 -9
- package/src/models/SearchCartsRequest.ts +0 -8
- package/src/models/SearchOrdersRequest.ts +0 -8
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreResource.ts +5 -5
- package/src/models/index.ts +0 -14
- package/dist/apis/CouponsApi.d.ts +0 -85
- package/dist/apis/CouponsApi.js +0 -355
- package/dist/models/CouponListResource.d.ts +0 -99
- package/dist/models/CouponListResource.js +0 -91
- package/dist/models/CouponListResourceArrayResponse.d.ts +0 -33
- package/dist/models/CouponListResourceArrayResponse.js +0 -50
- package/dist/models/CouponLiteResource.d.ts +0 -44
- package/dist/models/CouponLiteResource.js +0 -57
- package/dist/models/CouponLiteResourceArrayResponse.d.ts +0 -33
- package/dist/models/CouponLiteResourceArrayResponse.js +0 -50
- package/dist/models/CouponResource.d.ts +0 -163
- package/dist/models/CouponResource.js +0 -135
- package/dist/models/CouponResourceArrayResponse.d.ts +0 -33
- package/dist/models/CouponResourceArrayResponse.js +0 -50
- package/dist/models/CouponType.d.ts +0 -26
- package/dist/models/CouponType.js +0 -52
- package/dist/models/CreateCouponRequest.d.ts +0 -126
- package/dist/models/CreateCouponRequest.js +0 -107
- package/dist/models/CreateCouponRequestCouponablesInner.d.ts +0 -48
- package/dist/models/CreateCouponRequestCouponablesInner.js +0 -61
- package/dist/models/PaginatedCouponListResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedCouponListResourceResponse.js +0 -57
- package/dist/models/PaginatedCouponResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedCouponResourceResponse.js +0 -57
- package/dist/models/SearchAllCouponsRequest.d.ts +0 -101
- package/dist/models/SearchAllCouponsRequest.js +0 -85
- package/dist/models/SearchCouponsRequest.d.ts +0 -137
- package/dist/models/SearchCouponsRequest.js +0 -97
- package/dist/models/UpdateCouponRequest.d.ts +0 -120
- package/dist/models/UpdateCouponRequest.js +0 -103
- package/src/apis/CouponsApi.ts +0 -286
- package/src/models/CouponListResource.ts +0 -170
- package/src/models/CouponListResourceArrayResponse.ts +0 -73
- package/src/models/CouponLiteResource.ts +0 -83
- package/src/models/CouponLiteResourceArrayResponse.ts +0 -73
- package/src/models/CouponResource.ts +0 -288
- package/src/models/CouponResourceArrayResponse.ts +0 -73
- package/src/models/CouponType.ts +0 -54
- package/src/models/CreateCouponRequest.ts +0 -207
- package/src/models/CreateCouponRequestCouponablesInner.ts +0 -86
- package/src/models/PaginatedCouponListResourceResponse.ts +0 -90
- package/src/models/PaginatedCouponResourceResponse.ts +0 -90
- package/src/models/SearchAllCouponsRequest.ts +0 -154
- package/src/models/SearchCouponsRequest.ts +0 -202
- package/src/models/UpdateCouponRequest.ts +0 -198
package/dist/apis/CouponsApi.js
DELETED
|
@@ -1,355 +0,0 @@
|
|
|
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
|
-
var __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
41
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
-
function step(op) {
|
|
44
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
-
switch (op[0]) {
|
|
49
|
-
case 0: case 1: t = op; break;
|
|
50
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
-
default:
|
|
54
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
-
if (t[2]) _.ops.pop();
|
|
59
|
-
_.trys.pop(); continue;
|
|
60
|
-
}
|
|
61
|
-
op = body.call(thisArg, _);
|
|
62
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.CouponsApi = void 0;
|
|
68
|
-
var runtime = require("../runtime");
|
|
69
|
-
var index_1 = require("../models/index");
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
var CouponsApi = /** @class */ (function (_super) {
|
|
74
|
-
__extends(CouponsApi, _super);
|
|
75
|
-
function CouponsApi() {
|
|
76
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Auto-generated: destroyCoupon
|
|
80
|
-
*/
|
|
81
|
-
CouponsApi.prototype.destroyCouponRaw = function (requestParameters, initOverrides) {
|
|
82
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var queryParameters, headerParameters, urlPath, response;
|
|
84
|
-
return __generator(this, function (_a) {
|
|
85
|
-
switch (_a.label) {
|
|
86
|
-
case 0:
|
|
87
|
-
if (requestParameters['coupon'] == null) {
|
|
88
|
-
throw new runtime.RequiredError('coupon', 'Required parameter "coupon" was null or undefined when calling destroyCoupon().');
|
|
89
|
-
}
|
|
90
|
-
queryParameters = {};
|
|
91
|
-
headerParameters = {};
|
|
92
|
-
urlPath = "/admin-api/coupons/{coupon}/delete";
|
|
93
|
-
urlPath = urlPath.replace("{".concat("coupon", "}"), encodeURIComponent(String(requestParameters['coupon'])));
|
|
94
|
-
return [4 /*yield*/, this.request({
|
|
95
|
-
path: urlPath,
|
|
96
|
-
method: 'DELETE',
|
|
97
|
-
headers: headerParameters,
|
|
98
|
-
query: queryParameters,
|
|
99
|
-
}, initOverrides)];
|
|
100
|
-
case 1:
|
|
101
|
-
response = _a.sent();
|
|
102
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GenericResponseFromJSON)(jsonValue); })];
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Auto-generated: destroyCoupon
|
|
109
|
-
*/
|
|
110
|
-
CouponsApi.prototype.destroyCoupon = function (requestParameters, initOverrides) {
|
|
111
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
-
var response;
|
|
113
|
-
return __generator(this, function (_a) {
|
|
114
|
-
switch (_a.label) {
|
|
115
|
-
case 0: return [4 /*yield*/, this.destroyCouponRaw(requestParameters, initOverrides)];
|
|
116
|
-
case 1:
|
|
117
|
-
response = _a.sent();
|
|
118
|
-
return [4 /*yield*/, response.value()];
|
|
119
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Auto-generated: getAllCoupon
|
|
126
|
-
*/
|
|
127
|
-
CouponsApi.prototype.getAllCouponRaw = function (requestParameters, initOverrides) {
|
|
128
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
129
|
-
var queryParameters, headerParameters, urlPath, response;
|
|
130
|
-
return __generator(this, function (_a) {
|
|
131
|
-
switch (_a.label) {
|
|
132
|
-
case 0:
|
|
133
|
-
queryParameters = {};
|
|
134
|
-
headerParameters = {};
|
|
135
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
136
|
-
urlPath = "/admin-api/coupons/all";
|
|
137
|
-
return [4 /*yield*/, this.request({
|
|
138
|
-
path: urlPath,
|
|
139
|
-
method: 'POST',
|
|
140
|
-
headers: headerParameters,
|
|
141
|
-
query: queryParameters,
|
|
142
|
-
body: (0, index_1.SearchAllCouponsRequestToJSON)(requestParameters['searchAllCouponsRequest']),
|
|
143
|
-
}, initOverrides)];
|
|
144
|
-
case 1:
|
|
145
|
-
response = _a.sent();
|
|
146
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CouponLiteResourceArrayResponseFromJSON)(jsonValue); })];
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
/**
|
|
152
|
-
* Auto-generated: getAllCoupon
|
|
153
|
-
*/
|
|
154
|
-
CouponsApi.prototype.getAllCoupon = function () {
|
|
155
|
-
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
156
|
-
var response;
|
|
157
|
-
if (requestParameters === void 0) { requestParameters = {}; }
|
|
158
|
-
return __generator(this, function (_a) {
|
|
159
|
-
switch (_a.label) {
|
|
160
|
-
case 0: return [4 /*yield*/, this.getAllCouponRaw(requestParameters, initOverrides)];
|
|
161
|
-
case 1:
|
|
162
|
-
response = _a.sent();
|
|
163
|
-
return [4 /*yield*/, response.value()];
|
|
164
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* Auto-generated: indexCoupon
|
|
171
|
-
*/
|
|
172
|
-
CouponsApi.prototype.indexCouponRaw = function (requestParameters, initOverrides) {
|
|
173
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
174
|
-
var queryParameters, headerParameters, urlPath, response;
|
|
175
|
-
return __generator(this, function (_a) {
|
|
176
|
-
switch (_a.label) {
|
|
177
|
-
case 0:
|
|
178
|
-
queryParameters = {};
|
|
179
|
-
headerParameters = {};
|
|
180
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
181
|
-
urlPath = "/admin-api/coupons/list";
|
|
182
|
-
return [4 /*yield*/, this.request({
|
|
183
|
-
path: urlPath,
|
|
184
|
-
method: 'POST',
|
|
185
|
-
headers: headerParameters,
|
|
186
|
-
query: queryParameters,
|
|
187
|
-
body: (0, index_1.SearchCouponsRequestToJSON)(requestParameters['searchCouponsRequest']),
|
|
188
|
-
}, initOverrides)];
|
|
189
|
-
case 1:
|
|
190
|
-
response = _a.sent();
|
|
191
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedCouponListResourceResponseFromJSON)(jsonValue); })];
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
|
-
/**
|
|
197
|
-
* Auto-generated: indexCoupon
|
|
198
|
-
*/
|
|
199
|
-
CouponsApi.prototype.indexCoupon = function () {
|
|
200
|
-
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
201
|
-
var response;
|
|
202
|
-
if (requestParameters === void 0) { requestParameters = {}; }
|
|
203
|
-
return __generator(this, function (_a) {
|
|
204
|
-
switch (_a.label) {
|
|
205
|
-
case 0: return [4 /*yield*/, this.indexCouponRaw(requestParameters, initOverrides)];
|
|
206
|
-
case 1:
|
|
207
|
-
response = _a.sent();
|
|
208
|
-
return [4 /*yield*/, response.value()];
|
|
209
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
};
|
|
214
|
-
/**
|
|
215
|
-
* Auto-generated: showCoupon
|
|
216
|
-
*/
|
|
217
|
-
CouponsApi.prototype.showCouponRaw = function (requestParameters, initOverrides) {
|
|
218
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
219
|
-
var queryParameters, headerParameters, urlPath, response;
|
|
220
|
-
return __generator(this, function (_a) {
|
|
221
|
-
switch (_a.label) {
|
|
222
|
-
case 0:
|
|
223
|
-
if (requestParameters['coupon'] == null) {
|
|
224
|
-
throw new runtime.RequiredError('coupon', 'Required parameter "coupon" was null or undefined when calling showCoupon().');
|
|
225
|
-
}
|
|
226
|
-
queryParameters = {};
|
|
227
|
-
headerParameters = {};
|
|
228
|
-
urlPath = "/admin-api/coupons/{coupon}";
|
|
229
|
-
urlPath = urlPath.replace("{".concat("coupon", "}"), encodeURIComponent(String(requestParameters['coupon'])));
|
|
230
|
-
return [4 /*yield*/, this.request({
|
|
231
|
-
path: urlPath,
|
|
232
|
-
method: 'GET',
|
|
233
|
-
headers: headerParameters,
|
|
234
|
-
query: queryParameters,
|
|
235
|
-
}, initOverrides)];
|
|
236
|
-
case 1:
|
|
237
|
-
response = _a.sent();
|
|
238
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CouponResourceFromJSON)(jsonValue); })];
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
};
|
|
243
|
-
/**
|
|
244
|
-
* Auto-generated: showCoupon
|
|
245
|
-
*/
|
|
246
|
-
CouponsApi.prototype.showCoupon = function (requestParameters, initOverrides) {
|
|
247
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
248
|
-
var response;
|
|
249
|
-
return __generator(this, function (_a) {
|
|
250
|
-
switch (_a.label) {
|
|
251
|
-
case 0: return [4 /*yield*/, this.showCouponRaw(requestParameters, initOverrides)];
|
|
252
|
-
case 1:
|
|
253
|
-
response = _a.sent();
|
|
254
|
-
return [4 /*yield*/, response.value()];
|
|
255
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
|
-
/**
|
|
261
|
-
* Auto-generated: storeCoupon
|
|
262
|
-
*/
|
|
263
|
-
CouponsApi.prototype.storeCouponRaw = function (requestParameters, initOverrides) {
|
|
264
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
265
|
-
var queryParameters, headerParameters, urlPath, response;
|
|
266
|
-
return __generator(this, function (_a) {
|
|
267
|
-
switch (_a.label) {
|
|
268
|
-
case 0:
|
|
269
|
-
queryParameters = {};
|
|
270
|
-
headerParameters = {};
|
|
271
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
272
|
-
urlPath = "/admin-api/coupons/create";
|
|
273
|
-
return [4 /*yield*/, this.request({
|
|
274
|
-
path: urlPath,
|
|
275
|
-
method: 'POST',
|
|
276
|
-
headers: headerParameters,
|
|
277
|
-
query: queryParameters,
|
|
278
|
-
body: (0, index_1.CreateCouponRequestToJSON)(requestParameters['createCouponRequest']),
|
|
279
|
-
}, initOverrides)];
|
|
280
|
-
case 1:
|
|
281
|
-
response = _a.sent();
|
|
282
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CouponResourceFromJSON)(jsonValue); })];
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
});
|
|
286
|
-
};
|
|
287
|
-
/**
|
|
288
|
-
* Auto-generated: storeCoupon
|
|
289
|
-
*/
|
|
290
|
-
CouponsApi.prototype.storeCoupon = function () {
|
|
291
|
-
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
292
|
-
var response;
|
|
293
|
-
if (requestParameters === void 0) { requestParameters = {}; }
|
|
294
|
-
return __generator(this, function (_a) {
|
|
295
|
-
switch (_a.label) {
|
|
296
|
-
case 0: return [4 /*yield*/, this.storeCouponRaw(requestParameters, initOverrides)];
|
|
297
|
-
case 1:
|
|
298
|
-
response = _a.sent();
|
|
299
|
-
return [4 /*yield*/, response.value()];
|
|
300
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
};
|
|
305
|
-
/**
|
|
306
|
-
* Auto-generated: updateCoupon
|
|
307
|
-
*/
|
|
308
|
-
CouponsApi.prototype.updateCouponRaw = function (requestParameters, initOverrides) {
|
|
309
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
310
|
-
var queryParameters, headerParameters, urlPath, response;
|
|
311
|
-
return __generator(this, function (_a) {
|
|
312
|
-
switch (_a.label) {
|
|
313
|
-
case 0:
|
|
314
|
-
if (requestParameters['coupon'] == null) {
|
|
315
|
-
throw new runtime.RequiredError('coupon', 'Required parameter "coupon" was null or undefined when calling updateCoupon().');
|
|
316
|
-
}
|
|
317
|
-
queryParameters = {};
|
|
318
|
-
headerParameters = {};
|
|
319
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
320
|
-
urlPath = "/admin-api/coupons/{coupon}/update";
|
|
321
|
-
urlPath = urlPath.replace("{".concat("coupon", "}"), encodeURIComponent(String(requestParameters['coupon'])));
|
|
322
|
-
return [4 /*yield*/, this.request({
|
|
323
|
-
path: urlPath,
|
|
324
|
-
method: 'PUT',
|
|
325
|
-
headers: headerParameters,
|
|
326
|
-
query: queryParameters,
|
|
327
|
-
body: (0, index_1.UpdateCouponRequestToJSON)(requestParameters['updateCouponRequest']),
|
|
328
|
-
}, initOverrides)];
|
|
329
|
-
case 1:
|
|
330
|
-
response = _a.sent();
|
|
331
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CouponResourceFromJSON)(jsonValue); })];
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
});
|
|
335
|
-
};
|
|
336
|
-
/**
|
|
337
|
-
* Auto-generated: updateCoupon
|
|
338
|
-
*/
|
|
339
|
-
CouponsApi.prototype.updateCoupon = function (requestParameters, initOverrides) {
|
|
340
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
341
|
-
var response;
|
|
342
|
-
return __generator(this, function (_a) {
|
|
343
|
-
switch (_a.label) {
|
|
344
|
-
case 0: return [4 /*yield*/, this.updateCouponRaw(requestParameters, initOverrides)];
|
|
345
|
-
case 1:
|
|
346
|
-
response = _a.sent();
|
|
347
|
-
return [4 /*yield*/, response.value()];
|
|
348
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
|
-
};
|
|
353
|
-
return CouponsApi;
|
|
354
|
-
}(runtime.BaseAPI));
|
|
355
|
-
exports.CouponsApi = CouponsApi;
|
|
@@ -1,99 +0,0 @@
|
|
|
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;
|
|
@@ -1,91 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
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;
|
|
@@ -1,50 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
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;
|