@randock/nameshift-api-client 0.0.508 → 0.0.510

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.
@@ -240,6 +240,7 @@ src/models/CreateBankAccountInput.ts
240
240
  src/models/CreateBuyerDomainAppraisalRequestInput.ts
241
241
  src/models/CreateBuyerLeadMessageInput.ts
242
242
  src/models/CreateChallengeInput.ts
243
+ src/models/CreateInformationRequestLeadInput.ts
243
244
  src/models/CreateLeadInput.ts
244
245
  src/models/CreateLeadMessageInput.ts
245
246
  src/models/CreateManualLeadInput.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.508
1
+ ## @randock/nameshift-api-client@0.0.510
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.508 --save
39
+ npm install @randock/nameshift-api-client@0.0.510 --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
- 7bf9045aca42b6aa1b648e92260161ab5507a6d9a36db08db1e536091941e02c75d367911c7956e1fc0e4e100b4047fe
47
+ 9fc9492f2ee12efed7ce9b25ea506b1849a810402b767f71961ecc39f68861a3ade5b8b36b8a5e70294520e48e1ace9a
@@ -10,11 +10,15 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AssociateVisitorInput, CreateLeadInput, LeadStatusDto, ObjectId, PublicLeadDto, UpdateLeadInput, VerifyLeadInput } from '../models/index';
13
+ import type { AssociateVisitorInput, CreateInformationRequestLeadInput, CreateLeadInput, LeadStatusDto, ObjectId, PublicLeadDto, UpdateLeadInput, VerifyLeadInput } from '../models/index';
14
14
  export interface LeadsPublicApiAssociateLeadVisitorRequest {
15
15
  leadId: string;
16
16
  associateVisitorInput: AssociateVisitorInput;
17
17
  }
