@randock/nameshift-api-client 0.0.447 → 0.0.449

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.
Files changed (87) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +3 -3
  3. package/dist/apis/APIKeysApi.d.ts +78 -0
  4. package/dist/apis/APIKeysApi.js +354 -0
  5. package/dist/apis/AccountsApi.d.ts +36 -36
  6. package/dist/apis/AccountsApi.js +360 -216
  7. package/dist/apis/AdminApi.d.ts +26 -0
  8. package/dist/apis/AdminApi.js +106 -0
  9. package/dist/apis/AuctionsApi.d.ts +4 -4
  10. package/dist/apis/AuctionsApi.js +40 -24
  11. package/dist/apis/BankAccountsApi.d.ts +10 -10
  12. package/dist/apis/BankAccountsApi.js +100 -60
  13. package/dist/apis/ChallengesApi.d.ts +6 -6
  14. package/dist/apis/ChallengesApi.js +60 -36
  15. package/dist/apis/DomainTransfersApi.d.ts +2 -2
  16. package/dist/apis/DomainTransfersApi.js +20 -12
  17. package/dist/apis/DomainsApi.d.ts +44 -44
  18. package/dist/apis/DomainsApi.js +440 -264
  19. package/dist/apis/EppApi.d.ts +2 -2
  20. package/dist/apis/EppApi.js +20 -12
  21. package/dist/apis/InvoicesApi.d.ts +6 -6
  22. package/dist/apis/InvoicesApi.js +60 -36
  23. package/dist/apis/LeadsApi.d.ts +38 -38
  24. package/dist/apis/LeadsApi.js +380 -228
  25. package/dist/apis/MarketApi.d.ts +2 -2
  26. package/dist/apis/MarketApi.js +2 -2
  27. package/dist/apis/NotificationsApi.d.ts +8 -8
  28. package/dist/apis/NotificationsApi.js +80 -48
  29. package/dist/apis/StatsApi.d.ts +14 -14
  30. package/dist/apis/StatsApi.js +140 -84
  31. package/dist/apis/SubscriptionsApi.d.ts +2 -2
  32. package/dist/apis/SubscriptionsApi.js +20 -12
  33. package/dist/apis/TasksApi.d.ts +6 -6
  34. package/dist/apis/TasksApi.js +60 -36
  35. package/dist/apis/UsersApi.d.ts +10 -10
  36. package/dist/apis/UsersApi.js +100 -60
  37. package/dist/apis/index.d.ts +1 -0
  38. package/dist/apis/index.js +1 -0
  39. package/dist/models/AdminDomainListItemDto.d.ts +6 -0
  40. package/dist/models/AdminDomainListItemDto.js +4 -0
  41. package/dist/models/ApiKeyDto.d.ts +107 -0
  42. package/dist/models/ApiKeyDto.js +114 -0
  43. package/dist/models/ApiKeyScopeDto.d.ts +83 -0
  44. package/dist/models/ApiKeyScopeDto.js +98 -0
  45. package/dist/models/CreateApiKeyInput.d.ts +83 -0
  46. package/dist/models/CreateApiKeyInput.js +96 -0
  47. package/dist/models/CreatedApiKeyDto.d.ts +113 -0
  48. package/dist/models/CreatedApiKeyDto.js +118 -0
  49. package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.d.ts +6 -0
  50. package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.js +4 -0
  51. package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.d.ts +6 -0
  52. package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.js +4 -0
  53. package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.d.ts +6 -0
  54. package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.js +4 -0
  55. package/dist/models/UpdateApiKeyInput.d.ts +77 -0
  56. package/dist/models/UpdateApiKeyInput.js +90 -0
  57. package/dist/models/index.d.ts +5 -0
  58. package/dist/models/index.js +5 -0
  59. package/package.json +1 -1
  60. package/src/apis/APIKeysApi.ts +271 -0
  61. package/src/apis/AccountsApi.ts +108 -36
  62. package/src/apis/AdminApi.ts +92 -0
  63. package/src/apis/AuctionsApi.ts +12 -4
  64. package/src/apis/BankAccountsApi.ts +30 -10
  65. package/src/apis/ChallengesApi.ts +18 -6
  66. package/src/apis/DomainTransfersApi.ts +6 -2
  67. package/src/apis/DomainsApi.ts +132 -44
  68. package/src/apis/EppApi.ts +6 -2
  69. package/src/apis/InvoicesApi.ts +18 -6
  70. package/src/apis/LeadsApi.ts +114 -38
  71. package/src/apis/MarketApi.ts +2 -2
  72. package/src/apis/NotificationsApi.ts +24 -8
  73. package/src/apis/StatsApi.ts +42 -14
  74. package/src/apis/SubscriptionsApi.ts +6 -2
  75. package/src/apis/TasksApi.ts +18 -6
  76. package/src/apis/UsersApi.ts +30 -10
  77. package/src/apis/index.ts +1 -0
  78. package/src/models/AdminDomainListItemDto.ts +9 -0
  79. package/src/models/ApiKeyDto.ts +162 -0
  80. package/src/models/ApiKeyScopeDto.ts +126 -0
  81. package/src/models/CreateApiKeyInput.ts +125 -0
  82. package/src/models/CreatedApiKeyDto.ts +171 -0
  83. package/src/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.ts +9 -0
  84. package/src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts +9 -0
  85. package/src/models/IntersectionDomainDtoWithSeoMetricsDto.ts +9 -0
  86. package/src/models/UpdateApiKeyInput.ts +115 -0
  87. package/src/models/index.ts +5 -0
