@randock/nameshift-api-client 0.0.479 → 0.0.480

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.
@@ -391,6 +391,7 @@ src/models/ListAccountMetricsDto.ts
391
391
  src/models/ListAccountPortfolioSizeDto.ts
392
392
  src/models/ListAccountUserDto.ts
393
393
  src/models/ListAccounts200Response.ts
394
+ src/models/ListAdminRelatedLeads200Response.ts
394
395
  src/models/ListAuctions200Response.ts
395
396
  src/models/ListBankAccounts200Response.ts
396
397
  src/models/ListBankDeposits200Response.ts
@@ -404,7 +405,6 @@ src/models/ListLeadMessagesDto.ts
404
405
  src/models/ListLeads200Response.ts
405
406
  src/models/ListLeadsResultItem.ts
406
407
  src/models/ListNotifications200Response.ts
407
- src/models/ListRelatedLeads200Response.ts
408
408
  src/models/LockConfigurationInput.ts
409
409
  src/models/LockDurationDto.ts
410
410
  src/models/LockDurationInput.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.479
1
+ ## @randock/nameshift-api-client@0.0.480
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.479 --save
39
+ npm install @randock/nameshift-api-client@0.0.480 --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
- 7b9323bda73bf014c44a01f32534b2e06c06396dbc535bde6faab88443a9aa3cc9455ae913b0df1708568ecf78b1a181
47
+ 09f44cc499eb87d00be9e86f9597e504c7341ab237ae3a2f0ec0cecc96d0f1f8e8531560d9bb02b1f112ace16642b220
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AccountNameshiftCommissionByTypeDto, AccountNoteListDto, AccountPaymentMethodProfileDto, AccountSettingsDto, AdminAccountLoginDto, AdminAccountSettingsInput, AdminBuyerLoginDto, AdminChallengeListDto, AdminCompanyStatsDto, AdminDashboardStatsDto, AdminGetAllDomainTransfers200Response, AdminMarketplaceDto, BulkCommissionActionsInput, ChangeInvoiceStatusInput, ChangeOrderStatusInput, ChangeSubscriptionStatusInput, CommissionListDto, CommissionSimulationResultDto, CreateAccountNoteInput, CreateChallengeInput, DomainLockDto, DomainStatsDto, DomainTldsDto, DomainTransferDetailsDto, GetAccountChallengeRewardUsagesListDto, GetAllAuctions200Response, GetAllFeatureFlags200Response, GetAllInvoices200Response, GetAllOrders200Response, GetAllOwnedDomains200Response, GetAllSubscriptions200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, LeadMessageDto, LedgerMutationsDto, LinkBankDepositToBankAccountInput, LinkBankDepositToInvoiceInput, ListAccounts200Response, ListBankAccounts200Response, ListBankDeposits200Response, ListDomains200Response, ListLeads200Response, ObjectId, SellerSalesByTldStatsItemDto, SellerSalesCountStatsItemDto, SendAdminLeadAiPriceNegotiatorAgentChatMessageInput, SimulateCommissionInput, StatsFilterInputDateRange, SubscriptionDetailsDto, UpdateAccountChallengeRewardBalanceInput, UpdateAccountNoteInput, UpdateChallengeInput, UpdateFeatureFlagInput, UpdateMarketplaceInput, UpdateSubscriptionBuyerInformationInput } from '../models/index';
13
+ import type { AccountNameshiftCommissionByTypeDto, AccountNoteListDto, AccountPaymentMethodProfileDto, AccountSettingsDto, AdminAccountLoginDto, AdminAccountSettingsInput, AdminBuyerLoginDto, AdminChallengeListDto, AdminCompanyStatsDto, AdminDashboardStatsDto, AdminGetAllDomainTransfers200Response, AdminMarketplaceDto, BulkCommissionActionsInput, ChangeInvoiceStatusInput, ChangeOrderStatusInput, ChangeSubscriptionStatusInput, CommissionListDto, CommissionSimulationResultDto, CreateAccountNoteInput, CreateChallengeInput, DomainLockDto, DomainStatsDto, DomainTldsDto, DomainTransferDetailsDto, GetAccountChallengeRewardUsagesListDto, GetAllAuctions200Response, GetAllFeatureFlags200Response, GetAllInvoices200Response, GetAllOrders200Response, GetAllOwnedDomains200Response, GetAllSubscriptions200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, LeadEnrichmentDto, LeadMessageDto, LedgerMutationsDto, LinkBankDepositToBankAccountInput, LinkBankDepositToInvoiceInput, ListAccounts200Response, ListAdminRelatedLeads200Response, ListBankAccounts200Response, ListBankDeposits200Response, ListDomains200Response, ListLeadMessagesDto, ListLeads200Response, ObjectId, SellerLeadDetails, SellerSalesByTldStatsItemDto, SellerSalesCountStatsItemDto, SendAdminLeadAiPriceNegotiatorAgentChatMessageInput, SimulateCommissionInput, StatsFilterInputDateRange, SubscriptionDetailsDto, UpdateAccountChallengeRewardBalanceInput, UpdateAccountNoteInput, UpdateChallengeInput, UpdateFeatureFlagInput, UpdateMarketplaceInput, UpdateSubscriptionBuyerInformationInput } from '../models/index';
14
14
  export interface AdminApiAdminDeleteAuctionRequest {
15
15
  auctionId: string;
16
16
  }
