@randock/nameshift-api-client 0.0.556 → 0.0.558

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/.openapi-generator/FILES +15 -0
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +38 -1
  4. package/dist/apis/AdminApi.js +165 -0
  5. package/dist/apis/BuyersApi.d.ts +3 -2
  6. package/dist/apis/BuyersApi.js +5 -2
  7. package/dist/apis/LeadsPublicApi.d.ts +43 -1
  8. package/dist/apis/LeadsPublicApi.js +151 -0
  9. package/dist/models/AutomationRunLeadDto.d.ts +1 -1
  10. package/dist/models/FeatureFlagListItemDto.d.ts +2 -0
  11. package/dist/models/FeatureFlagListItemDto.js +3 -1
  12. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +2 -0
  13. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +3 -1
  14. package/dist/models/LeadDto.d.ts +7 -0
  15. package/dist/models/LeadDto.js +5 -0
  16. package/dist/models/LeadEmailVerificationDto.d.ts +38 -0
  17. package/dist/models/LeadEmailVerificationDto.js +55 -0
  18. package/dist/models/LeadPhoneVerificationDeliveryDto.d.ts +49 -0
  19. package/dist/models/LeadPhoneVerificationDeliveryDto.js +66 -0
  20. package/dist/models/LeadPhoneVerificationDto.d.ts +80 -0
  21. package/dist/models/LeadPhoneVerificationDto.js +89 -0
  22. package/dist/models/LeadPhoneVerificationReason.d.ts +35 -0
  23. package/dist/models/LeadPhoneVerificationReason.js +61 -0
  24. package/dist/models/LeadPhoneVerificationSummaryDto.d.ts +32 -0
  25. package/dist/models/LeadPhoneVerificationSummaryDto.js +51 -0
  26. package/dist/models/LeadPhoneVerificationTooSoonOutput.d.ts +51 -0
  27. package/dist/models/LeadPhoneVerificationTooSoonOutput.js +64 -0
  28. package/dist/models/LeadPhoneVerificationUnavailableOutput.d.ts +51 -0
  29. package/dist/models/LeadPhoneVerificationUnavailableOutput.js +64 -0
  30. package/dist/models/LeadVerificationDto.d.ts +40 -0
  31. package/dist/models/LeadVerificationDto.js +57 -0
  32. package/dist/models/LeadVerificationInput.d.ts +24 -0
  33. package/dist/models/LeadVerificationInput.js +8 -0
  34. package/dist/models/LeadVerificationSettingsDto.d.ts +24 -0
  35. package/dist/models/LeadVerificationSettingsDto.js +16 -0
  36. package/dist/models/ListLeadsResultItem.d.ts +7 -0
  37. package/dist/models/ListLeadsResultItem.js +5 -0
  38. package/dist/models/ManualLeadDetails.d.ts +7 -0
  39. package/dist/models/ManualLeadDetails.js +5 -0
  40. package/dist/models/PhoneMessageDeliveryStatus.d.ts +27 -0
  41. package/dist/models/PhoneMessageDeliveryStatus.js +53 -0
  42. package/dist/models/PlatformConfigurationBlock.d.ts +25 -0
  43. package/dist/models/PlatformConfigurationBlock.js +51 -0
  44. package/dist/models/PlatformConfigurationDto.d.ts +62 -0
  45. package/dist/models/PlatformConfigurationDto.js +69 -0
  46. package/dist/models/PlatformConfigurationUpdatedByDto.d.ts +44 -0
  47. package/dist/models/PlatformConfigurationUpdatedByDto.js +59 -0
  48. package/dist/models/PrivateAccountGetMeResponse.d.ts +2 -0
  49. package/dist/models/PrivateAccountGetMeResponse.js +3 -1
  50. package/dist/models/PublicLeadDto.d.ts +7 -0
  51. package/dist/models/PublicLeadDto.js +5 -0
  52. package/dist/models/RegisterAuctionBuyerPhoneInput.d.ts +9 -2
  53. package/dist/models/RegisterAuctionBuyerPhoneInput.js +3 -3
  54. package/dist/models/RequestLeadPhoneVerificationCodeInput.d.ts +32 -0
  55. package/dist/models/RequestLeadPhoneVerificationCodeInput.js +49 -0
  56. package/dist/models/SellerLeadDetails.d.ts +7 -0
  57. package/dist/models/SellerLeadDetails.js +5 -0
  58. package/dist/models/UpdatePlatformConfigurationInput.d.ts +34 -0
  59. package/dist/models/UpdatePlatformConfigurationInput.js +51 -0
  60. package/dist/models/VerifyLeadPhoneInput.d.ts +32 -0
  61. package/dist/models/VerifyLeadPhoneInput.js +51 -0
  62. package/dist/models/VerifyPhoneOtpInput.d.ts +1 -1
  63. package/dist/models/index.d.ts +15 -0
  64. package/dist/models/index.js +15 -0
  65. package/package.json +1 -1
  66. package/src/apis/AdminApi.ts +149 -0
  67. package/src/apis/BuyersApi.ts +7 -2
  68. package/src/apis/LeadsPublicApi.ts +162 -0
  69. package/src/models/AutomationRunLeadDto.ts +1 -1
  70. package/src/models/FeatureFlagListItemDto.ts +3 -1
  71. package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +3 -1
  72. package/src/models/LeadDto.ts +16 -0
  73. package/src/models/LeadEmailVerificationDto.ts +75 -0
  74. package/src/models/LeadPhoneVerificationDeliveryDto.ts +96 -0
  75. package/src/models/LeadPhoneVerificationDto.ts +132 -0
  76. package/src/models/LeadPhoneVerificationReason.ts +63 -0
  77. package/src/models/LeadPhoneVerificationSummaryDto.ts +66 -0
  78. package/src/models/LeadPhoneVerificationTooSoonOutput.ts +103 -0
  79. package/src/models/LeadPhoneVerificationUnavailableOutput.ts +103 -0
  80. package/src/models/LeadVerificationDto.ts +90 -0
  81. package/src/models/LeadVerificationInput.ts +32 -0
  82. package/src/models/LeadVerificationSettingsDto.ts +36 -0
  83. package/src/models/ListLeadsResultItem.ts +16 -0
  84. package/src/models/ManualLeadDetails.ts +16 -0
  85. package/src/models/PhoneMessageDeliveryStatus.ts +55 -0
  86. package/src/models/PlatformConfigurationBlock.ts +53 -0
  87. package/src/models/PlatformConfigurationDto.ts +119 -0
  88. package/src/models/PlatformConfigurationUpdatedByDto.ts +84 -0
  89. package/src/models/PrivateAccountGetMeResponse.ts +3 -1
  90. package/src/models/PublicLeadDto.ts +16 -0
  91. package/src/models/RegisterAuctionBuyerPhoneInput.ts +12 -4
  92. package/src/models/RequestLeadPhoneVerificationCodeInput.ts +65 -0
  93. package/src/models/SellerLeadDetails.ts +16 -0
  94. package/src/models/UpdatePlatformConfigurationInput.ts +66 -0
  95. package/src/models/VerifyLeadPhoneInput.ts +66 -0
  96. package/src/models/VerifyPhoneOtpInput.ts +1 -1
  97. package/src/models/index.ts +15 -0