@@ -3,6 +3,7 @@
3
3
  .openapi-generator-ignore
4
4
  README.md
5
5
  package.json
6
+ src/apis/APIKeysApi.ts
6
7
  src/apis/AccountsApi.ts
7
8
  src/apis/AccountsPublicApi.ts
8
9
  src/apis/AddressPublicApi.ts
@@ -106,6 +107,8 @@ src/models/AirwallexBankAccountDetailsDtoLocalMethod.ts
106
107
  src/models/AirwallexBankAccountDetailsDtoLocalMethodCode.ts
107
108
  src/models/AirwallexDepositDto.ts
108
109
  src/models/AirwallexDepositDtoFee.ts
110
+ src/models/ApiKeyDto.ts
111
+ src/models/ApiKeyScopeDto.ts
109
112
  src/models/AuBankAccountDetails.ts
110
113
  src/models/AuctionBidDto.ts
111
114
  src/models/AuctionBidInput.ts
@@ -196,6 +199,7 @@ src/models/CompanyTaxIdDto.ts
196
199
  src/models/ConflictException.ts
197
200
  src/models/CreateAccountPaymentInput.ts
198
201
  src/models/CreateAccountPaymentManualTransactionInput.ts
202
+ src/models/CreateApiKeyInput.ts
199
203
  src/models/CreateBankAccountInput.ts
200
204
  src/models/CreateBuyerLeadMessageInput.ts
201
205
  src/models/CreateChallengeInput.ts
@@ -207,6 +211,7 @@ src/models/CreateOrderInput.ts
207
211
  src/models/CreateSubscriptionBillingPeriodicityInput.ts
208
212
  src/models/CreateSubscriptionInput.ts
209
213
  src/models/CreateSubscriptionManualTransactionInput.ts
214
+ src/models/CreatedApiKeyDto.ts
210
215
  src/models/CursorBasedPageInfo.ts
211
216
  src/models/CursorBasedPaginationResponse.ts
212
217
  src/models/DeleteDomainsInput.ts
@@ -506,6 +511,7 @@ src/models/TopSellerAccountDto.ts
506
511
  src/models/UkBankAccountDetails.ts
507
512
  src/models/UpdateAccountBillingInformationInput.ts
508
513
  src/models/UpdateAccountChallengeRewardBalanceInput.ts
514
+ src/models/UpdateApiKeyInput.ts
509
515
  src/models/UpdateAuctionMuteStatusInput.ts
510
516
  src/models/UpdateBuyerDomainTransferBuyerInfoInput.ts
511
517
  src/models/UpdateBuyerDomainTransferIpsTagInputDto.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.447