@@ -89,6 +89,12 @@ export interface AdminApiGetAdminDashboardStatsRequest {
89
89
  export interface AdminApiGetAdminDomainTransferDetailsRequest {
90
90
  domainTransferId: string;
91
91
  }
92
+ export interface AdminApiGetAdminLeadDetailsRequest {
93
+ leadId: string;
94
+ }
95
+ export interface AdminApiGetAdminLeadEnrichmentRequest {
96
+ leadId: string;
97
+ }
92
98
  export interface AdminApiGetAdminSalesByTldRequest {
93
99
  currency: string;
94
100
  accountId?: string;
@@ -191,6 +197,19 @@ export interface AdminApiListAccountsRequest {
191
197
  sortBy?: Array<string>;
192
198
  filterSearchTerm?: string;
193
199
  }
200
+ export interface AdminApiListAdminLeadMessagesRequest {
201
+ leadId: string;
202
+ }
203
+ export interface AdminApiListAdminRelatedLeadsRequest {
204
+ leadId: string;
205
+ filter?: {
206
+ [key: string]: string;
207
+ };
208
+ page?: number;
209
+ limit?: number;
210
+ sortBy?: Array<string>;
211
+ filterStatus?: string;
212
+ }
194
213
  export interface AdminApiListAllCommissionsRequest {
195
214
  accountId?: string;
196
215
  }
@@ -275,6 +294,9 @@ export interface AdminApiRemoveDomainLockRequest {
275
294
  domainId: string;
276
295
  lockId: string;
277
296
  }
297
+ export interface AdminApiReopenAdminLeadRequest {
298
+ leadId: string;
299
+ }
278
300
  export interface AdminApiShowcaseDomainRequest {
279
301
  domainId: string;
280
302
  }
@@ -552,6 +574,26 @@ export declare class AdminApi extends runtime.BaseAPI {
552
574
  * Get domain transfer details
553
575
  */
554
576
  getAdminDomainTransferDetails(requestParameters: AdminApiGetAdminDomainTransferDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainTransferDetailsDto>;
577
+ /**
578
+ * Returns a lead as the seller sees it, for any account. Read only. Requires admin bearer authentication.
579
+ * Get lead details
580
+ */
581
+ getAdminLeadDetailsRaw(requestParameters: AdminApiGetAdminLeadDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SellerLeadDetails>>;
582
+ /**
583
+ * Returns a lead as the seller sees it, for any account. Read only. Requires admin bearer authentication.
584
+ * Get lead details
585
+ */
586
+ getAdminLeadDetails(requestParameters: AdminApiGetAdminLeadDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SellerLeadDetails>;
587
+ /**
588
+ * Returns the buyer background enrichment of a lead, for any account. Requires admin bearer authentication.
589
+ * Get lead buyer enrichment
590
+ */
591
+ getAdminLeadEnrichmentRaw(requestParameters: AdminApiGetAdminLeadEnrichmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadEnrichmentDto>>;
592
+ /**
593
+ * Returns the buyer background enrichment of a lead, for any account. Requires admin bearer authentication.
594
+ * Get lead buyer enrichment
595
+ */
596
+ getAdminLeadEnrichment(requestParameters: AdminApiGetAdminLeadEnrichmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadEnrichmentDto>;
555
597
  /**
556
598
  * Returns sales statistics grouped by top-level domain, optionally filtered by account, currency, and date range.
557
599
  * Get admin sales by TLD
@@ -712,6 +754,16 @@ export declare class AdminApi extends runtime.BaseAPI {
712
754
  * List accounts
713
755
  */
714
756
  listAccounts(requestParameters?: AdminApiListAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAccounts200Response>;
757
+ /**
758
+ * Lists the messages of a lead conversation, for any account. Read only: nothing is marked as read. Requires admin bearer authentication.
759
+ * List lead messages
760
+ */
761
+ listAdminLeadMessagesRaw(requestParameters: AdminApiListAdminLeadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListLeadMessagesDto>>;
762
+ /**
763
+ * Lists the messages of a lead conversation, for any account. Read only: nothing is marked as read. Requires admin bearer authentication.
764
+ * List lead messages
765
+ */
766
+ listAdminLeadMessages(requestParameters: AdminApiListAdminLeadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListLeadMessagesDto>;
715
767
  /**
716
768
  * Returns every marketplace including disabled ones, with the nameservers the edge resolves routed domains against.
717
769
  * List all marketplaces
@@ -722,6 +774,16 @@ export declare class AdminApi extends runtime.BaseAPI {
722
774
  * List all marketplaces
723
775
  */
724
776
  listAdminMarketplaces(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminMarketplaceDto>>;
777
+ /**
778
+ * Lists the leads related to the given one, for any account. Requires admin bearer authentication.
779
+ * List related leads
780
+ */
781
+ listAdminRelatedLeadsRaw(requestParameters: AdminApiListAdminRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAdminRelatedLeads200Response>>;
782
+ /**
783
+ * Lists the leads related to the given one, for any account. Requires admin bearer authentication.
784
+ * List related leads
785
+ */
786
+ listAdminRelatedLeads(requestParameters: AdminApiListAdminRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAdminRelatedLeads200Response>;
725
787
  /**
726
788
  * Lists all existing non-deleted challenges.
727
789
  * List all challenges
@@ -902,6 +964,16 @@ export declare class AdminApi extends runtime.BaseAPI {
902
964
  * Remove domain lock
903
965
  */
904
966
  removeDomainLock(requestParameters: AdminApiRemoveDomainLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
967
+ /**
968
+ * Puts a closed lead back to active so the buyer and seller can keep negotiating. Only closed leads whose domain still exists qualify. Requires admin bearer authentication.
969
+ * Reopen a closed lead
970
+ */
971
+ reopenAdminLeadRaw(requestParameters: AdminApiReopenAdminLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
972
+ /**
973
+ * Puts a closed lead back to active so the buyer and seller can keep negotiating. Only closed leads whose domain still exists qualify. Requires admin bearer authentication.
974
+ * Reopen a closed lead
975
+ */
976
+ reopenAdminLead(requestParameters: AdminApiReopenAdminLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
905
977
  /**
906
978
  * Picks the domain for the public showcase on the website. Idempotent: showcasing an already showcased domain keeps its original position in the showcase.
907
979
  * Showcase domain
@@ -1305,6 +1305,116 @@ var AdminApi = /** @class */ (function (_super) {
1305
1305
  });
1306
1306
  });
1307
1307
  };
1308
+ /**
1309
+ * Returns a lead as the seller sees it, for any account. Read only. Requires admin bearer authentication.
1310
+ * Get lead details
1311
+ */
1312
+ AdminApi.prototype.getAdminLeadDetailsRaw = function (requestParameters, initOverrides) {
1313
+ return __awaiter(this, void 0, void 0, function () {
1314
+ var queryParameters, headerParameters, token, tokenString, response;
1315
+ return __generator(this, function (_a) {
1316
+ switch (_a.label) {
1317
+ case 0:
1318
+ if (requestParameters['leadId'] == null) {
1319
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling getAdminLeadDetails().');
1320
+ }
1321
+ queryParameters = {};
1322
+ headerParameters = {};
1323
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1324
+ token = this.configuration.accessToken;
1325
+ return [4 /*yield*/, token("bearer", [])];
1326
+ case 1:
1327
+ tokenString = _a.sent();
1328
+ if (tokenString) {
1329
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
1330
+ }
1331
+ _a.label = 2;
1332
+ case 2: return [4 /*yield*/, this.request({
1333
+ path: "/admin/leads/{leadId}".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
1334
+ method: 'GET',
1335
+ headers: headerParameters,
1336
+ query: queryParameters,
1337
+ }, initOverrides)];
1338
+ case 3:
1339
+ response = _a.sent();
1340
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SellerLeadDetailsFromJSON)(jsonValue); })];
1341
+ }
1342
+ });
1343
+ });
1344
+ };
1345
+ /**
1346
+ * Returns a lead as the seller sees it, for any account. Read only. Requires admin bearer authentication.
1347
+ * Get lead details
1348
+ */
1349
+ AdminApi.prototype.getAdminLeadDetails = function (requestParameters, initOverrides) {
1350
+ return __awaiter(this, void 0, void 0, function () {
1351
+ var response;
1352
+ return __generator(this, function (_a) {
1353
+ switch (_a.label) {
1354
+ case 0: return [4 /*yield*/, this.getAdminLeadDetailsRaw(requestParameters, initOverrides)];
1355
+ case 1:
1356
+ response = _a.sent();
1357
+ return [4 /*yield*/, response.value()];
1358
+ case 2: return [2 /*return*/, _a.sent()];
1359
+ }
1360
+ });
1361
+ });
1362
+ };
1363
+ /**
1364
+ * Returns the buyer background enrichment of a lead, for any account. Requires admin bearer authentication.
1365
+ * Get lead buyer enrichment
1366
+ */
1367
+ AdminApi.prototype.getAdminLeadEnrichmentRaw = function (requestParameters, initOverrides) {
1368
+ return __awaiter(this, void 0, void 0, function () {
1369
+ var queryParameters, headerParameters, token, tokenString, response;
1370
+ return __generator(this, function (_a) {
1371
+ switch (_a.label) {
1372
+ case 0:
1373
+ if (requestParameters['leadId'] == null) {
1374
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling getAdminLeadEnrichment().');
1375
+ }
1376
+ queryParameters = {};
1377
+ headerParameters = {};
1378
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1379
+ token = this.configuration.accessToken;
1380
+ return [4 /*yield*/, token("bearer", [])];
1381
+ case 1:
1382
+ tokenString = _a.sent();
1383
+ if (tokenString) {
1384
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
1385
+ }
1386
+ _a.label = 2;
1387
+ case 2: return [4 /*yield*/, this.request({
1388
+ path: "/admin/leads/{leadId}/enrichment".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
1389
+ method: 'GET',
1390
+ headers: headerParameters,
1391
+ query: queryParameters,
1392
+ }, initOverrides)];
1393
+ case 3:
1394
+ response = _a.sent();
1395
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LeadEnrichmentDtoFromJSON)(jsonValue); })];
1396
+ }
1397
+ });
1398
+ });
1399
+ };
1400
+ /**
1401
+ * Returns the buyer background enrichment of a lead, for any account. Requires admin bearer authentication.
1402
+ * Get lead buyer enrichment
1403
+ */
1404
+ AdminApi.prototype.getAdminLeadEnrichment = function (requestParameters, initOverrides) {
1405
+ return __awaiter(this, void 0, void 0, function () {
1406
+ var response;
1407
+ return __generator(this, function (_a) {
1408
+ switch (_a.label) {
1409
+ case 0: return [4 /*yield*/, this.getAdminLeadEnrichmentRaw(requestParameters, initOverrides)];
1410
+ case 1:
1411
+ response = _a.sent();
1412
+ return [4 /*yield*/, response.value()];
1413
+ case 2: return [2 /*return*/, _a.sent()];
1414
+ }
1415
+ });
1416
+ });
1417
+ };
1308
1418
  /**
1309
1419
  * Returns sales statistics grouped by top-level domain, optionally filtered by account, currency, and date range.
1310
1420
  * Get admin sales by TLD
@@ -2317,6 +2427,61 @@ var AdminApi = /** @class */ (function (_super) {
2317
2427
  });
2318
2428
  });
2319
2429
  };
2430
+ /**
2431
+ * Lists the messages of a lead conversation, for any account. Read only: nothing is marked as read. Requires admin bearer authentication.
2432
+ * List lead messages
2433
+ */
2434
+ AdminApi.prototype.listAdminLeadMessagesRaw = function (requestParameters, initOverrides) {
2435
+ return __awaiter(this, void 0, void 0, function () {
2436
+ var queryParameters, headerParameters, token, tokenString, response;
2437
+ return __generator(this, function (_a) {
2438
+ switch (_a.label) {
2439
+ case 0:
2440
+ if (requestParameters['leadId'] == null) {
2441
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling listAdminLeadMessages().');
2442
+ }
2443
+ queryParameters = {};
2444
+ headerParameters = {};
2445
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
2446
+ token = this.configuration.accessToken;
2447
+ return [4 /*yield*/, token("bearer", [])];
2448
+ case 1:
2449
+ tokenString = _a.sent();
2450
+ if (tokenString) {
2451
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
2452
+ }
2453
+ _a.label = 2;
2454
+ case 2: return [4 /*yield*/, this.request({
2455
+ path: "/admin/leads/{leadId}/messages".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
2456
+ method: 'GET',
2457
+ headers: headerParameters,
2458
+ query: queryParameters,
2459
+ }, initOverrides)];
2460
+ case 3:
2461
+ response = _a.sent();
2462
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ListLeadMessagesDtoFromJSON)(jsonValue); })];
2463
+ }
2464
+ });
2465
+ });
2466
+ };
2467
+ /**
2468
+ * Lists the messages of a lead conversation, for any account. Read only: nothing is marked as read. Requires admin bearer authentication.
2469
+ * List lead messages
2470
+ */
2471
+ AdminApi.prototype.listAdminLeadMessages = function (requestParameters, initOverrides) {
2472
+ return __awaiter(this, void 0, void 0, function () {
2473
+ var response;
2474
+ return __generator(this, function (_a) {
2475
+ switch (_a.label) {
2476
+ case 0: return [4 /*yield*/, this.listAdminLeadMessagesRaw(requestParameters, initOverrides)];
2477
+ case 1:
2478
+ response = _a.sent();
2479
+ return [4 /*yield*/, response.value()];
2480
+ case 2: return [2 /*return*/, _a.sent()];
2481
+ }
2482
+ });
2483
+ });
2484
+ };
2320
2485
  /**
2321
2486
  * Returns every marketplace including disabled ones, with the nameservers the edge resolves routed domains against.
2322
2487
  * List all marketplaces
@@ -2369,6 +2534,76 @@ var AdminApi = /** @class */ (function (_super) {
2369
2534
  });