18
+ export interface LeadsPublicApiCreateInformationRequestLeadRequest {
19
+ createInformationRequestLeadInput: CreateInformationRequestLeadInput;
20
+ xRecaptchaToken?: string;
21
+ }
18
22
  export interface LeadsPublicApiCreateLeadRequest {
19
23
  createLeadInput: CreateLeadInput;
20
24
  xRecaptchaToken?: string;
@@ -50,6 +54,16 @@ export declare class LeadsPublicApi extends runtime.BaseAPI {
50
54
  * Associate a visitor with a lead buyer
51
55
  */
52
56
  associateLeadVisitor(requestParameters: LeadsPublicApiAssociateLeadVisitorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
57
+ /**
58
+ * Creates a lead without an offer for a domain the seller has not set any way to buy. No authentication required.
59
+ * Request information about a domain
60
+ */
61
+ createInformationRequestLeadRaw(requestParameters: LeadsPublicApiCreateInformationRequestLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectId>>;
62
+ /**
63
+ * Creates a lead without an offer for a domain the seller has not set any way to buy. No authentication required.
64
+ * Request information about a domain
65
+ */
66
+ createInformationRequestLead(requestParameters: LeadsPublicApiCreateInformationRequestLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId>;
53
67
  /**
54
68
  * Submits a purchase inquiry for a domain. No authentication required. May be processed synchronously or asynchronously.
55
69
  * Create a lead
@@ -124,6 +124,57 @@ var LeadsPublicApi = /** @class */ (function (_super) {
124
124
  });
125
125
  });
126
126
  };
127
+ /**
128
+ * Creates a lead without an offer for a domain the seller has not set any way to buy. No authentication required.
129
+ * Request information about a domain
130
+ */
131
+ LeadsPublicApi.prototype.createInformationRequestLeadRaw = function (requestParameters, initOverrides) {
132
+ return __awaiter(this, void 0, void 0, function () {
133
+ var queryParameters, headerParameters, response;
134
+ return __generator(this, function (_a) {
135
+ switch (_a.label) {
136
+ case 0:
137
+ if (requestParameters['createInformationRequestLeadInput'] == null) {
138
+ throw new runtime.RequiredError('createInformationRequestLeadInput', 'Required parameter "createInformationRequestLeadInput" was null or undefined when calling createInformationRequestLead().');
139
+ }
140
+ queryParameters = {};
141
+ headerParameters = {};
142
+ headerParameters['Content-Type'] = 'application/json';
143
+ if (requestParameters['xRecaptchaToken'] != null) {
144
+ headerParameters['x-recaptcha-token'] = String(requestParameters['xRecaptchaToken']);
145
+ }
146
+ return [4 /*yield*/, this.request({
147
+ path: "/leads/information-request",
148
+ method: 'POST',
149
+ headers: headerParameters,
150
+ query: queryParameters,
151
+ body: (0, index_1.CreateInformationRequestLeadInputToJSON)(requestParameters['createInformationRequestLeadInput']),
152
+ }, initOverrides)];
153
+ case 1:
154
+ response = _a.sent();
155
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ObjectIdFromJSON)(jsonValue); })];
156
+ }
157
+ });
158
+ });
159
+ };
160
+ /**
161
+ * Creates a lead without an offer for a domain the seller has not set any way to buy. No authentication required.
162
+ * Request information about a domain
163
+ */
164
+ LeadsPublicApi.prototype.createInformationRequestLead = function (requestParameters, initOverrides) {
165
+ return __awaiter(this, void 0, void 0, function () {
166
+ var response;
167
+ return __generator(this, function (_a) {
168
+ switch (_a.label) {
169
+ case 0: return [4 /*yield*/, this.createInformationRequestLeadRaw(requestParameters, initOverrides)];
170
+ case 1:
171
+ response = _a.sent();
172
+ return [4 /*yield*/, response.value()];
173
+ case 2: return [2 /*return*/, _a.sent()];
174
+ }
175
+ });
176
+ });
177
+ };
127
178
  /**
128
179
  * Submits a purchase inquiry for a domain. No authentication required. May be processed synchronously or asynchronously.
129
180
  * Create a lead
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Nameshift
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreateInformationRequestLeadInput
16
+ */
17
+ export interface CreateInformationRequestLeadInput {
18
+ /**
19
+ * Buyer first name
20
+ * @type {string}
21
+ * @memberof CreateInformationRequestLeadInput
22
+ */
23
+ firstname: string;
24
+ /**
25
+ * Buyer last name
26
+ * @type {string}
27
+ * @memberof CreateInformationRequestLeadInput
28
+ */
29
+ lastname: string;
30
+ /**
31
+ * Buyer email address
32
+ * @type {string}
33
+ * @memberof CreateInformationRequestLeadInput
34
+ */
35
+ email: string;
36
+ /**
37
+ * Buyer company name, if applicable
38
+ * @type {string}
39
+ * @memberof CreateInformationRequestLeadInput
40
+ */
41
+ companyName?: string | null;
42
+ /**
43
+ * Buyer phone number in E.164 format
44
+ * @type {string}
45
+ * @memberof CreateInformationRequestLeadInput
46
+ */
47
+ phoneNumber?: string | null;
48
+ /**
49
+ * Fully qualified domain name the buyer is asking about
50
+ * @type {string}
51
+ * @memberof CreateInformationRequestLeadInput
52
+ */
53
+ domainName: string;
54
+ /**
55
+ * Preferred locale for lead communications (BCP 47 language tag)
56
+ * @type {string}
57
+ * @memberof CreateInformationRequestLeadInput
58
+ */
59
+ locale: string;
60
+ /**
61
+ * Affiliate account identifier that referred this lead
62
+ * @type {string}
63
+ * @memberof CreateInformationRequestLeadInput
64
+ */
65
+ affiliateId?: string | null;
66
+ }
67
+ /**
68
+ * Check if a given object implements the CreateInformationRequestLeadInput interface.
69
+ */
70
+ export declare function instanceOfCreateInformationRequestLeadInput(value: object): value is CreateInformationRequestLeadInput;
71
+ export declare function CreateInformationRequestLeadInputFromJSON(json: any): CreateInformationRequestLeadInput;
72
+ export declare function CreateInformationRequestLeadInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateInformationRequestLeadInput;
73
+ export declare function CreateInformationRequestLeadInputToJSON(json: any): CreateInformationRequestLeadInput;
74
+ export declare function CreateInformationRequestLeadInputToJSONTyped(value?: CreateInformationRequestLeadInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfCreateInformationRequestLeadInput = instanceOfCreateInformationRequestLeadInput;
17
+ exports.CreateInformationRequestLeadInputFromJSON = CreateInformationRequestLeadInputFromJSON;
18
+ exports.CreateInformationRequestLeadInputFromJSONTyped = CreateInformationRequestLeadInputFromJSONTyped;
19
+ exports.CreateInformationRequestLeadInputToJSON = CreateInformationRequestLeadInputToJSON;
20
+ exports.CreateInformationRequestLeadInputToJSONTyped = CreateInformationRequestLeadInputToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the CreateInformationRequestLeadInput interface.
23
+ */
24
+ function instanceOfCreateInformationRequestLeadInput(value) {
25
+ if (!('firstname' in value) || value['firstname'] === undefined)
26
+ return false;
27
+ if (!('lastname' in value) || value['lastname'] === undefined)
28
+ return false;
29
+ if (!('email' in value) || value['email'] === undefined)
30
+ return false;
31
+ if (!('domainName' in value) || value['domainName'] === undefined)
32
+ return false;
33
+ if (!('locale' in value) || value['locale'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function CreateInformationRequestLeadInputFromJSON(json) {
38
+ return CreateInformationRequestLeadInputFromJSONTyped(json, false);
39
+ }
40
+ function CreateInformationRequestLeadInputFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'firstname': json['firstname'],
46
+ 'lastname': json['lastname'],
47
+ 'email': json['email'],
48
+ 'companyName': json['companyName'] == null ? undefined : json['companyName'],
49
+ 'phoneNumber': json['phoneNumber'] == null ? undefined : json['phoneNumber'],
50
+ 'domainName': json['domainName'],
51
+ 'locale': json['locale'],
52
+ 'affiliateId': json['affiliateId'] == null ? undefined : json['affiliateId'],
53
+ };
54
+ }
55
+ function CreateInformationRequestLeadInputToJSON(json) {
56
+ return CreateInformationRequestLeadInputToJSONTyped(json, false);
57
+ }
58
+ function CreateInformationRequestLeadInputToJSONTyped(value, ignoreDiscriminator) {
59
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'firstname': value['firstname'],
65
+ 'lastname': value['lastname'],
66
+ 'email': value['email'],
67
+ 'companyName': value['companyName'],
68
+ 'phoneNumber': value['phoneNumber'],
69
+ 'domainName': value['domainName'],
70
+ 'locale': value['locale'],
71
+ 'affiliateId': value['affiliateId'],
72
+ };
73
+ }
@@ -112,6 +112,12 @@ export interface DomainSalesInformationDto {
112
112
  * @memberof DomainSalesInformationDto
113
113
  */
114
114
  locked: boolean;
115
+ /**
116
+ * Whether buyers can request information about the domain from its landing page.
117
+ * @type {boolean}
118
+ * @memberof DomainSalesInformationDto
119
+ */
120
+ informationRequestEnabled: boolean;
115
121
  /**
116
122
  * Lead buyer information requirements for this domain.
117
123
  * @type {LeadBuyerConfigDto}
@@ -59,6 +59,8 @@ function instanceOfDomainSalesInformationDto(value) {
59
59
  return false;
60
60
  if (!('locked' in value) || value['locked'] === undefined)
61
61
  return false;
62
+ if (!('informationRequestEnabled' in value) || value['informationRequestEnabled'] === undefined)
63
+ return false;
62
64
  if (!('leadBuyerSettings' in value) || value['leadBuyerSettings'] === undefined)
63
65
  return false;
64
66
  if (!('domainAppraisalRequestEnabled' in value) || value['domainAppraisalRequestEnabled'] === undefined)
@@ -90,6 +92,7 @@ function DomainSalesInformationDtoFromJSONTyped(json, ignoreDiscriminator) {
90
92
  'hasActiveAuction': json['hasActiveAuction'],
91
93
  'auctionId': json['auctionId'],
92
94
  'locked': json['locked'],
95
+ 'informationRequestEnabled': json['informationRequestEnabled'],
93
96
  'leadBuyerSettings': (0, LeadBuyerConfigDto_1.LeadBuyerConfigDtoFromJSON)(json['leadBuyerSettings']),
94
97
  'domainAppraisalRequestEnabled': json['domainAppraisalRequestEnabled'],
95
98
  'landingPageDesign': (0, DomainSalesInformationDtoLandingPageDesign_1.DomainSalesInformationDtoLandingPageDesignFromJSON)(json['landingPageDesign']),
@@ -119,6 +122,7 @@ function DomainSalesInformationDtoToJSONTyped(value, ignoreDiscriminator) {
119
122
  'hasActiveAuction': value['hasActiveAuction'],
120
123
  'auctionId': value['auctionId'],
121
124
  'locked': value['locked'],
125
+ 'informationRequestEnabled': value['informationRequestEnabled'],
122
126
  'leadBuyerSettings': (0, LeadBuyerConfigDto_1.LeadBuyerConfigDtoToJSON)(value['leadBuyerSettings']),
123
127
  'domainAppraisalRequestEnabled': value['domainAppraisalRequestEnabled'],
124
128
  'landingPageDesign': (0, DomainSalesInformationDtoLandingPageDesign_1.DomainSalesInformationDtoLandingPageDesignToJSON)(value['landingPageDesign']),
@@ -59,7 +59,7 @@ export interface LandingPageInput {
59
59
  */
60
60
  domainNameCase?: LandingPageInputDomainNameCaseEnum | null;
61
61
  /**
62
- * Length under which the domain name is written uppercase on the landing page.
62
+ * Length up to which the domain name is written uppercase on the landing page.
63
63
  * @type {number}
64
64
  * @memberof LandingPageInput
65
65
  */
@@ -59,7 +59,7 @@ export interface LandingPageSettingsDto {
59
59
  */
60
60
  domainNameCase: LandingPageSettingsDtoDomainNameCaseEnum | null;
61
61
  /**
62
- * Length under which the domain name is written uppercase on the landing page.
62
+ * Length up to which the domain name is written uppercase on the landing page.
63
63
  * @type {number}
64
64
  * @memberof LandingPageSettingsDto
65
65
  */
@@ -80,6 +80,7 @@ export declare const LeadMessageDtoTypeEnum: {
80
80
  readonly OFFER_WITHDRAWN: "offer_withdrawn";
81
81
  readonly OFFER_REJECTED: "offer_rejected";
82
82
  readonly MESSAGE: "message";
83
+ readonly INFORMATION_REQUEST: "information_request";
83
84
  };
84
85
  export type LeadMessageDtoTypeEnum = typeof LeadMessageDtoTypeEnum[keyof typeof LeadMessageDtoTypeEnum];
85
86
  /**
@@ -28,7 +28,8 @@ exports.LeadMessageDtoTypeEnum = {
28
28
  OFFER_ACCEPTED: 'offer_accepted',
29
29
  OFFER_WITHDRAWN: 'offer_withdrawn',
30
30
  OFFER_REJECTED: 'offer_rejected',
31
- MESSAGE: 'message'
31
+ MESSAGE: 'message',
32
+ INFORMATION_REQUEST: 'information_request'
32
33
  };
33
34
  /**
34
35
  * @export
@@ -270,6 +270,7 @@ export declare const ListLeadsResultItemLastMessageTypeEnum: {
270
270
  readonly OFFER_WITHDRAWN: "offer_withdrawn";
271
271
  readonly OFFER_REJECTED: "offer_rejected";
272
272
  readonly MESSAGE: "message";
273
+ readonly INFORMATION_REQUEST: "information_request";
273
274
  };
274
275
  export type ListLeadsResultItemLastMessageTypeEnum = typeof ListLeadsResultItemLastMessageTypeEnum[keyof typeof ListLeadsResultItemLastMessageTypeEnum];
275
276
  /**
@@ -81,7 +81,8 @@ exports.ListLeadsResultItemLastMessageTypeEnum = {
81
81
  OFFER_ACCEPTED: 'offer_accepted',
82
82
  OFFER_WITHDRAWN: 'offer_withdrawn',
83
83
  OFFER_REJECTED: 'offer_rejected',
84
- MESSAGE: 'message'
84
+ MESSAGE: 'message',
85
+ INFORMATION_REQUEST: 'information_request'
85
86
  };
86
87
  /**
87
88
  * Check if a given object implements the ListLeadsResultItem interface.
@@ -197,6 +197,7 @@ export * from './CreateBankAccountInput';
197
197
  export * from './CreateBuyerDomainAppraisalRequestInput';
198
198
  export * from './CreateBuyerLeadMessageInput';
199
199
  export * from './CreateChallengeInput';
200
+ export * from './CreateInformationRequestLeadInput';
200
201
  export * from './CreateLeadInput';
201
202
  export * from './CreateLeadMessageInput';
202
203
  export * from './CreateManualLeadInput';
@@ -215,6 +215,7 @@ __exportStar(require("./CreateBankAccountInput"), exports);
215
215
  __exportStar(require("./CreateBuyerDomainAppraisalRequestInput"), exports);
216
216
  __exportStar(require("./CreateBuyerLeadMessageInput"), exports);
217
217
  __exportStar(require("./CreateChallengeInput"), exports);
218
+ __exportStar(require("./CreateInformationRequestLeadInput"), exports);
218
219
  __exportStar(require("./CreateLeadInput"), exports);
219
220
  __exportStar(require("./CreateLeadMessageInput"), exports);
220
221
  __exportStar(require("./CreateManualLeadInput"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.508",
3
+ "version": "0.0.510",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -17,6 +17,7 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  AssociateVisitorInput,
19
19
  BadRequestException,
20
+ CreateInformationRequestLeadInput,
20
21
  CreateLeadInput,
21
22
  LeadStatusDto,
22
23
  ObjectId,
@@ -30,6 +31,8 @@ import {
30
31
  AssociateVisitorInputToJSON,
31
32
  BadRequestExceptionFromJSON,
32
33
  BadRequestExceptionToJSON,
34
+ CreateInformationRequestLeadInputFromJSON,
35
+ CreateInformationRequestLeadInputToJSON,
33
36
  CreateLeadInputFromJSON,
34
37
  CreateLeadInputToJSON,
35
38
  LeadStatusDtoFromJSON,
@@ -51,6 +54,11 @@ export interface LeadsPublicApiAssociateLeadVisitorRequest {
51
54
  associateVisitorInput: AssociateVisitorInput;
52
55
  }
53
56
 
57
+ export interface LeadsPublicApiCreateInformationRequestLeadRequest {
58
+ createInformationRequestLeadInput: CreateInformationRequestLeadInput;
59
+ xRecaptchaToken?: string;
60
+ }
61
+
54
62
  export interface LeadsPublicApiCreateLeadRequest {
55
63
  createLeadInput: CreateLeadInput;
56
64
  xRecaptchaToken?: string;
@@ -127,6 +135,48 @@ export class LeadsPublicApi extends runtime.BaseAPI {
127
135
  await this.associateLeadVisitorRaw(requestParameters, initOverrides);
128
136
  }
129
137
 
138
+ /**
139
+ * Creates a lead without an offer for a domain the seller has not set any way to buy. No authentication required.
140
+ * Request information about a domain
141
+ */
142
+ async createInformationRequestLeadRaw(requestParameters: LeadsPublicApiCreateInformationRequestLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectId>> {
143
+ if (requestParameters['createInformationRequestLeadInput'] == null) {
144
+ throw new runtime.RequiredError(
145
+ 'createInformationRequestLeadInput',
146
+ 'Required parameter "createInformationRequestLeadInput" was null or undefined when calling createInformationRequestLead().'
147
+ );
148
+ }
149
+
150
+ const queryParameters: any = {};
151
+
152
+ const headerParameters: runtime.HTTPHeaders = {};
153
+
154
+ headerParameters['Content-Type'] = 'application/json';
155
+
156
+ if (requestParameters['xRecaptchaToken'] != null) {
157
+ headerParameters['x-recaptcha-token'] = String(requestParameters['xRecaptchaToken']);
158
+ }
159
+
160
+ const response = await this.request({
161
+ path: `/leads/information-request`,
162
+ method: 'POST',
163
+ headers: headerParameters,
164
+ query: queryParameters,
165
+ body: CreateInformationRequestLeadInputToJSON(requestParameters['createInformationRequestLeadInput']),
166
+ }, initOverrides);
167
+
168
+ return new runtime.JSONApiResponse(response, (jsonValue) => ObjectIdFromJSON(jsonValue));
169
+ }
170
+
171
+ /**
172
+ * Creates a lead without an offer for a domain the seller has not set any way to buy. No authentication required.
173
+ * Request information about a domain
174
+ */
175
+ async createInformationRequestLead(requestParameters: LeadsPublicApiCreateInformationRequestLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId> {
176
+ const response = await this.createInformationRequestLeadRaw(requestParameters, initOverrides);
177
+ return await response.value();
178
+ }
179
+
130
180
  /**
131
181
  * Submits a purchase inquiry for a domain. No authentication required. May be processed synchronously or asynchronously.
132
182
  * Create a lead
@@ -0,0 +1,126 @@
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 CreateInformationRequestLeadInput
20
+ */
21
+ export interface CreateInformationRequestLeadInput {
22
+ /**
23
+ * Buyer first name
24
+ * @type {string}
25
+ * @memberof CreateInformationRequestLeadInput
26
+ */
27
+ firstname: string;
28
+ /**
29
+ * Buyer last name
30
+ * @type {string}
31
+ * @memberof CreateInformationRequestLeadInput
32
+ */
33
+ lastname: string;
34
+ /**
35
+ * Buyer email address
36
+ * @type {string}
37
+ * @memberof CreateInformationRequestLeadInput
38
+ */
39
+ email: string;
40
+ /**
41
+ * Buyer company name, if applicable
42
+ * @type {string}
43
+ * @memberof CreateInformationRequestLeadInput
44
+ */
45
+ companyName?: string | null;
46
+ /**
47
+ * Buyer phone number in E.164 format
48
+ * @type {string}
49
+ * @memberof CreateInformationRequestLeadInput
50
+ */
51
+ phoneNumber?: string | null;
52
+ /**
53
+ * Fully qualified domain name the buyer is asking about
54
+ * @type {string}
55
+ * @memberof CreateInformationRequestLeadInput
56
+ */
57
+ domainName: string;
58
+ /**
59
+ * Preferred locale for lead communications (BCP 47 language tag)
60
+ * @type {string}
61
+ * @memberof CreateInformationRequestLeadInput
62
+ */
63
+ locale: string;
64
+ /**
65
+ * Affiliate account identifier that referred this lead
66
+ * @type {string}
67
+ * @memberof CreateInformationRequestLeadInput
68
+ */
69
+ affiliateId?: string | null;
70
+ }
71
+
72
+ /**
73
+ * Check if a given object implements the CreateInformationRequestLeadInput interface.
74
+ */
75
+ export function instanceOfCreateInformationRequestLeadInput(value: object): value is CreateInformationRequestLeadInput {
76
+ if (!('firstname' in value) || value['firstname'] === undefined) return false;
77
+ if (!('lastname' in value) || value['lastname'] === undefined) return false;
78
+ if (!('email' in value) || value['email'] === undefined) return false;
79
+ if (!('domainName' in value) || value['domainName'] === undefined) return false;
80
+ if (!('locale' in value) || value['locale'] === undefined) return false;
81
+ return true;
82
+ }
83
+
84
+ export function CreateInformationRequestLeadInputFromJSON(json: any): CreateInformationRequestLeadInput {
85
+ return CreateInformationRequestLeadInputFromJSONTyped(json, false);
86
+ }
87
+
88
+ export function CreateInformationRequestLeadInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateInformationRequestLeadInput {
89
+ if (json == null) {
90
+ return json;
91
+ }
92
+ return {
93
+
94
+ 'firstname': json['firstname'],
95
+ 'lastname': json['lastname'],
96
+ 'email': json['email'],
97
+ 'companyName': json['companyName'] == null ? undefined : json['companyName'],
98
+ 'phoneNumber': json['phoneNumber'] == null ? undefined : json['phoneNumber'],
99
+ 'domainName': json['domainName'],
100
+ 'locale': json['locale'],
101
+ 'affiliateId': json['affiliateId'] == null ? undefined : json['affiliateId'],
102
+ };
103
+ }
104
+
105
+ export function CreateInformationRequestLeadInputToJSON(json: any): CreateInformationRequestLeadInput {
106
+ return CreateInformationRequestLeadInputToJSONTyped(json, false);
107
+ }
108
+
109
+ export function CreateInformationRequestLeadInputToJSONTyped(value?: CreateInformationRequestLeadInput | null, ignoreDiscriminator: boolean = false): any {
110
+ if (value == null) {
111
+ return value;
112
+ }
113
+
114
+ return {
115
+
116
+ 'firstname': value['firstname'],
117
+ 'lastname': value['lastname'],
118
+ 'email': value['email'],
119
+ 'companyName': value['companyName'],
120
+ 'phoneNumber': value['phoneNumber'],
121
+ 'domainName': value['domainName'],
122
+ 'locale': value['locale'],
123
+ 'affiliateId': value['affiliateId'],
124
+ };
125
+ }
126
+
@@ -159,6 +159,12 @@ export interface DomainSalesInformationDto {
159
159
  * @memberof DomainSalesInformationDto
160
160
  */
161
161
  locked: boolean;
162
+ /**
163
+ * Whether buyers can request information about the domain from its landing page.
164
+ * @type {boolean}
165
+ * @memberof DomainSalesInformationDto
166
+ */
167
+ informationRequestEnabled: boolean;
162
168
  /**
163
169
  * Lead buyer information requirements for this domain.
164
170
  * @type {LeadBuyerConfigDto}
@@ -198,6 +204,7 @@ export function instanceOfDomainSalesInformationDto(value: object): value is Dom
198
204
  if (!('hasActiveAuction' in value) || value['hasActiveAuction'] === undefined) return false;
199
205
  if (!('auctionId' in value) || value['auctionId'] === undefined) return false;
200
206
  if (!('locked' in value) || value['locked'] === undefined) return false;
207
+ if (!('informationRequestEnabled' in value) || value['informationRequestEnabled'] === undefined) return false;
201
208
  if (!('leadBuyerSettings' in value) || value['leadBuyerSettings'] === undefined) return false;
202
209
  if (!('domainAppraisalRequestEnabled' in value) || value['domainAppraisalRequestEnabled'] === undefined) return false;
203
210
  if (!('landingPageDesign' in value) || value['landingPageDesign'] === undefined) return false;
@@ -229,6 +236,7 @@ export function DomainSalesInformationDtoFromJSONTyped(json: any, ignoreDiscrimi
229
236
  'hasActiveAuction': json['hasActiveAuction'],
230
237
  'auctionId': json['auctionId'],
231
238
  'locked': json['locked'],
239
+ 'informationRequestEnabled': json['informationRequestEnabled'],
232
240
  'leadBuyerSettings': LeadBuyerConfigDtoFromJSON(json['leadBuyerSettings']),
233
241
  'domainAppraisalRequestEnabled': json['domainAppraisalRequestEnabled'],
234
242
  'landingPageDesign': DomainSalesInformationDtoLandingPageDesignFromJSON(json['landingPageDesign']),
@@ -261,6 +269,7 @@ export function DomainSalesInformationDtoToJSONTyped(value?: DomainSalesInformat
261
269
  'hasActiveAuction': value['hasActiveAuction'],
262
270
  'auctionId': value['auctionId'],
263
271
  'locked': value['locked'],
272
+ 'informationRequestEnabled': value['informationRequestEnabled'],
264
273
  'leadBuyerSettings': LeadBuyerConfigDtoToJSON(value['leadBuyerSettings']),
265
274
  'domainAppraisalRequestEnabled': value['domainAppraisalRequestEnabled'],
266
275
  'landingPageDesign': DomainSalesInformationDtoLandingPageDesignToJSON(value['landingPageDesign']),
@@ -70,7 +70,7 @@ export interface LandingPageInput {
70
70
  */
71
71
  domainNameCase?: LandingPageInputDomainNameCaseEnum | null;
72
72
  /**
73
- * Length under which the domain name is written uppercase on the landing page.
73
+ * Length up to which the domain name is written uppercase on the landing page.
74
74
  * @type {number}
75
75
  * @memberof LandingPageInput
76
76
  */
@@ -70,7 +70,7 @@ export interface LandingPageSettingsDto {
70
70
  */
71
71
  domainNameCase: LandingPageSettingsDtoDomainNameCaseEnum | null;
72
72
  /**
73
- * Length under which the domain name is written uppercase on the landing page.
73
+ * Length up to which the domain name is written uppercase on the landing page.
74
74
  * @type {number}
75
75
  * @memberof LandingPageSettingsDto
76
76
  */
@@ -92,7 +92,8 @@ export const LeadMessageDtoTypeEnum = {
92
92
  OFFER_ACCEPTED: 'offer_accepted',
93
93
  OFFER_WITHDRAWN: 'offer_withdrawn',
94
94
  OFFER_REJECTED: 'offer_rejected',
95
- MESSAGE: 'message'
95
+ MESSAGE: 'message',
96
+ INFORMATION_REQUEST: 'information_request'
96
97
  } as const;
97
98
  export type LeadMessageDtoTypeEnum = typeof LeadMessageDtoTypeEnum[keyof typeof LeadMessageDtoTypeEnum];
98
99
 
@@ -323,7 +323,8 @@ export const ListLeadsResultItemLastMessageTypeEnum = {
323
323
  OFFER_ACCEPTED: 'offer_accepted',
324
324
  OFFER_WITHDRAWN: 'offer_withdrawn',
325
325
  OFFER_REJECTED: 'offer_rejected',
326
- MESSAGE: 'message'
326
+ MESSAGE: 'message',
327
+ INFORMATION_REQUEST: 'information_request'
327
328
  } as const;
328
329
  export type ListLeadsResultItemLastMessageTypeEnum = typeof ListLeadsResultItemLastMessageTypeEnum[keyof typeof ListLeadsResultItemLastMessageTypeEnum];
329
330
 
@@ -199,6 +199,7 @@ export * from './CreateBankAccountInput';
199
199
  export * from './CreateBuyerDomainAppraisalRequestInput';
200
200
  export * from './CreateBuyerLeadMessageInput';
201
201
  export * from './CreateChallengeInput';
202
+ export * from './CreateInformationRequestLeadInput';
202
203
  export * from './CreateLeadInput';
203
204
  export * from './CreateLeadMessageInput';
204
205
  export * from './CreateManualLeadInput';