@randock/nameshift-api-client 0.0.562 → 0.0.564
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.
- package/.openapi-generator/FILES +16 -0
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +28 -1
- package/dist/apis/AdminApi.js +113 -0
- package/dist/apis/BuyersApi.d.ts +14 -1
- package/dist/apis/BuyersApi.js +57 -0
- package/dist/apis/BuyersPublicApi.d.ts +100 -1
- package/dist/apis/BuyersPublicApi.js +426 -0
- package/dist/apis/LeadsApi.d.ts +28 -1
- package/dist/apis/LeadsApi.js +129 -0
- package/dist/apis/LeadsPublicApi.d.ts +5 -5
- package/dist/apis/LeadsPublicApi.js +6 -4
- package/dist/models/AcceptHighestBuyerLeadOfferInput.d.ts +32 -0
- package/dist/models/AcceptHighestBuyerLeadOfferInput.js +51 -0
- package/dist/models/BuyerCheckoutProfileDto.d.ts +116 -0
- package/dist/models/BuyerCheckoutProfileDto.js +107 -0
- package/dist/models/BuyerCheckoutProfileSummaryDto.d.ts +74 -0
- package/dist/models/BuyerCheckoutProfileSummaryDto.js +79 -0
- package/dist/models/BuyerLandingSessionOutput.d.ts +68 -0
- package/dist/models/BuyerLandingSessionOutput.js +75 -0
- package/dist/models/BuyerNotificationDto.d.ts +1 -0
- package/dist/models/BuyerNotificationDto.js +1 -0
- package/dist/models/BuyerNotificationListItemDto.d.ts +1 -0
- package/dist/models/BuyerNotificationListItemDto.js +1 -0
- package/dist/models/BuyerSessionEstablishTicketOutput.d.ts +32 -0
- package/dist/models/BuyerSessionEstablishTicketOutput.js +51 -0
- package/dist/models/BuyerSessionPurchaseTypeEnum.d.ts +26 -0
- package/dist/models/BuyerSessionPurchaseTypeEnum.js +52 -0
- package/dist/models/CreateBuyerSessionEstablishTicketInput.d.ts +38 -0
- package/dist/models/CreateBuyerSessionEstablishTicketInput.js +55 -0
- package/dist/models/CreateBuyerSessionFromPurchaseInput.d.ts +39 -0
- package/dist/models/CreateBuyerSessionFromPurchaseInput.js +56 -0
- package/dist/models/CreateDashboardBuyerSessionInput.d.ts +32 -0
- package/dist/models/CreateDashboardBuyerSessionInput.js +51 -0
- package/dist/models/ExchangeBuyerSessionCodeInput.d.ts +38 -0
- package/dist/models/ExchangeBuyerSessionCodeInput.js +55 -0
- package/dist/models/LeadEmailVerificationResultOutput.d.ts +33 -0
- package/dist/models/LeadEmailVerificationResultOutput.js +52 -0
- package/dist/models/LeadOfferSummaryCannotAcceptReason.d.ts +29 -0
- package/dist/models/LeadOfferSummaryCannotAcceptReason.js +55 -0
- package/dist/models/LeadOfferSummaryDto.d.ts +52 -0
- package/dist/models/LeadOfferSummaryDto.js +65 -0
- package/dist/models/LeadOfferSummaryItemDto.d.ts +61 -0
- package/dist/models/LeadOfferSummaryItemDto.js +74 -0
- package/dist/models/LeadPhoneVerificationResultOutput.d.ts +47 -0
- package/dist/models/LeadPhoneVerificationResultOutput.js +62 -0
- package/dist/models/UserNotificationDto.d.ts +1 -0
- package/dist/models/UserNotificationDto.js +1 -0
- package/dist/models/UserNotificationListItemDto.d.ts +1 -0
- package/dist/models/UserNotificationListItemDto.js +1 -0
- package/dist/models/VerifyBuyerSessionEmailOtpInput.d.ts +32 -0
- package/dist/models/VerifyBuyerSessionEmailOtpInput.js +51 -0
- package/dist/models/index.d.ts +16 -0
- package/dist/models/index.js +16 -0
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +110 -0
- package/src/apis/BuyersApi.ts +56 -0
- package/src/apis/BuyersPublicApi.ts +378 -0
- package/src/apis/LeadsApi.ts +118 -0
- package/src/apis/LeadsPublicApi.ts +14 -7
- package/src/models/AcceptHighestBuyerLeadOfferInput.ts +66 -0
- package/src/models/BuyerCheckoutProfileDto.ts +192 -0
- package/src/models/BuyerCheckoutProfileSummaryDto.ts +129 -0
- package/src/models/BuyerLandingSessionOutput.ts +120 -0
- package/src/models/BuyerNotificationDto.ts +1 -0
- package/src/models/BuyerNotificationListItemDto.ts +1 -0
- package/src/models/BuyerSessionEstablishTicketOutput.ts +66 -0
- package/src/models/BuyerSessionPurchaseTypeEnum.ts +54 -0
- package/src/models/CreateBuyerSessionEstablishTicketInput.ts +75 -0
- package/src/models/CreateBuyerSessionFromPurchaseInput.ts +85 -0
- package/src/models/CreateDashboardBuyerSessionInput.ts +66 -0
- package/src/models/ExchangeBuyerSessionCodeInput.ts +75 -0
- package/src/models/LeadEmailVerificationResultOutput.ts +74 -0
- package/src/models/LeadOfferSummaryCannotAcceptReason.ts +57 -0
- package/src/models/LeadOfferSummaryDto.ts +110 -0
- package/src/models/LeadOfferSummaryItemDto.ts +114 -0
- package/src/models/LeadPhoneVerificationResultOutput.ts +106 -0
- package/src/models/UserNotificationDto.ts +1 -0
- package/src/models/UserNotificationListItemDto.ts +1 -0
- package/src/models/VerifyBuyerSessionEmailOtpInput.ts +66 -0
- package/src/models/index.ts +16 -0
|
@@ -16,18 +16,43 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
AuctionBuyerWithTokenDto,
|
|
19
|
+
BuyerCheckoutProfileDto,
|
|
20
|
+
BuyerCheckoutProfileSummaryDto,
|
|
21
|
+
BuyerLandingSessionOutput,
|
|
19
22
|
BuyerLoginDto,
|
|
23
|
+
BuyerSessionEstablishTicketOutput,
|
|
24
|
+
BuyerSessionPurchaseTypeEnum,
|
|
25
|
+
CreateBuyerSessionEstablishTicketInput,
|
|
26
|
+
CreateBuyerSessionFromPurchaseInput,
|
|
27
|
+
ExchangeBuyerSessionCodeInput,
|
|
20
28
|
LoginInput,
|
|
21
29
|
RequestAccessTokenInput,
|
|
22
30
|
RequestEmailOtpInput,
|
|
23
31
|
ValidationException,
|
|
32
|
+
VerifyBuyerSessionEmailOtpInput,
|
|
24
33
|
VerifyEmailOtpInput,
|
|
25
34
|
} from '../models/index';
|
|
26
35
|
import {
|
|
27
36
|
AuctionBuyerWithTokenDtoFromJSON,
|
|
28
37
|
AuctionBuyerWithTokenDtoToJSON,
|
|
38
|
+
BuyerCheckoutProfileDtoFromJSON,
|
|
39
|
+
BuyerCheckoutProfileDtoToJSON,
|
|
40
|
+
BuyerCheckoutProfileSummaryDtoFromJSON,
|
|
41
|
+
BuyerCheckoutProfileSummaryDtoToJSON,
|
|
42
|
+
BuyerLandingSessionOutputFromJSON,
|
|
43
|
+
BuyerLandingSessionOutputToJSON,
|
|
29
44
|
BuyerLoginDtoFromJSON,
|
|
30
45
|
BuyerLoginDtoToJSON,
|
|
46
|
+
BuyerSessionEstablishTicketOutputFromJSON,
|
|
47
|
+
BuyerSessionEstablishTicketOutputToJSON,
|
|
48
|
+
BuyerSessionPurchaseTypeEnumFromJSON,
|
|
49
|
+
BuyerSessionPurchaseTypeEnumToJSON,
|
|
50
|
+
CreateBuyerSessionEstablishTicketInputFromJSON,
|
|
51
|
+
CreateBuyerSessionEstablishTicketInputToJSON,
|
|
52
|
+
CreateBuyerSessionFromPurchaseInputFromJSON,
|
|
53
|
+
CreateBuyerSessionFromPurchaseInputToJSON,
|
|
54
|
+
ExchangeBuyerSessionCodeInputFromJSON,
|
|
55
|
+
ExchangeBuyerSessionCodeInputToJSON,
|
|
31
56
|
LoginInputFromJSON,
|
|
32
57
|
LoginInputToJSON,
|
|
33
58
|
RequestAccessTokenInputFromJSON,
|
|
@@ -36,6 +61,8 @@ import {
|
|
|
36
61
|
RequestEmailOtpInputToJSON,
|
|
37
62
|
ValidationExceptionFromJSON,
|
|
38
63
|
ValidationExceptionToJSON,
|
|
64
|
+
VerifyBuyerSessionEmailOtpInputFromJSON,
|
|
65
|
+
VerifyBuyerSessionEmailOtpInputToJSON,
|
|
39
66
|
VerifyEmailOtpInputFromJSON,
|
|
40
67
|
VerifyEmailOtpInputToJSON,
|
|
41
68
|
} from '../models/index';
|
|
@@ -44,6 +71,27 @@ export interface BuyersPublicApiBuyerLoginRequest {
|
|
|
44
71
|
loginInput: LoginInput;
|
|
45
72
|
}
|
|
46
73
|
|
|
74
|
+
export interface BuyersPublicApiCreateBuyerSessionEstablishTicketRequest {
|
|
75
|
+
createBuyerSessionEstablishTicketInput: CreateBuyerSessionEstablishTicketInput;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface BuyersPublicApiCreateBuyerSessionFromPurchaseRequest {
|
|
79
|
+
createBuyerSessionFromPurchaseInput: CreateBuyerSessionFromPurchaseInput;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface BuyersPublicApiExchangeBuyerSessionCodeRequest {
|
|
83
|
+
exchangeBuyerSessionCodeInput: ExchangeBuyerSessionCodeInput;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface BuyersPublicApiGetBuyerSessionCheckoutProfileRequest {
|
|
87
|
+
profileId: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface BuyersPublicApiListBuyerSessionCheckoutProfilesRequest {
|
|
91
|
+
purchaseType?: BuyerSessionPurchaseTypeEnum;
|
|
92
|
+
purchaseId?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
47
95
|
export interface BuyersPublicApiRequestAccessTokenRequest {
|
|
48
96
|
requestAccessTokenInput: RequestAccessTokenInput;
|
|
49
97
|
}
|
|
@@ -52,6 +100,10 @@ export interface BuyersPublicApiRequestEmailOtpRequest {
|
|
|
52
100
|
requestEmailOtpInput: RequestEmailOtpInput;
|
|
53
101
|
}
|
|
54
102
|
|
|
103
|
+
export interface BuyersPublicApiVerifyBuyerSessionEmailOtpRequest {
|
|
104
|
+
verifyBuyerSessionEmailOtpInput: VerifyBuyerSessionEmailOtpInput;
|
|
105
|
+
}
|
|
106
|
+
|
|
55
107
|
export interface BuyersPublicApiVerifyEmailOtpRequest {
|
|
56
108
|
verifyEmailOtpInput: VerifyEmailOtpInput;
|
|
57
109
|
}
|
|
@@ -99,6 +151,251 @@ export class BuyersPublicApi extends runtime.BaseAPI {
|
|
|
99
151
|
return await response.value();
|
|
100
152
|
}
|
|
101
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Returns a one-time ticket the landing opens GET /buyers/session/establish with, so the other landings can find the session.
|
|
156
|
+
* Get a ticket to remember the buyer session in the browser
|
|
157
|
+
*/
|
|
158
|
+
async createBuyerSessionEstablishTicketRaw(requestParameters: BuyersPublicApiCreateBuyerSessionEstablishTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuyerSessionEstablishTicketOutput>> {
|
|
159
|
+
if (requestParameters['createBuyerSessionEstablishTicketInput'] == null) {
|
|
160
|
+
throw new runtime.RequiredError(
|
|
161
|
+
'createBuyerSessionEstablishTicketInput',
|
|
162
|
+
'Required parameter "createBuyerSessionEstablishTicketInput" was null or undefined when calling createBuyerSessionEstablishTicket().'
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const queryParameters: any = {};
|
|
167
|
+
|
|
168
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
169
|
+
|
|
170
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
171
|
+
|
|
172
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
173
|
+
const token = this.configuration.accessToken;
|
|
174
|
+
const tokenString = await token("bearer", []);
|
|
175
|
+
|
|
176
|
+
if (tokenString) {
|
|
177
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const response = await this.request({
|
|
181
|
+
path: `/buyers/session/establish-ticket`,
|
|
182
|
+
method: 'POST',
|
|
183
|
+
headers: headerParameters,
|
|
184
|
+
query: queryParameters,
|
|
185
|
+
body: CreateBuyerSessionEstablishTicketInputToJSON(requestParameters['createBuyerSessionEstablishTicketInput']),
|
|
186
|
+
}, initOverrides);
|
|
187
|
+
|
|
188
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuyerSessionEstablishTicketOutputFromJSON(jsonValue));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Returns a one-time ticket the landing opens GET /buyers/session/establish with, so the other landings can find the session.
|
|
193
|
+
* Get a ticket to remember the buyer session in the browser
|
|
194
|
+
*/
|
|
195
|
+
async createBuyerSessionEstablishTicket(requestParameters: BuyersPublicApiCreateBuyerSessionEstablishTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuyerSessionEstablishTicketOutput> {
|
|
196
|
+
const response = await this.createBuyerSessionEstablishTicketRaw(requestParameters, initOverrides);
|
|
197
|
+
return await response.value();
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Returns a buyer session, without a proven email, for the buyer of an order, subscription or appraisal already paid.
|
|
202
|
+
* Remember the buyer of a paid purchase
|
|
203
|
+
*/
|
|
204
|
+
async createBuyerSessionFromPurchaseRaw(requestParameters: BuyersPublicApiCreateBuyerSessionFromPurchaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuyerLandingSessionOutput>> {
|
|
205
|
+
if (requestParameters['createBuyerSessionFromPurchaseInput'] == null) {
|
|
206
|
+
throw new runtime.RequiredError(
|
|
207
|
+
'createBuyerSessionFromPurchaseInput',
|
|
208
|
+
'Required parameter "createBuyerSessionFromPurchaseInput" was null or undefined when calling createBuyerSessionFromPurchase().'
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const queryParameters: any = {};
|
|
213
|
+
|
|
214
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
215
|
+
|
|
216
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
217
|
+
|
|
218
|
+
const response = await this.request({
|
|
219
|
+
path: `/buyers/session/from-purchase`,
|
|
220
|
+
method: 'POST',
|
|
221
|
+
headers: headerParameters,
|
|
222
|
+
query: queryParameters,
|
|
223
|
+
body: CreateBuyerSessionFromPurchaseInputToJSON(requestParameters['createBuyerSessionFromPurchaseInput']),
|
|
224
|
+
}, initOverrides);
|
|
225
|
+
|
|
226
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuyerLandingSessionOutputFromJSON(jsonValue));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Returns a buyer session, without a proven email, for the buyer of an order, subscription or appraisal already paid.
|
|
231
|
+
* Remember the buyer of a paid purchase
|
|
232
|
+
*/
|
|
233
|
+
async createBuyerSessionFromPurchase(requestParameters: BuyersPublicApiCreateBuyerSessionFromPurchaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuyerLandingSessionOutput> {
|
|
234
|
+
const response = await this.createBuyerSessionFromPurchaseRaw(requestParameters, initOverrides);
|
|
235
|
+
return await response.value();
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Trades the one-time code the landing received after the redirect for the buyer session of that landing.
|
|
240
|
+
* Exchange a buyer session code
|
|
241
|
+
*/
|
|
242
|
+
async exchangeBuyerSessionCodeRaw(requestParameters: BuyersPublicApiExchangeBuyerSessionCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuyerLandingSessionOutput>> {
|
|
243
|
+
if (requestParameters['exchangeBuyerSessionCodeInput'] == null) {
|
|
244
|
+
throw new runtime.RequiredError(
|
|
245
|
+
'exchangeBuyerSessionCodeInput',
|
|
246
|
+
'Required parameter "exchangeBuyerSessionCodeInput" was null or undefined when calling exchangeBuyerSessionCode().'
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const queryParameters: any = {};
|
|
251
|
+
|
|
252
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
253
|
+
|
|
254
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
255
|
+
|
|
256
|
+
const response = await this.request({
|
|
257
|
+
path: `/buyers/session/exchange`,
|
|
258
|
+
method: 'POST',
|
|
259
|
+
headers: headerParameters,
|
|
260
|
+
query: queryParameters,
|
|
261
|
+
body: ExchangeBuyerSessionCodeInputToJSON(requestParameters['exchangeBuyerSessionCodeInput']),
|
|
262
|
+
}, initOverrides);
|
|
263
|
+
|
|
264
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuyerLandingSessionOutputFromJSON(jsonValue));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Trades the one-time code the landing received after the redirect for the buyer session of that landing.
|
|
269
|
+
* Exchange a buyer session code
|
|
270
|
+
*/
|
|
271
|
+
async exchangeBuyerSessionCode(requestParameters: BuyersPublicApiExchangeBuyerSessionCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuyerLandingSessionOutput> {
|
|
272
|
+
const response = await this.exchangeBuyerSessionCodeRaw(requestParameters, initOverrides);
|
|
273
|
+
return await response.value();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Returns the buyer session of the landing token sent as bearer token, with a fresh token for the landing to keep.
|
|
278
|
+
* Get the buyer session
|
|
279
|
+
*/
|
|
280
|
+
async getBuyerSessionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuyerLandingSessionOutput>> {
|
|
281
|
+
const queryParameters: any = {};
|
|
282
|
+
|
|
283
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
284
|
+
|
|
285
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
286
|
+
const token = this.configuration.accessToken;
|
|
287
|
+
const tokenString = await token("bearer", []);
|
|
288
|
+
|
|
289
|
+
if (tokenString) {
|
|
290
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
const response = await this.request({
|
|
294
|
+
path: `/buyers/session`,
|
|
295
|
+
method: 'GET',
|
|
296
|
+
headers: headerParameters,
|
|
297
|
+
query: queryParameters,
|
|
298
|
+
}, initOverrides);
|
|
299
|
+
|
|
300
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuyerLandingSessionOutputFromJSON(jsonValue));
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Returns the buyer session of the landing token sent as bearer token, with a fresh token for the landing to keep.
|
|
305
|
+
* Get the buyer session
|
|
306
|
+
*/
|
|
307
|
+
async getBuyerSession(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuyerLandingSessionOutput> {
|
|
308
|
+
const response = await this.getBuyerSessionRaw(initOverrides);
|
|
309
|
+
return await response.value();
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Returns the billing details of one profile, to fill the checkout form with. Only for a session that proved its email.
|
|
314
|
+
* Get a checkout profile of the buyer session
|
|
315
|
+
*/
|
|
316
|
+
async getBuyerSessionCheckoutProfileRaw(requestParameters: BuyersPublicApiGetBuyerSessionCheckoutProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuyerCheckoutProfileDto>> {
|
|
317
|
+
if (requestParameters['profileId'] == null) {
|
|
318
|
+
throw new runtime.RequiredError(
|
|
319
|
+
'profileId',
|
|
320
|
+
'Required parameter "profileId" was null or undefined when calling getBuyerSessionCheckoutProfile().'
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const queryParameters: any = {};
|
|
325
|
+
|
|
326
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
327
|
+
|
|
328
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
329
|
+
const token = this.configuration.accessToken;
|
|
330
|
+
const tokenString = await token("bearer", []);
|
|
331
|
+
|
|
332
|
+
if (tokenString) {
|
|
333
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
const response = await this.request({
|
|
337
|
+
path: `/buyers/session/checkout-profiles/{profileId}`.replace(`{${"profileId"}}`, encodeURIComponent(String(requestParameters['profileId']))),
|
|
338
|
+
method: 'GET',
|
|
339
|
+
headers: headerParameters,
|
|
340
|
+
query: queryParameters,
|
|
341
|
+
}, initOverrides);
|
|
342
|
+
|
|
343
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuyerCheckoutProfileDtoFromJSON(jsonValue));
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Returns the billing details of one profile, to fill the checkout form with. Only for a session that proved its email.
|
|
348
|
+
* Get a checkout profile of the buyer session
|
|
349
|
+
*/
|
|
350
|
+
async getBuyerSessionCheckoutProfile(requestParameters: BuyersPublicApiGetBuyerSessionCheckoutProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuyerCheckoutProfileDto> {
|
|
351
|
+
const response = await this.getBuyerSessionCheckoutProfileRaw(requestParameters, initOverrides);
|
|
352
|
+
return await response.value();
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Returns a summary of the billing details the buyer paid with before, most recently used first. Only for a session that proved its email, and none for a purchase of another buyer.
|
|
357
|
+
* List the checkout profiles of the buyer session
|
|
358
|
+
*/
|
|
359
|
+
async listBuyerSessionCheckoutProfilesRaw(requestParameters: BuyersPublicApiListBuyerSessionCheckoutProfilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<BuyerCheckoutProfileSummaryDto>>> {
|
|
360
|
+
const queryParameters: any = {};
|
|
361
|
+
|
|
362
|
+
if (requestParameters['purchaseType'] != null) {
|
|
363
|
+
queryParameters['purchaseType'] = requestParameters['purchaseType'];
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (requestParameters['purchaseId'] != null) {
|
|
367
|
+
queryParameters['purchaseId'] = requestParameters['purchaseId'];
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
371
|
+
|
|
372
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
373
|
+
const token = this.configuration.accessToken;
|
|
374
|
+
const tokenString = await token("bearer", []);
|
|
375
|
+
|
|
376
|
+
if (tokenString) {
|
|
377
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
const response = await this.request({
|
|
381
|
+
path: `/buyers/session/checkout-profiles`,
|
|
382
|
+
method: 'GET',
|
|
383
|
+
headers: headerParameters,
|
|
384
|
+
query: queryParameters,
|
|
385
|
+
}, initOverrides);
|
|
386
|
+
|
|
387
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BuyerCheckoutProfileSummaryDtoFromJSON));
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Returns a summary of the billing details the buyer paid with before, most recently used first. Only for a session that proved its email, and none for a purchase of another buyer.
|
|
392
|
+
* List the checkout profiles of the buyer session
|
|
393
|
+
*/
|
|
394
|
+
async listBuyerSessionCheckoutProfiles(requestParameters: BuyersPublicApiListBuyerSessionCheckoutProfilesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<BuyerCheckoutProfileSummaryDto>> {
|
|
395
|
+
const response = await this.listBuyerSessionCheckoutProfilesRaw(requestParameters, initOverrides);
|
|
396
|
+
return await response.value();
|
|
397
|
+
}
|
|
398
|
+
|
|
102
399
|
/**
|
|
103
400
|
* Sends an access token to the buyer email if the account exists. Always returns success regardless of email validity to prevent account enumeration.
|
|
104
401
|
* Request a magic-link access token
|
|
@@ -136,6 +433,41 @@ export class BuyersPublicApi extends runtime.BaseAPI {
|
|
|
136
433
|
await this.requestAccessTokenRaw(requestParameters, initOverrides);
|
|
137
434
|
}
|
|
138
435
|
|
|
436
|
+
/**
|
|
437
|
+
* Sends a code to the email of a buyer session that has not proven it yet.
|
|
438
|
+
* Email a code to prove the buyer session
|
|
439
|
+
*/
|
|
440
|
+
async requestBuyerSessionEmailOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
441
|
+
const queryParameters: any = {};
|
|
442
|
+
|
|
443
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
444
|
+
|
|
445
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
446
|
+
const token = this.configuration.accessToken;
|
|
447
|
+
const tokenString = await token("bearer", []);
|
|
448
|
+
|
|
449
|
+
if (tokenString) {
|
|
450
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
const response = await this.request({
|
|
454
|
+
path: `/buyers/session/request-email-otp`,
|
|
455
|
+
method: 'POST',
|
|
456
|
+
headers: headerParameters,
|
|
457
|
+
query: queryParameters,
|
|
458
|
+
}, initOverrides);
|
|
459
|
+
|
|
460
|
+
return new runtime.VoidApiResponse(response);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Sends a code to the email of a buyer session that has not proven it yet.
|
|
465
|
+
* Email a code to prove the buyer session
|
|
466
|
+
*/
|
|
467
|
+
async requestBuyerSessionEmailOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
468
|
+
await this.requestBuyerSessionEmailOtpRaw(initOverrides);
|
|
469
|
+
}
|
|
470
|
+
|
|
139
471
|
/**
|
|
140
472
|
* Sends a one-time password to the buyer email address for auction authentication.
|
|
141
473
|
* Request email OTP
|
|
@@ -173,6 +505,52 @@ export class BuyersPublicApi extends runtime.BaseAPI {
|
|
|
173
505
|
await this.requestEmailOtpRaw(requestParameters, initOverrides);
|
|
174
506
|
}
|
|
175
507
|
|
|
508
|
+
/**
|
|
509
|
+
* Checks the code emailed to the buyer; once right, the session counts as proven on every landing that uses it.
|
|
510
|
+
* Prove the email of the buyer session
|
|
511
|
+
*/
|
|
512
|
+
async verifyBuyerSessionEmailOtpRaw(requestParameters: BuyersPublicApiVerifyBuyerSessionEmailOtpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuyerLandingSessionOutput>> {
|
|
513
|
+
if (requestParameters['verifyBuyerSessionEmailOtpInput'] == null) {
|
|
514
|
+
throw new runtime.RequiredError(
|
|
515
|
+
'verifyBuyerSessionEmailOtpInput',
|
|
516
|
+
'Required parameter "verifyBuyerSessionEmailOtpInput" was null or undefined when calling verifyBuyerSessionEmailOtp().'
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
const queryParameters: any = {};
|
|
521
|
+
|
|
522
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
523
|
+
|
|
524
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
525
|
+
|
|
526
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
527
|
+
const token = this.configuration.accessToken;
|
|
528
|
+
const tokenString = await token("bearer", []);
|
|
529
|
+
|
|
530
|
+
if (tokenString) {
|
|
531
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
const response = await this.request({
|
|
535
|
+
path: `/buyers/session/verify-email-otp`,
|
|
536
|
+
method: 'POST',
|
|
537
|
+
headers: headerParameters,
|
|
538
|
+
query: queryParameters,
|
|
539
|
+
body: VerifyBuyerSessionEmailOtpInputToJSON(requestParameters['verifyBuyerSessionEmailOtpInput']),
|
|
540
|
+
}, initOverrides);
|
|
541
|
+
|
|
542
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuyerLandingSessionOutputFromJSON(jsonValue));
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Checks the code emailed to the buyer; once right, the session counts as proven on every landing that uses it.
|
|
547
|
+
* Prove the email of the buyer session
|
|
548
|
+
*/
|
|
549
|
+
async verifyBuyerSessionEmailOtp(requestParameters: BuyersPublicApiVerifyBuyerSessionEmailOtpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuyerLandingSessionOutput> {
|
|
550
|
+
const response = await this.verifyBuyerSessionEmailOtpRaw(requestParameters, initOverrides);
|
|
551
|
+
return await response.value();
|
|
552
|
+
}
|
|
553
|
+
|
|
176
554
|
/**
|
|
177
555
|
* Verifies the email OTP and returns an auction buyer session token.
|
|
178
556
|
* Verify email OTP
|
package/src/apis/LeadsApi.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
AcceptHighestBuyerLeadOfferInput,
|
|
18
19
|
BadRequestException,
|
|
19
20
|
BatchReadSellerLeadMessageInput,
|
|
20
21
|
CreateLeadMessageInput,
|
|
@@ -22,6 +23,7 @@ import type {
|
|
|
22
23
|
LeadEnrichmentDto,
|
|
23
24
|
LeadLeaseToOwnAndRentConfigurationPresetsDto,
|
|
24
25
|
LeadOfferExpirationConfigurationInput,
|
|
26
|
+
LeadOfferSummaryDto,
|
|
25
27
|
LeadQuickReplyListDto,
|
|
26
28
|
List200Response,
|
|
27
29
|
ListAdminRelatedLeads200Response,
|
|
@@ -35,6 +37,8 @@ import type {
|
|
|
35
37
|
ValidationException,
|
|
36
38
|
} from '../models/index';
|
|
37
39
|
import {
|
|
40
|
+
AcceptHighestBuyerLeadOfferInputFromJSON,
|
|
41
|
+
AcceptHighestBuyerLeadOfferInputToJSON,
|
|
38
42
|
BadRequestExceptionFromJSON,
|
|
39
43
|
BadRequestExceptionToJSON,
|
|
40
44
|
BatchReadSellerLeadMessageInputFromJSON,
|
|
@@ -49,6 +53,8 @@ import {
|
|
|
49
53
|
LeadLeaseToOwnAndRentConfigurationPresetsDtoToJSON,
|
|
50
54
|
LeadOfferExpirationConfigurationInputFromJSON,
|
|
51
55
|
LeadOfferExpirationConfigurationInputToJSON,
|
|
56
|
+
LeadOfferSummaryDtoFromJSON,
|
|
57
|
+
LeadOfferSummaryDtoToJSON,
|
|
52
58
|
LeadQuickReplyListDtoFromJSON,
|
|
53
59
|
LeadQuickReplyListDtoToJSON,
|
|
54
60
|
List200ResponseFromJSON,
|
|
@@ -73,6 +79,11 @@ import {
|
|
|
73
79
|
ValidationExceptionToJSON,
|
|
74
80
|
} from '../models/index';
|
|
75
81
|
|
|
82
|
+
export interface LeadsApiAcceptHighestBuyerLeadOfferRequest {
|
|
83
|
+
leadId: string;
|
|
84
|
+
acceptHighestBuyerLeadOfferInput: AcceptHighestBuyerLeadOfferInput;
|
|
85
|
+
}
|
|
86
|
+
|
|
76
87
|
export interface LeadsApiAcceptLeadOfferRequest {
|
|
77
88
|
leadId: string;
|
|
78
89
|
}
|
|
@@ -107,6 +118,10 @@ export interface LeadsApiGetLeadEnrichmentRequest {
|
|
|
107
118
|
leadId: string;
|
|
108
119
|
}
|
|
109
120
|
|
|
121
|
+
export interface LeadsApiGetLeadOfferSummaryRequest {
|
|
122
|
+
leadId: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
110
125
|
export interface LeadsApiGetLeadQuickRepliesRequest {
|
|
111
126
|
leadId: string;
|
|
112
127
|
}
|
|
@@ -175,6 +190,62 @@ export interface LeadsApiUpdateLeadOfferExpirationConfigurationRequest {
|
|
|
175
190
|
*/
|
|
176
191
|
export class LeadsApi extends runtime.BaseAPI {
|
|
177
192
|
|
|
193
|
+
/**
|
|
194
|
+
* Accepts the highest offer the buyer made, at any time, replacing the seller counter-offer that may be open. Creates the order and emails the buyer the payment link. `leadMessageId` is the offer the seller confirmed (see the offer summary); the request is refused when it is not the highest buyer offer any more. Validation error codes: NO_BUYER_OFFER, HIGHEST_BUYER_OFFER_CHANGED, MANUAL_LEAD, DOMAIN_IS_LOCKED, DOMAIN_HAS_AN_AUCTION, DOMAIN_IS_NOT_PURCHASABLE, MESSAGE_LIMIT_REACHED. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
195
|
+
* Accept the highest buyer offer
|
|
196
|
+
*/
|
|
197
|
+
async acceptHighestBuyerLeadOfferRaw(requestParameters: LeadsApiAcceptHighestBuyerLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
198
|
+
if (requestParameters['leadId'] == null) {
|
|
199
|
+
throw new runtime.RequiredError(
|
|
200
|
+
'leadId',
|
|
201
|
+
'Required parameter "leadId" was null or undefined when calling acceptHighestBuyerLeadOffer().'
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (requestParameters['acceptHighestBuyerLeadOfferInput'] == null) {
|
|
206
|
+
throw new runtime.RequiredError(
|
|
207
|
+
'acceptHighestBuyerLeadOfferInput',
|
|
208
|
+
'Required parameter "acceptHighestBuyerLeadOfferInput" was null or undefined when calling acceptHighestBuyerLeadOffer().'
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const queryParameters: any = {};
|
|
213
|
+
|
|
214
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
215
|
+
|
|
216
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
217
|
+
|
|
218
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
219
|
+
headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
223
|
+
const token = this.configuration.accessToken;
|
|
224
|
+
const tokenString = await token("bearer", []);
|
|
225
|
+
|
|
226
|
+
if (tokenString) {
|
|
227
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
const response = await this.request({
|
|
231
|
+
path: `/private/leads/{leadId}/status/accept-highest-buyer-offer`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
|
|
232
|
+
method: 'POST',
|
|
233
|
+
headers: headerParameters,
|
|
234
|
+
query: queryParameters,
|
|
235
|
+
body: AcceptHighestBuyerLeadOfferInputToJSON(requestParameters['acceptHighestBuyerLeadOfferInput']),
|
|
236
|
+
}, initOverrides);
|
|
237
|
+
|
|
238
|
+
return new runtime.VoidApiResponse(response);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Accepts the highest offer the buyer made, at any time, replacing the seller counter-offer that may be open. Creates the order and emails the buyer the payment link. `leadMessageId` is the offer the seller confirmed (see the offer summary); the request is refused when it is not the highest buyer offer any more. Validation error codes: NO_BUYER_OFFER, HIGHEST_BUYER_OFFER_CHANGED, MANUAL_LEAD, DOMAIN_IS_LOCKED, DOMAIN_HAS_AN_AUCTION, DOMAIN_IS_NOT_PURCHASABLE, MESSAGE_LIMIT_REACHED. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
243
|
+
* Accept the highest buyer offer
|
|
244
|
+
*/
|
|
245
|
+
async acceptHighestBuyerLeadOffer(requestParameters: LeadsApiAcceptHighestBuyerLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
246
|
+
await this.acceptHighestBuyerLeadOfferRaw(requestParameters, initOverrides);
|
|
247
|
+
}
|
|
248
|
+
|
|
178
249
|
/**
|
|
179
250
|
* Accepts the current buyer offer on the lead and advances the negotiation. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
180
251
|
* Accept the buyer offer
|
|
@@ -609,6 +680,53 @@ export class LeadsApi extends runtime.BaseAPI {
|
|
|
609
680
|
return await response.value();
|
|
610
681
|
}
|
|
611
682
|
|
|
683
|
+
/**
|
|
684
|
+
* Returns the highest buyer offer and the lowest seller offer of the negotiation (plain purchase offers in the domain currency, not withdrawn), and whether the highest buyer offer can be accepted now. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
685
|
+
* Get the offer summary of a lead
|
|
686
|
+
*/
|
|
687
|
+
async getLeadOfferSummaryRaw(requestParameters: LeadsApiGetLeadOfferSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadOfferSummaryDto>> {
|
|
688
|
+
if (requestParameters['leadId'] == null) {
|
|
689
|
+
throw new runtime.RequiredError(
|
|
690
|
+
'leadId',
|
|
691
|
+
'Required parameter "leadId" was null or undefined when calling getLeadOfferSummary().'
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
const queryParameters: any = {};
|
|
696
|
+
|
|
697
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
698
|
+
|
|
699
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
700
|
+
headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
704
|
+
const token = this.configuration.accessToken;
|
|
705
|
+
const tokenString = await token("bearer", []);
|
|
706
|
+
|
|
707
|
+
if (tokenString) {
|
|
708
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
const response = await this.request({
|
|
712
|
+
path: `/private/leads/{leadId}/offer-summary`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
|
|
713
|
+
method: 'GET',
|
|
714
|
+
headers: headerParameters,
|
|
715
|
+
query: queryParameters,
|
|
716
|
+
}, initOverrides);
|
|
717
|
+
|
|
718
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LeadOfferSummaryDtoFromJSON(jsonValue));
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Returns the highest buyer offer and the lowest seller offer of the negotiation (plain purchase offers in the domain currency, not withdrawn), and whether the highest buyer offer can be accepted now. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
723
|
+
* Get the offer summary of a lead
|
|
724
|
+
*/
|
|
725
|
+
async getLeadOfferSummary(requestParameters: LeadsApiGetLeadOfferSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadOfferSummaryDto> {
|
|
726
|
+
const response = await this.getLeadOfferSummaryRaw(requestParameters, initOverrides);
|
|
727
|
+
return await response.value();
|
|
728
|
+
}
|
|
729
|
+
|
|
612
730
|
/**
|
|
613
731
|
* Lists the quick replies of the seller account with their variables replaced by the values of the lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
614
732
|
* List quick replies for a lead
|
|
@@ -19,7 +19,9 @@ import type {
|
|
|
19
19
|
BadRequestException,
|
|
20
20
|
CreateInformationRequestLeadInput,
|
|
21
21
|
CreateLeadInput,
|
|
22
|
+
LeadEmailVerificationResultOutput,
|
|
22
23
|
LeadPhoneVerificationDeliveryDto,
|
|
24
|
+
LeadPhoneVerificationResultOutput,
|
|
23
25
|
LeadPhoneVerificationTooSoonOutput,
|
|
24
26
|
LeadPhoneVerificationUnavailableOutput,
|
|
25
27
|
LeadStatusDto,
|
|
@@ -41,8 +43,12 @@ import {
|
|
|
41
43
|
CreateInformationRequestLeadInputToJSON,
|
|
42
44
|
CreateLeadInputFromJSON,
|
|
43
45
|
CreateLeadInputToJSON,
|
|
46
|
+
LeadEmailVerificationResultOutputFromJSON,
|
|
47
|
+
LeadEmailVerificationResultOutputToJSON,
|
|
44
48
|
LeadPhoneVerificationDeliveryDtoFromJSON,
|
|
45
49
|
LeadPhoneVerificationDeliveryDtoToJSON,
|
|
50
|
+
LeadPhoneVerificationResultOutputFromJSON,
|
|
51
|
+
LeadPhoneVerificationResultOutputToJSON,
|
|
46
52
|
LeadPhoneVerificationTooSoonOutputFromJSON,
|
|
47
53
|
LeadPhoneVerificationTooSoonOutputToJSON,
|
|
48
54
|
LeadPhoneVerificationUnavailableOutputFromJSON,
|
|
@@ -488,7 +494,7 @@ export class LeadsPublicApi extends runtime.BaseAPI {
|
|
|
488
494
|
* Verifies a lead using the one-time code sent to the buyer email. No authentication required.
|
|
489
495
|
* Verify a lead
|
|
490
496
|
*/
|
|
491
|
-
async verifyLeadRaw(requestParameters: LeadsPublicApiVerifyLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
497
|
+
async verifyLeadRaw(requestParameters: LeadsPublicApiVerifyLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadEmailVerificationResultOutput>> {
|
|
492
498
|
if (requestParameters['leadId'] == null) {
|
|
493
499
|
throw new runtime.RequiredError(
|
|
494
500
|
'leadId',
|
|
@@ -517,22 +523,23 @@ export class LeadsPublicApi extends runtime.BaseAPI {
|
|
|
517
523
|
body: VerifyLeadInputToJSON(requestParameters['verifyLeadInput']),
|
|
518
524
|
}, initOverrides);
|
|
519
525
|
|
|
520
|
-
return new runtime.
|
|
526
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LeadEmailVerificationResultOutputFromJSON(jsonValue));
|
|
521
527
|
}
|
|
522
528
|
|
|
523
529
|
/**
|
|
524
530
|
* Verifies a lead using the one-time code sent to the buyer email. No authentication required.
|
|
525
531
|
* Verify a lead
|
|
526
532
|
*/
|
|
527
|
-
async verifyLead(requestParameters: LeadsPublicApiVerifyLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
528
|
-
await this.verifyLeadRaw(requestParameters, initOverrides);
|
|
533
|
+
async verifyLead(requestParameters: LeadsPublicApiVerifyLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadEmailVerificationResultOutput> {
|
|
534
|
+
const response = await this.verifyLeadRaw(requestParameters, initOverrides);
|
|
535
|
+
return await response.value();
|
|
529
536
|
}
|
|
530
537
|
|
|
531
538
|
/**
|
|
532
539
|
* Checks the one-time code the buyer received by Telegram, WhatsApp, SMS or a voice call. No authentication required.
|
|
533
540
|
* Verify a lead phone code
|
|
534
541
|
*/
|
|
535
|
-
async verifyLeadPhoneRaw(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
542
|
+
async verifyLeadPhoneRaw(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadPhoneVerificationResultOutput>> {
|
|
536
543
|
if (requestParameters['leadId'] == null) {
|
|
537
544
|
throw new runtime.RequiredError(
|
|
538
545
|
'leadId',
|
|
@@ -561,14 +568,14 @@ export class LeadsPublicApi extends runtime.BaseAPI {
|
|
|
561
568
|
body: VerifyLeadPhoneInputToJSON(requestParameters['verifyLeadPhoneInput']),
|
|
562
569
|
}, initOverrides);
|
|
563
570
|
|
|
564
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
571
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LeadPhoneVerificationResultOutputFromJSON(jsonValue));
|
|
565
572
|
}
|
|
566
573
|
|
|
567
574
|
/**
|
|
568
575
|
* Checks the one-time code the buyer received by Telegram, WhatsApp, SMS or a voice call. No authentication required.
|
|
569
576
|
* Verify a lead phone code
|
|
570
577
|
*/
|
|
571
|
-
async verifyLeadPhone(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
578
|
+
async verifyLeadPhone(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadPhoneVerificationResultOutput> {
|
|
572
579
|
const response = await this.verifyLeadPhoneRaw(requestParameters, initOverrides);
|
|
573
580
|
return await response.value();
|
|
574
581
|
}
|