@randock/nameshift-api-client 0.0.458 → 0.0.460

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 (69) hide show
  1. package/.openapi-generator/FILES +11 -0
  2. package/README.md +3 -3
  3. package/dist/apis/DomainsApi.d.ts +43 -9
  4. package/dist/apis/DomainsApi.js +156 -10
  5. package/dist/apis/JobsApi.d.ts +51 -0
  6. package/dist/apis/JobsApi.js +222 -0
  7. package/dist/apis/UsersApi.d.ts +27 -1
  8. package/dist/apis/UsersApi.js +108 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/models/ApplyDomainEditInput.d.ts +40 -0
  12. package/dist/models/ApplyDomainEditInput.js +53 -0
  13. package/dist/models/BuyerNotificationDto.d.ts +1 -0
  14. package/dist/models/BuyerNotificationDto.js +1 -0
  15. package/dist/models/BuyerNotificationListItemDto.d.ts +1 -0
  16. package/dist/models/BuyerNotificationListItemDto.js +1 -0
  17. package/dist/models/DomainEditPreviewDto.d.ts +83 -0
  18. package/dist/models/DomainEditPreviewDto.js +84 -0
  19. package/dist/models/DomainEditPreviewRowDto.d.ts +60 -0
  20. package/dist/models/DomainEditPreviewRowDto.js +67 -0
  21. package/dist/models/FeatureFlagListItemDto.d.ts +1 -0
  22. package/dist/models/FeatureFlagListItemDto.js +2 -1
  23. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +1 -0
  24. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +2 -1
  25. package/dist/models/JobDto.d.ts +101 -0
  26. package/dist/models/JobDto.js +98 -0
  27. package/dist/models/JobFailureDto.d.ts +38 -0
  28. package/dist/models/JobFailureDto.js +55 -0
  29. package/dist/models/JobStatus.d.ts +27 -0
  30. package/dist/models/JobStatus.js +53 -0
  31. package/dist/models/JobType.d.ts +24 -0
  32. package/dist/models/JobType.js +50 -0
  33. package/dist/models/ListJobs200Response.d.ts +47 -0
  34. package/dist/models/ListJobs200Response.js +62 -0
  35. package/dist/models/PreviewDomainEditInput.d.ts +38 -0
  36. package/dist/models/PreviewDomainEditInput.js +53 -0
  37. package/dist/models/PrivateAccountGetMeResponse.d.ts +1 -0
  38. package/dist/models/PrivateAccountGetMeResponse.js +2 -1
  39. package/dist/models/RegisterUserPushTokenInput.d.ts +46 -0
  40. package/dist/models/RegisterUserPushTokenInput.js +63 -0
  41. package/dist/models/UserNotificationDto.d.ts +1 -0
  42. package/dist/models/UserNotificationDto.js +1 -0
  43. package/dist/models/UserNotificationListItemDto.d.ts +1 -0
  44. package/dist/models/UserNotificationListItemDto.js +1 -0
  45. package/dist/models/index.d.ts +10 -0
  46. package/dist/models/index.js +10 -0
  47. package/package.json +1 -1
  48. package/src/apis/DomainsApi.ts +154 -12
  49. package/src/apis/JobsApi.ts +163 -0
  50. package/src/apis/UsersApi.ts +98 -0
  51. package/src/apis/index.ts +1 -0
  52. package/src/models/ApplyDomainEditInput.ts +74 -0
  53. package/src/models/BuyerNotificationDto.ts +1 -0
  54. package/src/models/BuyerNotificationListItemDto.ts +1 -0
  55. package/src/models/DomainEditPreviewDto.ts +146 -0
  56. package/src/models/DomainEditPreviewRowDto.ts +102 -0
  57. package/src/models/FeatureFlagListItemDto.ts +2 -1
  58. package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +2 -1
  59. package/src/models/JobDto.ts +189 -0
  60. package/src/models/JobFailureDto.ts +75 -0
  61. package/src/models/JobStatus.ts +55 -0
  62. package/src/models/JobType.ts +52 -0
  63. package/src/models/ListJobs200Response.ts +106 -0
  64. package/src/models/PreviewDomainEditInput.ts +74 -0
  65. package/src/models/PrivateAccountGetMeResponse.ts +2 -1
  66. package/src/models/RegisterUserPushTokenInput.ts +86 -0
  67. package/src/models/UserNotificationDto.ts +1 -0
  68. package/src/models/UserNotificationListItemDto.ts +1 -0
  69. package/src/models/index.ts +10 -0
