@teemill/website 0.1.6 → 0.2.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/website@0.1.6
1
+ ## @teemill/website@0.2.6
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @teemill/website@0.1.6 --save
39
+ npm install @teemill/website@0.2.6 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
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.1.6
7
+ * The version of the OpenAPI document: 0.2.6
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,429 @@ 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
+ * MenuApi - axios parameter creator
330
+ * @export
331
+ */
332
+ export const MenuApiAxiosParamCreator = function (configuration?: Configuration) {
333
+ return {
334
+ /**
335
+ * Get menu
336
+ * @summary Get menu
337
+ * @param {string} project What project it is
338
+ * @param {*} [options] Override http request option.
339
+ * @throws {RequiredError}
340
+ */
341
+ getMenu: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
342
+ // verify required parameter 'project' is not null or undefined
343
+ assertParamExists('getMenu', 'project', project)
344
+ const localVarPath = `/v1/website/menu`;
345
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
346
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
347
+ let baseOptions;
348
+ if (configuration) {
349
+ baseOptions = configuration.baseOptions;
350
+ }
351
+
352
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
353
+ const localVarHeaderParameter = {} as any;
354
+ const localVarQueryParameter = {} as any;
355
+
356
+ // authentication session-oauth required
357
+ // oauth required
358
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
359
+
360
+ // authentication api-key required
361
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
362
+
363
+ if (project !== undefined) {
364
+ localVarQueryParameter['project'] = project;
365
+ }
366
+
367
+
368
+
369
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
370
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
371
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
372
+
373
+ return {
374
+ url: toPathString(localVarUrlObj),
375
+ options: localVarRequestOptions,
376
+ };
377
+ },
378
+ /**
379
+ * Update menu
380
+ * @summary Update menu
381
+ * @param {string} project What project it is
382
+ * @param {UpdateMenuRequest} [updateMenuRequest] Update menu request
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ updateMenu: async (project: string, updateMenuRequest?: UpdateMenuRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
387
+ // verify required parameter 'project' is not null or undefined
388
+ assertParamExists('updateMenu', 'project', project)
389
+ const localVarPath = `/v1/website/menu`;
390
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
391
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
392
+ let baseOptions;
393
+ if (configuration) {
394
+ baseOptions = configuration.baseOptions;
395
+ }
396
+
397
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
398
+ const localVarHeaderParameter = {} as any;
399
+ const localVarQueryParameter = {} as any;
400
+
401
+ // authentication session-oauth required
402
+ // oauth required
403
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
404
+
405
+ // authentication api-key required
406
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
407
+
408
+ if (project !== undefined) {
409
+ localVarQueryParameter['project'] = project;
410
+ }
411
+
412
+
413
+
414
+ localVarHeaderParameter['Content-Type'] = 'application/json';
415
+
416
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
417
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
418
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
419
+ localVarRequestOptions.data = serializeDataIfNeeded(updateMenuRequest, localVarRequestOptions, configuration)
420
+
421
+ return {
422
+ url: toPathString(localVarUrlObj),
423
+ options: localVarRequestOptions,
424
+ };
425
+ },
426
+ }
427
+ };
428
+
429
+ /**
430
+ * MenuApi - functional programming interface
431
+ * @export
432
+ */
433
+ export const MenuApiFp = function(configuration?: Configuration) {
434
+ const localVarAxiosParamCreator = MenuApiAxiosParamCreator(configuration)
435
+ return {
436
+ /**
437
+ * Get menu
438
+ * @summary Get menu
439
+ * @param {string} project What project it is
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ async getMenu(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Menu>> {
444
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getMenu(project, options);
445
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
446
+ const localVarOperationServerBasePath = operationServerMap['MenuApi.getMenu']?.[localVarOperationServerIndex]?.url;
447
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
448
+ },
449
+ /**
450
+ * Update menu
451
+ * @summary Update menu
452
+ * @param {string} project What project it is
453
+ * @param {UpdateMenuRequest} [updateMenuRequest] Update menu request
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ async updateMenu(project: string, updateMenuRequest?: UpdateMenuRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Menu>> {
458
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateMenu(project, updateMenuRequest, options);
459
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
460
+ const localVarOperationServerBasePath = operationServerMap['MenuApi.updateMenu']?.[localVarOperationServerIndex]?.url;
461
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
462
+ },
463
+ }
464
+ };
465
+
466
+ /**
467
+ * MenuApi - factory interface
468
+ * @export
469
+ */
470
+ export const MenuApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
471
+ const localVarFp = MenuApiFp(configuration)
472
+ return {
473
+ /**
474
+ * Get menu
475
+ * @summary Get menu
476
+ * @param {MenuApiGetMenuRequest} requestParameters Request parameters.
477
+ * @param {*} [options] Override http request option.
478
+ * @throws {RequiredError}
479
+ */
480
+ getMenu(requestParameters: MenuApiGetMenuRequest, options?: RawAxiosRequestConfig): AxiosPromise<Menu> {
481
+ return localVarFp.getMenu(requestParameters.project, options).then((request) => request(axios, basePath));
482
+ },
483
+ /**
484
+ * Update menu
485
+ * @summary Update menu
486
+ * @param {MenuApiUpdateMenuRequest} requestParameters Request parameters.
487
+ * @param {*} [options] Override http request option.
488
+ * @throws {RequiredError}
489
+ */
490
+ updateMenu(requestParameters: MenuApiUpdateMenuRequest, options?: RawAxiosRequestConfig): AxiosPromise<Menu> {
491
+ return localVarFp.updateMenu(requestParameters.project, requestParameters.updateMenuRequest, options).then((request) => request(axios, basePath));
492
+ },
493
+ };
494
+ };
495
+
496
+ /**
497
+ * Request parameters for getMenu operation in MenuApi.
498
+ * @export
499
+ * @interface MenuApiGetMenuRequest
500
+ */
501
+ export interface MenuApiGetMenuRequest {
502
+ /**
503
+ * What project it is
504
+ * @type {string}
505
+ * @memberof MenuApiGetMenu
506
+ */
507
+ readonly project: string
508
+ }
509
+
510
+ /**
511
+ * Request parameters for updateMenu operation in MenuApi.
512
+ * @export
513
+ * @interface MenuApiUpdateMenuRequest
514
+ */
515
+ export interface MenuApiUpdateMenuRequest {
516
+ /**
517
+ * What project it is
518
+ * @type {string}
519
+ * @memberof MenuApiUpdateMenu
520
+ */
521
+ readonly project: string
522
+
523
+ /**
524
+ * Update menu request
525
+ * @type {UpdateMenuRequest}
526
+ * @memberof MenuApiUpdateMenu
527
+ */
528
+ readonly updateMenuRequest?: UpdateMenuRequest
529
+ }
530
+
531
+ /**
532
+ * MenuApi - object-oriented interface
533
+ * @export
534
+ * @class MenuApi
535
+ * @extends {BaseAPI}
536
+ */
537
+ export class MenuApi extends BaseAPI {
538
+ /**
539
+ * Get menu
540
+ * @summary Get menu
541
+ * @param {MenuApiGetMenuRequest} requestParameters Request parameters.
542
+ * @param {*} [options] Override http request option.
543
+ * @throws {RequiredError}
544
+ * @memberof MenuApi
545
+ */
546
+ public getMenu(requestParameters: MenuApiGetMenuRequest, options?: RawAxiosRequestConfig) {
547
+ return MenuApiFp(this.configuration).getMenu(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
548
+ }
549
+
550
+ /**
551
+ * Update menu
552
+ * @summary Update menu
553
+ * @param {MenuApiUpdateMenuRequest} requestParameters Request parameters.
554
+ * @param {*} [options] Override http request option.
555
+ * @throws {RequiredError}
556
+ * @memberof MenuApi
557
+ */
558
+ public updateMenu(requestParameters: MenuApiUpdateMenuRequest, options?: RawAxiosRequestConfig) {
559
+ return MenuApiFp(this.configuration).updateMenu(requestParameters.project, requestParameters.updateMenuRequest, options).then((request) => request(this.axios, this.basePath));
560
+ }
561
+ }
562
+
563
+
91
564
 
92
565
  /**
93
566
  * PaymentApi - axios parameter creator
package/base.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.1.6
7
+ * The version of the OpenAPI document: 0.2.6
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/common.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.1.6
7
+ * The version of the OpenAPI document: 0.2.6
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.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.1.6
7
+ * The version of the OpenAPI document: 0.2.6
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).