@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
@@ -0,0 +1,271 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * 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.
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ApiKeyDto,
19
+ ApiKeyScopeDto,
20
+ CreateApiKeyInput,
21
+ CreatedApiKeyDto,
22
+ UpdateApiKeyInput,
23
+ ValidationException,
24
+ } from '../models/index';
25
+ import {
26
+ ApiKeyDtoFromJSON,
27
+ ApiKeyDtoToJSON,
28
+ ApiKeyScopeDtoFromJSON,
29
+ ApiKeyScopeDtoToJSON,
30
+ CreateApiKeyInputFromJSON,
31
+ CreateApiKeyInputToJSON,
32
+ CreatedApiKeyDtoFromJSON,
33
+ CreatedApiKeyDtoToJSON,
34
+ UpdateApiKeyInputFromJSON,
35
+ UpdateApiKeyInputToJSON,
36
+ ValidationExceptionFromJSON,
37
+ ValidationExceptionToJSON,
38
+ } from '../models/index';
39
+
40
+ export interface APIKeysApiCreateApiKeyRequest {
41
+ createApiKeyInput: CreateApiKeyInput;
42
+ }
43
+
44
+ export interface APIKeysApiRevokeApiKeyRequest {
45
+ apiKeyId: string;
46
+ }
47
+
48
+ export interface APIKeysApiUpdateApiKeyRequest {
49
+ apiKeyId: string;
50
+ updateApiKeyInput: UpdateApiKeyInput;
51
+ }
52
+
53
+ /**
54
+ *
55
+ */
56
+ export class APIKeysApi extends runtime.BaseAPI {
57
+
58
+ /**
59
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
60
+ * Create an API key
61
+ */
62
+ async createApiKeyRaw(requestParameters: APIKeysApiCreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatedApiKeyDto>> {
63
+ if (requestParameters['createApiKeyInput'] == null) {
64
+ throw new runtime.RequiredError(
65
+ 'createApiKeyInput',
66
+ 'Required parameter "createApiKeyInput" was null or undefined when calling createApiKey().'
67
+ );
68
+ }
69
+
70
+ const queryParameters: any = {};
71
+
72
+ const headerParameters: runtime.HTTPHeaders = {};
73
+
74
+ headerParameters['Content-Type'] = 'application/json';
75
+
76
+ if (this.configuration && this.configuration.accessToken) {
77
+ const token = this.configuration.accessToken;
78
+ const tokenString = await token("bearer", []);
79
+
80
+ if (tokenString) {
81
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
82
+ }
83
+ }
84
+ const response = await this.request({
85
+ path: `/private/api-keys`,
86
+ method: 'POST',
87
+ headers: headerParameters,
88
+ query: queryParameters,
89
+ body: CreateApiKeyInputToJSON(requestParameters['createApiKeyInput']),
90
+ }, initOverrides);
91
+
92
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreatedApiKeyDtoFromJSON(jsonValue));
93
+ }
94
+
95
+ /**
96
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
97
+ * Create an API key
98
+ */
99
+ async createApiKey(requestParameters: APIKeysApiCreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatedApiKeyDto> {
100
+ const response = await this.createApiKeyRaw(requestParameters, initOverrides);
101
+ return await response.value();
102
+ }
103
+
104
+ /**
105
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
106
+ * List API keys
107
+ */
108
+ async getApiKeysRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApiKeyDto>>> {
109
+ const queryParameters: any = {};
110
+
111
+ const headerParameters: runtime.HTTPHeaders = {};
112
+
113
+ if (this.configuration && this.configuration.accessToken) {
114
+ const token = this.configuration.accessToken;
115
+ const tokenString = await token("bearer", []);
116
+
117
+ if (tokenString) {
118
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
119
+ }
120
+ }
121
+ const response = await this.request({
122
+ path: `/private/api-keys`,
123
+ method: 'GET',
124
+ headers: headerParameters,
125
+ query: queryParameters,
126
+ }, initOverrides);
127
+
128
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApiKeyDtoFromJSON));
129
+ }
130
+
131
+ /**
132
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
133
+ * List API keys
134
+ */
135
+ async getApiKeys(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApiKeyDto>> {
136
+ const response = await this.getApiKeysRaw(initOverrides);
137
+ return await response.value();
138
+ }
139
+
140
+ /**
141
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
142
+ * List grantable API key scopes
143
+ */
144
+ async getAvailableApiKeyScopesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApiKeyScopeDto>>> {
145
+ const queryParameters: any = {};
146
+
147
+ const headerParameters: runtime.HTTPHeaders = {};
148
+
149
+ if (this.configuration && this.configuration.accessToken) {
150
+ const token = this.configuration.accessToken;
151
+ const tokenString = await token("bearer", []);
152
+
153
+ if (tokenString) {
154
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
155
+ }
156
+ }
157
+ const response = await this.request({
158
+ path: `/private/api-keys/available-scopes`,
159
+ method: 'GET',
160
+ headers: headerParameters,
161
+ query: queryParameters,
162
+ }, initOverrides);
163
+
164
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApiKeyScopeDtoFromJSON));
165
+ }
166
+
167
+ /**
168
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
169
+ * List grantable API key scopes
170
+ */
171
+ async getAvailableApiKeyScopes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApiKeyScopeDto>> {
172
+ const response = await this.getAvailableApiKeyScopesRaw(initOverrides);
173
+ return await response.value();
174
+ }
175
+
176
+ /**
177
+ * Revokes an API key. Requests made with it stop being accepted immediately.
178
+ * Revoke an API key
179
+ */
180
+ async revokeApiKeyRaw(requestParameters: APIKeysApiRevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
181
+ if (requestParameters['apiKeyId'] == null) {
182
+ throw new runtime.RequiredError(
183
+ 'apiKeyId',
184
+ 'Required parameter "apiKeyId" was null or undefined when calling revokeApiKey().'
185
+ );
186
+ }
187
+
188
+ const queryParameters: any = {};
189
+
190
+ const headerParameters: runtime.HTTPHeaders = {};
191
+
192
+ if (this.configuration && this.configuration.accessToken) {
193
+ const token = this.configuration.accessToken;
194
+ const tokenString = await token("bearer", []);
195
+
196
+ if (tokenString) {
197
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
198
+ }
199
+ }
200
+ const response = await this.request({
201
+ path: `/private/api-keys/{apiKeyId}`.replace(`{${"apiKeyId"}}`, encodeURIComponent(String(requestParameters['apiKeyId']))),
202
+ method: 'DELETE',
203
+ headers: headerParameters,
204
+ query: queryParameters,
205
+ }, initOverrides);
206
+
207
+ return new runtime.VoidApiResponse(response);
208
+ }
209
+
210
+ /**
211
+ * Revokes an API key. Requests made with it stop being accepted immediately.
212
+ * Revoke an API key
213
+ */
214
+ async revokeApiKey(requestParameters: APIKeysApiRevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
215
+ await this.revokeApiKeyRaw(requestParameters, initOverrides);
216
+ }
217
+
218
+ /**
219
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
220
+ * Update an API key
221
+ */
222
+ async updateApiKeyRaw(requestParameters: APIKeysApiUpdateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiKeyDto>> {
223
+ if (requestParameters['apiKeyId'] == null) {
224
+ throw new runtime.RequiredError(
225
+ 'apiKeyId',
226
+ 'Required parameter "apiKeyId" was null or undefined when calling updateApiKey().'
227
+ );
228
+ }
229
+
230
+ if (requestParameters['updateApiKeyInput'] == null) {
231
+ throw new runtime.RequiredError(
232
+ 'updateApiKeyInput',
233
+ 'Required parameter "updateApiKeyInput" was null or undefined when calling updateApiKey().'
234
+ );
235
+ }
236
+
237
+ const queryParameters: any = {};
238
+
239
+ const headerParameters: runtime.HTTPHeaders = {};
240
+
241
+ headerParameters['Content-Type'] = 'application/json';
242
+
243
+ if (this.configuration && this.configuration.accessToken) {
244
+ const token = this.configuration.accessToken;
245
+ const tokenString = await token("bearer", []);
246
+
247
+ if (tokenString) {
248
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
249
+ }
250
+ }
251
+ const response = await this.request({
252
+ path: `/private/api-keys/{apiKeyId}`.replace(`{${"apiKeyId"}}`, encodeURIComponent(String(requestParameters['apiKeyId']))),
253
+ method: 'PATCH',
254
+ headers: headerParameters,
255
+ query: queryParameters,
256
+ body: UpdateApiKeyInputToJSON(requestParameters['updateApiKeyInput']),
257
+ }, initOverrides);
258
+
259
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApiKeyDtoFromJSON(jsonValue));
260
+ }
261
+
262
+ /**
263
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
264
+ * Update an API key
265
+ */
266
+ async updateApiKey(requestParameters: APIKeysApiUpdateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeyDto> {
267
+ const response = await this.updateApiKeyRaw(requestParameters, initOverrides);
268
+ return await response.value();
269
+ }
270
+
271
+ }