@teemill/website 0.1.1

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.
@@ -0,0 +1,15 @@
1
+ .gitignore
2
+ .npmignore
3
+ README.md
4
+ package.json
5
+ src/apis/ShippingMethodsApi.ts
6
+ src/apis/index.ts
7
+ src/index.ts
8
+ src/models/ApiError.ts
9
+ src/models/Price.ts
10
+ src/models/ShippingMethod.ts
11
+ src/models/ShippingMethods.ts
12
+ src/models/UpdateShippingMethodRequest.ts
13
+ src/models/index.ts
14
+ src/runtime.ts
15
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 7.4.0-SNAPSHOT
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ ## @teemill/website@0.1.1
2
+
3
+ This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
+
5
+ Environment
6
+ * Node.js
7
+ * Webpack
8
+ * Browserify
9
+
10
+ Language level
11
+ * ES5 - you must have a Promises/A+ library installed
12
+ * ES6
13
+
14
+ Module system
15
+ * CommonJS
16
+ * ES6 module system
17
+
18
+ It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
19
+
20
+ ### Building
21
+
22
+ To build and compile the typescript sources to javascript use:
23
+ ```
24
+ npm install
25
+ npm run build
26
+ ```
27
+
28
+ ### Publishing
29
+
30
+ First build the package then run `npm publish`
31
+
32
+ ### Consuming
33
+
34
+ navigate to the folder of your consuming project and run one of the following commands.
35
+
36
+ _published:_
37
+
38
+ ```
39
+ npm install @teemill/website@0.1.1 --save
40
+ ```
41
+
42
+ _unPublished (not recommended):_
43
+
44
+ ```
45
+ npm install PATH_TO_GENERATED_PACKAGE --save
46
+ ```
@@ -0,0 +1,96 @@
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.1
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 * as runtime from '../runtime';
13
+ import type { ShippingMethod, ShippingMethods, UpdateShippingMethodRequest } from '../models/index';
14
+ export interface GetShippingMethodRequest {
15
+ project: string;
16
+ shippingMethod: string;
17
+ }
18
+ export interface GetShippingMethodsRequest {
19
+ project: string;
20
+ search?: string;
21
+ pageToken?: number;
22
+ pageSize?: number;
23
+ sortBy?: GetShippingMethodsSortByEnum;
24
+ sortOrder?: GetShippingMethodsSortOrderEnum;
25
+ }
26
+ export interface RevertShippingMethodRequest {
27
+ project: string;
28
+ shippingMethod: string;
29
+ }
30
+ export interface UpdateShippingMethodOperationRequest {
31
+ project: string;
32
+ shippingMethod: string;
33
+ updateShippingMethodRequest?: UpdateShippingMethodRequest;
34
+ }
35
+ /**
36
+ *
37
+ */
38
+ export declare class ShippingMethodsApi extends runtime.BaseAPI {
39
+ /**
40
+ * Get shipping method
41
+ * Get shipping method
42
+ */
43
+ getShippingMethodRaw(requestParameters: GetShippingMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShippingMethod>>;
44
+ /**
45
+ * Get shipping method
46
+ * Get shipping method
47
+ */
48
+ getShippingMethod(project: string, shippingMethod: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShippingMethod>;
49
+ /**
50
+ * List shipping methods
51
+ * List shipping methods
52
+ */
53
+ getShippingMethodsRaw(requestParameters: GetShippingMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShippingMethods>>;
54
+ /**
55
+ * List shipping methods
56
+ * List shipping methods
57
+ */
58
+ getShippingMethods(project: string, optionalParameters?: runtime.OptionalOnly<GetShippingMethodsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShippingMethods>;
59
+ /**
60
+ * Revert shipping method to default
61
+ * Revert shipping method to default
62
+ */
63
+ revertShippingMethodRaw(requestParameters: RevertShippingMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShippingMethod>>;
64
+ /**
65
+ * Revert shipping method to default
66
+ * Revert shipping method to default
67
+ */
68
+ revertShippingMethod(project: string, shippingMethod: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShippingMethod>;
69
+ /**
70
+ * Update shipping method
71
+ * Update shipping method
72
+ */
73
+ updateShippingMethodRaw(requestParameters: UpdateShippingMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShippingMethod>>;
74
+ /**
75
+ * Update shipping method
76
+ * Update shipping method
77
+ */
78
+ updateShippingMethod(project: string, shippingMethod: string, optionalParameters?: runtime.OptionalOnly<UpdateShippingMethodOperationRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShippingMethod>;
79
+ }
80
+ /**
81
+ * @export
82
+ */
83
+ export declare const GetShippingMethodsSortByEnum: {
84
+ readonly Name: "name";
85
+ readonly Price: "price";
86
+ readonly Enabled: "enabled";
87
+ };
88
+ export type GetShippingMethodsSortByEnum = typeof GetShippingMethodsSortByEnum[keyof typeof GetShippingMethodsSortByEnum];
89
+ /**
90
+ * @export
91
+ */
92
+ export declare const GetShippingMethodsSortOrderEnum: {
93
+ readonly Asc: "asc";
94
+ readonly Desc: "desc";
95
+ };
96
+ export type GetShippingMethodsSortOrderEnum = typeof GetShippingMethodsSortOrderEnum[keyof typeof GetShippingMethodsSortOrderEnum];
@@ -0,0 +1,386 @@
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.1
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
+ };
@@ -0,0 +1 @@
1
+ export * from './ShippingMethodsApi';
@@ -0,0 +1,19 @@
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);
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
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("./runtime"), exports);
20
+ __exportStar(require("./apis/index"), exports);
21
+ __exportStar(require("./models/index"), exports);
@@ -0,0 +1,37 @@
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.1
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;