@randock/nameshift-api-client 0.0.479 → 0.0.481

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
@@ -423,6 +423,7 @@ src/models/MoneyDto.ts
423
423
  src/models/MoneyInput.ts
424
424
  src/models/MozMetrics.ts
425
425
  src/models/NotFoundException.ts
426
+ src/models/NotificationsUnsubscribeResultDto.ts
426
427
  src/models/NzBankAccountDetails.ts
427
428
  src/models/ObjectId.ts
428
429
  src/models/OrderCompanyInfoDto.ts
@@ -595,6 +596,7 @@ src/models/UserNotificationDto.ts
595
596
  src/models/UserNotificationListItemDto.ts
596
597
  src/models/UserNotificationSettingsDto.ts
597
598
  src/models/UserPasswordResetDto.ts
599
+ src/models/UserSignedTokenInput.ts
598
600
  src/models/ValidateTaxNumberDto.ts
599
601
  src/models/ValidateTaxNumberInput.ts
600
602
  src/models/ValidationError.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.479
1
+ ## @randock/nameshift-api-client@0.0.481
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.481 --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
+ 79cf49af01cfc60025b24287635d70fd0d6029bb0b310f6d54257b9a8c5e65006136d8dd2f1c643492395f14f188ecf6
@@ -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
  });
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ForgotPasswordRequestInput, LoginDto, LoginInput, SetNewPasswordInput, UserPasswordResetDto } from '../models/index';
13
+ import type { ForgotPasswordRequestInput, LoginDto, LoginInput, NotificationsUnsubscribeResultDto, SetNewPasswordInput, UserPasswordResetDto, UserSignedTokenInput } from '../models/index';
14
14
  export interface UsersPublicApiForgotPasswordRequestRequest {
15
15
  forgotPasswordRequestInput: ForgotPasswordRequestInput;
16
16
  }
@@ -24,6 +24,9 @@ export interface UsersPublicApiPostNewPasswordRequest {
24
24
  passwordRequestId: string;
25
25
  setNewPasswordInput: SetNewPasswordInput;
26
26
  }
27
+ export interface UsersPublicApiUnsubscribeFromNotificationsByTokenRequest {
28
+ userSignedTokenInput: UserSignedTokenInput;
29
+ }
27
30
  /**
28
31
  *
29
32
  */
@@ -68,4 +71,14 @@ export declare class UsersPublicApi extends runtime.BaseAPI {
68
71
  * Set a new password from reset request
69
72
  */
70
73
  postNewPassword(requestParameters: UsersPublicApiPostNewPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
74
+ /**
75
+ * Applies the unsubscription carried by the signed token of an email footer link, without a session: mutes the notifications of a task or a lead, or disables one notification setting.
76
+ * Unsubscribe from notifications with an email link token
77
+ */
78
+ unsubscribeFromNotificationsByTokenRaw(requestParameters: UsersPublicApiUnsubscribeFromNotificationsByTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationsUnsubscribeResultDto>>;
79
+ /**
80
+ * Applies the unsubscription carried by the signed token of an email footer link, without a session: mutes the notifications of a task or a lead, or disables one notification setting.
81
+ * Unsubscribe from notifications with an email link token
82
+ */
83
+ unsubscribeFromNotificationsByToken(requestParameters: UsersPublicApiUnsubscribeFromNotificationsByTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationsUnsubscribeResultDto>;
71
84
  }
@@ -264,6 +264,54 @@ var UsersPublicApi = /** @class */ (function (_super) {
264
264
  });
265
265
  });
266
266
  };
267
+ /**
268
+ * Applies the unsubscription carried by the signed token of an email footer link, without a session: mutes the notifications of a task or a lead, or disables one notification setting.
269
+ * Unsubscribe from notifications with an email link token
270
+ */
271
+ UsersPublicApi.prototype.unsubscribeFromNotificationsByTokenRaw = function (requestParameters, initOverrides) {
272
+ return __awaiter(this, void 0, void 0, function () {
273
+ var queryParameters, headerParameters, response;
274
+ return __generator(this, function (_a) {
275
+ switch (_a.label) {
276
+ case 0:
277
+ if (requestParameters['userSignedTokenInput'] == null) {
278
+ throw new runtime.RequiredError('userSignedTokenInput', 'Required parameter "userSignedTokenInput" was null or undefined when calling unsubscribeFromNotificationsByToken().');
279
+ }
280
+ queryParameters = {};
281
+ headerParameters = {};
282
+ headerParameters['Content-Type'] = 'application/json';
283
+ return [4 /*yield*/, this.request({
284
+ path: "/users/notifications/unsubscribe",
285
+ method: 'POST',
286
+ headers: headerParameters,
287
+ query: queryParameters,
288
+ body: (0, index_1.UserSignedTokenInputToJSON)(requestParameters['userSignedTokenInput']),
289
+ }, initOverrides)];
290
+ case 1:
291
+ response = _a.sent();
292
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.NotificationsUnsubscribeResultDtoFromJSON)(jsonValue); })];
293
+ }
294
+ });
295
+ });
296
+ };
297
+ /**
298
+ * Applies the unsubscription carried by the signed token of an email footer link, without a session: mutes the notifications of a task or a lead, or disables one notification setting.
299
+ * Unsubscribe from notifications with an email link token
300
+ */
301
+ UsersPublicApi.prototype.unsubscribeFromNotificationsByToken = function (requestParameters, initOverrides) {
302
+ return __awaiter(this, void 0, void 0, function () {
303
+ var response;
304
+ return __generator(this, function (_a) {
305
+ switch (_a.label) {
306
+ case 0: return [4 /*yield*/, this.unsubscribeFromNotificationsByTokenRaw(requestParameters, initOverrides)];
307
+ case 1:
308
+ response = _a.sent();
309
+ return [4 /*yield*/, response.value()];
310
+ case 2: return [2 /*return*/, _a.sent()];
311
+ }
312
+ });
313
+ });
314
+ };
267
315
  return UsersPublicApi;
268
316
  }(runtime.BaseAPI));
269
317
  exports.UsersPublicApi = UsersPublicApi;