2370
2535
  });
2371
2536
  };
2537
+ /**
2538
+ * Lists the leads related to the given one, for any account. Requires admin bearer authentication.
2539
+ * List related leads
2540
+ */
2541
+ AdminApi.prototype.listAdminRelatedLeadsRaw = function (requestParameters, initOverrides) {
2542
+ return __awaiter(this, void 0, void 0, function () {
2543
+ var queryParameters, headerParameters, token, tokenString, response;
2544
+ return __generator(this, function (_a) {
2545
+ switch (_a.label) {
2546
+ case 0:
2547
+ if (requestParameters['leadId'] == null) {
2548
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling listAdminRelatedLeads().');
2549
+ }
2550
+ queryParameters = {};
2551
+ if (requestParameters['filter'] != null) {
2552
+ queryParameters['filter'] = requestParameters['filter'];
2553
+ }
2554
+ if (requestParameters['page'] != null) {
2555
+ queryParameters['page'] = requestParameters['page'];
2556
+ }
2557
+ if (requestParameters['limit'] != null) {
2558
+ queryParameters['limit'] = requestParameters['limit'];
2559
+ }
2560
+ if (requestParameters['sortBy'] != null) {
2561
+ queryParameters['sortBy'] = requestParameters['sortBy'];
2562
+ }
2563
+ if (requestParameters['filterStatus'] != null) {
2564
+ queryParameters['filter[status]'] = requestParameters['filterStatus'];
2565
+ }
2566
+ headerParameters = {};
2567
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
2568
+ token = this.configuration.accessToken;
2569
+ return [4 /*yield*/, token("bearer", [])];
2570
+ case 1:
2571
+ tokenString = _a.sent();
2572
+ if (tokenString) {
2573
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
2574
+ }
2575
+ _a.label = 2;
2576
+ case 2: return [4 /*yield*/, this.request({
2577
+ path: "/admin/leads/{leadId}/related".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
2578
+ method: 'GET',
2579
+ headers: headerParameters,
2580
+ query: queryParameters,
2581
+ }, initOverrides)];
2582
+ case 3:
2583
+ response = _a.sent();
2584
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ListAdminRelatedLeads200ResponseFromJSON)(jsonValue); })];
2585
+ }
2586
+ });
2587
+ });
2588
+ };
2589
+ /**
2590
+ * Lists the leads related to the given one, for any account. Requires admin bearer authentication.
2591
+ * List related leads
2592
+ */
2593
+ AdminApi.prototype.listAdminRelatedLeads = function (requestParameters, initOverrides) {
2594
+ return __awaiter(this, void 0, void 0, function () {
2595
+ var response;
2596
+ return __generator(this, function (_a) {
2597
+ switch (_a.label) {
2598
+ case 0: return [4 /*yield*/, this.listAdminRelatedLeadsRaw(requestParameters, initOverrides)];
2599
+ case 1:
2600
+ response = _a.sent();
2601
+ return [4 /*yield*/, response.value()];
2602
+ case 2: return [2 /*return*/, _a.sent()];
2603
+ }
2604
+ });
2605
+ });
2606
+ };
2372
2607
  /**
2373
2608
  * Lists all existing non-deleted challenges.
2374
2609
  * List all challenges
@@ -3435,6 +3670,59 @@ var AdminApi = /** @class */ (function (_super) {
3435
3670
  });