1
+ ## @randock/nameshift-api-client@0.0.449
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.447 --save
39
+ npm install @randock/nameshift-api-client@0.0.449 --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
- b16518573bfed486629257b16565a7436b69e47de57a4687cf2b290774663712d2ca7860ddbea923af3e066d5a2b9b11
47
+ ef35da7f8b5a1be28b52ab412632a00d9304060f6dfc00b9920c1e53d7de37a2123c512e852434329c6418d266a52fa8
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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
+ import * as runtime from '../runtime';
13
+ import type { ApiKeyDto, ApiKeyScopeDto, CreateApiKeyInput, CreatedApiKeyDto, UpdateApiKeyInput } from '../models/index';
14
+ export interface APIKeysApiCreateApiKeyRequest {
15
+ createApiKeyInput: CreateApiKeyInput;
16
+ }
17
+ export interface APIKeysApiRevokeApiKeyRequest {
18
+ apiKeyId: string;
19
+ }
20
+ export interface APIKeysApiUpdateApiKeyRequest {
21
+ apiKeyId: string;
22
+ updateApiKeyInput: UpdateApiKeyInput;
23
+ }
24
+ /**
25
+ *
26
+ */
27
+ export declare class APIKeysApi extends runtime.BaseAPI {
28
+ /**
29
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
30
+ * Create an API key
31
+ */
32
+ createApiKeyRaw(requestParameters: APIKeysApiCreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatedApiKeyDto>>;
33
+ /**
34
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
35
+ * Create an API key
36
+ */
37
+ createApiKey(requestParameters: APIKeysApiCreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatedApiKeyDto>;
38
+ /**
39
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
40
+ * List API keys
41
+ */
42
+ getApiKeysRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApiKeyDto>>>;
43
+ /**
44
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
45
+ * List API keys
46
+ */
47
+ getApiKeys(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApiKeyDto>>;
48
+ /**
49
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
50
+ * List grantable API key scopes
51
+ */
52
+ getAvailableApiKeyScopesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApiKeyScopeDto>>>;
53
+ /**
54
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
55
+ * List grantable API key scopes
56
+ */
57
+ getAvailableApiKeyScopes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApiKeyScopeDto>>;
58
+ /**
59
+ * Revokes an API key. Requests made with it stop being accepted immediately.
60
+ * Revoke an API key
61
+ */
62
+ revokeApiKeyRaw(requestParameters: APIKeysApiRevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
63
+ /**
64
+ * Revokes an API key. Requests made with it stop being accepted immediately.
65
+ * Revoke an API key
66
+ */
67
+ revokeApiKey(requestParameters: APIKeysApiRevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
68
+ /**
69
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
70
+ * Update an API key
71
+ */
72
+ updateApiKeyRaw(requestParameters: APIKeysApiUpdateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiKeyDto>>;
73
+ /**
74
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
75
+ * Update an API key
76
+ */
77
+ updateApiKey(requestParameters: APIKeysApiUpdateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeyDto>;
78
+ }
@@ -0,0 +1,354 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
+ return new (P || (P = Promise))(function (resolve, reject) {
33
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
37
+ });
38
+ };
39
+ var __generator = (this && this.__generator) || function (thisArg, body) {
40
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
41
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42
+ function verb(n) { return function (v) { return step([n, v]); }; }
43
+ function step(op) {
44
+ if (f) throw new TypeError("Generator is already executing.");
45
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
46
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
47
+ if (y = 0, t) op = [op[0] & 2, t.value];
48
+ switch (op[0]) {
49
+ case 0: case 1: t = op; break;
50
+ case 4: _.label++; return { value: op[1], done: false };
51
+ case 5: _.label++; y = op[1]; op = [0]; continue;
52
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
53
+ default:
54
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
55
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
56
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
57
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
58
+ if (t[2]) _.ops.pop();
59
+ _.trys.pop(); continue;
60
+ }
61
+ op = body.call(thisArg, _);
62
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
63
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
64
+ }
65
+ };
66
+ Object.defineProperty(exports, "__esModule", { value: true });
67
+ exports.APIKeysApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var APIKeysApi = /** @class */ (function (_super) {
74
+ __extends(APIKeysApi, _super);
75
+ function APIKeysApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
80
+ * Create an API key
81
+ */
82
+ APIKeysApi.prototype.createApiKeyRaw = function (requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var queryParameters, headerParameters, token, tokenString, response;
85
+ return __generator(this, function (_a) {
86
+ switch (_a.label) {
87
+ case 0:
88
+ if (requestParameters['createApiKeyInput'] == null) {
89
+ throw new runtime.RequiredError('createApiKeyInput', 'Required parameter "createApiKeyInput" was null or undefined when calling createApiKey().');
90
+ }
91
+ queryParameters = {};
92
+ headerParameters = {};
93
+ headerParameters['Content-Type'] = 'application/json';
94
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
95
+ token = this.configuration.accessToken;
96
+ return [4 /*yield*/, token("bearer", [])];
97
+ case 1:
98
+ tokenString = _a.sent();
99
+ if (tokenString) {
100
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
101
+ }
102
+ _a.label = 2;
103
+ case 2: return [4 /*yield*/, this.request({
104
+ path: "/private/api-keys",
105
+ method: 'POST',
106
+ headers: headerParameters,
107
+ query: queryParameters,
108
+ body: (0, index_1.CreateApiKeyInputToJSON)(requestParameters['createApiKeyInput']),
109
+ }, initOverrides)];
110
+ case 3:
111
+ response = _a.sent();
112
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CreatedApiKeyDtoFromJSON)(jsonValue); })];
113
+ }
114
+ });
115
+ });
116
+ };
117
+ /**
118
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
119
+ * Create an API key
120
+ */
121
+ APIKeysApi.prototype.createApiKey = function (requestParameters, initOverrides) {
122
+ return __awaiter(this, void 0, void 0, function () {
123
+ var response;
124
+ return __generator(this, function (_a) {
125
+ switch (_a.label) {
126
+ case 0: return [4 /*yield*/, this.createApiKeyRaw(requestParameters, initOverrides)];
127
+ case 1:
128
+ response = _a.sent();
129
+ return [4 /*yield*/, response.value()];
130
+ case 2: return [2 /*return*/, _a.sent()];
131
+ }
132
+ });
133
+ });
134
+ };
135
+ /**
136
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
137
+ * List API keys
138
+ */
139
+ APIKeysApi.prototype.getApiKeysRaw = function (initOverrides) {
140
+ return __awaiter(this, void 0, void 0, function () {
141
+ var queryParameters, headerParameters, token, tokenString, response;
142
+ return __generator(this, function (_a) {
143
+ switch (_a.label) {
144
+ case 0:
145
+ queryParameters = {};
146
+ headerParameters = {};
147
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
148
+ token = this.configuration.accessToken;
149
+ return [4 /*yield*/, token("bearer", [])];
150
+ case 1:
151
+ tokenString = _a.sent();
152
+ if (tokenString) {
153
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
154
+ }
155
+ _a.label = 2;
156
+ case 2: return [4 /*yield*/, this.request({
157
+ path: "/private/api-keys",
158
+ method: 'GET',
159
+ headers: headerParameters,
160
+ query: queryParameters,
161
+ }, initOverrides)];
162
+ case 3:
163
+ response = _a.sent();
164
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ApiKeyDtoFromJSON); })];
165
+ }
166
+ });
167
+ });
168
+ };
169
+ /**
170
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
171
+ * List API keys
172
+ */
173
+ APIKeysApi.prototype.getApiKeys = function (initOverrides) {
174
+ return __awaiter(this, void 0, void 0, function () {
175
+ var response;
176
+ return __generator(this, function (_a) {
177
+ switch (_a.label) {
178
+ case 0: return [4 /*yield*/, this.getApiKeysRaw(initOverrides)];
179
+ case 1:
180
+ response = _a.sent();
181
+ return [4 /*yield*/, response.value()];
182
+ case 2: return [2 /*return*/, _a.sent()];
183
+ }
184
+ });
185
+ });
186
+ };
187
+ /**
188
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
189
+ * List grantable API key scopes
190
+ */
191
+ APIKeysApi.prototype.getAvailableApiKeyScopesRaw = function (initOverrides) {
192
+ return __awaiter(this, void 0, void 0, function () {
193
+ var queryParameters, headerParameters, token, tokenString, response;
194
+ return __generator(this, function (_a) {
195
+ switch (_a.label) {
196
+ case 0:
197
+ queryParameters = {};
198
+ headerParameters = {};
199
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
200
+ token = this.configuration.accessToken;
201
+ return [4 /*yield*/, token("bearer", [])];
202
+ case 1:
203
+ tokenString = _a.sent();
204
+ if (tokenString) {
205
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
206
+ }
207
+ _a.label = 2;
208
+ case 2: return [4 /*yield*/, this.request({
209
+ path: "/private/api-keys/available-scopes",
210
+ method: 'GET',
211
+ headers: headerParameters,
212
+ query: queryParameters,
213
+ }, initOverrides)];
214
+ case 3:
215
+ response = _a.sent();
216
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ApiKeyScopeDtoFromJSON); })];
217
+ }
218
+ });
219
+ });
220
+ };
221
+ /**
222
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
223
+ * List grantable API key scopes
224
+ */
225
+ APIKeysApi.prototype.getAvailableApiKeyScopes = function (initOverrides) {
226
+ return __awaiter(this, void 0, void 0, function () {
227
+ var response;
228
+ return __generator(this, function (_a) {
229
+ switch (_a.label) {
230
+ case 0: return [4 /*yield*/, this.getAvailableApiKeyScopesRaw(initOverrides)];
231
+ case 1:
232
+ response = _a.sent();
233
+ return [4 /*yield*/, response.value()];
234
+ case 2: return [2 /*return*/, _a.sent()];
235
+ }
236
+ });
237
+ });
238
+ };
239
+ /**
240
+ * Revokes an API key. Requests made with it stop being accepted immediately.
241
+ * Revoke an API key
242
+ */
243
+ APIKeysApi.prototype.revokeApiKeyRaw = function (requestParameters, initOverrides) {
244
+ return __awaiter(this, void 0, void 0, function () {
245
+ var queryParameters, headerParameters, token, tokenString, response;
246
+ return __generator(this, function (_a) {
247
+ switch (_a.label) {
248
+ case 0:
249
+ if (requestParameters['apiKeyId'] == null) {
250
+ throw new runtime.RequiredError('apiKeyId', 'Required parameter "apiKeyId" was null or undefined when calling revokeApiKey().');
251
+ }
252
+ queryParameters = {};
253
+ headerParameters = {};
254
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
255
+ token = this.configuration.accessToken;
256
+ return [4 /*yield*/, token("bearer", [])];
257
+ case 1:
258
+ tokenString = _a.sent();
259
+ if (tokenString) {
260
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
261
+ }
262
+ _a.label = 2;
263
+ case 2: return [4 /*yield*/, this.request({
264
+ path: "/private/api-keys/{apiKeyId}".replace("{".concat("apiKeyId", "}"), encodeURIComponent(String(requestParameters['apiKeyId']))),
265
+ method: 'DELETE',
266
+ headers: headerParameters,
267
+ query: queryParameters,
268
+ }, initOverrides)];
269
+ case 3:
270
+ response = _a.sent();
271
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
272
+ }
273
+ });
274
+ });
275
+ };
276
+ /**
277
+ * Revokes an API key. Requests made with it stop being accepted immediately.
278
+ * Revoke an API key
279
+ */
280
+ APIKeysApi.prototype.revokeApiKey = function (requestParameters, initOverrides) {
281
+ return __awaiter(this, void 0, void 0, function () {
282
+ return __generator(this, function (_a) {
283
+ switch (_a.label) {
284
+ case 0: return [4 /*yield*/, this.revokeApiKeyRaw(requestParameters, initOverrides)];
285
+ case 1:
286
+ _a.sent();
287
+ return [2 /*return*/];
288
+ }
289
+ });
290
+ });
291
+ };
292
+ /**
293
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
294
+ * Update an API key
295
+ */
296
+ APIKeysApi.prototype.updateApiKeyRaw = function (requestParameters, initOverrides) {
297
+ return __awaiter(this, void 0, void 0, function () {
298
+ var queryParameters, headerParameters, token, tokenString, response;
299
+ return __generator(this, function (_a) {
300
+ switch (_a.label) {
301
+ case 0:
302
+ if (requestParameters['apiKeyId'] == null) {
303
+ throw new runtime.RequiredError('apiKeyId', 'Required parameter "apiKeyId" was null or undefined when calling updateApiKey().');
304
+ }
305
+ if (requestParameters['updateApiKeyInput'] == null) {
306
+ throw new runtime.RequiredError('updateApiKeyInput', 'Required parameter "updateApiKeyInput" was null or undefined when calling updateApiKey().');
307
+ }
308
+ queryParameters = {};
309
+ headerParameters = {};
310
+ headerParameters['Content-Type'] = 'application/json';
311
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
312
+ token = this.configuration.accessToken;
313
+ return [4 /*yield*/, token("bearer", [])];
314
+ case 1:
315
+ tokenString = _a.sent();
316
+ if (tokenString) {
317
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
318
+ }
319
+ _a.label = 2;
320
+ case 2: return [4 /*yield*/, this.request({
321
+ path: "/private/api-keys/{apiKeyId}".replace("{".concat("apiKeyId", "}"), encodeURIComponent(String(requestParameters['apiKeyId']))),
322
+ method: 'PATCH',
323
+ headers: headerParameters,
324
+ query: queryParameters,
325
+ body: (0, index_1.UpdateApiKeyInputToJSON)(requestParameters['updateApiKeyInput']),
326
+ }, initOverrides)];
327
+ case 3:
328
+ response = _a.sent();
329
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiKeyDtoFromJSON)(jsonValue); })];
330
+ }
331
+ });
332
+ });
333
+ };
334
+ /**
335
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
336
+ * Update an API key
337
+ */
338
+ APIKeysApi.prototype.updateApiKey = function (requestParameters, initOverrides) {
339
+ return __awaiter(this, void 0, void 0, function () {
340
+ var response;
341
+ return __generator(this, function (_a) {
342
+ switch (_a.label) {
343
+ case 0: return [4 /*yield*/, this.updateApiKeyRaw(requestParameters, initOverrides)];
344
+ case 1:
345
+ response = _a.sent();
346
+ return [4 /*yield*/, response.value()];
347
+ case 2: return [2 /*return*/, _a.sent()];
348
+ }
349
+ });
350
+ });
351
+ };
352
+ return APIKeysApi;
353
+ }(runtime.BaseAPI));
354
+ exports.APIKeysApi = APIKeysApi;