@teemill/website 0.1.3 → 0.1.6
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 +7 -10
- package/.openapi-generator/VERSION +1 -1
- package/README.md +3 -3
- package/api.ts +409 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +110 -0
- package/dist/api.d.ts +243 -0
- package/dist/api.js +292 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +65 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +43 -0
- package/dist/esm/api.d.ts +243 -0
- package/dist/esm/api.js +285 -0
- package/dist/esm/base.d.ts +66 -0
- package/dist/esm/base.js +60 -0
- package/dist/esm/common.d.ts +65 -0
- package/dist/esm/common.js +149 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +39 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.js +15 -5
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +18 -4
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +4 -6
- package/dist/apis/ShippingMethodsApi.d.ts +0 -96
- package/dist/apis/ShippingMethodsApi.js +0 -386
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -19
- package/dist/models/ApiError.d.ts +0 -37
- package/dist/models/ApiError.js +0 -53
- package/dist/models/Price.d.ts +0 -37
- package/dist/models/Price.js +0 -52
- package/dist/models/ShippingMethod.d.ts +0 -56
- package/dist/models/ShippingMethod.js +0 -59
- package/dist/models/ShippingMethods.d.ts +0 -38
- package/dist/models/ShippingMethods.js +0 -54
- package/dist/models/UpdateShippingMethodRequest.d.ts +0 -44
- package/dist/models/UpdateShippingMethodRequest.js +0 -55
- package/dist/models/index.d.ts +0 -5
- package/dist/models/index.js +0 -23
- package/dist/runtime.d.ts +0 -187
- package/dist/runtime.js +0 -565
- package/src/apis/ShippingMethodsApi.ts +0 -337
- package/src/apis/index.ts +0 -3
- package/src/index.ts +0 -5
- package/src/models/ApiError.ts +0 -74
- package/src/models/Price.ts +0 -73
- package/src/models/ShippingMethod.ts +0 -104
- package/src/models/ShippingMethods.ts +0 -81
- package/src/models/UpdateShippingMethodRequest.ts +0 -88
- package/src/models/index.ts +0 -7
- package/src/runtime.ts +0 -441
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Website Api
|
|
6
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.3
|
|
9
|
-
* Contact: hello@teemill.com
|
|
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 __assign = (this && this.__assign) || function () {
|
|
31
|
-
__assign = Object.assign || function(t) {
|
|
32
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
-
s = arguments[i];
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
return __assign.apply(this, arguments);
|
|
40
|
-
};
|
|
41
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
-
function step(op) {
|
|
55
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
-
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;
|
|
58
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
-
switch (op[0]) {
|
|
60
|
-
case 0: case 1: t = op; break;
|
|
61
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
-
default:
|
|
65
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
-
if (t[2]) _.ops.pop();
|
|
70
|
-
_.trys.pop(); continue;
|
|
71
|
-
}
|
|
72
|
-
op = body.call(thisArg, _);
|
|
73
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
|
-
exports.GetShippingMethodsSortOrderEnum = exports.GetShippingMethodsSortByEnum = exports.ShippingMethodsApi = void 0;
|
|
79
|
-
var runtime = require("../runtime");
|
|
80
|
-
var index_1 = require("../models/index");
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
var ShippingMethodsApi = /** @class */ (function (_super) {
|
|
85
|
-
__extends(ShippingMethodsApi, _super);
|
|
86
|
-
function ShippingMethodsApi() {
|
|
87
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Get shipping method
|
|
91
|
-
* Get shipping method
|
|
92
|
-
*/
|
|
93
|
-
ShippingMethodsApi.prototype.getShippingMethodRaw = function (requestParameters, initOverrides) {
|
|
94
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
95
|
-
var queryParameters, headerParameters, _a, _b, response;
|
|
96
|
-
return __generator(this, function (_c) {
|
|
97
|
-
switch (_c.label) {
|
|
98
|
-
case 0:
|
|
99
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
100
|
-
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getShippingMethod.');
|
|
101
|
-
}
|
|
102
|
-
if (requestParameters.shippingMethod === null || requestParameters.shippingMethod === undefined) {
|
|
103
|
-
throw new runtime.RequiredError('shippingMethod', 'Required parameter requestParameters.shippingMethod was null or undefined when calling getShippingMethod.');
|
|
104
|
-
}
|
|
105
|
-
queryParameters = {};
|
|
106
|
-
if (requestParameters.project !== undefined) {
|
|
107
|
-
queryParameters['project'] = requestParameters.project;
|
|
108
|
-
}
|
|
109
|
-
headerParameters = {};
|
|
110
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
111
|
-
// oauth required
|
|
112
|
-
_a = headerParameters;
|
|
113
|
-
_b = "Authorization";
|
|
114
|
-
return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
|
|
115
|
-
case 1:
|
|
116
|
-
// oauth required
|
|
117
|
-
_a[_b] = _c.sent();
|
|
118
|
-
_c.label = 2;
|
|
119
|
-
case 2:
|
|
120
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
121
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
122
|
-
}
|
|
123
|
-
return [4 /*yield*/, this.request({
|
|
124
|
-
path: "/v1/website/shipping-methods/{shippingMethod}".replace("{".concat("shippingMethod", "}"), encodeURIComponent(String(requestParameters.shippingMethod))),
|
|
125
|
-
method: 'GET',
|
|
126
|
-
headers: headerParameters,
|
|
127
|
-
query: queryParameters,
|
|
128
|
-
}, initOverrides)];
|
|
129
|
-
case 3:
|
|
130
|
-
response = _c.sent();
|
|
131
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ShippingMethodFromJSON)(jsonValue); })];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
/**
|
|
137
|
-
* Get shipping method
|
|
138
|
-
* Get shipping method
|
|
139
|
-
*/
|
|
140
|
-
ShippingMethodsApi.prototype.getShippingMethod = function (project, shippingMethod, initOverrides) {
|
|
141
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
-
var response;
|
|
143
|
-
return __generator(this, function (_a) {
|
|
144
|
-
switch (_a.label) {
|
|
145
|
-
case 0: return [4 /*yield*/, this.getShippingMethodRaw({
|
|
146
|
-
project: project, shippingMethod: shippingMethod,
|
|
147
|
-
}, initOverrides)];
|
|
148
|
-
case 1:
|
|
149
|
-
response = _a.sent();
|
|
150
|
-
return [4 /*yield*/, response.value()];
|
|
151
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* List shipping methods
|
|
158
|
-
* List shipping methods
|
|
159
|
-
*/
|
|
160
|
-
ShippingMethodsApi.prototype.getShippingMethodsRaw = function (requestParameters, initOverrides) {
|
|
161
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
-
var queryParameters, headerParameters, _a, _b, response;
|
|
163
|
-
return __generator(this, function (_c) {
|
|
164
|
-
switch (_c.label) {
|
|
165
|
-
case 0:
|
|
166
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
167
|
-
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getShippingMethods.');
|
|
168
|
-
}
|
|
169
|
-
queryParameters = {};
|
|
170
|
-
if (requestParameters.project !== undefined) {
|
|
171
|
-
queryParameters['project'] = requestParameters.project;
|
|
172
|
-
}
|
|
173
|
-
if (requestParameters.search !== undefined) {
|
|
174
|
-
queryParameters['search'] = requestParameters.search;
|
|
175
|
-
}
|
|
176
|
-
if (requestParameters.pageToken !== undefined) {
|
|
177
|
-
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
178
|
-
}
|
|
179
|
-
if (requestParameters.pageSize !== undefined) {
|
|
180
|
-
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
181
|
-
}
|
|
182
|
-
if (requestParameters.sortBy !== undefined) {
|
|
183
|
-
queryParameters['sortBy'] = requestParameters.sortBy;
|
|
184
|
-
}
|
|
185
|
-
if (requestParameters.sortOrder !== undefined) {
|
|
186
|
-
queryParameters['sortOrder'] = requestParameters.sortOrder;
|
|
187
|
-
}
|
|
188
|
-
headerParameters = {};
|
|
189
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
190
|
-
// oauth required
|
|
191
|
-
_a = headerParameters;
|
|
192
|
-
_b = "Authorization";
|
|
193
|
-
return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
|
|
194
|
-
case 1:
|
|
195
|
-
// oauth required
|
|
196
|
-
_a[_b] = _c.sent();
|
|
197
|
-
_c.label = 2;
|
|
198
|
-
case 2:
|
|
199
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
200
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
201
|
-
}
|
|
202
|
-
return [4 /*yield*/, this.request({
|
|
203
|
-
path: "/v1/website/shipping-methods",
|
|
204
|
-
method: 'GET',
|
|
205
|
-
headers: headerParameters,
|
|
206
|
-
query: queryParameters,
|
|
207
|
-
}, initOverrides)];
|
|
208
|
-
case 3:
|
|
209
|
-
response = _c.sent();
|
|
210
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ShippingMethodsFromJSON)(jsonValue); })];
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* List shipping methods
|
|
217
|
-
* List shipping methods
|
|
218
|
-
*/
|
|
219
|
-
ShippingMethodsApi.prototype.getShippingMethods = function (project, optionalParameters, initOverrides) {
|
|
220
|
-
if (optionalParameters === void 0) { optionalParameters = {}; }
|
|
221
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
222
|
-
var response;
|
|
223
|
-
return __generator(this, function (_a) {
|
|
224
|
-
switch (_a.label) {
|
|
225
|
-
case 0: return [4 /*yield*/, this.getShippingMethodsRaw(__assign({ project: project }, optionalParameters), initOverrides)];
|
|
226
|
-
case 1:
|
|
227
|
-
response = _a.sent();
|
|
228
|
-
return [4 /*yield*/, response.value()];
|
|
229
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
|
-
/**
|
|
235
|
-
* Revert shipping method to default
|
|
236
|
-
* Revert shipping method to default
|
|
237
|
-
*/
|
|
238
|
-
ShippingMethodsApi.prototype.revertShippingMethodRaw = function (requestParameters, initOverrides) {
|
|
239
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
240
|
-
var queryParameters, headerParameters, _a, _b, response;
|
|
241
|
-
return __generator(this, function (_c) {
|
|
242
|
-
switch (_c.label) {
|
|
243
|
-
case 0:
|
|
244
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
245
|
-
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling revertShippingMethod.');
|
|
246
|
-
}
|
|
247
|
-
if (requestParameters.shippingMethod === null || requestParameters.shippingMethod === undefined) {
|
|
248
|
-
throw new runtime.RequiredError('shippingMethod', 'Required parameter requestParameters.shippingMethod was null or undefined when calling revertShippingMethod.');
|
|
249
|
-
}
|
|
250
|
-
queryParameters = {};
|
|
251
|
-
if (requestParameters.project !== undefined) {
|
|
252
|
-
queryParameters['project'] = requestParameters.project;
|
|
253
|
-
}
|
|
254
|
-
headerParameters = {};
|
|
255
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
256
|
-
// oauth required
|
|
257
|
-
_a = headerParameters;
|
|
258
|
-
_b = "Authorization";
|
|
259
|
-
return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
|
|
260
|
-
case 1:
|
|
261
|
-
// oauth required
|
|
262
|
-
_a[_b] = _c.sent();
|
|
263
|
-
_c.label = 2;
|
|
264
|
-
case 2:
|
|
265
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
266
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
267
|
-
}
|
|
268
|
-
return [4 /*yield*/, this.request({
|
|
269
|
-
path: "/v1/website/shipping-methods/{shippingMethod}/revert".replace("{".concat("shippingMethod", "}"), encodeURIComponent(String(requestParameters.shippingMethod))),
|
|
270
|
-
method: 'POST',
|
|
271
|
-
headers: headerParameters,
|
|
272
|
-
query: queryParameters,
|
|
273
|
-
}, initOverrides)];
|
|
274
|
-
case 3:
|
|
275
|
-
response = _c.sent();
|
|
276
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ShippingMethodFromJSON)(jsonValue); })];
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
};
|
|
281
|
-
/**
|
|
282
|
-
* Revert shipping method to default
|
|
283
|
-
* Revert shipping method to default
|
|
284
|
-
*/
|
|
285
|
-
ShippingMethodsApi.prototype.revertShippingMethod = function (project, shippingMethod, initOverrides) {
|
|
286
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
287
|
-
var response;
|
|
288
|
-
return __generator(this, function (_a) {
|
|
289
|
-
switch (_a.label) {
|
|
290
|
-
case 0: return [4 /*yield*/, this.revertShippingMethodRaw({
|
|
291
|
-
project: project, shippingMethod: shippingMethod,
|
|
292
|
-
}, initOverrides)];
|
|
293
|
-
case 1:
|
|
294
|
-
response = _a.sent();
|
|
295
|
-
return [4 /*yield*/, response.value()];
|
|
296
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
});
|
|
300
|
-
};
|
|
301
|
-
/**
|
|
302
|
-
* Update shipping method
|
|
303
|
-
* Update shipping method
|
|
304
|
-
*/
|
|
305
|
-
ShippingMethodsApi.prototype.updateShippingMethodRaw = function (requestParameters, initOverrides) {
|
|
306
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
307
|
-
var queryParameters, headerParameters, _a, _b, response;
|
|
308
|
-
return __generator(this, function (_c) {
|
|
309
|
-
switch (_c.label) {
|
|
310
|
-
case 0:
|
|
311
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
312
|
-
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling updateShippingMethod.');
|
|
313
|
-
}
|
|
314
|
-
if (requestParameters.shippingMethod === null || requestParameters.shippingMethod === undefined) {
|
|
315
|
-
throw new runtime.RequiredError('shippingMethod', 'Required parameter requestParameters.shippingMethod was null or undefined when calling updateShippingMethod.');
|
|
316
|
-
}
|
|
317
|
-
queryParameters = {};
|
|
318
|
-
if (requestParameters.project !== undefined) {
|
|
319
|
-
queryParameters['project'] = requestParameters.project;
|
|
320
|
-
}
|
|
321
|
-
headerParameters = {};
|
|
322
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
323
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
324
|
-
// oauth required
|
|
325
|
-
_a = headerParameters;
|
|
326
|
-
_b = "Authorization";
|
|
327
|
-
return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
|
|
328
|
-
case 1:
|
|
329
|
-
// oauth required
|
|
330
|
-
_a[_b] = _c.sent();
|
|
331
|
-
_c.label = 2;
|
|
332
|
-
case 2:
|
|
333
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
334
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
335
|
-
}
|
|
336
|
-
return [4 /*yield*/, this.request({
|
|
337
|
-
path: "/v1/website/shipping-methods/{shippingMethod}".replace("{".concat("shippingMethod", "}"), encodeURIComponent(String(requestParameters.shippingMethod))),
|
|
338
|
-
method: 'PUT',
|
|
339
|
-
headers: headerParameters,
|
|
340
|
-
query: queryParameters,
|
|
341
|
-
body: (0, index_1.UpdateShippingMethodRequestToJSON)(requestParameters.updateShippingMethodRequest),
|
|
342
|
-
}, initOverrides)];
|
|
343
|
-
case 3:
|
|
344
|
-
response = _c.sent();
|
|
345
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ShippingMethodFromJSON)(jsonValue); })];
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
});
|
|
349
|
-
};
|
|
350
|
-
/**
|
|
351
|
-
* Update shipping method
|
|
352
|
-
* Update shipping method
|
|
353
|
-
*/
|
|
354
|
-
ShippingMethodsApi.prototype.updateShippingMethod = function (project, shippingMethod, optionalParameters, initOverrides) {
|
|
355
|
-
if (optionalParameters === void 0) { optionalParameters = {}; }
|
|
356
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
357
|
-
var response;
|
|
358
|
-
return __generator(this, function (_a) {
|
|
359
|
-
switch (_a.label) {
|
|
360
|
-
case 0: return [4 /*yield*/, this.updateShippingMethodRaw(__assign({ project: project, shippingMethod: shippingMethod }, optionalParameters), initOverrides)];
|
|
361
|
-
case 1:
|
|
362
|
-
response = _a.sent();
|
|
363
|
-
return [4 /*yield*/, response.value()];
|
|
364
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
});
|
|
368
|
-
};
|
|
369
|
-
return ShippingMethodsApi;
|
|
370
|
-
}(runtime.BaseAPI));
|
|
371
|
-
exports.ShippingMethodsApi = ShippingMethodsApi;
|
|
372
|
-
/**
|
|
373
|
-
* @export
|
|
374
|
-
*/
|
|
375
|
-
exports.GetShippingMethodsSortByEnum = {
|
|
376
|
-
Name: 'name',
|
|
377
|
-
Price: 'price',
|
|
378
|
-
Enabled: 'enabled'
|
|
379
|
-
};
|
|
380
|
-
/**
|
|
381
|
-
* @export
|
|
382
|
-
*/
|
|
383
|
-
exports.GetShippingMethodsSortOrderEnum = {
|
|
384
|
-
Asc: 'asc',
|
|
385
|
-
Desc: 'desc'
|
|
386
|
-
};
|
package/dist/apis/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ShippingMethodsApi';
|
package/dist/apis/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/* tslint:disable */
|
|
18
|
-
/* eslint-disable */
|
|
19
|
-
__exportStar(require("./ShippingMethodsApi"), exports);
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Website Api
|
|
3
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.1.3
|
|
6
|
-
* Contact: hello@teemill.com
|
|
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 ApiError
|
|
16
|
-
*/
|
|
17
|
-
export interface ApiError {
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof ApiError
|
|
22
|
-
*/
|
|
23
|
-
code?: string;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof ApiError
|
|
28
|
-
*/
|
|
29
|
-
message: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the ApiError interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfApiError(value: object): boolean;
|
|
35
|
-
export declare function ApiErrorFromJSON(json: any): ApiError;
|
|
36
|
-
export declare function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError;
|
|
37
|
-
export declare function ApiErrorToJSON(value?: ApiError | null): any;
|
package/dist/models/ApiError.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Website Api
|
|
6
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.3
|
|
9
|
-
* Contact: hello@teemill.com
|
|
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.ApiErrorToJSON = exports.ApiErrorFromJSONTyped = exports.ApiErrorFromJSON = exports.instanceOfApiError = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
|
-
/**
|
|
19
|
-
* Check if a given object implements the ApiError interface.
|
|
20
|
-
*/
|
|
21
|
-
function instanceOfApiError(value) {
|
|
22
|
-
var isInstance = true;
|
|
23
|
-
isInstance = isInstance && "message" in value;
|
|
24
|
-
return isInstance;
|
|
25
|
-
}
|
|
26
|
-
exports.instanceOfApiError = instanceOfApiError;
|
|
27
|
-
function ApiErrorFromJSON(json) {
|
|
28
|
-
return ApiErrorFromJSONTyped(json, false);
|
|
29
|
-
}
|
|
30
|
-
exports.ApiErrorFromJSON = ApiErrorFromJSON;
|
|
31
|
-
function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
-
if ((json === undefined) || (json === null)) {
|
|
33
|
-
return json;
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
|
|
37
|
-
'message': json['message'],
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
exports.ApiErrorFromJSONTyped = ApiErrorFromJSONTyped;
|
|
41
|
-
function ApiErrorToJSON(value) {
|
|
42
|
-
if (value === undefined) {
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
if (value === null) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
'code': value.code,
|
|
50
|
-
'message': value.message,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
exports.ApiErrorToJSON = ApiErrorToJSON;
|
package/dist/models/Price.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Website Api
|
|
3
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.1.3
|
|
6
|
-
* Contact: hello@teemill.com
|
|
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
|
-
* Standard price definition that defines the amount and currency.
|
|
14
|
-
* @export
|
|
15
|
-
* @interface Price
|
|
16
|
-
*/
|
|
17
|
-
export interface Price {
|
|
18
|
-
/**
|
|
19
|
-
* Price including tax in the specified currency.
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof Price
|
|
22
|
-
*/
|
|
23
|
-
amount?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Currency code for the currency the price is valued in.
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof Price
|
|
28
|
-
*/
|
|
29
|
-
currencyCode?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the Price interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfPrice(value: object): boolean;
|
|
35
|
-
export declare function PriceFromJSON(json: any): Price;
|
|
36
|
-
export declare function PriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Price;
|
|
37
|
-
export declare function PriceToJSON(value?: Price | null): any;
|
package/dist/models/Price.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Website Api
|
|
6
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.3
|
|
9
|
-
* Contact: hello@teemill.com
|
|
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.PriceToJSON = exports.PriceFromJSONTyped = exports.PriceFromJSON = exports.instanceOfPrice = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
|
-
/**
|
|
19
|
-
* Check if a given object implements the Price interface.
|
|
20
|
-
*/
|
|
21
|
-
function instanceOfPrice(value) {
|
|
22
|
-
var isInstance = true;
|
|
23
|
-
return isInstance;
|
|
24
|
-
}
|
|
25
|
-
exports.instanceOfPrice = instanceOfPrice;
|
|
26
|
-
function PriceFromJSON(json) {
|
|
27
|
-
return PriceFromJSONTyped(json, false);
|
|
28
|
-
}
|
|
29
|
-
exports.PriceFromJSON = PriceFromJSON;
|
|
30
|
-
function PriceFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
-
if ((json === undefined) || (json === null)) {
|
|
32
|
-
return json;
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
'amount': !(0, runtime_1.exists)(json, 'amount') ? undefined : json['amount'],
|
|
36
|
-
'currencyCode': !(0, runtime_1.exists)(json, 'currencyCode') ? undefined : json['currencyCode'],
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
exports.PriceFromJSONTyped = PriceFromJSONTyped;
|
|
40
|
-
function PriceToJSON(value) {
|
|
41
|
-
if (value === undefined) {
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
if (value === null) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
'amount': value.amount,
|
|
49
|
-
'currencyCode': value.currencyCode,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
exports.PriceToJSON = PriceToJSON;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Website Api
|
|
3
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.1.3
|
|
6
|
-
* Contact: hello@teemill.com
|
|
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 { Price } from './Price';
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @export
|
|
16
|
-
* @interface ShippingMethod
|
|
17
|
-
*/
|
|
18
|
-
export interface ShippingMethod {
|
|
19
|
-
/**
|
|
20
|
-
* Unique object identifier
|
|
21
|
-
* @type {string}
|
|
22
|
-
* @memberof ShippingMethod
|
|
23
|
-
*/
|
|
24
|
-
id?: string;
|
|
25
|
-
/**
|
|
26
|
-
* A reference to the resource location
|
|
27
|
-
* @type {string}
|
|
28
|
-
* @memberof ShippingMethod
|
|
29
|
-
*/
|
|
30
|
-
ref?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Name of the shipping method
|
|
33
|
-
* @type {string}
|
|
34
|
-
* @memberof ShippingMethod
|
|
35
|
-
*/
|
|
36
|
-
name?: string;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @type {Price}
|
|
40
|
-
* @memberof ShippingMethod
|
|
41
|
-
*/
|
|
42
|
-
price?: Price;
|
|
43
|
-
/**
|
|
44
|
-
* Whether the shipping method is enabled
|
|
45
|
-
* @type {boolean}
|
|
46
|
-
* @memberof ShippingMethod
|
|
47
|
-
*/
|
|
48
|
-
enabled?: boolean;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Check if a given object implements the ShippingMethod interface.
|
|
52
|
-
*/
|
|
53
|
-
export declare function instanceOfShippingMethod(value: object): boolean;
|
|
54
|
-
export declare function ShippingMethodFromJSON(json: any): ShippingMethod;
|
|
55
|
-
export declare function ShippingMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShippingMethod;
|
|
56
|
-
export declare function ShippingMethodToJSON(value?: ShippingMethod | null): any;
|