3436
3671
  });
3437
3672
  };
3673
+ /**
3674
+ * Puts a closed lead back to active so the buyer and seller can keep negotiating. Only closed leads whose domain still exists qualify. Requires admin bearer authentication.
3675
+ * Reopen a closed lead
3676
+ */
3677
+ AdminApi.prototype.reopenAdminLeadRaw = function (requestParameters, initOverrides) {
3678
+ return __awaiter(this, void 0, void 0, function () {
3679
+ var queryParameters, headerParameters, token, tokenString, response;
3680
+ return __generator(this, function (_a) {
3681
+ switch (_a.label) {
3682
+ case 0:
3683
+ if (requestParameters['leadId'] == null) {
3684
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling reopenAdminLead().');
3685
+ }
3686
+ queryParameters = {};
3687
+ headerParameters = {};
3688
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
3689
+ token = this.configuration.accessToken;
3690
+ return [4 /*yield*/, token("bearer", [])];
3691
+ case 1:
3692
+ tokenString = _a.sent();
3693
+ if (tokenString) {
3694
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
3695
+ }
3696
+ _a.label = 2;
3697
+ case 2: return [4 /*yield*/, this.request({
3698
+ path: "/admin/leads/{leadId}/status/reopen".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
3699
+ method: 'POST',
3700
+ headers: headerParameters,
3701
+ query: queryParameters,
3702
+ }, initOverrides)];
3703
+ case 3:
3704
+ response = _a.sent();
3705
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
3706
+ }
3707
+ });
3708
+ });
3709
+ };
3710
+ /**
3711
+ * Puts a closed lead back to active so the buyer and seller can keep negotiating. Only closed leads whose domain still exists qualify. Requires admin bearer authentication.
3712
+ * Reopen a closed lead
3713
+ */
3714
+ AdminApi.prototype.reopenAdminLead = function (requestParameters, initOverrides) {
3715
+ return __awaiter(this, void 0, void 0, function () {
3716
+ return __generator(this, function (_a) {
3717
+ switch (_a.label) {
3718
+ case 0: return [4 /*yield*/, this.reopenAdminLeadRaw(requestParameters, initOverrides)];
3719
+ case 1:
3720
+ _a.sent();
3721
+ return [2 /*return*/];
3722
+ }
3723
+ });
3724
+ });
3725
+ };
3438
3726
  /**
3439
3727
  * Picks the domain for the public showcase on the website. Idempotent: showcasing an already showcased domain keeps its original position in the showcase.
3440
3728
  * Showcase domain
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { BatchReadSellerLeadMessageInput, CreateLeadMessageInput, CreateManualLeadInput, IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDto, LeadEnrichmentDto, LeadLeaseToOwnAndRentConfigurationPresetsDto, LeadOfferExpirationConfigurationInput, List200Response, ListLeadMessagesDto, ListRelatedLeads200Response, LockConfigurationInput, ObjectId, PutLeadOfferInput, SellerLeadDetails, UpdateLeadMuteStatusInput } from '../models/index';
13
+ import type { BatchReadSellerLeadMessageInput, CreateLeadMessageInput, CreateManualLeadInput, IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDto, LeadEnrichmentDto, LeadLeaseToOwnAndRentConfigurationPresetsDto, LeadOfferExpirationConfigurationInput, List200Response, ListAdminRelatedLeads200Response, ListLeadMessagesDto, LockConfigurationInput, ObjectId, PutLeadOfferInput, SellerLeadDetails, UpdateLeadMuteStatusInput } from '../models/index';
14
14
  export interface LeadsApiAcceptLeadOfferRequest {
15
15
  leadId: string;
16
16
  }
@@ -217,12 +217,12 @@ export declare class LeadsApi extends runtime.BaseAPI {
217
217
  * Lists leads related to the specified lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
218
218
  * List related leads
219
219
  */
220
- listRelatedLeadsRaw(requestParameters: LeadsApiListRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListRelatedLeads200Response>>;
220
+ listRelatedLeadsRaw(requestParameters: LeadsApiListRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAdminRelatedLeads200Response>>;
221
221
  /**
222
222
  * Lists leads related to the specified lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
223
223
  * List related leads
224
224
  */
225
- listRelatedLeads(requestParameters: LeadsApiListRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListRelatedLeads200Response>;
225
+ listRelatedLeads(requestParameters: LeadsApiListRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAdminRelatedLeads200Response>;
226
226
  /**
227
227
  * Pauses the AI price negotiator agent for the lead. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
228
228
  * Pause AI price negotiator
@@ -904,7 +904,7 @@ var LeadsApi = /** @class */ (function (_super) {
904
904
  }, initOverrides)];
905
905
  case 5:
906
906
  response = _c.sent();
907
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ListRelatedLeads200ResponseFromJSON)(jsonValue); })];
907
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ListAdminRelatedLeads200ResponseFromJSON)(jsonValue); })];
908
908
  }
909
909
  });
910
910
  });
@@ -15,33 +15,33 @@ import type { PaginateResponseMeta } from './PaginateResponseMeta';
15
15
  /**
16
16
  *
17
17
  * @export
18
- * @interface ListRelatedLeads200Response
18
+ * @interface ListAdminRelatedLeads200Response
19
19
  */
