@randock/nameshift-api-client 0.0.226 → 0.0.227

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
- ## @randock/nameshift-api-client@0.0.226
1
+ ## @randock/nameshift-api-client@0.0.227
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.226 --save
39
+ npm install @randock/nameshift-api-client@0.0.227 --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
- 5e3e3926eccb7fdcabfe126fadd872db653bf4bf19534fd408f17e21031bc97bb61748d4c14030c4126f8988e23b9b7d
47
+ dbf86a8d4c12bdd5028424eb183d91c460c23f445c703efadb4176f2c2f3a1780f5455311ffc96fcebca586cfda4863c
@@ -11,6 +11,9 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { AccountOnboardingSessionDto, AccountSettingsDto, AccountSettingsInput, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, SetPayoutProviderInput, UpdateAccountBillingInformationInput } from '../models/index';
14
+ export interface AccountsApiDeleteAccountRequest {
15
+ accountId: string;
16
+ }
14
17
  export interface AccountsApiGetAccountPaymentProviderSessionRequest {
15
18
  accountId: string;
16
19
  }
@@ -38,6 +41,14 @@ export interface AccountsApiUpdateSettingsRequest {
38
41
  *
39
42
  */
40
43
  export declare class AccountsApi extends runtime.BaseAPI {
44
+ /**
45
+ *
46
+ */
47
+ deleteAccountRaw(requestParameters: AccountsApiDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
48
+ /**
49
+ *
50
+ */
51
+ deleteAccount(requestParameters: AccountsApiDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
41
52
  /**
42
53
  *
43
54
  */
@@ -75,6 +75,57 @@ var AccountsApi = /** @class */ (function (_super) {
75
75
  function AccountsApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ *
80
+ */
81
+ AccountsApi.prototype.deleteAccountRaw = function (requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, token, tokenString, response;
84
+ return __generator(this, function (_a) {
85
+ switch (_a.label) {
86
+ case 0:
87
+ if (requestParameters['accountId'] == null) {
88
+ throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling deleteAccount().');
89
+ }
90
+ queryParameters = {};
91
+ headerParameters = {};
92
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
93
+ token = this.configuration.accessToken;
94
+ return [4 /*yield*/, token("bearer", [])];
95
+ case 1:
96
+ tokenString = _a.sent();
97
+ if (tokenString) {
98
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
99
+ }
100
+ _a.label = 2;
101
+ case 2: return [4 /*yield*/, this.request({
102
+ path: "/private/accounts/{accountId}".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
103
+ method: 'DELETE',
104
+ headers: headerParameters,
105
+ query: queryParameters,
106
+ }, initOverrides)];
107
+ case 3:
108
+ response = _a.sent();
109
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
110
+ }
111
+ });
112
+ });
113
+ };
114
+ /**
115
+ *
116
+ */
117
+ AccountsApi.prototype.deleteAccount = function (requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function () {
119
+ return __generator(this, function (_a) {
120
+ switch (_a.label) {
121
+ case 0: return [4 /*yield*/, this.deleteAccountRaw(requestParameters, initOverrides)];
122
+ case 1:
123
+ _a.sent();
124
+ return [2 /*return*/];
125
+ }
126
+ });
127
+ });
128
+ };
78
129
  /**
79
130
  *
80
131
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.226",
3
+ "version": "0.0.227",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -49,6 +49,10 @@ import {
49
49
  ValidationExceptionToJSON,
50
50
  } from '../models/index';
51
51
 
52
+ export interface AccountsApiDeleteAccountRequest {
53
+ accountId: string;
54
+ }
55
+
52
56
  export interface AccountsApiGetAccountPaymentProviderSessionRequest {
53
57
  accountId: string;
54
58
  }
@@ -83,6 +87,46 @@ export interface AccountsApiUpdateSettingsRequest {
83
87
  */
84
88
  export class AccountsApi extends runtime.BaseAPI {
85
89
 
90
+ /**
91
+ *
92
+ */
93
+ async deleteAccountRaw(requestParameters: AccountsApiDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
94
+ if (requestParameters['accountId'] == null) {
95
+ throw new runtime.RequiredError(
96
+ 'accountId',
97
+ 'Required parameter "accountId" was null or undefined when calling deleteAccount().'
98
+ );
99
+ }
100
+
101
+ const queryParameters: any = {};
102
+
103
+ const headerParameters: runtime.HTTPHeaders = {};
104
+
105
+ if (this.configuration && this.configuration.accessToken) {
106
+ const token = this.configuration.accessToken;
107
+ const tokenString = await token("bearer", []);
108
+
109
+ if (tokenString) {
110
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
111
+ }
112
+ }
113
+ const response = await this.request({
114
+ path: `/private/accounts/{accountId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
115
+ method: 'DELETE',
116
+ headers: headerParameters,
117
+ query: queryParameters,
118
+ }, initOverrides);
119
+
120
+ return new runtime.VoidApiResponse(response);
121
+ }
122
+
123
+ /**
124
+ *
125
+ */
126
+ async deleteAccount(requestParameters: AccountsApiDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
127
+ await this.deleteAccountRaw(requestParameters, initOverrides);
128
+ }
129
+
86
130
  /**
87
131
  *
88
132
  */