@randock/nameshift-api-client 0.0.211 → 0.0.212

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.
@@ -187,6 +187,7 @@ src/models/SellerSubscriptionListItemDtoDomainInformation.ts
187
187
  src/models/SeoMetricsDto.ts
188
188
  src/models/SetDomainTransferConfirmationInput.ts
189
189
  src/models/SetNewPasswordInput.ts
190
+ src/models/SetPayoutProviderInput.ts
190
191
  src/models/StoreBuyerLocaleInput.ts
191
192
  src/models/StoreUserLocaleInput.ts
192
193
  src/models/SubscriptionBillingPeriodicityDto.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.211
1
+ ## @randock/nameshift-api-client@0.0.212
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
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 @randock/nameshift-api-client@0.0.211 --save
39
+ npm install @randock/nameshift-api-client@0.0.212 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
44
44
  ```
45
45
  npm install PATH_TO_GENERATED_PACKAGE --save
46
46
  ```
47
- 9d7d771b5fbac612e4b509358213c72b602b34e715991e64c9efff091efbb48d7d8bc3639437e1d78a83f0fac98f6891
47
+ 4c94f072c60f0194a797da504e5ba2c90a0b767a41c0ebb22c6c02379a776c07cc26ea28bcc714b7aa37728941cce962
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AccountOnboardingSessionDto, AccountSettingsDto, AccountSettingsInput, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, UpdateAccountBillingInformationInput } from '../models/index';
13
+ import type { AccountOnboardingSessionDto, AccountSettingsDto, AccountSettingsInput, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, SetPayoutProviderInput, UpdateAccountBillingInformationInput } from '../models/index';
14
14
  export interface AccountsApiGetAccountPaymentProviderSessionRequest {
15
15
  accountId: string;
16
16
  }
@@ -26,6 +26,10 @@ export interface AccountsApiPutAvatarRequest {
26
26
  accountId: string;
27
27
  file?: Blob | null;
28
28
  }