20
- export interface ListRelatedLeads200Response {
20
+ export interface ListAdminRelatedLeads200Response {
21
21
  /**
22
22
  *
23
23
  * @type {Array<RelatedLeadDto>}
24
- * @memberof ListRelatedLeads200Response
24
+ * @memberof ListAdminRelatedLeads200Response
25
25
  */
26
26
  data: Array<RelatedLeadDto>;
27
27
  /**
28
28
  *
29
29
  * @type {PaginateResponseMeta}
30
- * @memberof ListRelatedLeads200Response
30
+ * @memberof ListAdminRelatedLeads200Response
31
31
  */
32
32
  meta: PaginateResponseMeta;
33
33
  /**
34
34
  *
35
35
  * @type {PaginateResponseLinks}
36
- * @memberof ListRelatedLeads200Response
36
+ * @memberof ListAdminRelatedLeads200Response
37
37
  */
38
38
  links: PaginateResponseLinks;
39
39
  }
40
40
  /**
41
- * Check if a given object implements the ListRelatedLeads200Response interface.
41
+ * Check if a given object implements the ListAdminRelatedLeads200Response interface.
42
42
  */
43
- export declare function instanceOfListRelatedLeads200Response(value: object): value is ListRelatedLeads200Response;
44
- export declare function ListRelatedLeads200ResponseFromJSON(json: any): ListRelatedLeads200Response;
45
- export declare function ListRelatedLeads200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListRelatedLeads200Response;
46
- export declare function ListRelatedLeads200ResponseToJSON(json: any): ListRelatedLeads200Response;
47
- export declare function ListRelatedLeads200ResponseToJSONTyped(value?: ListRelatedLeads200Response | null, ignoreDiscriminator?: boolean): any;
43
+ export declare function instanceOfListAdminRelatedLeads200Response(value: object): value is ListAdminRelatedLeads200Response;
44
+ export declare function ListAdminRelatedLeads200ResponseFromJSON(json: any): ListAdminRelatedLeads200Response;
45
+ export declare function ListAdminRelatedLeads200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAdminRelatedLeads200Response;
46
+ export declare function ListAdminRelatedLeads200ResponseToJSON(json: any): ListAdminRelatedLeads200Response;
47
+ export declare function ListAdminRelatedLeads200ResponseToJSONTyped(value?: ListAdminRelatedLeads200Response | null, ignoreDiscriminator?: boolean): any;
@@ -13,18 +13,18 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.instanceOfListRelatedLeads200Response = instanceOfListRelatedLeads200Response;
17
- exports.ListRelatedLeads200ResponseFromJSON = ListRelatedLeads200ResponseFromJSON;
18
- exports.ListRelatedLeads200ResponseFromJSONTyped = ListRelatedLeads200ResponseFromJSONTyped;
19
- exports.ListRelatedLeads200ResponseToJSON = ListRelatedLeads200ResponseToJSON;
20
- exports.ListRelatedLeads200ResponseToJSONTyped = ListRelatedLeads200ResponseToJSONTyped;
16
+ exports.instanceOfListAdminRelatedLeads200Response = instanceOfListAdminRelatedLeads200Response;
17
+ exports.ListAdminRelatedLeads200ResponseFromJSON = ListAdminRelatedLeads200ResponseFromJSON;
18
+ exports.ListAdminRelatedLeads200ResponseFromJSONTyped = ListAdminRelatedLeads200ResponseFromJSONTyped;
19
+ exports.ListAdminRelatedLeads200ResponseToJSON = ListAdminRelatedLeads200ResponseToJSON;
20
+ exports.ListAdminRelatedLeads200ResponseToJSONTyped = ListAdminRelatedLeads200ResponseToJSONTyped;
21
21
  var PaginateResponseLinks_1 = require("./PaginateResponseLinks");
22
22
  var RelatedLeadDto_1 = require("./RelatedLeadDto");
23
23
  var PaginateResponseMeta_1 = require("./PaginateResponseMeta");
24
24
  /**
25
- * Check if a given object implements the ListRelatedLeads200Response interface.
25
+ * Check if a given object implements the ListAdminRelatedLeads200Response interface.
26
26
  */
27
- function instanceOfListRelatedLeads200Response(value) {
27
+ function instanceOfListAdminRelatedLeads200Response(value) {
28
28
  if (!('data' in value) || value['data'] === undefined)
29
29
  return false;
30
30
  if (!('meta' in value) || value['meta'] === undefined)
@@ -33,10 +33,10 @@ function instanceOfListRelatedLeads200Response(value) {
33
33
  return false;
34
34
  return true;
35
35
  }
36
- function ListRelatedLeads200ResponseFromJSON(json) {
37
- return ListRelatedLeads200ResponseFromJSONTyped(json, false);
36
+ function ListAdminRelatedLeads200ResponseFromJSON(json) {
37
+ return ListAdminRelatedLeads200ResponseFromJSONTyped(json, false);
38
38
  }
39
- function ListRelatedLeads200ResponseFromJSONTyped(json, ignoreDiscriminator) {
39
+ function ListAdminRelatedLeads200ResponseFromJSONTyped(json, ignoreDiscriminator) {
40
40
  if (json == null) {
41
41
  return json;
42
42
  }
@@ -46,10 +46,10 @@ function ListRelatedLeads200ResponseFromJSONTyped(json, ignoreDiscriminator) {
46
46
  'links': (0, PaginateResponseLinks_1.PaginateResponseLinksFromJSON)(json['links']),
47
47
  };
48
48
  }
49
- function ListRelatedLeads200ResponseToJSON(json) {
50
- return ListRelatedLeads200ResponseToJSONTyped(json, false);
49
+ function ListAdminRelatedLeads200ResponseToJSON(json) {
50
+ return ListAdminRelatedLeads200ResponseToJSONTyped(json, false);
51
51
  }
52
- function ListRelatedLeads200ResponseToJSONTyped(value, ignoreDiscriminator) {
52
+ function ListAdminRelatedLeads200ResponseToJSONTyped(value, ignoreDiscriminator) {
53
53
  if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
54
54
  if (value == null) {
55
55
  return value;
@@ -350,6 +350,7 @@ export * from './ListAccountMetricsDto';
350
350
  export * from './ListAccountPortfolioSizeDto';
351
351
  export * from './ListAccountUserDto';
352
352
  export * from './ListAccounts200Response';
353
+ export * from './ListAdminRelatedLeads200Response';
353
354
  export * from './ListAuctions200Response';
354
355
  export * from './ListBankAccounts200Response';
355
356
  export * from './ListBankDeposits200Response';
@@ -363,7 +364,6 @@ export * from './ListLeadMessagesDto';
363
364
  export * from './ListLeads200Response';
364
365
  export * from './ListLeadsResultItem';
365
366
  export * from './ListNotifications200Response';
366
- export * from './ListRelatedLeads200Response';
367
367
  export * from './LockConfigurationInput';
368
368
  export * from './LockDurationDto';
369
369
  export * from './LockDurationInput';
@@ -368,6 +368,7 @@ __exportStar(require("./ListAccountMetricsDto"), exports);
368
368
  __exportStar(require("./ListAccountPortfolioSizeDto"), exports);
369
369
  __exportStar(require("./ListAccountUserDto"), exports);
370
370
  __exportStar(require("./ListAccounts200Response"), exports);
371
+ __exportStar(require("./ListAdminRelatedLeads200Response"), exports);
371
372
  __exportStar(require("./ListAuctions200Response"), exports);
372
373
  __exportStar(require("./ListBankAccounts200Response"), exports);
373
374
  __exportStar(require("./ListBankDeposits200Response"), exports);
@@ -381,7 +382,6 @@ __exportStar(require("./ListLeadMessagesDto"), exports);
381
382
  __exportStar(require("./ListLeads200Response"), exports);
382
383
  __exportStar(require("./ListLeadsResultItem"), exports);
383
384
  __exportStar(require("./ListNotifications200Response"), exports);
384
- __exportStar(require("./ListRelatedLeads200Response"), exports);
385
385
  __exportStar(require("./LockConfigurationInput"), exports);
386
386
  __exportStar(require("./LockDurationDto"), exports);
387
387
  __exportStar(require("./LockDurationInput"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.479",
3
+ "version": "0.0.480",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -50,17 +50,21 @@ import type {
50
50
  GetAllOwnedDomains200Response,
51
51
  GetAllSubscriptions200Response,
52
52
  IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto,
53
+ LeadEnrichmentDto,
53
54
  LeadMessageDto,
54
55
  LedgerMutationsDto,
55
56
  LinkBankDepositToBankAccountInput,
56
57
  LinkBankDepositToInvoiceInput,
57
58
  ListAccounts200Response,
59
+ ListAdminRelatedLeads200Response,
58
60
  ListBankAccounts200Response,
59
61
  ListBankDeposits200Response,
60
62
  ListDomains200Response,
63
+ ListLeadMessagesDto,
61
64
  ListLeads200Response,
62
65
  NotFoundException,
63
66
  ObjectId,
67
+ SellerLeadDetails,
64
68
  SellerSalesByTldStatsItemDto,
65
69
  SellerSalesCountStatsItemDto,
66
70
  SendAdminLeadAiPriceNegotiatorAgentChatMessageInput,
@@ -146,6 +150,8 @@ import {
146
150
  GetAllSubscriptions200ResponseToJSON,
147
151
  IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoFromJSON,
148
152
  IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoToJSON,
153
+ LeadEnrichmentDtoFromJSON,
154
+ LeadEnrichmentDtoToJSON,
149
155
  LeadMessageDtoFromJSON,
150
156
  LeadMessageDtoToJSON,
151
157
  LedgerMutationsDtoFromJSON,
@@ -156,18 +162,24 @@ import {
156
162
  LinkBankDepositToInvoiceInputToJSON,
157
163
  ListAccounts200ResponseFromJSON,
158
164
  ListAccounts200ResponseToJSON,
165
+ ListAdminRelatedLeads200ResponseFromJSON,
166
+ ListAdminRelatedLeads200ResponseToJSON,
159
167
  ListBankAccounts200ResponseFromJSON,
160
168
  ListBankAccounts200ResponseToJSON,
161
169
  ListBankDeposits200ResponseFromJSON,
162
170
  ListBankDeposits200ResponseToJSON,
163
171
  ListDomains200ResponseFromJSON,
164
172
  ListDomains200ResponseToJSON,
173
+ ListLeadMessagesDtoFromJSON,
174
+ ListLeadMessagesDtoToJSON,
165
175
  ListLeads200ResponseFromJSON,
166
176
  ListLeads200ResponseToJSON,
167
177
  NotFoundExceptionFromJSON,
168
178
  NotFoundExceptionToJSON,
169
179
  ObjectIdFromJSON,
170
180
  ObjectIdToJSON,
181
+ SellerLeadDetailsFromJSON,
182
+ SellerLeadDetailsToJSON,
171
183
  SellerSalesByTldStatsItemDtoFromJSON,
172
184
  SellerSalesByTldStatsItemDtoToJSON,
173
185
  SellerSalesCountStatsItemDtoFromJSON,
@@ -294,6 +306,14 @@ export interface AdminApiGetAdminDomainTransferDetailsRequest {
294
306
  domainTransferId: string;
295
307
  }
296
308
 
309
+ export interface AdminApiGetAdminLeadDetailsRequest {
310
+ leadId: string;
311
+ }
312
+
313
+ export interface AdminApiGetAdminLeadEnrichmentRequest {
314
+ leadId: string;
315
+ }
316
+
297
317
  export interface AdminApiGetAdminSalesByTldRequest {
298
318
  currency: string;
299
319
  accountId?: string;
@@ -398,6 +418,19 @@ export interface AdminApiListAccountsRequest {
398
418
  filterSearchTerm?: string;
399
419
  }
400
420
 
421
+ export interface AdminApiListAdminLeadMessagesRequest {
422
+ leadId: string;
423
+ }
424
+
425
+ export interface AdminApiListAdminRelatedLeadsRequest {
426
+ leadId: string;
427
+ filter?: { [key: string]: string; };
428
+ page?: number;
429
+ limit?: number;
430
+ sortBy?: Array<string>;
431
+ filterStatus?: string;
432
+ }
433
+
401
434
  export interface AdminApiListAllCommissionsRequest {
402
435
  accountId?: string;
403
436
  }
@@ -490,6 +523,10 @@ export interface AdminApiRemoveDomainLockRequest {
490
523
  lockId: string;
491
524
  }
492
525
 
526
+ export interface AdminApiReopenAdminLeadRequest {
527
+ leadId: string;
528
+ }
529
+
493
530
  export interface AdminApiShowcaseDomainRequest {
494
531
  domainId: string;
495
532
  }
@@ -1564,6 +1601,92 @@ export class AdminApi extends runtime.BaseAPI {
1564
1601
  return await response.value();
1565
1602
  }
1566
1603
 
1604
+ /**
1605
+ * Returns a lead as the seller sees it, for any account. Read only. Requires admin bearer authentication.
1606
+ * Get lead details
1607
+ */
1608
+ async getAdminLeadDetailsRaw(requestParameters: AdminApiGetAdminLeadDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SellerLeadDetails>> {
1609
+ if (requestParameters['leadId'] == null) {
1610
+ throw new runtime.RequiredError(
1611
+ 'leadId',
1612
+ 'Required parameter "leadId" was null or undefined when calling getAdminLeadDetails().'
1613
+ );
1614
+ }
1615
+
1616
+ const queryParameters: any = {};
1617
+
1618
+ const headerParameters: runtime.HTTPHeaders = {};
1619
+
1620
+ if (this.configuration && this.configuration.accessToken) {
1621
+ const token = this.configuration.accessToken;
1622
+ const tokenString = await token("bearer", []);
1623
+
1624
+ if (tokenString) {
1625
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1626
+ }
1627
+ }
1628
+ const response = await this.request({
1629
+ path: `/admin/leads/{leadId}`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
1630
+ method: 'GET',
1631
+ headers: headerParameters,
1632
+ query: queryParameters,
1633
+ }, initOverrides);
1634
+
1635
+ return new runtime.JSONApiResponse(response, (jsonValue) => SellerLeadDetailsFromJSON(jsonValue));
1636
+ }
1637
+
1638
+ /**
1639
+ * Returns a lead as the seller sees it, for any account. Read only. Requires admin bearer authentication.
1640
+ * Get lead details
1641
+ */
1642
+ async getAdminLeadDetails(requestParameters: AdminApiGetAdminLeadDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SellerLeadDetails> {
1643
+ const response = await this.getAdminLeadDetailsRaw(requestParameters, initOverrides);
1644
+ return await response.value();
1645
+ }
1646
+
1647
+ /**
1648
+ * Returns the buyer background enrichment of a lead, for any account. Requires admin bearer authentication.
1649
+ * Get lead buyer enrichment
1650
+ */
1651
+ async getAdminLeadEnrichmentRaw(requestParameters: AdminApiGetAdminLeadEnrichmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadEnrichmentDto>> {
1652
+ if (requestParameters['leadId'] == null) {
1653
+ throw new runtime.RequiredError(
1654
+ 'leadId',
1655
+ 'Required parameter "leadId" was null or undefined when calling getAdminLeadEnrichment().'
1656
+ );
1657
+ }
1658
+
1659
+ const queryParameters: any = {};
1660
+
1661
+ const headerParameters: runtime.HTTPHeaders = {};
1662
+
1663
+ if (this.configuration && this.configuration.accessToken) {
1664
+ const token = this.configuration.accessToken;
1665
+ const tokenString = await token("bearer", []);
1666
+
1667
+ if (tokenString) {
1668
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1669
+ }
1670
+ }
1671
+ const response = await this.request({
1672
+ path: `/admin/leads/{leadId}/enrichment`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
1673
+ method: 'GET',
1674
+ headers: headerParameters,
1675
+ query: queryParameters,
1676
+ }, initOverrides);
1677
+
1678
+ return new runtime.JSONApiResponse(response, (jsonValue) => LeadEnrichmentDtoFromJSON(jsonValue));
1679
+ }
1680
+
1681
+ /**
1682
+ * Returns the buyer background enrichment of a lead, for any account. Requires admin bearer authentication.
1683
+ * Get lead buyer enrichment
1684
+ */
1685
+ async getAdminLeadEnrichment(requestParameters: AdminApiGetAdminLeadEnrichmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadEnrichmentDto> {
1686
+ const response = await this.getAdminLeadEnrichmentRaw(requestParameters, initOverrides);
1687
+ return await response.value();
1688
+ }
1689
+
1567
1690
  /**
1568
1691
  * Returns sales statistics grouped by top-level domain, optionally filtered by account, currency, and date range.
1569
1692
  * Get admin sales by TLD
@@ -2399,6 +2522,49 @@ export class AdminApi extends runtime.BaseAPI {
2399
2522
  return await response.value();
2400
2523
  }
2401
2524
 
2525
+ /**
2526
+ * Lists the messages of a lead conversation, for any account. Read only: nothing is marked as read. Requires admin bearer authentication.
2527
+ * List lead messages
2528
+ */
2529
+ async listAdminLeadMessagesRaw(requestParameters: AdminApiListAdminLeadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListLeadMessagesDto>> {
2530
+ if (requestParameters['leadId'] == null) {
2531
+ throw new runtime.RequiredError(
2532
+ 'leadId',
2533
+ 'Required parameter "leadId" was null or undefined when calling listAdminLeadMessages().'
2534
+ );
2535
+ }
2536
+
2537
+ const queryParameters: any = {};
2538
+
2539
+ const headerParameters: runtime.HTTPHeaders = {};
2540
+
2541
+ if (this.configuration && this.configuration.accessToken) {
2542
+ const token = this.configuration.accessToken;
2543
+ const tokenString = await token("bearer", []);
2544
+
2545
+ if (tokenString) {
2546
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2547
+ }
2548
+ }
2549
+ const response = await this.request({
2550
+ path: `/admin/leads/{leadId}/messages`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
2551
+ method: 'GET',
2552
+ headers: headerParameters,
2553
+ query: queryParameters,
2554
+ }, initOverrides);
2555
+
2556
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListLeadMessagesDtoFromJSON(jsonValue));
2557
+ }
2558
+
2559
+ /**
2560
+ * Lists the messages of a lead conversation, for any account. Read only: nothing is marked as read. Requires admin bearer authentication.
2561
+ * List lead messages
2562
+ */
2563
+ async listAdminLeadMessages(requestParameters: AdminApiListAdminLeadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListLeadMessagesDto> {
2564
+ const response = await this.listAdminLeadMessagesRaw(requestParameters, initOverrides);
2565
+ return await response.value();
2566
+ }
2567
+
2402
2568
  /**
2403
2569
  * Returns every marketplace including disabled ones, with the nameservers the edge resolves routed domains against.
2404
2570
  * List all marketplaces
@@ -2435,6 +2601,69 @@ export class AdminApi extends runtime.BaseAPI {
2435
2601
  return await response.value();
2436
2602
  }
2437
2603
 
2604
+ /**
2605
+ * Lists the leads related to the given one, for any account. Requires admin bearer authentication.
2606
+ * List related leads
2607
+ */
2608
+ async listAdminRelatedLeadsRaw(requestParameters: AdminApiListAdminRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAdminRelatedLeads200Response>> {
2609
+ if (requestParameters['leadId'] == null) {
2610
+ throw new runtime.RequiredError(
2611
+ 'leadId',
2612
+ 'Required parameter "leadId" was null or undefined when calling listAdminRelatedLeads().'
2613
+ );
2614
+ }
2615
+
2616
+ const queryParameters: any = {};
2617
+
2618
+ if (requestParameters['filter'] != null) {
2619
+ queryParameters['filter'] = requestParameters['filter'];
2620
+ }
2621
+
2622
+ if (requestParameters['page'] != null) {
2623
+ queryParameters['page'] = requestParameters['page'];
2624
+ }
2625
+
2626
+ if (requestParameters['limit'] != null) {
2627
+ queryParameters['limit'] = requestParameters['limit'];
2628
+ }
2629
+
2630
+ if (requestParameters['sortBy'] != null) {
2631
+ queryParameters['sortBy'] = requestParameters['sortBy'];
2632
+ }
2633
+
2634
+ if (requestParameters['filterStatus'] != null) {
2635
+ queryParameters['filter[status]'] = requestParameters['filterStatus'];
2636
+ }
2637
+
2638
+ const headerParameters: runtime.HTTPHeaders = {};
2639
+
2640
+ if (this.configuration && this.configuration.accessToken) {
2641
+ const token = this.configuration.accessToken;
2642
+ const tokenString = await token("bearer", []);
2643
+
2644
+ if (tokenString) {
2645
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2646
+ }
2647
+ }
2648
+ const response = await this.request({
2649
+ path: `/admin/leads/{leadId}/related`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
2650
+ method: 'GET',
2651
+ headers: headerParameters,
2652
+ query: queryParameters,
2653
+ }, initOverrides);
2654
+
2655
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListAdminRelatedLeads200ResponseFromJSON(jsonValue));
2656
+ }
2657
+
2658
+ /**
2659
+ * Lists the leads related to the given one, for any account. Requires admin bearer authentication.
2660
+ * List related leads
2661
+ */
2662
+ async listAdminRelatedLeads(requestParameters: AdminApiListAdminRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAdminRelatedLeads200Response> {
2663
+ const response = await this.listAdminRelatedLeadsRaw(requestParameters, initOverrides);
2664
+ return await response.value();
2665
+ }
2666
+
2438
2667
  /**
2439
2668
  * Lists all existing non-deleted challenges.
2440
2669
  * List all challenges
@@ -3305,6 +3534,48 @@ export class AdminApi extends runtime.BaseAPI {
3305
3534
  await this.removeDomainLockRaw(requestParameters, initOverrides);
3306
3535
  }
3307
3536
 
3537
+ /**
3538
+ * Puts a closed lead back to active so the buyer and seller can keep negotiating. Only closed leads whose domain still exists qualify. Requires admin bearer authentication.
3539
+ * Reopen a closed lead
3540
+ */
3541
+ async reopenAdminLeadRaw(requestParameters: AdminApiReopenAdminLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
3542
+ if (requestParameters['leadId'] == null) {
3543
+ throw new runtime.RequiredError(
3544
+ 'leadId',
3545
+ 'Required parameter "leadId" was null or undefined when calling reopenAdminLead().'
3546
+ );
3547
+ }
3548
+
3549
+ const queryParameters: any = {};
3550
+
3551
+ const headerParameters: runtime.HTTPHeaders = {};
3552
+
3553
+ if (this.configuration && this.configuration.accessToken) {
3554
+ const token = this.configuration.accessToken;
3555
+ const tokenString = await token("bearer", []);
3556
+
3557
+ if (tokenString) {
3558
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3559
+ }
3560
+ }
3561
+ const response = await this.request({
3562
+ path: `/admin/leads/{leadId}/status/reopen`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
3563
+ method: 'POST',
3564
+ headers: headerParameters,
3565
+ query: queryParameters,
3566
+ }, initOverrides);
3567
+
3568
+ return new runtime.VoidApiResponse(response);
3569
+ }
3570
+
3571
+ /**
3572
+ * Puts a closed lead back to active so the buyer and seller can keep negotiating. Only closed leads whose domain still exists qualify. Requires admin bearer authentication.
3573
+ * Reopen a closed lead
3574
+ */
3575
+ async reopenAdminLead(requestParameters: AdminApiReopenAdminLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
3576
+ await this.reopenAdminLeadRaw(requestParameters, initOverrides);
3577
+ }
3578
+
3308
3579
  /**
3309
3580
  * Picks the domain for the public showcase on the website. Idempotent: showcasing an already showcased domain keeps its original position in the showcase.
3310
3581
  * Showcase domain
@@ -24,8 +24,8 @@ import type {
24
24
  LeadLeaseToOwnAndRentConfigurationPresetsDto,
25
25
  LeadOfferExpirationConfigurationInput,
26
26
  List200Response,
27
+ ListAdminRelatedLeads200Response,
27
28
  ListLeadMessagesDto,
28
- ListRelatedLeads200Response,
29
29
  LockConfigurationInput,
30
30
  ObjectId,
31
31
  PutLeadOfferInput,
@@ -52,10 +52,10 @@ import {
52
52
  LeadOfferExpirationConfigurationInputToJSON,
53
53
  List200ResponseFromJSON,
54
54
  List200ResponseToJSON,
55
+ ListAdminRelatedLeads200ResponseFromJSON,
56
+ ListAdminRelatedLeads200ResponseToJSON,
55
57
  ListLeadMessagesDtoFromJSON,
56
58
  ListLeadMessagesDtoToJSON,
57
- ListRelatedLeads200ResponseFromJSON,
58
- ListRelatedLeads200ResponseToJSON,
59
59
  LockConfigurationInputFromJSON,
60
60
  LockConfigurationInputToJSON,
61
61
  ObjectIdFromJSON,
@@ -768,7 +768,7 @@ export class LeadsApi extends runtime.BaseAPI {
768
768
  * Lists leads related to the specified lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
769
769
  * List related leads
770
770
  */
771
- async listRelatedLeadsRaw(requestParameters: LeadsApiListRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListRelatedLeads200Response>> {
771
+ async listRelatedLeadsRaw(requestParameters: LeadsApiListRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAdminRelatedLeads200Response>> {
772
772
  if (requestParameters['leadId'] == null) {
773
773
  throw new runtime.RequiredError(
774
774
  'leadId',
@@ -819,14 +819,14 @@ export class LeadsApi extends runtime.BaseAPI {
819
819
  query: queryParameters,
820
820
  }, initOverrides);
821
821
 
822
- return new runtime.JSONApiResponse(response, (jsonValue) => ListRelatedLeads200ResponseFromJSON(jsonValue));
822
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListAdminRelatedLeads200ResponseFromJSON(jsonValue));
823
823
  }
824
824
 
825
825
  /**
826
826
  * Lists leads related to the specified lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
827
827
  * List related leads
828
828
  */
829
- async listRelatedLeads(requestParameters: LeadsApiListRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListRelatedLeads200Response> {
829
+ async listRelatedLeads(requestParameters: LeadsApiListRelatedLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAdminRelatedLeads200Response> {
830
830
  const response = await this.listRelatedLeadsRaw(requestParameters, initOverrides);
831
831
  return await response.value();
832
832
  }
@@ -38,44 +38,44 @@ import {
38
38
  /**
39
39
  *
40
40
  * @export
41
- * @interface ListRelatedLeads200Response
41
+ * @interface ListAdminRelatedLeads200Response
42
42
  */
43
- export interface ListRelatedLeads200Response {
43
+ export interface ListAdminRelatedLeads200Response {
44
44
  /**
45
45
  *
46
46
  * @type {Array<RelatedLeadDto>}
47
- * @memberof ListRelatedLeads200Response
47
+ * @memberof ListAdminRelatedLeads200Response
48
48
  */
49
49
  data: Array<RelatedLeadDto>;
50
50
  /**
51
51
  *
52
52
  * @type {PaginateResponseMeta}
53
- * @memberof ListRelatedLeads200Response
53
+ * @memberof ListAdminRelatedLeads200Response
54
54
  */
55
55
  meta: PaginateResponseMeta;
56
56
  /**
57
57
  *
58
58
  * @type {PaginateResponseLinks}
59
- * @memberof ListRelatedLeads200Response
59
+ * @memberof ListAdminRelatedLeads200Response
60
60
  */
61
61
  links: PaginateResponseLinks;
62
62
  }
63
63
 
64
64
  /**
65
- * Check if a given object implements the ListRelatedLeads200Response interface.
65
+ * Check if a given object implements the ListAdminRelatedLeads200Response interface.
66
66
  */
67
- export function instanceOfListRelatedLeads200Response(value: object): value is ListRelatedLeads200Response {
67
+ export function instanceOfListAdminRelatedLeads200Response(value: object): value is ListAdminRelatedLeads200Response {
68
68
  if (!('data' in value) || value['data'] === undefined) return false;
69
69
  if (!('meta' in value) || value['meta'] === undefined) return false;
70
70
  if (!('links' in value) || value['links'] === undefined) return false;
71
71
  return true;
72
72
  }
73
73
 
74
- export function ListRelatedLeads200ResponseFromJSON(json: any): ListRelatedLeads200Response {
75
- return ListRelatedLeads200ResponseFromJSONTyped(json, false);
74
+ export function ListAdminRelatedLeads200ResponseFromJSON(json: any): ListAdminRelatedLeads200Response {
75
+ return ListAdminRelatedLeads200ResponseFromJSONTyped(json, false);
76
76
  }
77
77
 
78
- export function ListRelatedLeads200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListRelatedLeads200Response {
78
+ export function ListAdminRelatedLeads200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAdminRelatedLeads200Response {
79
79
  if (json == null) {
80
80
  return json;
81
81
  }
@@ -87,11 +87,11 @@ export function ListRelatedLeads200ResponseFromJSONTyped(json: any, ignoreDiscri
87
87
  };
88
88
  }
89
89
 
90
- export function ListRelatedLeads200ResponseToJSON(json: any): ListRelatedLeads200Response {
91
- return ListRelatedLeads200ResponseToJSONTyped(json, false);
90
+ export function ListAdminRelatedLeads200ResponseToJSON(json: any): ListAdminRelatedLeads200Response {
91
+ return ListAdminRelatedLeads200ResponseToJSONTyped(json, false);
92
92
  }
93
93
 
94
- export function ListRelatedLeads200ResponseToJSONTyped(value?: ListRelatedLeads200Response | null, ignoreDiscriminator: boolean = false): any {
94
+ export function ListAdminRelatedLeads200ResponseToJSONTyped(value?: ListAdminRelatedLeads200Response | null, ignoreDiscriminator: boolean = false): any {
95
95
  if (value == null) {
96
96
  return value;
97
97
  }
@@ -352,6 +352,7 @@ export * from './ListAccountMetricsDto';
352
352
  export * from './ListAccountPortfolioSizeDto';
353
353
  export * from './ListAccountUserDto';
354
354
  export * from './ListAccounts200Response';
355
+ export * from './ListAdminRelatedLeads200Response';
355
356
  export * from './ListAuctions200Response';
356
357
  export * from './ListBankAccounts200Response';
357
358
  export * from './ListBankDeposits200Response';
@@ -365,7 +366,6 @@ export * from './ListLeadMessagesDto';
365
366
  export * from './ListLeads200Response';
366
367
  export * from './ListLeadsResultItem';
367
368
  export * from './ListNotifications200Response';
368
- export * from './ListRelatedLeads200Response';
369
369
  export * from './LockConfigurationInput';
370
370
  export * from './LockDurationDto';
371
371
  export * from './LockDurationInput';