@teemill/platform 0.13.0 → 0.14.2

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/platform@0.13.0
1
+ ## @teemill/platform@0.14.2
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/platform@0.13.0 --save
39
+ npm install @teemill/platform@0.14.2 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.13.0
7
+ * The version of the OpenAPI document: 0.14.2
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -153,6 +153,19 @@ export interface ApplicationTechnology {
153
153
  */
154
154
  'ref'?: string;
155
155
  }
156
+ /**
157
+ *
158
+ * @export
159
+ * @interface AuthorizeStripe200Response
160
+ */
161
+ export interface AuthorizeStripe200Response {
162
+ /**
163
+ * The URL to redirect to
164
+ * @type {string}
165
+ * @memberof AuthorizeStripe200Response
166
+ */
167
+ 'redirect_url': string;
168
+ }
156
169
  /**
157
170
  * Order recipient contact information, used only for courier tracking/updates.
158
171
  * @export
@@ -650,6 +663,12 @@ export interface Order {
650
663
  * @memberof Order
651
664
  */
652
665
  'statusHistory'?: Array<StatusHistoryItem>;
666
+ /**
667
+ *
668
+ * @type {Project}
669
+ * @memberof Order
670
+ */
671
+ 'project': Project;
653
672
  }
654
673
 
655
674
 
@@ -669,8 +688,15 @@ export interface OrderItem {
669
688
  * Reference URL to the order item variant
670
689
  * @type {string}
671
690
  * @memberof OrderItem
691
+ * @deprecated
672
692
  */
673
693
  'variantRef': string;
694
+ /**
695
+ *
696
+ * @type {Variant1}
697
+ * @memberof OrderItem
698
+ */
699
+ 'variant': Variant1;
674
700
  /**
675
701
  * Options associated to an order item\'s variant, such as color and size.
676
702
  * @type {Array<Option>}
@@ -978,6 +1004,38 @@ export interface OutputPadding {
978
1004
  */
979
1005
  'left': number;
980
1006
  }
1007
+ /**
1008
+ *
1009
+ * @export
1010
+ * @interface PaymentAccount
1011
+ */
1012
+ export interface PaymentAccount {
1013
+ /**
1014
+ * The name of the payment account
1015
+ * @type {string}
1016
+ * @memberof PaymentAccount
1017
+ */
1018
+ 'name': string;
1019
+ /**
1020
+ * The payment method
1021
+ * @type {string}
1022
+ * @memberof PaymentAccount
1023
+ */
1024
+ 'method': PaymentAccountMethodEnum;
1025
+ /**
1026
+ * The configuration for the payment account
1027
+ * @type {{ [key: string]: string; }}
1028
+ * @memberof PaymentAccount
1029
+ */
1030
+ 'config': { [key: string]: string; };
1031
+ }
1032
+
1033
+ export const PaymentAccountMethodEnum = {
1034
+ Stripe: 'stripe'
1035
+ } as const;
1036
+
1037
+ export type PaymentAccountMethodEnum = typeof PaymentAccountMethodEnum[keyof typeof PaymentAccountMethodEnum];
1038
+
981
1039
  /**
982
1040
  *
983
1041
  * @export
@@ -1314,6 +1372,25 @@ export interface ProductVariantsInner {
1314
1372
  */
1315
1373
  'ref'?: string;
1316
1374
  }
1375
+ /**
1376
+ *
1377
+ * @export
1378
+ * @interface Project
1379
+ */
1380
+ export interface Project {
1381
+ /**
1382
+ *
1383
+ * @type {string}
1384
+ * @memberof Project
1385
+ */
1386
+ 'id': string;
1387
+ /**
1388
+ * The name of the project
1389
+ * @type {string}
1390
+ * @memberof Project
1391
+ */
1392
+ 'name': string;
1393
+ }
1317
1394
  /**
1318
1395
  *
1319
1396
  * @export
@@ -1638,6 +1715,31 @@ export interface Variant {
1638
1715
  */
1639
1716
  'applications'?: Array<Application>;
1640
1717
  }