29
+ export interface AccountsApiSetPayoutProviderRequest {
30
+ accountId: string;
31
+ setPayoutProviderInput: SetPayoutProviderInput;
32
+ }
29
33
  export interface AccountsApiUpdateSettingsRequest {
30
34
  accountId: string;
31
35
  accountSettingsInput: AccountSettingsInput;
@@ -82,6 +86,14 @@ export declare class AccountsApi extends runtime.BaseAPI {
82
86
  *
83
87
  */
84
88
  putAvatar(requestParameters: AccountsApiPutAvatarRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
89
+ /**
90
+ *
91
+ */
92
+ setPayoutProviderRaw(requestParameters: AccountsApiSetPayoutProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
93
+ /**
94
+ *
95
+ */
96
+ setPayoutProvider(requestParameters: AccountsApiSetPayoutProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
85
97
  /**
86
98
  *
87
99
  */
@@ -407,6 +407,62 @@ var AccountsApi = /** @class */ (function (_super) {
407
407
  });
408
408
  });
409
409
  };
410
+ /**
411
+ *
412
+ */
413
+ AccountsApi.prototype.setPayoutProviderRaw = function (requestParameters, initOverrides) {
414
+ return __awaiter(this, void 0, void 0, function () {
415
+ var queryParameters, headerParameters, token, tokenString, response;
416
+ return __generator(this, function (_a) {
417
+ switch (_a.label) {
418
+ case 0:
419
+ if (requestParameters['accountId'] == null) {
420
+ throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling setPayoutProvider().');
421
+ }
422
+ if (requestParameters['setPayoutProviderInput'] == null) {
423
+ throw new runtime.RequiredError('setPayoutProviderInput', 'Required parameter "setPayoutProviderInput" was null or undefined when calling setPayoutProvider().');
424
+ }
425
+ queryParameters = {};
426
+ headerParameters = {};
427
+ headerParameters['Content-Type'] = 'application/json';
428
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
429
+ token = this.configuration.accessToken;
430
+ return [4 /*yield*/, token("bearer", [])];
431
+ case 1:
432
+ tokenString = _a.sent();
433
+ if (tokenString) {
434
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
435
+ }
436
+ _a.label = 2;
437
+ case 2: return [4 /*yield*/, this.request({
438
+ path: "/private/accounts/{accountId}/payout-provider".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
439
+ method: 'POST',
440
+ headers: headerParameters,
441
+ query: queryParameters,
442
+ body: (0, index_1.SetPayoutProviderInputToJSON)(requestParameters['setPayoutProviderInput']),
443
+ }, initOverrides)];
444
+ case 3:
445
+ response = _a.sent();
446
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
447
+ }
448
+ });
449
+ });
450
+ };
451
+ /**
452
+ *
453
+ */
454
+ AccountsApi.prototype.setPayoutProvider = function (requestParameters, initOverrides) {
455
+ return __awaiter(this, void 0, void 0, function () {
456
+ return __generator(this, function (_a) {
457
+ switch (_a.label) {
458
+ case 0: return [4 /*yield*/, this.setPayoutProviderRaw(requestParameters, initOverrides)];
459
+ case 1:
460
+ _a.sent();
461
+ return [2 /*return*/];
462
+ }
463
+ });
464
+ });
465
+ };
410
466
  /**
411
467
  *
412
468
  */
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface SetPayoutProviderInput
16
+ */
17
+ export interface SetPayoutProviderInput {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SetPayoutProviderInput
22
+ */
23
+ provider: SetPayoutProviderInputProviderEnum;
24
+ }
25
+ /**
26
+ * @export
27
+ */
28
+ export declare const SetPayoutProviderInputProviderEnum: {
29
+ readonly STRIPE: "stripe";
30
+ readonly BANK_ACCOUNT: "bank_account";
31
+ };
32
+ export type SetPayoutProviderInputProviderEnum = typeof SetPayoutProviderInputProviderEnum[keyof typeof SetPayoutProviderInputProviderEnum];
33
+ /**
34
+ * Check if a given object implements the SetPayoutProviderInput interface.
35
+ */
36
+ export declare function instanceOfSetPayoutProviderInput(value: object): value is SetPayoutProviderInput;
37
+ export declare function SetPayoutProviderInputFromJSON(json: any): SetPayoutProviderInput;
38
+ export declare function SetPayoutProviderInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetPayoutProviderInput;
39
+ export declare function SetPayoutProviderInputToJSON(json: any): SetPayoutProviderInput;
40
+ export declare function SetPayoutProviderInputToJSONTyped(value?: SetPayoutProviderInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift API
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.SetPayoutProviderInputProviderEnum = void 0;
17
+ exports.instanceOfSetPayoutProviderInput = instanceOfSetPayoutProviderInput;
18
+ exports.SetPayoutProviderInputFromJSON = SetPayoutProviderInputFromJSON;
19
+ exports.SetPayoutProviderInputFromJSONTyped = SetPayoutProviderInputFromJSONTyped;
20
+ exports.SetPayoutProviderInputToJSON = SetPayoutProviderInputToJSON;
21
+ exports.SetPayoutProviderInputToJSONTyped = SetPayoutProviderInputToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.SetPayoutProviderInputProviderEnum = {
26
+ STRIPE: 'stripe',
27
+ BANK_ACCOUNT: 'bank_account'
28
+ };
29
+ /**
30
+ * Check if a given object implements the SetPayoutProviderInput interface.
31
+ */
32
+ function instanceOfSetPayoutProviderInput(value) {
33
+ if (!('provider' in value) || value['provider'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function SetPayoutProviderInputFromJSON(json) {
38
+ return SetPayoutProviderInputFromJSONTyped(json, false);
39
+ }
40
+ function SetPayoutProviderInputFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'provider': json['provider'],
46
+ };
47
+ }
48
+ function SetPayoutProviderInputToJSON(json) {
49
+ return SetPayoutProviderInputToJSONTyped(json, false);
50
+ }
51
+ function SetPayoutProviderInputToJSONTyped(value, ignoreDiscriminator) {
52
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ 'provider': value['provider'],
58
+ };
59
+ }
@@ -161,6 +161,7 @@ export * from './SellerSubscriptionListItemDtoDomainInformation';
161
161
  export * from './SeoMetricsDto';
162
162
  export * from './SetDomainTransferConfirmationInput';
163
163
  export * from './SetNewPasswordInput';
164
+ export * from './SetPayoutProviderInput';
164
165
  export * from './StoreBuyerLocaleInput';
165
166
  export * from './StoreUserLocaleInput';
166
167
  export * from './SubscriptionBillingPeriodicityDto';
@@ -179,6 +179,7 @@ __exportStar(require("./SellerSubscriptionListItemDtoDomainInformation"), export
179
179
  __exportStar(require("./SeoMetricsDto"), exports);
180
180
  __exportStar(require("./SetDomainTransferConfirmationInput"), exports);
181
181
  __exportStar(require("./SetNewPasswordInput"), exports);
182
+ __exportStar(require("./SetPayoutProviderInput"), exports);
182
183
  __exportStar(require("./StoreBuyerLocaleInput"), exports);
183
184
  __exportStar(require("./StoreUserLocaleInput"), exports);
184
185
  __exportStar(require("./SubscriptionBillingPeriodicityDto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.211",
3
+ "version": "0.0.212",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -21,6 +21,7 @@ import type {
21
21
  BadRequestException,
22
22
  IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto,
23
23
  NotFoundException,
24
+ SetPayoutProviderInput,
24
25
  ThrottlerException,
25
26
  UpdateAccountBillingInformationInput,
26
27
  ValidationException,
@@ -38,6 +39,8 @@ import {
38
39
  IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoToJSON,
39
40
  NotFoundExceptionFromJSON,
40
41
  NotFoundExceptionToJSON,
42
+ SetPayoutProviderInputFromJSON,
43
+ SetPayoutProviderInputToJSON,
41
44
  ThrottlerExceptionFromJSON,
42
45
  ThrottlerExceptionToJSON,
43
46
  UpdateAccountBillingInformationInputFromJSON,
@@ -65,6 +68,11 @@ export interface AccountsApiPutAvatarRequest {
65
68
  file?: Blob | null;
66
69
  }
67
70
 
71
+ export interface AccountsApiSetPayoutProviderRequest {
72
+ accountId: string;
73
+ setPayoutProviderInput: SetPayoutProviderInput;
74
+ }
75
+
68
76
  export interface AccountsApiUpdateSettingsRequest {
69
77
  accountId: string;
70
78
  accountSettingsInput: AccountSettingsInput;
@@ -342,6 +350,56 @@ export class AccountsApi extends runtime.BaseAPI {
342
350
  await this.putAvatarRaw(requestParameters, initOverrides);
343
351
  }
344
352
 
353
+ /**
354
+ *
355
+ */
356
+ async setPayoutProviderRaw(requestParameters: AccountsApiSetPayoutProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
357
+ if (requestParameters['accountId'] == null) {
358
+ throw new runtime.RequiredError(
359
+ 'accountId',
360
+ 'Required parameter "accountId" was null or undefined when calling setPayoutProvider().'
361
+ );
362
+ }
363
+
364
+ if (requestParameters['setPayoutProviderInput'] == null) {
365
+ throw new runtime.RequiredError(
366
+ 'setPayoutProviderInput',
367
+ 'Required parameter "setPayoutProviderInput" was null or undefined when calling setPayoutProvider().'
368
+ );
369
+ }
370
+
371
+ const queryParameters: any = {};
372
+
373
+ const headerParameters: runtime.HTTPHeaders = {};
374
+
375
+ headerParameters['Content-Type'] = 'application/json';
376
+
377
+ if (this.configuration && this.configuration.accessToken) {
378
+ const token = this.configuration.accessToken;
379
+ const tokenString = await token("bearer", []);
380
+
381
+ if (tokenString) {
382
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
383
+ }
384
+ }
385
+ const response = await this.request({
386
+ path: `/private/accounts/{accountId}/payout-provider`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
387
+ method: 'POST',
388
+ headers: headerParameters,
389
+ query: queryParameters,
390
+ body: SetPayoutProviderInputToJSON(requestParameters['setPayoutProviderInput']),
391
+ }, initOverrides);
392
+
393
+ return new runtime.VoidApiResponse(response);
394
+ }
395
+
396
+ /**
397
+ *
398
+ */
399
+ async setPayoutProvider(requestParameters: AccountsApiSetPayoutProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
400
+ await this.setPayoutProviderRaw(requestParameters, initOverrides);
401
+ }
402
+
345
403
  /**
346
404
  *
347
405
  */
@@ -0,0 +1,77 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface SetPayoutProviderInput
20
+ */
21
+ export interface SetPayoutProviderInput {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SetPayoutProviderInput
26
+ */
27
+ provider: SetPayoutProviderInputProviderEnum;
28
+ }
29
+
30
+
31
+ /**
32
+ * @export
33
+ */
34
+ export const SetPayoutProviderInputProviderEnum = {
35
+ STRIPE: 'stripe',
36
+ BANK_ACCOUNT: 'bank_account'
37
+ } as const;
38
+ export type SetPayoutProviderInputProviderEnum = typeof SetPayoutProviderInputProviderEnum[keyof typeof SetPayoutProviderInputProviderEnum];
39
+
40
+
41
+ /**
42
+ * Check if a given object implements the SetPayoutProviderInput interface.
43
+ */
44
+ export function instanceOfSetPayoutProviderInput(value: object): value is SetPayoutProviderInput {
45
+ if (!('provider' in value) || value['provider'] === undefined) return false;
46
+ return true;
47
+ }
48
+
49
+ export function SetPayoutProviderInputFromJSON(json: any): SetPayoutProviderInput {
50
+ return SetPayoutProviderInputFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function SetPayoutProviderInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetPayoutProviderInput {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'provider': json['provider'],
60
+ };
61
+ }
62
+
63
+ export function SetPayoutProviderInputToJSON(json: any): SetPayoutProviderInput {
64
+ return SetPayoutProviderInputToJSONTyped(json, false);
65
+ }
66
+
67
+ export function SetPayoutProviderInputToJSONTyped(value?: SetPayoutProviderInput | null, ignoreDiscriminator: boolean = false): any {
68
+ if (value == null) {
69
+ return value;
70
+ }
71
+
72
+ return {
73
+
74
+ 'provider': value['provider'],
75
+ };
76
+ }
77
+
@@ -163,6 +163,7 @@ export * from './SellerSubscriptionListItemDtoDomainInformation';
163
163
  export * from './SeoMetricsDto';
164
164
  export * from './SetDomainTransferConfirmationInput';
165
165
  export * from './SetNewPasswordInput';
166
+ export * from './SetPayoutProviderInput';
166
167
  export * from './StoreBuyerLocaleInput';
167
168
  export * from './StoreUserLocaleInput';
168
169
  export * from './SubscriptionBillingPeriodicityDto';