@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,337 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Website Api
|
|
5
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.3
|
|
8
|
-
* Contact: hello@teemill.com
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import * as runtime from '../runtime';
|
|
17
|
-
import type {
|
|
18
|
-
ApiError,
|
|
19
|
-
ShippingMethod,
|
|
20
|
-
ShippingMethods,
|
|
21
|
-
UpdateShippingMethodRequest,
|
|
22
|
-
} from '../models/index';
|
|
23
|
-
import {
|
|
24
|
-
ApiErrorFromJSON,
|
|
25
|
-
ApiErrorToJSON,
|
|
26
|
-
ShippingMethodFromJSON,
|
|
27
|
-
ShippingMethodToJSON,
|
|
28
|
-
ShippingMethodsFromJSON,
|
|
29
|
-
ShippingMethodsToJSON,
|
|
30
|
-
UpdateShippingMethodRequestFromJSON,
|
|
31
|
-
UpdateShippingMethodRequestToJSON,
|
|
32
|
-
} from '../models/index';
|
|
33
|
-
|
|
34
|
-
export interface GetShippingMethodRequest {
|
|
35
|
-
project: string;
|
|
36
|
-
shippingMethod: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface GetShippingMethodsRequest {
|
|
40
|
-
project: string;
|
|
41
|
-
search?: string;
|
|
42
|
-
pageToken?: number;
|
|
43
|
-
pageSize?: number;
|
|
44
|
-
sortBy?: GetShippingMethodsSortByEnum;
|
|
45
|
-
sortOrder?: GetShippingMethodsSortOrderEnum;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface RevertShippingMethodRequest {
|
|
49
|
-
project: string;
|
|
50
|
-
shippingMethod: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface UpdateShippingMethodOperationRequest {
|
|
54
|
-
project: string;
|
|
55
|
-
shippingMethod: string;
|
|
56
|
-
updateShippingMethodRequest?: UpdateShippingMethodRequest;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
*/
|
|
62
|
-
export class ShippingMethodsApi extends runtime.BaseAPI {
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Get shipping method
|
|
66
|
-
* Get shipping method
|
|
67
|
-
*/
|
|
68
|
-
async getShippingMethodRaw(requestParameters: GetShippingMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShippingMethod>> {
|
|
69
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
70
|
-
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling getShippingMethod.');
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (requestParameters.shippingMethod === null || requestParameters.shippingMethod === undefined) {
|
|
74
|
-
throw new runtime.RequiredError('shippingMethod','Required parameter requestParameters.shippingMethod was null or undefined when calling getShippingMethod.');
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const queryParameters: any = {};
|
|
78
|
-
|
|
79
|
-
if (requestParameters.project !== undefined) {
|
|
80
|
-
queryParameters['project'] = requestParameters.project;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
84
|
-
|
|
85
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
86
|
-
// oauth required
|
|
87
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
91
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const response = await this.request({
|
|
95
|
-
path: `/v1/website/shipping-methods/{shippingMethod}`.replace(`{${"shippingMethod"}}`, encodeURIComponent(String(requestParameters.shippingMethod))),
|
|
96
|
-
method: 'GET',
|
|
97
|
-
headers: headerParameters,
|
|
98
|
-
query: queryParameters,
|
|
99
|
-
}, initOverrides);
|
|
100
|
-
|
|
101
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ShippingMethodFromJSON(jsonValue));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Get shipping method
|
|
106
|
-
* Get shipping method
|
|
107
|
-
*/
|
|
108
|
-
async getShippingMethod(
|
|
109
|
-
project: string, shippingMethod: string,
|
|
110
|
-
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
111
|
-
): Promise<ShippingMethod> {
|
|
112
|
-
const response = await this.getShippingMethodRaw(
|
|
113
|
-
{
|
|
114
|
-
project: project,shippingMethod: shippingMethod,
|
|
115
|
-
},
|
|
116
|
-
initOverrides
|
|
117
|
-
);
|
|
118
|
-
|
|
119
|
-
return await response.value();
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* List shipping methods
|
|
124
|
-
* List shipping methods
|
|
125
|
-
*/
|
|
126
|
-
async getShippingMethodsRaw(requestParameters: GetShippingMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShippingMethods>> {
|
|
127
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
128
|
-
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling getShippingMethods.');
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
const queryParameters: any = {};
|
|
132
|
-
|
|
133
|
-
if (requestParameters.project !== undefined) {
|
|
134
|
-
queryParameters['project'] = requestParameters.project;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (requestParameters.search !== undefined) {
|
|
138
|
-
queryParameters['search'] = requestParameters.search;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (requestParameters.pageToken !== undefined) {
|
|
142
|
-
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
if (requestParameters.pageSize !== undefined) {
|
|
146
|
-
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (requestParameters.sortBy !== undefined) {
|
|
150
|
-
queryParameters['sortBy'] = requestParameters.sortBy;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (requestParameters.sortOrder !== undefined) {
|
|
154
|
-
queryParameters['sortOrder'] = requestParameters.sortOrder;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
158
|
-
|
|
159
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
160
|
-
// oauth required
|
|
161
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
165
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
const response = await this.request({
|
|
169
|
-
path: `/v1/website/shipping-methods`,
|
|
170
|
-
method: 'GET',
|
|
171
|
-
headers: headerParameters,
|
|
172
|
-
query: queryParameters,
|
|
173
|
-
}, initOverrides);
|
|
174
|
-
|
|
175
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ShippingMethodsFromJSON(jsonValue));
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* List shipping methods
|
|
180
|
-
* List shipping methods
|
|
181
|
-
*/
|
|
182
|
-
async getShippingMethods(
|
|
183
|
-
project: string,
|
|
184
|
-
optionalParameters: runtime.OptionalOnly<GetShippingMethodsRequest> = {},
|
|
185
|
-
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
186
|
-
): Promise<ShippingMethods> {
|
|
187
|
-
const response = await this.getShippingMethodsRaw(
|
|
188
|
-
{
|
|
189
|
-
project: project,
|
|
190
|
-
...optionalParameters,
|
|
191
|
-
},
|
|
192
|
-
initOverrides
|
|
193
|
-
);
|
|
194
|
-
|
|
195
|
-
return await response.value();
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Revert shipping method to default
|
|
200
|
-
* Revert shipping method to default
|
|
201
|
-
*/
|
|
202
|
-
async revertShippingMethodRaw(requestParameters: RevertShippingMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShippingMethod>> {
|
|
203
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
204
|
-
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling revertShippingMethod.');
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
if (requestParameters.shippingMethod === null || requestParameters.shippingMethod === undefined) {
|
|
208
|
-
throw new runtime.RequiredError('shippingMethod','Required parameter requestParameters.shippingMethod was null or undefined when calling revertShippingMethod.');
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
const queryParameters: any = {};
|
|
212
|
-
|
|
213
|
-
if (requestParameters.project !== undefined) {
|
|
214
|
-
queryParameters['project'] = requestParameters.project;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
218
|
-
|
|
219
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
220
|
-
// oauth required
|
|
221
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
225
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
const response = await this.request({
|
|
229
|
-
path: `/v1/website/shipping-methods/{shippingMethod}/revert`.replace(`{${"shippingMethod"}}`, encodeURIComponent(String(requestParameters.shippingMethod))),
|
|
230
|
-
method: 'POST',
|
|
231
|
-
headers: headerParameters,
|
|
232
|
-
query: queryParameters,
|
|
233
|
-
}, initOverrides);
|
|
234
|
-
|
|
235
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ShippingMethodFromJSON(jsonValue));
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Revert shipping method to default
|
|
240
|
-
* Revert shipping method to default
|
|
241
|
-
*/
|
|
242
|
-
async revertShippingMethod(
|
|
243
|
-
project: string, shippingMethod: string,
|
|
244
|
-
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
245
|
-
): Promise<ShippingMethod> {
|
|
246
|
-
const response = await this.revertShippingMethodRaw(
|
|
247
|
-
{
|
|
248
|
-
project: project,shippingMethod: shippingMethod,
|
|
249
|
-
},
|
|
250
|
-
initOverrides
|
|
251
|
-
);
|
|
252
|
-
|
|
253
|
-
return await response.value();
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Update shipping method
|
|
258
|
-
* Update shipping method
|
|
259
|
-
*/
|
|
260
|
-
async updateShippingMethodRaw(requestParameters: UpdateShippingMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShippingMethod>> {
|
|
261
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
262
|
-
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling updateShippingMethod.');
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
if (requestParameters.shippingMethod === null || requestParameters.shippingMethod === undefined) {
|
|
266
|
-
throw new runtime.RequiredError('shippingMethod','Required parameter requestParameters.shippingMethod was null or undefined when calling updateShippingMethod.');
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const queryParameters: any = {};
|
|
270
|
-
|
|
271
|
-
if (requestParameters.project !== undefined) {
|
|
272
|
-
queryParameters['project'] = requestParameters.project;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
276
|
-
|
|
277
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
278
|
-
|
|
279
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
280
|
-
// oauth required
|
|
281
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
285
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
const response = await this.request({
|
|
289
|
-
path: `/v1/website/shipping-methods/{shippingMethod}`.replace(`{${"shippingMethod"}}`, encodeURIComponent(String(requestParameters.shippingMethod))),
|
|
290
|
-
method: 'PUT',
|
|
291
|
-
headers: headerParameters,
|
|
292
|
-
query: queryParameters,
|
|
293
|
-
body: UpdateShippingMethodRequestToJSON(requestParameters.updateShippingMethodRequest),
|
|
294
|
-
}, initOverrides);
|
|
295
|
-
|
|
296
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ShippingMethodFromJSON(jsonValue));
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Update shipping method
|
|
301
|
-
* Update shipping method
|
|
302
|
-
*/
|
|
303
|
-
async updateShippingMethod(
|
|
304
|
-
project: string, shippingMethod: string,
|
|
305
|
-
optionalParameters: runtime.OptionalOnly<UpdateShippingMethodOperationRequest> = {},
|
|
306
|
-
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
307
|
-
): Promise<ShippingMethod> {
|
|
308
|
-
const response = await this.updateShippingMethodRaw(
|
|
309
|
-
{
|
|
310
|
-
project: project,shippingMethod: shippingMethod,
|
|
311
|
-
...optionalParameters,
|
|
312
|
-
},
|
|
313
|
-
initOverrides
|
|
314
|
-
);
|
|
315
|
-
|
|
316
|
-
return await response.value();
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* @export
|
|
323
|
-
*/
|
|
324
|
-
export const GetShippingMethodsSortByEnum = {
|
|
325
|
-
Name: 'name',
|
|
326
|
-
Price: 'price',
|
|
327
|
-
Enabled: 'enabled'
|
|
328
|
-
} as const;
|
|
329
|
-
export type GetShippingMethodsSortByEnum = typeof GetShippingMethodsSortByEnum[keyof typeof GetShippingMethodsSortByEnum];
|
|
330
|
-
/**
|
|
331
|
-
* @export
|
|
332
|
-
*/
|
|
333
|
-
export const GetShippingMethodsSortOrderEnum = {
|
|
334
|
-
Asc: 'asc',
|
|
335
|
-
Desc: 'desc'
|
|
336
|
-
} as const;
|
|
337
|
-
export type GetShippingMethodsSortOrderEnum = typeof GetShippingMethodsSortOrderEnum[keyof typeof GetShippingMethodsSortOrderEnum];
|
package/src/apis/index.ts
DELETED
package/src/index.ts
DELETED
package/src/models/ApiError.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Website Api
|
|
5
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.3
|
|
8
|
-
* Contact: hello@teemill.com
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { exists, mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface ApiError
|
|
20
|
-
*/
|
|
21
|
-
export interface ApiError {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof ApiError
|
|
26
|
-
*/
|
|
27
|
-
code?: string;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof ApiError
|
|
32
|
-
*/
|
|
33
|
-
message: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Check if a given object implements the ApiError interface.
|
|
38
|
-
*/
|
|
39
|
-
export function instanceOfApiError(value: object): boolean {
|
|
40
|
-
let isInstance = true;
|
|
41
|
-
isInstance = isInstance && "message" in value;
|
|
42
|
-
|
|
43
|
-
return isInstance;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function ApiErrorFromJSON(json: any): ApiError {
|
|
47
|
-
return ApiErrorFromJSONTyped(json, false);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError {
|
|
51
|
-
if ((json === undefined) || (json === null)) {
|
|
52
|
-
return json;
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
|
|
56
|
-
'code': !exists(json, 'code') ? undefined : json['code'],
|
|
57
|
-
'message': json['message'],
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function ApiErrorToJSON(value?: ApiError | null): any {
|
|
62
|
-
if (value === undefined) {
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
if (value === null) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
|
|
70
|
-
'code': value.code,
|
|
71
|
-
'message': value.message,
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
|
package/src/models/Price.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Website Api
|
|
5
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.3
|
|
8
|
-
* Contact: hello@teemill.com
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { exists, mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
* Standard price definition that defines the amount and currency.
|
|
18
|
-
* @export
|
|
19
|
-
* @interface Price
|
|
20
|
-
*/
|
|
21
|
-
export interface Price {
|
|
22
|
-
/**
|
|
23
|
-
* Price including tax in the specified currency.
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof Price
|
|
26
|
-
*/
|
|
27
|
-
amount?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Currency code for the currency the price is valued in.
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof Price
|
|
32
|
-
*/
|
|
33
|
-
currencyCode?: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Check if a given object implements the Price interface.
|
|
38
|
-
*/
|
|
39
|
-
export function instanceOfPrice(value: object): boolean {
|
|
40
|
-
let isInstance = true;
|
|
41
|
-
|
|
42
|
-
return isInstance;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function PriceFromJSON(json: any): Price {
|
|
46
|
-
return PriceFromJSONTyped(json, false);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function PriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Price {
|
|
50
|
-
if ((json === undefined) || (json === null)) {
|
|
51
|
-
return json;
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
|
|
55
|
-
'amount': !exists(json, 'amount') ? undefined : json['amount'],
|
|
56
|
-
'currencyCode': !exists(json, 'currencyCode') ? undefined : json['currencyCode'],
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function PriceToJSON(value?: Price | null): any {
|
|
61
|
-
if (value === undefined) {
|
|
62
|
-
return undefined;
|
|
63
|
-
}
|
|
64
|
-
if (value === null) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
|
|
69
|
-
'amount': value.amount,
|
|
70
|
-
'currencyCode': value.currencyCode,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Website Api
|
|
5
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.3
|
|
8
|
-
* Contact: hello@teemill.com
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { exists, mapValues } from '../runtime';
|
|
16
|
-
import type { Price } from './Price';
|
|
17
|
-
import {
|
|
18
|
-
PriceFromJSON,
|
|
19
|
-
PriceFromJSONTyped,
|
|
20
|
-
PriceToJSON,
|
|
21
|
-
} from './Price';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @export
|
|
26
|
-
* @interface ShippingMethod
|
|
27
|
-
*/
|
|
28
|
-
export interface ShippingMethod {
|
|
29
|
-
/**
|
|
30
|
-
* Unique object identifier
|
|
31
|
-
* @type {string}
|
|
32
|
-
* @memberof ShippingMethod
|
|
33
|
-
*/
|
|
34
|
-
id?: string;
|
|
35
|
-
/**
|
|
36
|
-
* A reference to the resource location
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof ShippingMethod
|
|
39
|
-
*/
|
|
40
|
-
ref?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Name of the shipping method
|
|
43
|
-
* @type {string}
|
|
44
|
-
* @memberof ShippingMethod
|
|
45
|
-
*/
|
|
46
|
-
name?: string;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @type {Price}
|
|
50
|
-
* @memberof ShippingMethod
|
|
51
|
-
*/
|
|
52
|
-
price?: Price;
|
|
53
|
-
/**
|
|
54
|
-
* Whether the shipping method is enabled
|
|
55
|
-
* @type {boolean}
|
|
56
|
-
* @memberof ShippingMethod
|
|
57
|
-
*/
|
|
58
|
-
enabled?: boolean;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Check if a given object implements the ShippingMethod interface.
|
|
63
|
-
*/
|
|
64
|
-
export function instanceOfShippingMethod(value: object): boolean {
|
|
65
|
-
let isInstance = true;
|
|
66
|
-
|
|
67
|
-
return isInstance;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function ShippingMethodFromJSON(json: any): ShippingMethod {
|
|
71
|
-
return ShippingMethodFromJSONTyped(json, false);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function ShippingMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShippingMethod {
|
|
75
|
-
if ((json === undefined) || (json === null)) {
|
|
76
|
-
return json;
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
|
|
80
|
-
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
81
|
-
'ref': !exists(json, 'ref') ? undefined : json['ref'],
|
|
82
|
-
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
83
|
-
'price': !exists(json, 'price') ? undefined : PriceFromJSON(json['price']),
|
|
84
|
-
'enabled': !exists(json, 'enabled') ? undefined : json['enabled'],
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function ShippingMethodToJSON(value?: ShippingMethod | null): any {
|
|
89
|
-
if (value === undefined) {
|
|
90
|
-
return undefined;
|
|
91
|
-
}
|
|
92
|
-
if (value === null) {
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
return {
|
|
96
|
-
|
|
97
|
-
'id': value.id,
|
|
98
|
-
'ref': value.ref,
|
|
99
|
-
'name': value.name,
|
|
100
|
-
'price': PriceToJSON(value.price),
|
|
101
|
-
'enabled': value.enabled,
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Website Api
|
|
5
|
-
* Manage Teemill Website For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.3
|
|
8
|
-
* Contact: hello@teemill.com
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { exists, mapValues } from '../runtime';
|
|
16
|
-
import type { ShippingMethod } from './ShippingMethod';
|
|
17
|
-
import {
|
|
18
|
-
ShippingMethodFromJSON,
|
|
19
|
-
ShippingMethodFromJSONTyped,
|
|
20
|
-
ShippingMethodToJSON,
|
|
21
|
-
} from './ShippingMethod';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @export
|
|
26
|
-
* @interface ShippingMethods
|
|
27
|
-
*/
|
|
28
|
-
export interface ShippingMethods {
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @type {Array<ShippingMethod>}
|
|
32
|
-
* @memberof ShippingMethods
|
|
33
|
-
*/
|
|
34
|
-
shippingMethods: Array<ShippingMethod>;
|
|
35
|
-
/**
|
|
36
|
-
* The token referencing the next page number
|
|
37
|
-
* @type {number}
|
|
38
|
-
* @memberof ShippingMethods
|
|
39
|
-
*/
|
|
40
|
-
nextPageToken?: number | null;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Check if a given object implements the ShippingMethods interface.
|
|
45
|
-
*/
|
|
46
|
-
export function instanceOfShippingMethods(value: object): boolean {
|
|
47
|
-
let isInstance = true;
|
|
48
|
-
isInstance = isInstance && "shippingMethods" in value;
|
|
49
|
-
|
|
50
|
-
return isInstance;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function ShippingMethodsFromJSON(json: any): ShippingMethods {
|
|
54
|
-
return ShippingMethodsFromJSONTyped(json, false);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function ShippingMethodsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShippingMethods {
|
|
58
|
-
if ((json === undefined) || (json === null)) {
|
|
59
|
-
return json;
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
|
|
63
|
-
'shippingMethods': ((json['shippingMethods'] as Array<any>).map(ShippingMethodFromJSON)),
|
|
64
|
-
'nextPageToken': !exists(json, 'nextPageToken') ? undefined : json['nextPageToken'],
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function ShippingMethodsToJSON(value?: ShippingMethods | null): any {
|
|
69
|
-
if (value === undefined) {
|
|
70
|
-
return undefined;
|
|
71
|
-
}
|
|
72
|
-
if (value === null) {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
|
|
77
|
-
'shippingMethods': ((value.shippingMethods as Array<any>).map(ShippingMethodToJSON)),
|
|
78
|
-
'nextPageToken': value.nextPageToken,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|