@@ -19,12 +19,18 @@ import type {
19
19
  BadRequestException,
20
20
  CreateInformationRequestLeadInput,
21
21
  CreateLeadInput,
22
+ LeadPhoneVerificationDeliveryDto,
23
+ LeadPhoneVerificationTooSoonOutput,
24
+ LeadPhoneVerificationUnavailableOutput,
22
25
  LeadStatusDto,
26
+ LeadVerificationDto,
23
27
  ObjectId,
24
28
  PublicLeadDto,
29
+ RequestLeadPhoneVerificationCodeInput,
25
30
  UpdateLeadInput,
26
31
  ValidationException,
27
32
  VerifyLeadInput,
33
+ VerifyLeadPhoneInput,
28
34
  } from '../models/index';
29
35
  import {
30
36
  AssociateVisitorInputFromJSON,
@@ -35,18 +41,30 @@ import {
35
41
  CreateInformationRequestLeadInputToJSON,
36
42
  CreateLeadInputFromJSON,
37
43
  CreateLeadInputToJSON,
44
+ LeadPhoneVerificationDeliveryDtoFromJSON,
45
+ LeadPhoneVerificationDeliveryDtoToJSON,
46
+ LeadPhoneVerificationTooSoonOutputFromJSON,
47
+ LeadPhoneVerificationTooSoonOutputToJSON,
48
+ LeadPhoneVerificationUnavailableOutputFromJSON,
49
+ LeadPhoneVerificationUnavailableOutputToJSON,
38
50
  LeadStatusDtoFromJSON,
39
51
  LeadStatusDtoToJSON,
52
+ LeadVerificationDtoFromJSON,
53
+ LeadVerificationDtoToJSON,
40
54
  ObjectIdFromJSON,
41
55
  ObjectIdToJSON,
42
56
  PublicLeadDtoFromJSON,
43
57
  PublicLeadDtoToJSON,
58
+ RequestLeadPhoneVerificationCodeInputFromJSON,
59
+ RequestLeadPhoneVerificationCodeInputToJSON,
44
60
  UpdateLeadInputFromJSON,
45
61
  UpdateLeadInputToJSON,
46
62
  ValidationExceptionFromJSON,
47
63
  ValidationExceptionToJSON,
48
64
  VerifyLeadInputFromJSON,
49
65
  VerifyLeadInputToJSON,
66
+ VerifyLeadPhoneInputFromJSON,
67
+ VerifyLeadPhoneInputToJSON,
50
68
  } from '../models/index';
51
69
 
52
70
  export interface LeadsPublicApiAssociateLeadVisitorRequest {
@@ -68,10 +86,20 @@ export interface LeadsPublicApiGetLeadRequest {
68
86
  leadId: string;
69
87
  }
70
88
 
89
+ export interface LeadsPublicApiGetLeadPhoneVerificationDeliveryRequest {
90
+ leadId: string;
91
+ }
92
+
71
93
  export interface LeadsPublicApiGetLeadStatusRequest {
72
94
  leadId: string;
73
95
  }
74
96
 
97
+ export interface LeadsPublicApiRequestLeadPhoneVerificationCodeRequest {
98
+ leadId: string;
99
+ requestLeadPhoneVerificationCodeInput: RequestLeadPhoneVerificationCodeInput;
100
+ xRecaptchaToken?: string;
101
+ }
102
+
75
103
  export interface LeadsPublicApiRequestVerificationCodeRequest {
76
104
  leadId: string;
77
105
  }
@@ -86,6 +114,11 @@ export interface LeadsPublicApiVerifyLeadRequest {
86
114
  verifyLeadInput: VerifyLeadInput;
87
115
  }
88
116
 
117
+ export interface LeadsPublicApiVerifyLeadPhoneRequest {
118
+ leadId: string;
119
+ verifyLeadPhoneInput: VerifyLeadPhoneInput;
120
+ }
121
+
89
122
  /**
90
123
  *
91
124
  */
@@ -254,6 +287,41 @@ export class LeadsPublicApi extends runtime.BaseAPI {
254
287
  return await response.value();
255
288
  }
256
289
 
290
+ /**
291
+ * Returns whether the last phone code of a lead is on its way, arrived or could not arrive, and on which app. No authentication required.
292
+ * Get where the last phone code is
293
+ */
294
+ async getLeadPhoneVerificationDeliveryRaw(requestParameters: LeadsPublicApiGetLeadPhoneVerificationDeliveryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadPhoneVerificationDeliveryDto>> {
295
+ if (requestParameters['leadId'] == null) {
296
+ throw new runtime.RequiredError(
297
+ 'leadId',
298
+ 'Required parameter "leadId" was null or undefined when calling getLeadPhoneVerificationDelivery().'
299
+ );
300
+ }
301
+
302
+ const queryParameters: any = {};
303
+
304
+ const headerParameters: runtime.HTTPHeaders = {};
305
+
306
+ const response = await this.request({
307
+ path: `/leads/{leadId}/phone-verification-delivery`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
308
+ method: 'GET',
309
+ headers: headerParameters,
310
+ query: queryParameters,
311
+ }, initOverrides);
312
+
313
+ return new runtime.JSONApiResponse(response, (jsonValue) => LeadPhoneVerificationDeliveryDtoFromJSON(jsonValue));
314
+ }
315
+
316
+ /**
317
+ * Returns whether the last phone code of a lead is on its way, arrived or could not arrive, and on which app. No authentication required.
318
+ * Get where the last phone code is
319
+ */
320
+ async getLeadPhoneVerificationDelivery(requestParameters: LeadsPublicApiGetLeadPhoneVerificationDeliveryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadPhoneVerificationDeliveryDto> {
321
+ const response = await this.getLeadPhoneVerificationDeliveryRaw(requestParameters, initOverrides);
322
+ return await response.value();
323
+ }
324
+
257
325
  /**
258
326
  * Returns the current negotiation status of a lead. No authentication required.
259
327
  * Get lead status
@@ -289,6 +357,55 @@ export class LeadsPublicApi extends runtime.BaseAPI {
289
357
  return await response.value();
290
358
  }
291
359
 
360
+ /**
361
+ * Sends the buyer of a lead a one-time code by Telegram, WhatsApp, SMS or a voice call, to the phone number on the lead. No authentication required.
362
+ * Send a phone verification code
363
+ */
364
+ async requestLeadPhoneVerificationCodeRaw(requestParameters: LeadsPublicApiRequestLeadPhoneVerificationCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadVerificationDto>> {
365
+ if (requestParameters['leadId'] == null) {
366
+ throw new runtime.RequiredError(
367
+ 'leadId',
368
+ 'Required parameter "leadId" was null or undefined when calling requestLeadPhoneVerificationCode().'
369
+ );
370
+ }
371
+
372
+ if (requestParameters['requestLeadPhoneVerificationCodeInput'] == null) {
373
+ throw new runtime.RequiredError(
374
+ 'requestLeadPhoneVerificationCodeInput',
375
+ 'Required parameter "requestLeadPhoneVerificationCodeInput" was null or undefined when calling requestLeadPhoneVerificationCode().'
376
+ );
377
+ }
378
+
379
+ const queryParameters: any = {};
380
+
381
+ const headerParameters: runtime.HTTPHeaders = {};
382
+
383
+ headerParameters['Content-Type'] = 'application/json';
384
+
385
+ if (requestParameters['xRecaptchaToken'] != null) {
386
+ headerParameters['x-recaptcha-token'] = String(requestParameters['xRecaptchaToken']);
387
+ }
388
+
389
+ const response = await this.request({
390
+ path: `/leads/{leadId}/request-phone-verification-code`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
391
+ method: 'POST',
392
+ headers: headerParameters,
393
+ query: queryParameters,
394
+ body: RequestLeadPhoneVerificationCodeInputToJSON(requestParameters['requestLeadPhoneVerificationCodeInput']),
395
+ }, initOverrides);
396
+
397
+ return new runtime.JSONApiResponse(response, (jsonValue) => LeadVerificationDtoFromJSON(jsonValue));
398
+ }
399
+
400
+ /**
401
+ * Sends the buyer of a lead a one-time code by Telegram, WhatsApp, SMS or a voice call, to the phone number on the lead. No authentication required.
402
+ * Send a phone verification code
403
+ */
404
+ async requestLeadPhoneVerificationCode(requestParameters: LeadsPublicApiRequestLeadPhoneVerificationCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadVerificationDto> {
405
+ const response = await this.requestLeadPhoneVerificationCodeRaw(requestParameters, initOverrides);
406
+ return await response.value();
407
+ }
408
+
292
409
  /**
293
410
  * Generates and sends a new one-time verification code to the buyer email for the specified lead. No authentication required.
294
411
  * Request a verification code
@@ -411,4 +528,49 @@ export class LeadsPublicApi extends runtime.BaseAPI {
411
528
  await this.verifyLeadRaw(requestParameters, initOverrides);
412
529
  }
413
530
 
531
+ /**
532
+ * Checks the one-time code the buyer received by Telegram, WhatsApp, SMS or a voice call. No authentication required.
533
+ * Verify a lead phone code
534
+ */
535
+ async verifyLeadPhoneRaw(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadVerificationDto>> {
536
+ if (requestParameters['leadId'] == null) {
537
+ throw new runtime.RequiredError(
538
+ 'leadId',
539
+ 'Required parameter "leadId" was null or undefined when calling verifyLeadPhone().'
540
+ );
541
+ }
542
+
543
+ if (requestParameters['verifyLeadPhoneInput'] == null) {
544
+ throw new runtime.RequiredError(
545
+ 'verifyLeadPhoneInput',
546
+ 'Required parameter "verifyLeadPhoneInput" was null or undefined when calling verifyLeadPhone().'
547
+ );
548
+ }
549
+
550
+ const queryParameters: any = {};
551
+
552
+ const headerParameters: runtime.HTTPHeaders = {};
553
+
554
+ headerParameters['Content-Type'] = 'application/json';
555
+
556
+ const response = await this.request({
557
+ path: `/leads/{leadId}/verify-phone`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
558
+ method: 'POST',
559
+ headers: headerParameters,
560
+ query: queryParameters,
561
+ body: VerifyLeadPhoneInputToJSON(requestParameters['verifyLeadPhoneInput']),
562
+ }, initOverrides);
563
+
564
+ return new runtime.JSONApiResponse(response, (jsonValue) => LeadVerificationDtoFromJSON(jsonValue));
565
+ }
566
+
567
+ /**
568
+ * Checks the one-time code the buyer received by Telegram, WhatsApp, SMS or a voice call. No authentication required.
569
+ * Verify a lead phone code
570
+ */
571
+ async verifyLeadPhone(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadVerificationDto> {
572
+ const response = await this.verifyLeadPhoneRaw(requestParameters, initOverrides);
573
+ return await response.value();
574
+ }
575
+
414
576
  }
@@ -32,7 +32,7 @@ export interface AutomationRunLeadDto {
32
32
  */
33
33
  domainName: string;
34
34
  /**
35
- * Email of the buyer of the lead.
35
+ * Email of the buyer of the lead, or its masked form.
36
36
  * @type {string}
37
37
  * @memberof AutomationRunLeadDto
38
38
  */
@@ -105,7 +105,9 @@ export const FeatureFlagListItemDtoNameEnum = {
105
105
  MFA_ENFORCED_FOR_STAFF: 'MFA_ENFORCED_FOR_STAFF',
106
106
  WEBHOOKS: 'WEBHOOKS',
107
107
  CUSTOM_LANDING_PAGE_CONTENT: 'CUSTOM_LANDING_PAGE_CONTENT',
108
- AUTOMATIONS: 'AUTOMATIONS'
108
+ AUTOMATIONS: 'AUTOMATIONS',
109
+ LEAD_PHONE_OTP: 'LEAD_PHONE_OTP',
110
+ PHONE_VERIFICATION_RECAPTCHA: 'PHONE_VERIFICATION_RECAPTCHA'
109
111
  } as const;
110
112
  export type FeatureFlagListItemDtoNameEnum = typeof FeatureFlagListItemDtoNameEnum[keyof typeof FeatureFlagListItemDtoNameEnum];
111
113
 
@@ -203,7 +203,9 @@ export const IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatur
203
203
  MFA_ENFORCED_FOR_STAFF: 'MFA_ENFORCED_FOR_STAFF',
204
204
  WEBHOOKS: 'WEBHOOKS',
205
205
  CUSTOM_LANDING_PAGE_CONTENT: 'CUSTOM_LANDING_PAGE_CONTENT',
206
- AUTOMATIONS: 'AUTOMATIONS'
206
+ AUTOMATIONS: 'AUTOMATIONS',
207
+ LEAD_PHONE_OTP: 'LEAD_PHONE_OTP',
208
+ PHONE_VERIFICATION_RECAPTCHA: 'PHONE_VERIFICATION_RECAPTCHA'
207
209
  } as const;
208
210
  export type IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoEnabledFeaturesEnum = typeof IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoEnabledFeaturesEnum[keyof typeof IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoEnabledFeaturesEnum];
209
211
 
@@ -34,6 +34,13 @@ import {
34
34
  MoneyDtoToJSON,
35
35
  MoneyDtoToJSONTyped,
36
36
  } from './MoneyDto';
37
+ import type { LeadPhoneVerificationSummaryDto } from './LeadPhoneVerificationSummaryDto';
38
+ import {
39
+ LeadPhoneVerificationSummaryDtoFromJSON,
40
+ LeadPhoneVerificationSummaryDtoFromJSONTyped,
41
+ LeadPhoneVerificationSummaryDtoToJSON,
42
+ LeadPhoneVerificationSummaryDtoToJSONTyped,
43
+ } from './LeadPhoneVerificationSummaryDto';
37
44
  import type { LeadRentConfigurationDto } from './LeadRentConfigurationDto';
38
45
  import {
39
46
  LeadRentConfigurationDtoFromJSON,
@@ -206,6 +213,12 @@ export interface LeadDto {
206
213
  * @memberof LeadDto
207
214
  */
208
215
  awaitingSellerFirstMessage: boolean;
216
+ /**
217
+ * How the buyer phone number was confirmed. Null when the buyer did not confirm a phone code.
218
+ * @type {LeadPhoneVerificationSummaryDto}
219
+ * @memberof LeadDto
220
+ */
221
+ phoneVerification: LeadPhoneVerificationSummaryDto | null;
209
222
  }
210
223
 
211
224
 
@@ -284,6 +297,7 @@ export function instanceOfLeadDto(value: object): value is LeadDto {
284
297
  if (!('canBeClosedBySeller' in value) || value['canBeClosedBySeller'] === undefined) return false;
285
298
  if (!('acceptedAt' in value) || value['acceptedAt'] === undefined) return false;
286
299
  if (!('awaitingSellerFirstMessage' in value) || value['awaitingSellerFirstMessage'] === undefined) return false;
300
+ if (!('phoneVerification' in value) || value['phoneVerification'] === undefined) return false;
287
301
  return true;
288
302
  }
289
303
 
@@ -321,6 +335,7 @@ export function LeadDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): L
321
335
  'canBeClosedBySeller': json['canBeClosedBySeller'],
322
336
  'acceptedAt': (json['acceptedAt'] == null ? null : new Date(json['acceptedAt'])),
323
337
  'awaitingSellerFirstMessage': json['awaitingSellerFirstMessage'],
338
+ 'phoneVerification': LeadPhoneVerificationSummaryDtoFromJSON(json['phoneVerification']),
324
339
  };
325
340
  }
326
341
 
@@ -359,6 +374,7 @@ export function LeadDtoToJSONTyped(value?: LeadDto | null, ignoreDiscriminator:
359
374
  'canBeClosedBySeller': value['canBeClosedBySeller'],
360
375
  'acceptedAt': (value['acceptedAt'] == null ? null : (value['acceptedAt'] as any).toISOString()),
361
376
  'awaitingSellerFirstMessage': value['awaitingSellerFirstMessage'],
377
+ 'phoneVerification': LeadPhoneVerificationSummaryDtoToJSON(value['phoneVerification']),
362
378
  };
363
379
  }
364
380
 
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface LeadEmailVerificationDto
20
+ */
21
+ export interface LeadEmailVerificationDto {
22
+ /**
23
+ * Whether the buyer has to confirm the email code.
24
+ * @type {boolean}
25
+ * @memberof LeadEmailVerificationDto
26
+ */
27
+ required: boolean;
28
+ /**
29
+ * Whether the buyer confirmed the email code.
30
+ * @type {boolean}
31
+ * @memberof LeadEmailVerificationDto
32
+ */
33
+ verified: boolean;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the LeadEmailVerificationDto interface.
38
+ */
39
+ export function instanceOfLeadEmailVerificationDto(value: object): value is LeadEmailVerificationDto {
40
+ if (!('required' in value) || value['required'] === undefined) return false;
41
+ if (!('verified' in value) || value['verified'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function LeadEmailVerificationDtoFromJSON(json: any): LeadEmailVerificationDto {
46
+ return LeadEmailVerificationDtoFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function LeadEmailVerificationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeadEmailVerificationDto {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'required': json['required'],
56
+ 'verified': json['verified'],
57
+ };
58
+ }
59
+
60
+ export function LeadEmailVerificationDtoToJSON(json: any): LeadEmailVerificationDto {
61
+ return LeadEmailVerificationDtoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function LeadEmailVerificationDtoToJSONTyped(value?: LeadEmailVerificationDto | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'required': value['required'],
72
+ 'verified': value['verified'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,96 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { PhoneMessageDeliveryStatus } from './PhoneMessageDeliveryStatus';
17
+ import {
18
+ PhoneMessageDeliveryStatusFromJSON,
19
+ PhoneMessageDeliveryStatusFromJSONTyped,
20
+ PhoneMessageDeliveryStatusToJSON,
21
+ PhoneMessageDeliveryStatusToJSONTyped,
22
+ } from './PhoneMessageDeliveryStatus';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface LeadPhoneVerificationDeliveryDto
28
+ */
29
+ export interface LeadPhoneVerificationDeliveryDto {
30
+ /**
31
+ * Whether the code is on its way, arrived, or could not arrive.
32
+ * @type {PhoneMessageDeliveryStatus}
33
+ * @memberof LeadPhoneVerificationDeliveryDto
34
+ */
35
+ status: PhoneMessageDeliveryStatus;
36
+ /**
37
+ * The app the code is on, when known.
38
+ * @type {string}
39
+ * @memberof LeadPhoneVerificationDeliveryDto
40
+ */
41
+ channel: LeadPhoneVerificationDeliveryDtoChannelEnum | null;
42
+ }
43
+
44
+
45
+ /**
46
+ * @export
47
+ */
48
+ export const LeadPhoneVerificationDeliveryDtoChannelEnum = {
49
+ TELEGRAM: 'telegram',
50
+ WHATSAPP: 'whatsapp',
51
+ SMS: 'sms',
52
+ VOICE: 'voice'
53
+ } as const;
54
+ export type LeadPhoneVerificationDeliveryDtoChannelEnum = typeof LeadPhoneVerificationDeliveryDtoChannelEnum[keyof typeof LeadPhoneVerificationDeliveryDtoChannelEnum];
55
+
56
+
57
+ /**
58
+ * Check if a given object implements the LeadPhoneVerificationDeliveryDto interface.
59
+ */
60
+ export function instanceOfLeadPhoneVerificationDeliveryDto(value: object): value is LeadPhoneVerificationDeliveryDto {
61
+ if (!('status' in value) || value['status'] === undefined) return false;
62
+ if (!('channel' in value) || value['channel'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function LeadPhoneVerificationDeliveryDtoFromJSON(json: any): LeadPhoneVerificationDeliveryDto {
67
+ return LeadPhoneVerificationDeliveryDtoFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function LeadPhoneVerificationDeliveryDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeadPhoneVerificationDeliveryDto {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'status': PhoneMessageDeliveryStatusFromJSON(json['status']),
77
+ 'channel': json['channel'],
78
+ };
79
+ }
80
+
81
+ export function LeadPhoneVerificationDeliveryDtoToJSON(json: any): LeadPhoneVerificationDeliveryDto {
82
+ return LeadPhoneVerificationDeliveryDtoToJSONTyped(json, false);
83
+ }
84
+
85
+ export function LeadPhoneVerificationDeliveryDtoToJSONTyped(value?: LeadPhoneVerificationDeliveryDto | null, ignoreDiscriminator: boolean = false): any {
86
+ if (value == null) {
87
+ return value;
88
+ }
89
+
90
+ return {
91
+
92
+ 'status': PhoneMessageDeliveryStatusToJSON(value['status']),
93
+ 'channel': value['channel'],
94
+ };
95
+ }
96
+
@@ -0,0 +1,132 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface LeadPhoneVerificationDto
20
+ */
21
+ export interface LeadPhoneVerificationDto {
22
+ /**
23
+ * Whether the buyer has to confirm the phone code.
24
+ * @type {boolean}
25
+ * @memberof LeadPhoneVerificationDto
26
+ */
27
+ required: boolean;
28
+ /**
29
+ * Whether the buyer confirmed the phone code.
30
+ * @type {boolean}
31
+ * @memberof LeadPhoneVerificationDto
32
+ */
33
+ verified: boolean;
34
+ /**
35
+ * Why no phone code can be sent for the lead.
36
+ * @type {string}
37
+ * @memberof LeadPhoneVerificationDto
38
+ */
39
+ unavailableReason: LeadPhoneVerificationDtoUnavailableReasonEnum | null;
40
+ /**
41
+ * Phone codes the lead can still receive.
42
+ * @type {number}
43
+ * @memberof LeadPhoneVerificationDto
44
+ */
45
+ sendsLeft: number;
46
+ /**
47
+ * When the next phone code can be sent.
48
+ * @type {Date}
49
+ * @memberof LeadPhoneVerificationDto
50
+ */
51
+ nextSendAt: Date | null;
52
+ /**
53
+ * When the last phone code stops working.
54
+ * @type {Date}
55
+ * @memberof LeadPhoneVerificationDto
56
+ */
57
+ codeExpiresAt: Date | null;
58
+ }
59
+
60
+
61
+ /**
62
+ * @export
63
+ */
64
+ export const LeadPhoneVerificationDtoUnavailableReasonEnum = {
65
+ COOLDOWN: 'cooldown',
66
+ PHONE_HOURLY_CAP: 'phone_hourly_cap',
67
+ LEAD_CAP: 'lead_cap',
68
+ PHONE_DAILY_CAP: 'phone_daily_cap',
69
+ PHONE_LEADS_CAP: 'phone_leads_cap',
70
+ GLOBAL_CAP: 'global_cap',
71
+ NO_PHONE_NUMBER: 'no_phone_number',
72
+ INVALID_NUMBER: 'invalid_number',
73
+ COUNTRY_NOT_ALLOWED: 'country_not_allowed',
74
+ NUMBER_TYPE_NOT_ALLOWED: 'number_type_not_allowed',
75
+ ATTEMPTS_EXCEEDED: 'attempts_exceeded',
76
+ REJECTED_BY_PROVIDER: 'rejected_by_provider'
77
+ } as const;
78
+ export type LeadPhoneVerificationDtoUnavailableReasonEnum = typeof LeadPhoneVerificationDtoUnavailableReasonEnum[keyof typeof LeadPhoneVerificationDtoUnavailableReasonEnum];
79
+
80
+
81
+ /**
82
+ * Check if a given object implements the LeadPhoneVerificationDto interface.
83
+ */
84
+ export function instanceOfLeadPhoneVerificationDto(value: object): value is LeadPhoneVerificationDto {
85
+ if (!('required' in value) || value['required'] === undefined) return false;
86
+ if (!('verified' in value) || value['verified'] === undefined) return false;
87
+ if (!('unavailableReason' in value) || value['unavailableReason'] === undefined) return false;
88
+ if (!('sendsLeft' in value) || value['sendsLeft'] === undefined) return false;
89
+ if (!('nextSendAt' in value) || value['nextSendAt'] === undefined) return false;
90
+ if (!('codeExpiresAt' in value) || value['codeExpiresAt'] === undefined) return false;
91
+ return true;
92
+ }
93
+
94
+ export function LeadPhoneVerificationDtoFromJSON(json: any): LeadPhoneVerificationDto {
95
+ return LeadPhoneVerificationDtoFromJSONTyped(json, false);
96
+ }
97
+
98
+ export function LeadPhoneVerificationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeadPhoneVerificationDto {
99
+ if (json == null) {
100
+ return json;
101
+ }
102
+ return {
103
+
104
+ 'required': json['required'],
105
+ 'verified': json['verified'],
106
+ 'unavailableReason': json['unavailableReason'],
107
+ 'sendsLeft': json['sendsLeft'],
108
+ 'nextSendAt': (json['nextSendAt'] == null ? null : new Date(json['nextSendAt'])),
109
+ 'codeExpiresAt': (json['codeExpiresAt'] == null ? null : new Date(json['codeExpiresAt'])),
110
+ };
111
+ }
112
+
113
+ export function LeadPhoneVerificationDtoToJSON(json: any): LeadPhoneVerificationDto {
114
+ return LeadPhoneVerificationDtoToJSONTyped(json, false);
115
+ }
116
+
117
+ export function LeadPhoneVerificationDtoToJSONTyped(value?: LeadPhoneVerificationDto | null, ignoreDiscriminator: boolean = false): any {
118
+ if (value == null) {
119
+ return value;
120
+ }
121
+
122
+ return {
123
+
124
+ 'required': value['required'],
125
+ 'verified': value['verified'],
126
+ 'unavailableReason': value['unavailableReason'],
127
+ 'sendsLeft': value['sendsLeft'],
128
+ 'nextSendAt': (value['nextSendAt'] == null ? null : (value['nextSendAt'] as any).toISOString()),
129
+ 'codeExpiresAt': (value['codeExpiresAt'] == null ? null : (value['codeExpiresAt'] as any).toISOString()),
130
+ };
131
+ }
132
+
@@ -0,0 +1,63 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * Why no code can be sent.
18
+ * @export
19
+ */
20
+ export const LeadPhoneVerificationReason = {
21
+ COOLDOWN: 'cooldown',
22
+ PHONE_HOURLY_CAP: 'phone_hourly_cap',
23
+ LEAD_CAP: 'lead_cap',
24
+ PHONE_DAILY_CAP: 'phone_daily_cap',
25
+ PHONE_LEADS_CAP: 'phone_leads_cap',
26
+ GLOBAL_CAP: 'global_cap',
27
+ NO_PHONE_NUMBER: 'no_phone_number',
28
+ INVALID_NUMBER: 'invalid_number',
29
+ COUNTRY_NOT_ALLOWED: 'country_not_allowed',
30
+ NUMBER_TYPE_NOT_ALLOWED: 'number_type_not_allowed',
31
+ ATTEMPTS_EXCEEDED: 'attempts_exceeded',
32
+ REJECTED_BY_PROVIDER: 'rejected_by_provider'
33
+ } as const;
34
+ export type LeadPhoneVerificationReason = typeof LeadPhoneVerificationReason[keyof typeof LeadPhoneVerificationReason];
35
+
36
+
37
+ export function instanceOfLeadPhoneVerificationReason(value: any): boolean {
38
+ for (const key in LeadPhoneVerificationReason) {
39
+ if (Object.prototype.hasOwnProperty.call(LeadPhoneVerificationReason, key)) {
40
+ if (LeadPhoneVerificationReason[key as keyof typeof LeadPhoneVerificationReason] === value) {
41
+ return true;
42
+ }
43
+ }
44
+ }
45
+ return false;
46
+ }
47
+
48
+ export function LeadPhoneVerificationReasonFromJSON(json: any): LeadPhoneVerificationReason {
49
+ return LeadPhoneVerificationReasonFromJSONTyped(json, false);
50
+ }
51
+
52
+ export function LeadPhoneVerificationReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeadPhoneVerificationReason {
53
+ return json as LeadPhoneVerificationReason;
54
+ }
55
+
56
+ export function LeadPhoneVerificationReasonToJSON(value?: LeadPhoneVerificationReason | null): any {
57
+ return value as any;
58
+ }
59
+
60
+ export function LeadPhoneVerificationReasonToJSONTyped(value: any, ignoreDiscriminator: boolean): LeadPhoneVerificationReason {
61
+ return value as LeadPhoneVerificationReason;
62
+ }
63
+