1718
+ /**
1719
+ *
1720
+ * @export
1721
+ * @interface Variant1
1722
+ */
1723
+ export interface Variant1 {
1724
+ /**
1725
+ * Unique object identifier
1726
+ * @type {string}
1727
+ * @memberof Variant1
1728
+ */
1729
+ 'id': string;
1730
+ /**
1731
+ * A reference to the resource location
1732
+ * @type {string}
1733
+ * @memberof Variant1
1734
+ */
1735
+ 'ref': string;
1736
+ /**
1737
+ * A reference to the resource location
1738
+ * @type {string}
1739
+ * @memberof Variant1
1740
+ */
1741
+ 'warehouseVariantRef': string;
1742
+ }
1641
1743
  /**
1642
1744
  *
1643
1745
  * @export
@@ -3144,6 +3246,324 @@ export class OrdersApi extends BaseAPI {
3144
3246
 
3145
3247
 
3146
3248
 
3249
+ /**
3250
+ * PaymentApi - axios parameter creator
3251
+ * @export
3252
+ */
3253
+ export const PaymentApiAxiosParamCreator = function (configuration?: Configuration) {
3254
+ return {
3255
+ /**
3256
+ * Authorize a Stripe payment account
3257
+ * @summary Authorize Stripe
3258
+ * @param {string} project Project unique identifier
3259
+ * @param {*} [options] Override http request option.
3260
+ * @throws {RequiredError}
3261
+ */
3262
+ authorizeStripe: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3263
+ // verify required parameter 'project' is not null or undefined
3264
+ assertParamExists('authorizeStripe', 'project', project)
3265
+ const localVarPath = `/v1/platform/payment/stripe/authorize`;
3266
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3267
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3268
+ let baseOptions;
3269
+ if (configuration) {
3270
+ baseOptions = configuration.baseOptions;
3271
+ }
3272
+
3273
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3274
+ const localVarHeaderParameter = {} as any;
3275
+ const localVarQueryParameter = {} as any;
3276
+
3277
+ // authentication session-oauth required
3278
+ // oauth required
3279
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
3280
+
3281
+ // authentication api-key required
3282
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
3283
+
3284
+ if (project !== undefined) {
3285
+ localVarQueryParameter['project'] = project;
3286
+ }
3287
+
3288
+
3289
+
3290
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3291
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3292
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3293
+
3294
+ return {
3295
+ url: toPathString(localVarUrlObj),
3296
+ options: localVarRequestOptions,
3297
+ };
3298
+ },
3299
+ /**
3300
+ * Deauthorize a Stripe payment account
3301
+ * @summary Deauthorize Stripe
3302
+ * @param {string} project Project unique identifier
3303
+ * @param {*} [options] Override http request option.
3304
+ * @throws {RequiredError}
3305
+ */
3306
+ deauthorizeStripe: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3307
+ // verify required parameter 'project' is not null or undefined
3308
+ assertParamExists('deauthorizeStripe', 'project', project)
3309
+ const localVarPath = `/v1/platform/payment/stripe/deauthorize`;
3310
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3311
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3312
+ let baseOptions;
3313
+ if (configuration) {
3314
+ baseOptions = configuration.baseOptions;
3315
+ }
3316
+
3317
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
3318
+ const localVarHeaderParameter = {} as any;
3319
+ const localVarQueryParameter = {} as any;
3320
+
3321
+ // authentication session-oauth required
3322
+ // oauth required
3323
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
3324
+
3325
+ // authentication api-key required
3326
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
3327
+
3328
+ if (project !== undefined) {
3329
+ localVarQueryParameter['project'] = project;
3330
+ }
3331
+
3332
+
3333
+
3334
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3335
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3336
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3337
+
3338
+ return {
3339
+ url: toPathString(localVarUrlObj),
3340
+ options: localVarRequestOptions,
3341
+ };
3342
+ },
3343
+ /**
3344
+ * Get the Stripe payment account for the project
3345
+ * @summary Get Stripe Payment Account
3346
+ * @param {string} project Project unique identifier
3347
+ * @param {*} [options] Override http request option.
3348
+ * @throws {RequiredError}
3349
+ */
3350
+ getStripePaymentAccount: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3351
+ // verify required parameter 'project' is not null or undefined
3352
+ assertParamExists('getStripePaymentAccount', 'project', project)
3353
+ const localVarPath = `/v1/platform/payment/stripe`;
3354
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3355
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3356
+ let baseOptions;
3357
+ if (configuration) {
3358
+ baseOptions = configuration.baseOptions;
3359
+ }
3360
+
3361
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3362
+ const localVarHeaderParameter = {} as any;
3363
+ const localVarQueryParameter = {} as any;
3364
+
3365
+ // authentication session-oauth required
3366
+ // oauth required
3367
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
3368
+
3369
+ // authentication api-key required
3370
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
3371
+
3372
+ if (project !== undefined) {
3373
+ localVarQueryParameter['project'] = project;
3374
+ }
3375
+
3376
+
3377
+
3378
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3379
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3380
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3381
+
3382
+ return {
3383
+ url: toPathString(localVarUrlObj),
3384
+ options: localVarRequestOptions,
3385
+ };
3386
+ },
3387
+ }
3388
+ };
3389
+
3390
+ /**
3391
+ * PaymentApi - functional programming interface
3392
+ * @export
3393
+ */
3394
+ export const PaymentApiFp = function(configuration?: Configuration) {
3395
+ const localVarAxiosParamCreator = PaymentApiAxiosParamCreator(configuration)
3396
+ return {
3397
+ /**
3398
+ * Authorize a Stripe payment account
3399
+ * @summary Authorize Stripe
3400
+ * @param {string} project Project unique identifier
3401
+ * @param {*} [options] Override http request option.
3402
+ * @throws {RequiredError}
3403
+ */
3404
+ async authorizeStripe(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthorizeStripe200Response>> {
3405
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authorizeStripe(project, options);
3406
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3407
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.authorizeStripe']?.[localVarOperationServerIndex]?.url;
3408
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3409
+ },
3410
+ /**
3411
+ * Deauthorize a Stripe payment account
3412
+ * @summary Deauthorize Stripe
3413
+ * @param {string} project Project unique identifier
3414
+ * @param {*} [options] Override http request option.
3415
+ * @throws {RequiredError}
3416
+ */
3417
+ async deauthorizeStripe(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
3418
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deauthorizeStripe(project, options);
3419
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3420
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.deauthorizeStripe']?.[localVarOperationServerIndex]?.url;
3421
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3422
+ },
3423
+ /**
3424
+ * Get the Stripe payment account for the project
3425
+ * @summary Get Stripe Payment Account
3426
+ * @param {string} project Project unique identifier
3427
+ * @param {*} [options] Override http request option.
3428
+ * @throws {RequiredError}
3429
+ */
3430
+ async getStripePaymentAccount(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentAccount>> {
3431
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getStripePaymentAccount(project, options);
3432
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3433
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.getStripePaymentAccount']?.[localVarOperationServerIndex]?.url;
3434
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3435
+ },
3436
+ }
3437
+ };
3438
+
3439
+ /**
3440
+ * PaymentApi - factory interface
3441
+ * @export
3442
+ */
3443
+ export const PaymentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3444
+ const localVarFp = PaymentApiFp(configuration)
3445
+ return {
3446
+ /**
3447
+ * Authorize a Stripe payment account
3448
+ * @summary Authorize Stripe
3449
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
3450
+ * @param {*} [options] Override http request option.
3451
+ * @throws {RequiredError}
3452
+ */
3453
+ authorizeStripe(requestParameters: PaymentApiAuthorizeStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizeStripe200Response> {
3454
+ return localVarFp.authorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
3455
+ },
3456
+ /**
3457
+ * Deauthorize a Stripe payment account
3458
+ * @summary Deauthorize Stripe
3459
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
3460
+ * @param {*} [options] Override http request option.
3461
+ * @throws {RequiredError}
3462
+ */
3463
+ deauthorizeStripe(requestParameters: PaymentApiDeauthorizeStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3464
+ return localVarFp.deauthorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
3465
+ },
3466
+ /**
3467
+ * Get the Stripe payment account for the project
3468
+ * @summary Get Stripe Payment Account
3469
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
3470
+ * @param {*} [options] Override http request option.
3471
+ * @throws {RequiredError}
3472
+ */
3473
+ getStripePaymentAccount(requestParameters: PaymentApiGetStripePaymentAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise<PaymentAccount> {
3474
+ return localVarFp.getStripePaymentAccount(requestParameters.project, options).then((request) => request(axios, basePath));
3475
+ },
3476
+ };
3477
+ };
3478
+
3479
+ /**
3480
+ * Request parameters for authorizeStripe operation in PaymentApi.
3481
+ * @export
3482
+ * @interface PaymentApiAuthorizeStripeRequest
3483
+ */
3484
+ export interface PaymentApiAuthorizeStripeRequest {
3485
+ /**
3486
+ * Project unique identifier
3487
+ * @type {string}
3488
+ * @memberof PaymentApiAuthorizeStripe
3489
+ */
3490
+ readonly project: string
3491
+ }
3492
+
3493
+ /**
3494
+ * Request parameters for deauthorizeStripe operation in PaymentApi.
3495
+ * @export
3496
+ * @interface PaymentApiDeauthorizeStripeRequest
3497
+ */
3498
+ export interface PaymentApiDeauthorizeStripeRequest {
3499
+ /**
3500
+ * Project unique identifier
3501
+ * @type {string}
3502
+ * @memberof PaymentApiDeauthorizeStripe
3503
+ */
3504
+ readonly project: string
3505
+ }
3506
+
3507
+ /**
3508
+ * Request parameters for getStripePaymentAccount operation in PaymentApi.
3509
+ * @export
3510
+ * @interface PaymentApiGetStripePaymentAccountRequest
3511
+ */
3512
+ export interface PaymentApiGetStripePaymentAccountRequest {
3513
+ /**
3514
+ * Project unique identifier
3515
+ * @type {string}
3516
+ * @memberof PaymentApiGetStripePaymentAccount
3517
+ */
3518
+ readonly project: string
3519
+ }
3520
+
3521
+ /**
3522
+ * PaymentApi - object-oriented interface
3523
+ * @export
3524
+ * @class PaymentApi
3525
+ * @extends {BaseAPI}
3526
+ */
3527
+ export class PaymentApi extends BaseAPI {
3528
+ /**
3529
+ * Authorize a Stripe payment account
3530
+ * @summary Authorize Stripe
3531
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
3532
+ * @param {*} [options] Override http request option.
3533
+ * @throws {RequiredError}
3534
+ * @memberof PaymentApi
3535
+ */
3536
+ public authorizeStripe(requestParameters: PaymentApiAuthorizeStripeRequest, options?: RawAxiosRequestConfig) {
3537
+ return PaymentApiFp(this.configuration).authorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
3538
+ }
3539
+
3540
+ /**
3541
+ * Deauthorize a Stripe payment account
3542
+ * @summary Deauthorize Stripe
3543
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
3544
+ * @param {*} [options] Override http request option.
3545
+ * @throws {RequiredError}
3546
+ * @memberof PaymentApi
3547
+ */
3548
+ public deauthorizeStripe(requestParameters: PaymentApiDeauthorizeStripeRequest, options?: RawAxiosRequestConfig) {
3549
+ return PaymentApiFp(this.configuration).deauthorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
3550
+ }
3551
+
3552
+ /**
3553
+ * Get the Stripe payment account for the project
3554
+ * @summary Get Stripe Payment Account
3555
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
3556
+ * @param {*} [options] Override http request option.
3557
+ * @throws {RequiredError}
3558
+ * @memberof PaymentApi
3559
+ */
3560
+ public getStripePaymentAccount(requestParameters: PaymentApiGetStripePaymentAccountRequest, options?: RawAxiosRequestConfig) {
3561
+ return PaymentApiFp(this.configuration).getStripePaymentAccount(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
3562
+ }
3563
+ }
3564
+
3565
+
3566
+
3147
3567
  /**
3148
3568
  * PlatformApi - axios parameter creator
3149
3569
  * @export
package/base.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.13.0
7
+ * The version of the OpenAPI document: 0.14.2
8
8
  *
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
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.13.0
7
+ * The version of the OpenAPI document: 0.14.2
8
8
  *
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
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.13.0
7
+ * The version of the OpenAPI document: 0.14.2
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -90,11 +90,10 @@ export class Configuration {
90
90
  this.basePath = param.basePath;
91
91
  this.serverIndex = param.serverIndex;
92
92
  this.baseOptions = {
93
+ ...param.baseOptions,
93
94
  headers: {
94
95
  ...param.baseOptions?.headers,
95
- 'User-Agent': "OpenAPI-Generator/0.13.0/typescript-axios"
96
96
  },
97
- ...param.baseOptions
98
97
  };
99
98
  this.formDataCtor = param.formDataCtor;
100
99
  }