@teemill/website 0.1.6 → 0.3.0
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/README.md +2 -2
- package/api.ts +735 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +505 -1
- package/dist/api.js +390 -4
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +505 -1
- package/dist/esm/api.js +382 -4
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Website API
|
|
5
5
|
* Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
7
|
+
* The version of the OpenAPI document: 0.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -55,6 +55,56 @@ export interface AuthorizeStripe200Response {
|
|
|
55
55
|
*/
|
|
56
56
|
'redirect_url': string;
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @export
|
|
61
|
+
* @interface Menu
|
|
62
|
+
*/
|
|
63
|
+
export interface Menu {
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Array<MenuItem>}
|
|
67
|
+
* @memberof Menu
|
|
68
|
+
*/
|
|
69
|
+
'items': Array<MenuItem>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @export
|
|
74
|
+
* @interface MenuItem
|
|
75
|
+
*/
|
|
76
|
+
export interface MenuItem {
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof MenuItem
|
|
81
|
+
*/
|
|
82
|
+
'id': string;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof MenuItem
|
|
87
|
+
*/
|
|
88
|
+
'text': string;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {string}
|
|
92
|
+
* @memberof MenuItem
|
|
93
|
+
*/
|
|
94
|
+
'link': string;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {number}
|
|
98
|
+
* @memberof MenuItem
|
|
99
|
+
*/
|
|
100
|
+
'order': number;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @type {Array<SubmenuInner>}
|
|
104
|
+
* @memberof MenuItem
|
|
105
|
+
*/
|
|
106
|
+
'submenu': Array<SubmenuInner>;
|
|
107
|
+
}
|
|
58
108
|
/**
|
|
59
109
|
*
|
|
60
110
|
* @export
|
|
@@ -88,6 +138,690 @@ export const PaymentAccountMethodEnum = {
|
|
|
88
138
|
|
|
89
139
|
export type PaymentAccountMethodEnum = typeof PaymentAccountMethodEnum[keyof typeof PaymentAccountMethodEnum];
|
|
90
140
|
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @export
|
|
144
|
+
* @interface SubmenuInner
|
|
145
|
+
*/
|
|
146
|
+
export interface SubmenuInner {
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* @type {string}
|
|
150
|
+
* @memberof SubmenuInner
|
|
151
|
+
*/
|
|
152
|
+
'id': string;
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @type {string}
|
|
156
|
+
* @memberof SubmenuInner
|
|
157
|
+
*/
|
|
158
|
+
'title': string;
|
|
159
|
+
/**
|
|
160
|
+
*
|
|
161
|
+
* @type {string}
|
|
162
|
+
* @memberof SubmenuInner
|
|
163
|
+
*/
|
|
164
|
+
'image': string | null;
|
|
165
|
+
/**
|
|
166
|
+
*
|
|
167
|
+
* @type {number}
|
|
168
|
+
* @memberof SubmenuInner
|
|
169
|
+
*/
|
|
170
|
+
'order': number;
|
|
171
|
+
/**
|
|
172
|
+
*
|
|
173
|
+
* @type {Array<SubmenuItem>}
|
|
174
|
+
* @memberof SubmenuInner
|
|
175
|
+
*/
|
|
176
|
+
'items': Array<SubmenuItem>;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
*
|
|
180
|
+
* @export
|
|
181
|
+
* @interface SubmenuItem
|
|
182
|
+
*/
|
|
183
|
+
export interface SubmenuItem {
|
|
184
|
+
/**
|
|
185
|
+
*
|
|
186
|
+
* @type {string}
|
|
187
|
+
* @memberof SubmenuItem
|
|
188
|
+
*/
|
|
189
|
+
'id': string;
|
|
190
|
+
/**
|
|
191
|
+
*
|
|
192
|
+
* @type {string}
|
|
193
|
+
* @memberof SubmenuItem
|
|
194
|
+
*/
|
|
195
|
+
'text': string;
|
|
196
|
+
/**
|
|
197
|
+
*
|
|
198
|
+
* @type {string}
|
|
199
|
+
* @memberof SubmenuItem
|
|
200
|
+
*/
|
|
201
|
+
'link': string;
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @type {number}
|
|
205
|
+
* @memberof SubmenuItem
|
|
206
|
+
*/
|
|
207
|
+
'order': number;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
* @export
|
|
212
|
+
* @interface UpdateMenuRequest
|
|
213
|
+
*/
|
|
214
|
+
export interface UpdateMenuRequest {
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
* @type {Array<UpdateMenuRequestItem>}
|
|
218
|
+
* @memberof UpdateMenuRequest
|
|
219
|
+
*/
|
|
220
|
+
'items'?: Array<UpdateMenuRequestItem>;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
*
|
|
224
|
+
* @export
|
|
225
|
+
* @interface UpdateMenuRequestItem
|
|
226
|
+
*/
|
|
227
|
+
export interface UpdateMenuRequestItem {
|
|
228
|
+
/**
|
|
229
|
+
*
|
|
230
|
+
* @type {string}
|
|
231
|
+
* @memberof UpdateMenuRequestItem
|
|
232
|
+
*/
|
|
233
|
+
'id': string | null;
|
|
234
|
+
/**
|
|
235
|
+
*
|
|
236
|
+
* @type {string}
|
|
237
|
+
* @memberof UpdateMenuRequestItem
|
|
238
|
+
*/
|
|
239
|
+
'text': string;
|
|
240
|
+
/**
|
|
241
|
+
*
|
|
242
|
+
* @type {string}
|
|
243
|
+
* @memberof UpdateMenuRequestItem
|
|
244
|
+
*/
|
|
245
|
+
'link': string;
|
|
246
|
+
/**
|
|
247
|
+
*
|
|
248
|
+
* @type {number}
|
|
249
|
+
* @memberof UpdateMenuRequestItem
|
|
250
|
+
*/
|
|
251
|
+
'order': number;
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
* @type {Array<UpdateMenuRequestItemSubmenuInner>}
|
|
255
|
+
* @memberof UpdateMenuRequestItem
|
|
256
|
+
*/
|
|
257
|
+
'submenu': Array<UpdateMenuRequestItemSubmenuInner>;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
*
|
|
261
|
+
* @export
|
|
262
|
+
* @interface UpdateMenuRequestItemSubmenuInner
|
|
263
|
+
*/
|
|
264
|
+
export interface UpdateMenuRequestItemSubmenuInner {
|
|
265
|
+
/**
|
|
266
|
+
*
|
|
267
|
+
* @type {string}
|
|
268
|
+
* @memberof UpdateMenuRequestItemSubmenuInner
|
|
269
|
+
*/
|
|
270
|
+
'id': string | null;
|
|
271
|
+
/**
|
|
272
|
+
*
|
|
273
|
+
* @type {string}
|
|
274
|
+
* @memberof UpdateMenuRequestItemSubmenuInner
|
|
275
|
+
*/
|
|
276
|
+
'title': string;
|
|
277
|
+
/**
|
|
278
|
+
*
|
|
279
|
+
* @type {string}
|
|
280
|
+
* @memberof UpdateMenuRequestItemSubmenuInner
|
|
281
|
+
*/
|
|
282
|
+
'image': string | null;
|
|
283
|
+
/**
|
|
284
|
+
*
|
|
285
|
+
* @type {number}
|
|
286
|
+
* @memberof UpdateMenuRequestItemSubmenuInner
|
|
287
|
+
*/
|
|
288
|
+
'order': number;
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
* @type {Array<UpdateMenuRequestSubmenuItem>}
|
|
292
|
+
* @memberof UpdateMenuRequestItemSubmenuInner
|
|
293
|
+
*/
|
|
294
|
+
'items': Array<UpdateMenuRequestSubmenuItem>;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
*
|
|
298
|
+
* @export
|
|
299
|
+
* @interface UpdateMenuRequestSubmenuItem
|
|
300
|
+
*/
|
|
301
|
+
export interface UpdateMenuRequestSubmenuItem {
|
|
302
|
+
/**
|
|
303
|
+
*
|
|
304
|
+
* @type {string}
|
|
305
|
+
* @memberof UpdateMenuRequestSubmenuItem
|
|
306
|
+
*/
|
|
307
|
+
'id': string | null;
|
|
308
|
+
/**
|
|
309
|
+
*
|
|
310
|
+
* @type {string}
|
|
311
|
+
* @memberof UpdateMenuRequestSubmenuItem
|
|
312
|
+
*/
|
|
313
|
+
'text': string;
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* @type {string}
|
|
317
|
+
* @memberof UpdateMenuRequestSubmenuItem
|
|
318
|
+
*/
|
|
319
|
+
'link': string;
|
|
320
|
+
/**
|
|
321
|
+
*
|
|
322
|
+
* @type {number}
|
|
323
|
+
* @memberof UpdateMenuRequestSubmenuItem
|
|
324
|
+
*/
|
|
325
|
+
'order': number;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* CrossSellApi - axios parameter creator
|
|
330
|
+
* @export
|
|
331
|
+
*/
|
|
332
|
+
export const CrossSellApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
333
|
+
return {
|
|
334
|
+
/**
|
|
335
|
+
* Attaches a list of products to the given product as cross-sell products.
|
|
336
|
+
* @summary Attach cross-sell products
|
|
337
|
+
* @param {string} project What project it is
|
|
338
|
+
* @param {string} productId Product\'s unique identifier
|
|
339
|
+
* @param {Array<string>} [requestBody]
|
|
340
|
+
* @param {*} [options] Override http request option.
|
|
341
|
+
* @throws {RequiredError}
|
|
342
|
+
*/
|
|
343
|
+
attachCrossSellProducts: async (project: string, productId: string, requestBody?: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
344
|
+
// verify required parameter 'project' is not null or undefined
|
|
345
|
+
assertParamExists('attachCrossSellProducts', 'project', project)
|
|
346
|
+
// verify required parameter 'productId' is not null or undefined
|
|
347
|
+
assertParamExists('attachCrossSellProducts', 'productId', productId)
|
|
348
|
+
const localVarPath = `/v1/website/products/{productId}/cross-sell/products`
|
|
349
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
350
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
351
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
352
|
+
let baseOptions;
|
|
353
|
+
if (configuration) {
|
|
354
|
+
baseOptions = configuration.baseOptions;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
358
|
+
const localVarHeaderParameter = {} as any;
|
|
359
|
+
const localVarQueryParameter = {} as any;
|
|
360
|
+
|
|
361
|
+
// authentication session-oauth required
|
|
362
|
+
// oauth required
|
|
363
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
364
|
+
|
|
365
|
+
// authentication api-key required
|
|
366
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
367
|
+
|
|
368
|
+
if (project !== undefined) {
|
|
369
|
+
localVarQueryParameter['project'] = project;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
375
|
+
|
|
376
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
377
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
378
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
379
|
+
localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration)
|
|
380
|
+
|
|
381
|
+
return {
|
|
382
|
+
url: toPathString(localVarUrlObj),
|
|
383
|
+
options: localVarRequestOptions,
|
|
384
|
+
};
|
|
385
|
+
},
|
|
386
|
+
/**
|
|
387
|
+
*
|
|
388
|
+
* @summary Get cross-sell products linked to a product
|
|
389
|
+
* @param {string} project What project it is
|
|
390
|
+
* @param {string} productId Product\'s unique identifier
|
|
391
|
+
* @param {*} [options] Override http request option.
|
|
392
|
+
* @throws {RequiredError}
|
|
393
|
+
*/
|
|
394
|
+
getCrossSellProducts: async (project: string, productId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
395
|
+
// verify required parameter 'project' is not null or undefined
|
|
396
|
+
assertParamExists('getCrossSellProducts', 'project', project)
|
|
397
|
+
// verify required parameter 'productId' is not null or undefined
|
|
398
|
+
assertParamExists('getCrossSellProducts', 'productId', productId)
|
|
399
|
+
const localVarPath = `/v1/website/products/{productId}/cross-sell/products`
|
|
400
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
401
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
402
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
403
|
+
let baseOptions;
|
|
404
|
+
if (configuration) {
|
|
405
|
+
baseOptions = configuration.baseOptions;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
409
|
+
const localVarHeaderParameter = {} as any;
|
|
410
|
+
const localVarQueryParameter = {} as any;
|
|
411
|
+
|
|
412
|
+
// authentication session-oauth required
|
|
413
|
+
// oauth required
|
|
414
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
415
|
+
|
|
416
|
+
// authentication api-key required
|
|
417
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
418
|
+
|
|
419
|
+
if (project !== undefined) {
|
|
420
|
+
localVarQueryParameter['project'] = project;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
426
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
427
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
428
|
+
|
|
429
|
+
return {
|
|
430
|
+
url: toPathString(localVarUrlObj),
|
|
431
|
+
options: localVarRequestOptions,
|
|
432
|
+
};
|
|
433
|
+
},
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* CrossSellApi - functional programming interface
|
|
439
|
+
* @export
|
|
440
|
+
*/
|
|
441
|
+
export const CrossSellApiFp = function(configuration?: Configuration) {
|
|
442
|
+
const localVarAxiosParamCreator = CrossSellApiAxiosParamCreator(configuration)
|
|
443
|
+
return {
|
|
444
|
+
/**
|
|
445
|
+
* Attaches a list of products to the given product as cross-sell products.
|
|
446
|
+
* @summary Attach cross-sell products
|
|
447
|
+
* @param {string} project What project it is
|
|
448
|
+
* @param {string} productId Product\'s unique identifier
|
|
449
|
+
* @param {Array<string>} [requestBody]
|
|
450
|
+
* @param {*} [options] Override http request option.
|
|
451
|
+
* @throws {RequiredError}
|
|
452
|
+
*/
|
|
453
|
+
async attachCrossSellProducts(project: string, productId: string, requestBody?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
|
|
454
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.attachCrossSellProducts(project, productId, requestBody, options);
|
|
455
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
456
|
+
const localVarOperationServerBasePath = operationServerMap['CrossSellApi.attachCrossSellProducts']?.[localVarOperationServerIndex]?.url;
|
|
457
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
458
|
+
},
|
|
459
|
+
/**
|
|
460
|
+
*
|
|
461
|
+
* @summary Get cross-sell products linked to a product
|
|
462
|
+
* @param {string} project What project it is
|
|
463
|
+
* @param {string} productId Product\'s unique identifier
|
|
464
|
+
* @param {*} [options] Override http request option.
|
|
465
|
+
* @throws {RequiredError}
|
|
466
|
+
*/
|
|
467
|
+
async getCrossSellProducts(project: string, productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
|
|
468
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getCrossSellProducts(project, productId, options);
|
|
469
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
470
|
+
const localVarOperationServerBasePath = operationServerMap['CrossSellApi.getCrossSellProducts']?.[localVarOperationServerIndex]?.url;
|
|
471
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
472
|
+
},
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* CrossSellApi - factory interface
|
|
478
|
+
* @export
|
|
479
|
+
*/
|
|
480
|
+
export const CrossSellApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
481
|
+
const localVarFp = CrossSellApiFp(configuration)
|
|
482
|
+
return {
|
|
483
|
+
/**
|
|
484
|
+
* Attaches a list of products to the given product as cross-sell products.
|
|
485
|
+
* @summary Attach cross-sell products
|
|
486
|
+
* @param {CrossSellApiAttachCrossSellProductsRequest} requestParameters Request parameters.
|
|
487
|
+
* @param {*} [options] Override http request option.
|
|
488
|
+
* @throws {RequiredError}
|
|
489
|
+
*/
|
|
490
|
+
attachCrossSellProducts(requestParameters: CrossSellApiAttachCrossSellProductsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<string>> {
|
|
491
|
+
return localVarFp.attachCrossSellProducts(requestParameters.project, requestParameters.productId, requestParameters.requestBody, options).then((request) => request(axios, basePath));
|
|
492
|
+
},
|
|
493
|
+
/**
|
|
494
|
+
*
|
|
495
|
+
* @summary Get cross-sell products linked to a product
|
|
496
|
+
* @param {CrossSellApiGetCrossSellProductsRequest} requestParameters Request parameters.
|
|
497
|
+
* @param {*} [options] Override http request option.
|
|
498
|
+
* @throws {RequiredError}
|
|
499
|
+
*/
|
|
500
|
+
getCrossSellProducts(requestParameters: CrossSellApiGetCrossSellProductsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<string>> {
|
|
501
|
+
return localVarFp.getCrossSellProducts(requestParameters.project, requestParameters.productId, options).then((request) => request(axios, basePath));
|
|
502
|
+
},
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Request parameters for attachCrossSellProducts operation in CrossSellApi.
|
|
508
|
+
* @export
|
|
509
|
+
* @interface CrossSellApiAttachCrossSellProductsRequest
|
|
510
|
+
*/
|
|
511
|
+
export interface CrossSellApiAttachCrossSellProductsRequest {
|
|
512
|
+
/**
|
|
513
|
+
* What project it is
|
|
514
|
+
* @type {string}
|
|
515
|
+
* @memberof CrossSellApiAttachCrossSellProducts
|
|
516
|
+
*/
|
|
517
|
+
readonly project: string
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Product\'s unique identifier
|
|
521
|
+
* @type {string}
|
|
522
|
+
* @memberof CrossSellApiAttachCrossSellProducts
|
|
523
|
+
*/
|
|
524
|
+
readonly productId: string
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
*
|
|
528
|
+
* @type {Array<string>}
|
|
529
|
+
* @memberof CrossSellApiAttachCrossSellProducts
|
|
530
|
+
*/
|
|
531
|
+
readonly requestBody?: Array<string>
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Request parameters for getCrossSellProducts operation in CrossSellApi.
|
|
536
|
+
* @export
|
|
537
|
+
* @interface CrossSellApiGetCrossSellProductsRequest
|
|
538
|
+
*/
|
|
539
|
+
export interface CrossSellApiGetCrossSellProductsRequest {
|
|
540
|
+
/**
|
|
541
|
+
* What project it is
|
|
542
|
+
* @type {string}
|
|
543
|
+
* @memberof CrossSellApiGetCrossSellProducts
|
|
544
|
+
*/
|
|
545
|
+
readonly project: string
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Product\'s unique identifier
|
|
549
|
+
* @type {string}
|
|
550
|
+
* @memberof CrossSellApiGetCrossSellProducts
|
|
551
|
+
*/
|
|
552
|
+
readonly productId: string
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* CrossSellApi - object-oriented interface
|
|
557
|
+
* @export
|
|
558
|
+
* @class CrossSellApi
|
|
559
|
+
* @extends {BaseAPI}
|
|
560
|
+
*/
|
|
561
|
+
export class CrossSellApi extends BaseAPI {
|
|
562
|
+
/**
|
|
563
|
+
* Attaches a list of products to the given product as cross-sell products.
|
|
564
|
+
* @summary Attach cross-sell products
|
|
565
|
+
* @param {CrossSellApiAttachCrossSellProductsRequest} requestParameters Request parameters.
|
|
566
|
+
* @param {*} [options] Override http request option.
|
|
567
|
+
* @throws {RequiredError}
|
|
568
|
+
* @memberof CrossSellApi
|
|
569
|
+
*/
|
|
570
|
+
public attachCrossSellProducts(requestParameters: CrossSellApiAttachCrossSellProductsRequest, options?: RawAxiosRequestConfig) {
|
|
571
|
+
return CrossSellApiFp(this.configuration).attachCrossSellProducts(requestParameters.project, requestParameters.productId, requestParameters.requestBody, options).then((request) => request(this.axios, this.basePath));
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
*
|
|
576
|
+
* @summary Get cross-sell products linked to a product
|
|
577
|
+
* @param {CrossSellApiGetCrossSellProductsRequest} requestParameters Request parameters.
|
|
578
|
+
* @param {*} [options] Override http request option.
|
|
579
|
+
* @throws {RequiredError}
|
|
580
|
+
* @memberof CrossSellApi
|
|
581
|
+
*/
|
|
582
|
+
public getCrossSellProducts(requestParameters: CrossSellApiGetCrossSellProductsRequest, options?: RawAxiosRequestConfig) {
|
|
583
|
+
return CrossSellApiFp(this.configuration).getCrossSellProducts(requestParameters.project, requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* MenuApi - axios parameter creator
|
|
591
|
+
* @export
|
|
592
|
+
*/
|
|
593
|
+
export const MenuApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
594
|
+
return {
|
|
595
|
+
/**
|
|
596
|
+
* Get menu
|
|
597
|
+
* @summary Get menu
|
|
598
|
+
* @param {string} project What project it is
|
|
599
|
+
* @param {*} [options] Override http request option.
|
|
600
|
+
* @throws {RequiredError}
|
|
601
|
+
*/
|
|
602
|
+
getMenu: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
603
|
+
// verify required parameter 'project' is not null or undefined
|
|
604
|
+
assertParamExists('getMenu', 'project', project)
|
|
605
|
+
const localVarPath = `/v1/website/menu`;
|
|
606
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
607
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
608
|
+
let baseOptions;
|
|
609
|
+
if (configuration) {
|
|
610
|
+
baseOptions = configuration.baseOptions;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
614
|
+
const localVarHeaderParameter = {} as any;
|
|
615
|
+
const localVarQueryParameter = {} as any;
|
|
616
|
+
|
|
617
|
+
// authentication session-oauth required
|
|
618
|
+
// oauth required
|
|
619
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
620
|
+
|
|
621
|
+
// authentication api-key required
|
|
622
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
623
|
+
|
|
624
|
+
if (project !== undefined) {
|
|
625
|
+
localVarQueryParameter['project'] = project;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
631
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
632
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
633
|
+
|
|
634
|
+
return {
|
|
635
|
+
url: toPathString(localVarUrlObj),
|
|
636
|
+
options: localVarRequestOptions,
|
|
637
|
+
};
|
|
638
|
+
},
|
|
639
|
+
/**
|
|
640
|
+
* Update menu
|
|
641
|
+
* @summary Update menu
|
|
642
|
+
* @param {string} project What project it is
|
|
643
|
+
* @param {UpdateMenuRequest} [updateMenuRequest] Update menu request
|
|
644
|
+
* @param {*} [options] Override http request option.
|
|
645
|
+
* @throws {RequiredError}
|
|
646
|
+
*/
|
|
647
|
+
updateMenu: async (project: string, updateMenuRequest?: UpdateMenuRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
648
|
+
// verify required parameter 'project' is not null or undefined
|
|
649
|
+
assertParamExists('updateMenu', 'project', project)
|
|
650
|
+
const localVarPath = `/v1/website/menu`;
|
|
651
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
652
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
653
|
+
let baseOptions;
|
|
654
|
+
if (configuration) {
|
|
655
|
+
baseOptions = configuration.baseOptions;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
659
|
+
const localVarHeaderParameter = {} as any;
|
|
660
|
+
const localVarQueryParameter = {} as any;
|
|
661
|
+
|
|
662
|
+
// authentication session-oauth required
|
|
663
|
+
// oauth required
|
|
664
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
665
|
+
|
|
666
|
+
// authentication api-key required
|
|
667
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
668
|
+
|
|
669
|
+
if (project !== undefined) {
|
|
670
|
+
localVarQueryParameter['project'] = project;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
676
|
+
|
|
677
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
678
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
679
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
680
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateMenuRequest, localVarRequestOptions, configuration)
|
|
681
|
+
|
|
682
|
+
return {
|
|
683
|
+
url: toPathString(localVarUrlObj),
|
|
684
|
+
options: localVarRequestOptions,
|
|
685
|
+
};
|
|
686
|
+
},
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* MenuApi - functional programming interface
|
|
692
|
+
* @export
|
|
693
|
+
*/
|
|
694
|
+
export const MenuApiFp = function(configuration?: Configuration) {
|
|
695
|
+
const localVarAxiosParamCreator = MenuApiAxiosParamCreator(configuration)
|
|
696
|
+
return {
|
|
697
|
+
/**
|
|
698
|
+
* Get menu
|
|
699
|
+
* @summary Get menu
|
|
700
|
+
* @param {string} project What project it is
|
|
701
|
+
* @param {*} [options] Override http request option.
|
|
702
|
+
* @throws {RequiredError}
|
|
703
|
+
*/
|
|
704
|
+
async getMenu(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Menu>> {
|
|
705
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMenu(project, options);
|
|
706
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
707
|
+
const localVarOperationServerBasePath = operationServerMap['MenuApi.getMenu']?.[localVarOperationServerIndex]?.url;
|
|
708
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
709
|
+
},
|
|
710
|
+
/**
|
|
711
|
+
* Update menu
|
|
712
|
+
* @summary Update menu
|
|
713
|
+
* @param {string} project What project it is
|
|
714
|
+
* @param {UpdateMenuRequest} [updateMenuRequest] Update menu request
|
|
715
|
+
* @param {*} [options] Override http request option.
|
|
716
|
+
* @throws {RequiredError}
|
|
717
|
+
*/
|
|
718
|
+
async updateMenu(project: string, updateMenuRequest?: UpdateMenuRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Menu>> {
|
|
719
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateMenu(project, updateMenuRequest, options);
|
|
720
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
721
|
+
const localVarOperationServerBasePath = operationServerMap['MenuApi.updateMenu']?.[localVarOperationServerIndex]?.url;
|
|
722
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
723
|
+
},
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* MenuApi - factory interface
|
|
729
|
+
* @export
|
|
730
|
+
*/
|
|
731
|
+
export const MenuApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
732
|
+
const localVarFp = MenuApiFp(configuration)
|
|
733
|
+
return {
|
|
734
|
+
/**
|
|
735
|
+
* Get menu
|
|
736
|
+
* @summary Get menu
|
|
737
|
+
* @param {MenuApiGetMenuRequest} requestParameters Request parameters.
|
|
738
|
+
* @param {*} [options] Override http request option.
|
|
739
|
+
* @throws {RequiredError}
|
|
740
|
+
*/
|
|
741
|
+
getMenu(requestParameters: MenuApiGetMenuRequest, options?: RawAxiosRequestConfig): AxiosPromise<Menu> {
|
|
742
|
+
return localVarFp.getMenu(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
743
|
+
},
|
|
744
|
+
/**
|
|
745
|
+
* Update menu
|
|
746
|
+
* @summary Update menu
|
|
747
|
+
* @param {MenuApiUpdateMenuRequest} requestParameters Request parameters.
|
|
748
|
+
* @param {*} [options] Override http request option.
|
|
749
|
+
* @throws {RequiredError}
|
|
750
|
+
*/
|
|
751
|
+
updateMenu(requestParameters: MenuApiUpdateMenuRequest, options?: RawAxiosRequestConfig): AxiosPromise<Menu> {
|
|
752
|
+
return localVarFp.updateMenu(requestParameters.project, requestParameters.updateMenuRequest, options).then((request) => request(axios, basePath));
|
|
753
|
+
},
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Request parameters for getMenu operation in MenuApi.
|
|
759
|
+
* @export
|
|
760
|
+
* @interface MenuApiGetMenuRequest
|
|
761
|
+
*/
|
|
762
|
+
export interface MenuApiGetMenuRequest {
|
|
763
|
+
/**
|
|
764
|
+
* What project it is
|
|
765
|
+
* @type {string}
|
|
766
|
+
* @memberof MenuApiGetMenu
|
|
767
|
+
*/
|
|
768
|
+
readonly project: string
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Request parameters for updateMenu operation in MenuApi.
|
|
773
|
+
* @export
|
|
774
|
+
* @interface MenuApiUpdateMenuRequest
|
|
775
|
+
*/
|
|
776
|
+
export interface MenuApiUpdateMenuRequest {
|
|
777
|
+
/**
|
|
778
|
+
* What project it is
|
|
779
|
+
* @type {string}
|
|
780
|
+
* @memberof MenuApiUpdateMenu
|
|
781
|
+
*/
|
|
782
|
+
readonly project: string
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Update menu request
|
|
786
|
+
* @type {UpdateMenuRequest}
|
|
787
|
+
* @memberof MenuApiUpdateMenu
|
|
788
|
+
*/
|
|
789
|
+
readonly updateMenuRequest?: UpdateMenuRequest
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* MenuApi - object-oriented interface
|
|
794
|
+
* @export
|
|
795
|
+
* @class MenuApi
|
|
796
|
+
* @extends {BaseAPI}
|
|
797
|
+
*/
|
|
798
|
+
export class MenuApi extends BaseAPI {
|
|
799
|
+
/**
|
|
800
|
+
* Get menu
|
|
801
|
+
* @summary Get menu
|
|
802
|
+
* @param {MenuApiGetMenuRequest} requestParameters Request parameters.
|
|
803
|
+
* @param {*} [options] Override http request option.
|
|
804
|
+
* @throws {RequiredError}
|
|
805
|
+
* @memberof MenuApi
|
|
806
|
+
*/
|
|
807
|
+
public getMenu(requestParameters: MenuApiGetMenuRequest, options?: RawAxiosRequestConfig) {
|
|
808
|
+
return MenuApiFp(this.configuration).getMenu(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Update menu
|
|
813
|
+
* @summary Update menu
|
|
814
|
+
* @param {MenuApiUpdateMenuRequest} requestParameters Request parameters.
|
|
815
|
+
* @param {*} [options] Override http request option.
|
|
816
|
+
* @throws {RequiredError}
|
|
817
|
+
* @memberof MenuApi
|
|
818
|
+
*/
|
|
819
|
+
public updateMenu(requestParameters: MenuApiUpdateMenuRequest, options?: RawAxiosRequestConfig) {
|
|
820
|
+
return MenuApiFp(this.configuration).updateMenu(requestParameters.project, requestParameters.updateMenuRequest, options).then((request) => request(this.axios, this.basePath));
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
|
|
91
825
|
|
|
92
826
|
/**
|
|
93
827
|
* PaymentApi - axios parameter creator
|