@@ -15,12 +15,14 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ ApplyDomainEditInput,
18
19
  BadRequestException,
19
20
  BatchImportPreviewDto,
20
21
  BatchUpdateDomainsInput,
21
22
  BulkUpdateDomainsWithFiltersInput,
22
23
  CheckDomainsNsInput,
23
24
  DeleteDomainsInput,
25
+ DomainEditPreviewDto,
24
26
  DomainExchangeRateDto,
25
27
  DomainFiltersDto,
26
28
  DomainSearchTranslationDto,
@@ -28,8 +30,10 @@ import type {
28
30
  DomainVerificationStatusDto,
29
31
  GetAllDomainTransfers200Response,
30
32
  IntersectionDomainDtoWithHijackerDtoWithAccountDto,
33
+ JobDto,
31
34
  List200Response2,
32
35
  NotFoundException,
36
+ PreviewDomainEditInput,
33
37
  SellerDomainAffiliateCommissionDto,
34
38
  SellerDomainTransferDto,
35
39
  StartAuctionInput,
@@ -40,6 +44,8 @@ import type {
40
44
  ValidationException,
41
45
  } from '../models/index';
42
46
  import {
47
+ ApplyDomainEditInputFromJSON,
48
+ ApplyDomainEditInputToJSON,
43
49
  BadRequestExceptionFromJSON,
44
50
  BadRequestExceptionToJSON,
45
51
  BatchImportPreviewDtoFromJSON,
@@ -52,6 +58,8 @@ import {
52
58
  CheckDomainsNsInputToJSON,
53
59
  DeleteDomainsInputFromJSON,
54
60
  DeleteDomainsInputToJSON,
61
+ DomainEditPreviewDtoFromJSON,
62
+ DomainEditPreviewDtoToJSON,
55
63
  DomainExchangeRateDtoFromJSON,
56
64
  DomainExchangeRateDtoToJSON,
57
65
  DomainFiltersDtoFromJSON,
@@ -66,10 +74,14 @@ import {
66
74
  GetAllDomainTransfers200ResponseToJSON,
67
75
  IntersectionDomainDtoWithHijackerDtoWithAccountDtoFromJSON,
68
76
  IntersectionDomainDtoWithHijackerDtoWithAccountDtoToJSON,
77
+ JobDtoFromJSON,
78
+ JobDtoToJSON,
69
79
  List200Response2FromJSON,
70
80
  List200Response2ToJSON,
71
81
  NotFoundExceptionFromJSON,
72
82
  NotFoundExceptionToJSON,
83
+ PreviewDomainEditInputFromJSON,
84
+ PreviewDomainEditInputToJSON,
73
85
  SellerDomainAffiliateCommissionDtoFromJSON,
74
86
  SellerDomainAffiliateCommissionDtoToJSON,
75
87
  SellerDomainTransferDtoFromJSON,
@@ -88,6 +100,12 @@ import {
88
100
  ValidationExceptionToJSON,
89
101
  } from '../models/index';
90
102
 
103
+ export interface DomainsApiApplyDomainEditRequest {
104
+ applyDomainEditInput: ApplyDomainEditInput;
105
+ searchFilter?: string;
106
+ filter?: { [key: string]: string; };
107
+ }
108
+
91
109
  export interface DomainsApiBatchImportRequest {
92
110
  domains?: Array<string>;
93
111
  file?: Blob | null;
@@ -172,6 +190,12 @@ export interface DomainsApiListRequest {
172
190
  filterName?: string;
173
191
  }
174
192
 
193
+ export interface DomainsApiPreviewDomainEditRequest {
194
+ previewDomainEditInput: PreviewDomainEditInput;
195
+ searchFilter?: string;
196
+ filter?: { [key: string]: string; };
197
+ }
198
+
175
199
  export interface DomainsApiStartAuctionRequest {
176
200
  domainId: string;
177
201
  startAuctionInput: StartAuctionInput;
@@ -201,6 +225,64 @@ export interface DomainsApiUpdateDomainTransferIpsTagRequest {
201
225
  */
202
226
  export class DomainsApi extends runtime.BaseAPI {
203
227
 
228
+ /**
229
+ * Queues the operations a preview returned. Send them back unchanged; they are validated again here. Domains failing validation are skipped and the rest still apply. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
230
+ * Queue a previewed bulk edit
231
+ */
232
+ async applyDomainEditRaw(requestParameters: DomainsApiApplyDomainEditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>> {
233
+ if (requestParameters['applyDomainEditInput'] == null) {
234
+ throw new runtime.RequiredError(
235
+ 'applyDomainEditInput',
236
+ 'Required parameter "applyDomainEditInput" was null or undefined when calling applyDomainEdit().'
237
+ );
238
+ }
239
+
240
+ const queryParameters: any = {};
241
+
242
+ if (requestParameters['searchFilter'] != null) {
243
+ queryParameters['searchFilter'] = requestParameters['searchFilter'];
244
+ }
245
+
246
+ if (requestParameters['filter'] != null) {
247
+ queryParameters['filter'] = requestParameters['filter'];
248
+ }
249
+
250
+ const headerParameters: runtime.HTTPHeaders = {};
251
+
252
+ headerParameters['Content-Type'] = 'application/json';
253
+
254
+ if (this.configuration && this.configuration.apiKey) {
255
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
256
+ }
257
+
258
+ if (this.configuration && this.configuration.accessToken) {
259
+ const token = this.configuration.accessToken;
260
+ const tokenString = await token("bearer", []);
261
+
262
+ if (tokenString) {
263
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
264
+ }
265
+ }
266
+ const response = await this.request({
267
+ path: `/private/domains/edit`,
268
+ method: 'PATCH',
269
+ headers: headerParameters,
270
+ query: queryParameters,
271
+ body: ApplyDomainEditInputToJSON(requestParameters['applyDomainEditInput']),
272
+ }, initOverrides);
273
+
274
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobDtoFromJSON(jsonValue));
275
+ }
276
+
277
+ /**
278
+ * Queues the operations a preview returned. Send them back unchanged; they are validated again here. Domains failing validation are skipped and the rest still apply. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
279
+ * Queue a previewed bulk edit
280
+ */
281
+ async applyDomainEdit(requestParameters: DomainsApiApplyDomainEditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto> {
282
+ const response = await this.applyDomainEditRaw(requestParameters, initOverrides);
283
+ return await response.value();
284
+ }
285
+
204
286
  /**
205
287
  * Imports domains from an uploaded file or a list of domain names and queues them for processing. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
206
288
  * Import domains
@@ -327,10 +409,10 @@ export class DomainsApi extends runtime.BaseAPI {
327
409
  }
328
410
 
329
411
  /**
330
- * Applies the same settings update to multiple domains by ID. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
412
+ * Queues the same settings update for multiple domains by ID. Ids belonging to another account match nothing, and domains the update would leave in an invalid state are skipped while the rest still apply. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
331
413
  * Batch update domains
332
414
  */
333
- async batchUpdateRaw(requestParameters: DomainsApiBatchUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
415
+ async batchUpdateRaw(requestParameters: DomainsApiBatchUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>> {
334
416
  if (requestParameters['batchUpdateDomainsInput'] == null) {
335
417
  throw new runtime.RequiredError(
336
418
  'batchUpdateDomainsInput',
@@ -364,22 +446,23 @@ export class DomainsApi extends runtime.BaseAPI {
364
446
  body: BatchUpdateDomainsInputToJSON(requestParameters['batchUpdateDomainsInput']),
365
447
  }, initOverrides);
366
448
 
367
- return new runtime.VoidApiResponse(response);
449
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobDtoFromJSON(jsonValue));
368
450
  }
369
451
 
370
452
  /**
371
- * Applies the same settings update to multiple domains by ID. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
453
+ * Queues the same settings update for multiple domains by ID. Ids belonging to another account match nothing, and domains the update would leave in an invalid state are skipped while the rest still apply. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
372
454
  * Batch update domains
373
455
  */
374
- async batchUpdate(requestParameters: DomainsApiBatchUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
375
- await this.batchUpdateRaw(requestParameters, initOverrides);
456
+ async batchUpdate(requestParameters: DomainsApiBatchUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto> {
457
+ const response = await this.batchUpdateRaw(requestParameters, initOverrides);
458
+ return await response.value();
376
459
  }
377
460
 
378
461
  /**
379
- * Applies pricing and configuration updates to all domains matching the provided filter criteria. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
462
+ * Queues pricing and configuration updates for every domain matching the provided filter criteria. Domains the update would leave in an invalid state are skipped and the rest still apply. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
380
463
  * Bulk update domains with filters
381
464
  */
382
- async bulkUpdateDomainsWithFiltersRaw(requestParameters: DomainsApiBulkUpdateDomainsWithFiltersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
465
+ async bulkUpdateDomainsWithFiltersRaw(requestParameters: DomainsApiBulkUpdateDomainsWithFiltersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>> {
383
466
  if (requestParameters['bulkUpdateDomainsWithFiltersInput'] == null) {
384
467
  throw new runtime.RequiredError(
385
468
  'bulkUpdateDomainsWithFiltersInput',
@@ -421,15 +504,16 @@ export class DomainsApi extends runtime.BaseAPI {
421
504
  body: BulkUpdateDomainsWithFiltersInputToJSON(requestParameters['bulkUpdateDomainsWithFiltersInput']),
422
505
  }, initOverrides);
423
506
 
424
- return new runtime.VoidApiResponse(response);
507
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobDtoFromJSON(jsonValue));
425
508
  }
426
509
 
427
510
  /**
428
- * Applies pricing and configuration updates to all domains matching the provided filter criteria. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
511
+ * Queues pricing and configuration updates for every domain matching the provided filter criteria. Domains the update would leave in an invalid state are skipped and the rest still apply. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
429
512
  * Bulk update domains with filters
430
513
  */
431
- async bulkUpdateDomainsWithFilters(requestParameters: DomainsApiBulkUpdateDomainsWithFiltersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
432
- await this.bulkUpdateDomainsWithFiltersRaw(requestParameters, initOverrides);
514
+ async bulkUpdateDomainsWithFilters(requestParameters: DomainsApiBulkUpdateDomainsWithFiltersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto> {
515
+ const response = await this.bulkUpdateDomainsWithFiltersRaw(requestParameters, initOverrides);
516
+ return await response.value();
433
517
  }
434
518
 
435
519
  /**
@@ -1141,6 +1225,64 @@ export class DomainsApi extends runtime.BaseAPI {
1141
1225
  return await response.value();
1142
1226
  }
1143
1227
 
1228
+ /**
1229
+ * Turns a sentence into edit operations and returns how many domains it would change, with a sample of before and after values. Nothing is written. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
1230
+ * Translate a plain-language bulk edit and preview it
1231
+ */
1232
+ async previewDomainEditRaw(requestParameters: DomainsApiPreviewDomainEditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainEditPreviewDto>> {
1233
+ if (requestParameters['previewDomainEditInput'] == null) {
1234
+ throw new runtime.RequiredError(
1235
+ 'previewDomainEditInput',
1236
+ 'Required parameter "previewDomainEditInput" was null or undefined when calling previewDomainEdit().'
1237
+ );
1238
+ }
1239
+
1240
+ const queryParameters: any = {};
1241
+
1242
+ if (requestParameters['searchFilter'] != null) {
1243
+ queryParameters['searchFilter'] = requestParameters['searchFilter'];
1244
+ }
1245
+
1246
+ if (requestParameters['filter'] != null) {
1247
+ queryParameters['filter'] = requestParameters['filter'];
1248
+ }
1249
+
1250
+ const headerParameters: runtime.HTTPHeaders = {};
1251
+
1252
+ headerParameters['Content-Type'] = 'application/json';
1253
+
1254
+ if (this.configuration && this.configuration.apiKey) {
1255
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
1256
+ }
1257
+
1258
+ if (this.configuration && this.configuration.accessToken) {
1259
+ const token = this.configuration.accessToken;
1260
+ const tokenString = await token("bearer", []);
1261
+
1262
+ if (tokenString) {
1263
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1264
+ }
1265
+ }
1266
+ const response = await this.request({
1267
+ path: `/private/domains/edit/preview`,
1268
+ method: 'POST',
1269
+ headers: headerParameters,
1270
+ query: queryParameters,
1271
+ body: PreviewDomainEditInputToJSON(requestParameters['previewDomainEditInput']),
1272
+ }, initOverrides);
1273
+
1274
+ return new runtime.JSONApiResponse(response, (jsonValue) => DomainEditPreviewDtoFromJSON(jsonValue));
1275
+ }
1276
+
1277
+ /**
1278
+ * Turns a sentence into edit operations and returns how many domains it would change, with a sample of before and after values. Nothing is written. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
1279
+ * Translate a plain-language bulk edit and preview it
1280
+ */
1281
+ async previewDomainEdit(requestParameters: DomainsApiPreviewDomainEditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainEditPreviewDto> {
1282
+ const response = await this.previewDomainEditRaw(requestParameters, initOverrides);
1283
+ return await response.value();
1284
+ }
1285
+
1144
1286
  /**
1145
1287
  * Creates and starts an auction for the specified verified domain. **API key scope required:** `AUCTIONS_WRITE`. Requests authenticated with a seller session do not need any scope.
1146
1288
  * Start domain auction
@@ -0,0 +1,163 @@
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
+ JobDto,
19
+ ListJobs200Response,
20
+ NotFoundException,
21
+ ValidationException,
22
+ } from '../models/index';
23
+ import {
24
+ JobDtoFromJSON,
25
+ JobDtoToJSON,
26
+ ListJobs200ResponseFromJSON,
27
+ ListJobs200ResponseToJSON,
28
+ NotFoundExceptionFromJSON,
29
+ NotFoundExceptionToJSON,
30
+ ValidationExceptionFromJSON,
31
+ ValidationExceptionToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface JobsApiGetJobRequest {
35
+ jobId: string;
36
+ }
37
+
38
+ export interface JobsApiListJobsRequest {
39
+ filter?: { [key: string]: string; };
40
+ page?: number;
41
+ limit?: number;
42
+ sortBy?: Array<string>;
43
+ filterStatus?: string;
44
+ filterType?: string;
45
+ }
46
+
47
+ /**
48
+ *
49
+ */
50
+ export class JobsApi extends runtime.BaseAPI {
51
+
52
+ /**
53
+ * Progress and result of one job belonging to the account. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
54
+ * Get a background job
55
+ */
56
+ async getJobRaw(requestParameters: JobsApiGetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>> {
57
+ if (requestParameters['jobId'] == null) {
58
+ throw new runtime.RequiredError(
59
+ 'jobId',
60
+ 'Required parameter "jobId" was null or undefined when calling getJob().'
61
+ );
62
+ }
63
+
64
+ const queryParameters: any = {};
65
+
66
+ const headerParameters: runtime.HTTPHeaders = {};
67
+
68
+ if (this.configuration && this.configuration.apiKey) {
69
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
70
+ }
71
+
72
+ if (this.configuration && this.configuration.accessToken) {
73
+ const token = this.configuration.accessToken;
74
+ const tokenString = await token("bearer", []);
75
+
76
+ if (tokenString) {
77
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
78
+ }
79
+ }
80
+ const response = await this.request({
81
+ path: `/private/jobs/{jobId}`.replace(`{${"jobId"}}`, encodeURIComponent(String(requestParameters['jobId']))),
82
+ method: 'GET',
83
+ headers: headerParameters,
84
+ query: queryParameters,
85
+ }, initOverrides);
86
+
87
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobDtoFromJSON(jsonValue));
88
+ }
89
+
90
+ /**
91
+ * Progress and result of one job belonging to the account. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
92
+ * Get a background job
93
+ */
94
+ async getJob(requestParameters: JobsApiGetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto> {
95
+ const response = await this.getJobRaw(requestParameters, initOverrides);
96
+ return await response.value();
97
+ }
98
+
99
+ /**
100
+ * The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
101
+ * List background jobs
102
+ */
103
+ async listJobsRaw(requestParameters: JobsApiListJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListJobs200Response>> {
104
+ const queryParameters: any = {};
105
+
106
+ if (requestParameters['filter'] != null) {
107
+ queryParameters['filter'] = requestParameters['filter'];
108
+ }
109
+
110
+ if (requestParameters['page'] != null) {
111
+ queryParameters['page'] = requestParameters['page'];
112
+ }
113
+
114
+ if (requestParameters['limit'] != null) {
115
+ queryParameters['limit'] = requestParameters['limit'];
116
+ }
117
+
118
+ if (requestParameters['sortBy'] != null) {
119
+ queryParameters['sortBy'] = requestParameters['sortBy'];
120
+ }
121
+
122
+ if (requestParameters['filterStatus'] != null) {
123
+ queryParameters['filter[status]'] = requestParameters['filterStatus'];
124
+ }
125
+
126
+ if (requestParameters['filterType'] != null) {
127
+ queryParameters['filter[type]'] = requestParameters['filterType'];
128
+ }
129
+
130
+ const headerParameters: runtime.HTTPHeaders = {};
131
+
132
+ if (this.configuration && this.configuration.apiKey) {
133
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
134
+ }
135
+
136
+ if (this.configuration && this.configuration.accessToken) {
137
+ const token = this.configuration.accessToken;
138
+ const tokenString = await token("bearer", []);
139
+
140
+ if (tokenString) {
141
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
142
+ }
143
+ }
144
+ const response = await this.request({
145
+ path: `/private/jobs`,
146
+ method: 'GET',
147
+ headers: headerParameters,
148
+ query: queryParameters,
149
+ }, initOverrides);
150
+
151
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListJobs200ResponseFromJSON(jsonValue));
152
+ }
153
+
154
+ /**
155
+ * The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
156
+ * List background jobs
157
+ */
158
+ async listJobs(requestParameters: JobsApiListJobsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListJobs200Response> {
159
+ const response = await this.listJobsRaw(requestParameters, initOverrides);
160
+ return await response.value();
161
+ }
162
+
163
+ }
@@ -16,6 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ChangeUserEmailWithOtpInput,
19
+ RegisterUserPushTokenInput,
19
20
  RequestUserEmailChangeOtpInput,
20
21
  StoreUserLocaleInput,
21
22
  UpdateUserNotificationSettingsInput,
@@ -25,6 +26,8 @@ import type {
25
26
  import {
26
27
  ChangeUserEmailWithOtpInputFromJSON,
27
28
  ChangeUserEmailWithOtpInputToJSON,
29
+ RegisterUserPushTokenInputFromJSON,
30
+ RegisterUserPushTokenInputToJSON,
28
31
  RequestUserEmailChangeOtpInputFromJSON,
29
32
  RequestUserEmailChangeOtpInputToJSON,
30
33
  StoreUserLocaleInputFromJSON,
@@ -41,6 +44,14 @@ export interface UsersApiChangeUserEmailWithOtpRequest {
41
44
  changeUserEmailWithOtpInput: ChangeUserEmailWithOtpInput;
42
45
  }
43
46
 
47
+ export interface UsersApiRegisterUserPushTokenRequest {
48
+ registerUserPushTokenInput: RegisterUserPushTokenInput;
49
+ }
50
+
51
+ export interface UsersApiRemoveUserPushTokenRequest {
52
+ token: string;
53
+ }
54
+
44
55
  export interface UsersApiRequestUserEmailChangeOtpRequest {
45
56
  requestUserEmailChangeOtpInput: RequestUserEmailChangeOtpInput;
46
57
  }
@@ -147,6 +158,93 @@ export class UsersApi extends runtime.BaseAPI {
147
158
  return await response.value();
148
159
  }
149
160
 
161
+ /**
162
+ * Registers (or refreshes) an Expo push token for the current user and device. Seller session only.
163
+ * Register a push token
164
+ */
165
+ async registerUserPushTokenRaw(requestParameters: UsersApiRegisterUserPushTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
166
+ if (requestParameters['registerUserPushTokenInput'] == null) {
167
+ throw new runtime.RequiredError(
168
+ 'registerUserPushTokenInput',
169
+ 'Required parameter "registerUserPushTokenInput" was null or undefined when calling registerUserPushToken().'
170
+ );
171
+ }
172
+
173
+ const queryParameters: any = {};
174
+
175
+ const headerParameters: runtime.HTTPHeaders = {};
176
+
177
+ headerParameters['Content-Type'] = 'application/json';
178
+
179
+ if (this.configuration && this.configuration.accessToken) {
180
+ const token = this.configuration.accessToken;
181
+ const tokenString = await token("bearer", []);
182
+
183
+ if (tokenString) {
184
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
185
+ }
186
+ }
187
+ const response = await this.request({
188
+ path: `/private/users/push-tokens`,
189
+ method: 'PUT',
190
+ headers: headerParameters,
191
+ query: queryParameters,
192
+ body: RegisterUserPushTokenInputToJSON(requestParameters['registerUserPushTokenInput']),
193
+ }, initOverrides);
194
+
195
+ return new runtime.VoidApiResponse(response);
196
+ }
197
+
198
+ /**
199
+ * Registers (or refreshes) an Expo push token for the current user and device. Seller session only.
200
+ * Register a push token
201
+ */
202
+ async registerUserPushToken(requestParameters: UsersApiRegisterUserPushTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
203
+ await this.registerUserPushTokenRaw(requestParameters, initOverrides);
204
+ }
205
+
206
+ /**
207
+ * Unregisters an Expo push token for the current user, e.g. on logout. Seller session only.
208
+ * Remove a push token
209
+ */
210
+ async removeUserPushTokenRaw(requestParameters: UsersApiRemoveUserPushTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
211
+ if (requestParameters['token'] == null) {
212
+ throw new runtime.RequiredError(
213
+ 'token',
214
+ 'Required parameter "token" was null or undefined when calling removeUserPushToken().'
215
+ );
216
+ }
217
+
218
+ const queryParameters: any = {};
219
+
220
+ const headerParameters: runtime.HTTPHeaders = {};
221
+
222
+ if (this.configuration && this.configuration.accessToken) {
223
+ const token = this.configuration.accessToken;
224
+ const tokenString = await token("bearer", []);
225
+
226
+ if (tokenString) {
227
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
228
+ }
229
+ }
230
+ const response = await this.request({
231
+ path: `/private/users/push-tokens/{token}`.replace(`{${"token"}}`, encodeURIComponent(String(requestParameters['token']))),
232
+ method: 'DELETE',
233
+ headers: headerParameters,
234
+ query: queryParameters,
235
+ }, initOverrides);
236
+
237
+ return new runtime.VoidApiResponse(response);
238
+ }
239
+
240
+ /**
241
+ * Unregisters an Expo push token for the current user, e.g. on logout. Seller session only.
242
+ * Remove a push token
243
+ */
244
+ async removeUserPushToken(requestParameters: UsersApiRemoveUserPushTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
245
+ await this.removeUserPushTokenRaw(requestParameters, initOverrides);
246
+ }
247
+
150
248
  /**
151
249
  * Sends a one-time password to the new email address to verify ownership before changing the account email. **API key scope required:** `USER_EMAIL_WRITE`. Requests authenticated with a seller session do not need any scope.
152
250
  * Request email change OTP
package/src/apis/index.ts CHANGED
@@ -16,6 +16,7 @@ export * from './DomainsApi';
16
16
  export * from './DomainsPublicApi';
17
17
  export * from './EppApi';
18
18
  export * from './InvoicesApi';
19
+ export * from './JobsApi';
19
20
  export * from './LeadsApi';
20
21
  export * from './LeadsPublicApi';
21
22
  export * from './MarketApi';
@@ -0,0 +1,74 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ApplyDomainEditInput
20
+ */
21
+ export interface ApplyDomainEditInput {
22
+ /**
23
+ * The selected domains. Omit to apply to everything the filter and searchFilter match.
24
+ * @type {Array<string>}
25
+ * @memberof ApplyDomainEditInput
26
+ */
27
+ domainIds?: Array<string>;
28
+ /**
29
+ * The operations returned by the preview, sent back unchanged. Validated again here.
30
+ * @type {Array<{ [key: string]: any; }>}
31
+ * @memberof ApplyDomainEditInput
32
+ */
33
+ operations: Array<{ [key: string]: any; }>;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ApplyDomainEditInput interface.
38
+ */
39
+ export function instanceOfApplyDomainEditInput(value: object): value is ApplyDomainEditInput {
40
+ if (!('operations' in value) || value['operations'] === undefined) return false;
41
+ return true;
42
+ }
43
+
44
+ export function ApplyDomainEditInputFromJSON(json: any): ApplyDomainEditInput {
45
+ return ApplyDomainEditInputFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function ApplyDomainEditInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplyDomainEditInput {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'domainIds': json['domainIds'] == null ? undefined : json['domainIds'],
55
+ 'operations': json['operations'],
56
+ };
57
+ }
58
+
59
+ export function ApplyDomainEditInputToJSON(json: any): ApplyDomainEditInput {
60
+ return ApplyDomainEditInputToJSONTyped(json, false);
61
+ }
62
+
63
+ export function ApplyDomainEditInputToJSONTyped(value?: ApplyDomainEditInput | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'domainIds': value['domainIds'],
71
+ 'operations': value['operations'],
72
+ };
73
+ }
74
+
@@ -133,6 +133,7 @@ export const BuyerNotificationDtoTypeEnum = {
133
133
  SELLER_BULK_DOWNLOAD_INVOICES_COMPLETED: 'seller_bulk_download_invoices_completed',
134
134
  SELLER_BULK_DOWNLOAD_INVOICES_FAILED: 'seller_bulk_download_invoices_failed',
135
135
  EPP_BATCH_UPDATE_DOMAINS_RESULTS: 'epp.batch.update.domains.results',
136
+ BULK_EDIT_DOMAINS_FINISHED: 'bulk_edit_domains_finished',
136
137
  ORDER_HAS_BEEN_PAID: 'order_has_been_paid',
137
138
  PURCHASES_ARE_CLOSED_DUE_DOMAINS_IS_SOLD_OR_DELETED: 'purchases_are_closed_due_domains_is_sold_or_deleted',
138
139
  DOMAIN_OWNER_CHANGED: 'domain_owner_changed',
@@ -119,6 +119,7 @@ export const BuyerNotificationListItemDtoTypeEnum = {
119
119
  SELLER_BULK_DOWNLOAD_INVOICES_COMPLETED: 'seller_bulk_download_invoices_completed',
120
120
  SELLER_BULK_DOWNLOAD_INVOICES_FAILED: 'seller_bulk_download_invoices_failed',
121
121
  EPP_BATCH_UPDATE_DOMAINS_RESULTS: 'epp.batch.update.domains.results',
122
+ BULK_EDIT_DOMAINS_FINISHED: 'bulk_edit_domains_finished',
122
123
  ORDER_HAS_BEEN_PAID: 'order_has_been_paid',
123
124
  PURCHASES_ARE_CLOSED_DUE_DOMAINS_IS_SOLD_OR_DELETED: 'purchases_are_closed_due_domains_is_sold_or_deleted',
124
125
  DOMAIN_OWNER_CHANGED: 'domain_owner_changed',