@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
|
@@ -123,6 +123,325 @@ var BuyersPublicApi = /** @class */ (function (_super) {
|
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
|
+
/**
|
|
127
|
+
* Returns a one-time ticket the landing opens GET /buyers/session/establish with, so the other landings can find the session.
|
|
128
|
+
* Get a ticket to remember the buyer session in the browser
|
|
129
|
+
*/
|
|
130
|
+
BuyersPublicApi.prototype.createBuyerSessionEstablishTicketRaw = function (requestParameters, initOverrides) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
132
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
133
|
+
return __generator(this, function (_a) {
|
|
134
|
+
switch (_a.label) {
|
|
135
|
+
case 0:
|
|
136
|
+
if (requestParameters['createBuyerSessionEstablishTicketInput'] == null) {
|
|
137
|
+
throw new runtime.RequiredError('createBuyerSessionEstablishTicketInput', 'Required parameter "createBuyerSessionEstablishTicketInput" was null or undefined when calling createBuyerSessionEstablishTicket().');
|
|
138
|
+
}
|
|
139
|
+
queryParameters = {};
|
|
140
|
+
headerParameters = {};
|
|
141
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
142
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
143
|
+
token = this.configuration.accessToken;
|
|
144
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
145
|
+
case 1:
|
|
146
|
+
tokenString = _a.sent();
|
|
147
|
+
if (tokenString) {
|
|
148
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
149
|
+
}
|
|
150
|
+
_a.label = 2;
|
|
151
|
+
case 2: return [4 /*yield*/, this.request({
|
|
152
|
+
path: "/buyers/session/establish-ticket",
|
|
153
|
+
method: 'POST',
|
|
154
|
+
headers: headerParameters,
|
|
155
|
+
query: queryParameters,
|
|
156
|
+
body: (0, index_1.CreateBuyerSessionEstablishTicketInputToJSON)(requestParameters['createBuyerSessionEstablishTicketInput']),
|
|
157
|
+
}, initOverrides)];
|
|
158
|
+
case 3:
|
|
159
|
+
response = _a.sent();
|
|
160
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.BuyerSessionEstablishTicketOutputFromJSON)(jsonValue); })];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Returns a one-time ticket the landing opens GET /buyers/session/establish with, so the other landings can find the session.
|
|
167
|
+
* Get a ticket to remember the buyer session in the browser
|
|
168
|
+
*/
|
|
169
|
+
BuyersPublicApi.prototype.createBuyerSessionEstablishTicket = function (requestParameters, initOverrides) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
171
|
+
var response;
|
|
172
|
+
return __generator(this, function (_a) {
|
|
173
|
+
switch (_a.label) {
|
|
174
|
+
case 0: return [4 /*yield*/, this.createBuyerSessionEstablishTicketRaw(requestParameters, initOverrides)];
|
|
175
|
+
case 1:
|
|
176
|
+
response = _a.sent();
|
|
177
|
+
return [4 /*yield*/, response.value()];
|
|
178
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Returns a buyer session, without a proven email, for the buyer of an order, subscription or appraisal already paid.
|
|
185
|
+
* Remember the buyer of a paid purchase
|
|
186
|
+
*/
|
|
187
|
+
BuyersPublicApi.prototype.createBuyerSessionFromPurchaseRaw = function (requestParameters, initOverrides) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
189
|
+
var queryParameters, headerParameters, response;
|
|
190
|
+
return __generator(this, function (_a) {
|
|
191
|
+
switch (_a.label) {
|
|
192
|
+
case 0:
|
|
193
|
+
if (requestParameters['createBuyerSessionFromPurchaseInput'] == null) {
|
|
194
|
+
throw new runtime.RequiredError('createBuyerSessionFromPurchaseInput', 'Required parameter "createBuyerSessionFromPurchaseInput" was null or undefined when calling createBuyerSessionFromPurchase().');
|
|
195
|
+
}
|
|
196
|
+
queryParameters = {};
|
|
197
|
+
headerParameters = {};
|
|
198
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
199
|
+
return [4 /*yield*/, this.request({
|
|
200
|
+
path: "/buyers/session/from-purchase",
|
|
201
|
+
method: 'POST',
|
|
202
|
+
headers: headerParameters,
|
|
203
|
+
query: queryParameters,
|
|
204
|
+
body: (0, index_1.CreateBuyerSessionFromPurchaseInputToJSON)(requestParameters['createBuyerSessionFromPurchaseInput']),
|
|
205
|
+
}, initOverrides)];
|
|
206
|
+
case 1:
|
|
207
|
+
response = _a.sent();
|
|
208
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.BuyerLandingSessionOutputFromJSON)(jsonValue); })];
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Returns a buyer session, without a proven email, for the buyer of an order, subscription or appraisal already paid.
|
|
215
|
+
* Remember the buyer of a paid purchase
|
|
216
|
+
*/
|
|
217
|
+
BuyersPublicApi.prototype.createBuyerSessionFromPurchase = function (requestParameters, initOverrides) {
|
|
218
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
219
|
+
var response;
|
|
220
|
+
return __generator(this, function (_a) {
|
|
221
|
+
switch (_a.label) {
|
|
222
|
+
case 0: return [4 /*yield*/, this.createBuyerSessionFromPurchaseRaw(requestParameters, initOverrides)];
|
|
223
|
+
case 1:
|
|
224
|
+
response = _a.sent();
|
|
225
|
+
return [4 /*yield*/, response.value()];
|
|
226
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Trades the one-time code the landing received after the redirect for the buyer session of that landing.
|
|
233
|
+
* Exchange a buyer session code
|
|
234
|
+
*/
|
|
235
|
+
BuyersPublicApi.prototype.exchangeBuyerSessionCodeRaw = function (requestParameters, initOverrides) {
|
|
236
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
237
|
+
var queryParameters, headerParameters, response;
|
|
238
|
+
return __generator(this, function (_a) {
|
|
239
|
+
switch (_a.label) {
|
|
240
|
+
case 0:
|
|
241
|
+
if (requestParameters['exchangeBuyerSessionCodeInput'] == null) {
|
|
242
|
+
throw new runtime.RequiredError('exchangeBuyerSessionCodeInput', 'Required parameter "exchangeBuyerSessionCodeInput" was null or undefined when calling exchangeBuyerSessionCode().');
|
|
243
|
+
}
|
|
244
|
+
queryParameters = {};
|
|
245
|
+
headerParameters = {};
|
|
246
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
247
|
+
return [4 /*yield*/, this.request({
|
|
248
|
+
path: "/buyers/session/exchange",
|
|
249
|
+
method: 'POST',
|
|
250
|
+
headers: headerParameters,
|
|
251
|
+
query: queryParameters,
|
|
252
|
+
body: (0, index_1.ExchangeBuyerSessionCodeInputToJSON)(requestParameters['exchangeBuyerSessionCodeInput']),
|
|
253
|
+
}, initOverrides)];
|
|
254
|
+
case 1:
|
|
255
|
+
response = _a.sent();
|
|
256
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.BuyerLandingSessionOutputFromJSON)(jsonValue); })];
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Trades the one-time code the landing received after the redirect for the buyer session of that landing.
|
|
263
|
+
* Exchange a buyer session code
|
|
264
|
+
*/
|
|
265
|
+
BuyersPublicApi.prototype.exchangeBuyerSessionCode = function (requestParameters, initOverrides) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
267
|
+
var response;
|
|
268
|
+
return __generator(this, function (_a) {
|
|
269
|
+
switch (_a.label) {
|
|
270
|
+
case 0: return [4 /*yield*/, this.exchangeBuyerSessionCodeRaw(requestParameters, initOverrides)];
|
|
271
|
+
case 1:
|
|
272
|
+
response = _a.sent();
|
|
273
|
+
return [4 /*yield*/, response.value()];
|
|
274
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Returns the buyer session of the landing token sent as bearer token, with a fresh token for the landing to keep.
|
|
281
|
+
* Get the buyer session
|
|
282
|
+
*/
|
|
283
|
+
BuyersPublicApi.prototype.getBuyerSessionRaw = function (initOverrides) {
|
|
284
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
285
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
286
|
+
return __generator(this, function (_a) {
|
|
287
|
+
switch (_a.label) {
|
|
288
|
+
case 0:
|
|
289
|
+
queryParameters = {};
|
|
290
|
+
headerParameters = {};
|
|
291
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
292
|
+
token = this.configuration.accessToken;
|
|
293
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
294
|
+
case 1:
|
|
295
|
+
tokenString = _a.sent();
|
|
296
|
+
if (tokenString) {
|
|
297
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
298
|
+
}
|
|
299
|
+
_a.label = 2;
|
|
300
|
+
case 2: return [4 /*yield*/, this.request({
|
|
301
|
+
path: "/buyers/session",
|
|
302
|
+
method: 'GET',
|
|
303
|
+
headers: headerParameters,
|
|
304
|
+
query: queryParameters,
|
|
305
|
+
}, initOverrides)];
|
|
306
|
+
case 3:
|
|
307
|
+
response = _a.sent();
|
|
308
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.BuyerLandingSessionOutputFromJSON)(jsonValue); })];
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Returns the buyer session of the landing token sent as bearer token, with a fresh token for the landing to keep.
|
|
315
|
+
* Get the buyer session
|
|
316
|
+
*/
|
|
317
|
+
BuyersPublicApi.prototype.getBuyerSession = function (initOverrides) {
|
|
318
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
319
|
+
var response;
|
|
320
|
+
return __generator(this, function (_a) {
|
|
321
|
+
switch (_a.label) {
|
|
322
|
+
case 0: return [4 /*yield*/, this.getBuyerSessionRaw(initOverrides)];
|
|
323
|
+
case 1:
|
|
324
|
+
response = _a.sent();
|
|
325
|
+
return [4 /*yield*/, response.value()];
|
|
326
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* Returns the billing details of one profile, to fill the checkout form with. Only for a session that proved its email.
|
|
333
|
+
* Get a checkout profile of the buyer session
|
|
334
|
+
*/
|
|
335
|
+
BuyersPublicApi.prototype.getBuyerSessionCheckoutProfileRaw = function (requestParameters, initOverrides) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
337
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
338
|
+
return __generator(this, function (_a) {
|
|
339
|
+
switch (_a.label) {
|
|
340
|
+
case 0:
|
|
341
|
+
if (requestParameters['profileId'] == null) {
|
|
342
|
+
throw new runtime.RequiredError('profileId', 'Required parameter "profileId" was null or undefined when calling getBuyerSessionCheckoutProfile().');
|
|
343
|
+
}
|
|
344
|
+
queryParameters = {};
|
|
345
|
+
headerParameters = {};
|
|
346
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
347
|
+
token = this.configuration.accessToken;
|
|
348
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
349
|
+
case 1:
|
|
350
|
+
tokenString = _a.sent();
|
|
351
|
+
if (tokenString) {
|
|
352
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
353
|
+
}
|
|
354
|
+
_a.label = 2;
|
|
355
|
+
case 2: return [4 /*yield*/, this.request({
|
|
356
|
+
path: "/buyers/session/checkout-profiles/{profileId}".replace("{".concat("profileId", "}"), encodeURIComponent(String(requestParameters['profileId']))),
|
|
357
|
+
method: 'GET',
|
|
358
|
+
headers: headerParameters,
|
|
359
|
+
query: queryParameters,
|
|
360
|
+
}, initOverrides)];
|
|
361
|
+
case 3:
|
|
362
|
+
response = _a.sent();
|
|
363
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.BuyerCheckoutProfileDtoFromJSON)(jsonValue); })];
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Returns the billing details of one profile, to fill the checkout form with. Only for a session that proved its email.
|
|
370
|
+
* Get a checkout profile of the buyer session
|
|
371
|
+
*/
|
|
372
|
+
BuyersPublicApi.prototype.getBuyerSessionCheckoutProfile = function (requestParameters, initOverrides) {
|
|
373
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
374
|
+
var response;
|
|
375
|
+
return __generator(this, function (_a) {
|
|
376
|
+
switch (_a.label) {
|
|
377
|
+
case 0: return [4 /*yield*/, this.getBuyerSessionCheckoutProfileRaw(requestParameters, initOverrides)];
|
|
378
|
+
case 1:
|
|
379
|
+
response = _a.sent();
|
|
380
|
+
return [4 /*yield*/, response.value()];
|
|
381
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* 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.
|
|
388
|
+
* List the checkout profiles of the buyer session
|
|
389
|
+
*/
|
|
390
|
+
BuyersPublicApi.prototype.listBuyerSessionCheckoutProfilesRaw = function (requestParameters, initOverrides) {
|
|
391
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
392
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
393
|
+
return __generator(this, function (_a) {
|
|
394
|
+
switch (_a.label) {
|
|
395
|
+
case 0:
|
|
396
|
+
queryParameters = {};
|
|
397
|
+
if (requestParameters['purchaseType'] != null) {
|
|
398
|
+
queryParameters['purchaseType'] = requestParameters['purchaseType'];
|
|
399
|
+
}
|
|
400
|
+
if (requestParameters['purchaseId'] != null) {
|
|
401
|
+
queryParameters['purchaseId'] = requestParameters['purchaseId'];
|
|
402
|
+
}
|
|
403
|
+
headerParameters = {};
|
|
404
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
405
|
+
token = this.configuration.accessToken;
|
|
406
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
407
|
+
case 1:
|
|
408
|
+
tokenString = _a.sent();
|
|
409
|
+
if (tokenString) {
|
|
410
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
411
|
+
}
|
|
412
|
+
_a.label = 2;
|
|
413
|
+
case 2: return [4 /*yield*/, this.request({
|
|
414
|
+
path: "/buyers/session/checkout-profiles",
|
|
415
|
+
method: 'GET',
|
|
416
|
+
headers: headerParameters,
|
|
417
|
+
query: queryParameters,
|
|
418
|
+
}, initOverrides)];
|
|
419
|
+
case 3:
|
|
420
|
+
response = _a.sent();
|
|
421
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.BuyerCheckoutProfileSummaryDtoFromJSON); })];
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
};
|
|
426
|
+
/**
|
|
427
|
+
* 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.
|
|
428
|
+
* List the checkout profiles of the buyer session
|
|
429
|
+
*/
|
|
430
|
+
BuyersPublicApi.prototype.listBuyerSessionCheckoutProfiles = function () {
|
|
431
|
+
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
432
|
+
var response;
|
|
433
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
434
|
+
return __generator(this, function (_a) {
|
|
435
|
+
switch (_a.label) {
|
|
436
|
+
case 0: return [4 /*yield*/, this.listBuyerSessionCheckoutProfilesRaw(requestParameters, initOverrides)];
|
|
437
|
+
case 1:
|
|
438
|
+
response = _a.sent();
|
|
439
|
+
return [4 /*yield*/, response.value()];
|
|
440
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
};
|
|
126
445
|
/**
|
|
127
446
|
* Sends an access token to the buyer email if the account exists. Always returns success regardless of email validity to prevent account enumeration.
|
|
128
447
|
* Request a magic-link access token
|
|
@@ -169,6 +488,56 @@ var BuyersPublicApi = /** @class */ (function (_super) {
|
|
|
169
488
|
});
|
|
170
489
|
});
|
|
171
490
|
};
|
|
491
|
+
/**
|
|
492
|
+
* Sends a code to the email of a buyer session that has not proven it yet.
|
|
493
|
+
* Email a code to prove the buyer session
|
|
494
|
+
*/
|
|
495
|
+
BuyersPublicApi.prototype.requestBuyerSessionEmailOtpRaw = function (initOverrides) {
|
|
496
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
497
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
498
|
+
return __generator(this, function (_a) {
|
|
499
|
+
switch (_a.label) {
|
|
500
|
+
case 0:
|
|
501
|
+
queryParameters = {};
|
|
502
|
+
headerParameters = {};
|
|
503
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
504
|
+
token = this.configuration.accessToken;
|
|
505
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
506
|
+
case 1:
|
|
507
|
+
tokenString = _a.sent();
|
|
508
|
+
if (tokenString) {
|
|
509
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
510
|
+
}
|
|
511
|
+
_a.label = 2;
|
|
512
|
+
case 2: return [4 /*yield*/, this.request({
|
|
513
|
+
path: "/buyers/session/request-email-otp",
|
|
514
|
+
method: 'POST',
|
|
515
|
+
headers: headerParameters,
|
|
516
|
+
query: queryParameters,
|
|
517
|
+
}, initOverrides)];
|
|
518
|
+
case 3:
|
|
519
|
+
response = _a.sent();
|
|
520
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
});
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* Sends a code to the email of a buyer session that has not proven it yet.
|
|
527
|
+
* Email a code to prove the buyer session
|
|
528
|
+
*/
|
|
529
|
+
BuyersPublicApi.prototype.requestBuyerSessionEmailOtp = function (initOverrides) {
|
|
530
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
531
|
+
return __generator(this, function (_a) {
|
|
532
|
+
switch (_a.label) {
|
|
533
|
+
case 0: return [4 /*yield*/, this.requestBuyerSessionEmailOtpRaw(initOverrides)];
|
|
534
|
+
case 1:
|
|
535
|
+
_a.sent();
|
|
536
|
+
return [2 /*return*/];
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
};
|
|
172
541
|
/**
|
|
173
542
|
* Sends a one-time password to the buyer email address for auction authentication.
|
|
174
543
|
* Request email OTP
|
|
@@ -215,6 +584,63 @@ var BuyersPublicApi = /** @class */ (function (_super) {
|
|
|
215
584
|
});
|
|
216
585
|
});
|
|
217
586
|
};
|
|
587
|
+
/**
|
|
588
|
+
* Checks the code emailed to the buyer; once right, the session counts as proven on every landing that uses it.
|
|
589
|
+
* Prove the email of the buyer session
|
|
590
|
+
*/
|
|
591
|
+
BuyersPublicApi.prototype.verifyBuyerSessionEmailOtpRaw = function (requestParameters, initOverrides) {
|
|
592
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
593
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
594
|
+
return __generator(this, function (_a) {
|
|
595
|
+
switch (_a.label) {
|
|
596
|
+
case 0:
|
|
597
|
+
if (requestParameters['verifyBuyerSessionEmailOtpInput'] == null) {
|
|
598
|
+
throw new runtime.RequiredError('verifyBuyerSessionEmailOtpInput', 'Required parameter "verifyBuyerSessionEmailOtpInput" was null or undefined when calling verifyBuyerSessionEmailOtp().');
|
|
599
|
+
}
|
|
600
|
+
queryParameters = {};
|
|
601
|
+
headerParameters = {};
|
|
602
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
603
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
604
|
+
token = this.configuration.accessToken;
|
|
605
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
606
|
+
case 1:
|
|
607
|
+
tokenString = _a.sent();
|
|
608
|
+
if (tokenString) {
|
|
609
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
610
|
+
}
|
|
611
|
+
_a.label = 2;
|
|
612
|
+
case 2: return [4 /*yield*/, this.request({
|
|
613
|
+
path: "/buyers/session/verify-email-otp",
|
|
614
|
+
method: 'POST',
|
|
615
|
+
headers: headerParameters,
|
|
616
|
+
query: queryParameters,
|
|
617
|
+
body: (0, index_1.VerifyBuyerSessionEmailOtpInputToJSON)(requestParameters['verifyBuyerSessionEmailOtpInput']),
|
|
618
|
+
}, initOverrides)];
|
|
619
|
+
case 3:
|
|
620
|
+
response = _a.sent();
|
|
621
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.BuyerLandingSessionOutputFromJSON)(jsonValue); })];
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
});
|
|
625
|
+
};
|
|
626
|
+
/**
|
|
627
|
+
* Checks the code emailed to the buyer; once right, the session counts as proven on every landing that uses it.
|
|
628
|
+
* Prove the email of the buyer session
|
|
629
|
+
*/
|
|
630
|
+
BuyersPublicApi.prototype.verifyBuyerSessionEmailOtp = function (requestParameters, initOverrides) {
|
|
631
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
632
|
+
var response;
|
|
633
|
+
return __generator(this, function (_a) {
|
|
634
|
+
switch (_a.label) {
|
|
635
|
+
case 0: return [4 /*yield*/, this.verifyBuyerSessionEmailOtpRaw(requestParameters, initOverrides)];
|
|
636
|
+
case 1:
|
|
637
|
+
response = _a.sent();
|
|
638
|
+
return [4 /*yield*/, response.value()];
|
|
639
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
});
|
|
643
|
+
};
|
|
218
644
|
/**
|
|
219
645
|
* Verifies the email OTP and returns an auction buyer session token.
|
|
220
646
|
* Verify email OTP
|
package/dist/apis/LeadsApi.d.ts
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BatchReadSellerLeadMessageInput, CreateLeadMessageInput, CreateManualLeadInput, LeadEnrichmentDto, LeadLeaseToOwnAndRentConfigurationPresetsDto, LeadOfferExpirationConfigurationInput, LeadQuickReplyListDto, List200Response, ListAdminRelatedLeads200Response, ListLeadMessagesDto, LockConfigurationInput, ManualLeadDetails, ObjectId, PutLeadOfferInput, SellerLeadDetails, UpdateLeadMuteStatusInput } from '../models/index';
|
|
13
|
+
import type { AcceptHighestBuyerLeadOfferInput, BatchReadSellerLeadMessageInput, CreateLeadMessageInput, CreateManualLeadInput, LeadEnrichmentDto, LeadLeaseToOwnAndRentConfigurationPresetsDto, LeadOfferExpirationConfigurationInput, LeadOfferSummaryDto, LeadQuickReplyListDto, List200Response, ListAdminRelatedLeads200Response, ListLeadMessagesDto, LockConfigurationInput, ManualLeadDetails, ObjectId, PutLeadOfferInput, SellerLeadDetails, UpdateLeadMuteStatusInput } from '../models/index';
|
|
14
|
+
export interface LeadsApiAcceptHighestBuyerLeadOfferRequest {
|
|
15
|
+
leadId: string;
|
|
16
|
+
acceptHighestBuyerLeadOfferInput: AcceptHighestBuyerLeadOfferInput;
|
|
17
|
+
}
|
|
14
18
|
export interface LeadsApiAcceptLeadOfferRequest {
|
|
15
19
|
leadId: string;
|
|
16
20
|
}
|
|
@@ -37,6 +41,9 @@ export interface LeadsApiGetLeadRequest {
|
|
|
37
41
|
export interface LeadsApiGetLeadEnrichmentRequest {
|
|
38
42
|
leadId: string;
|
|
39
43
|
}
|
|
44
|
+
export interface LeadsApiGetLeadOfferSummaryRequest {
|
|
45
|
+
leadId: string;
|
|
46
|
+
}
|
|
40
47
|
export interface LeadsApiGetLeadQuickRepliesRequest {
|
|
41
48
|
leadId: string;
|
|
42
49
|
}
|
|
@@ -96,6 +103,16 @@ export interface LeadsApiUpdateLeadOfferExpirationConfigurationRequest {
|
|
|
96
103
|
*
|
|
97
104
|
*/
|
|
98
105
|
export declare class LeadsApi extends runtime.BaseAPI {
|
|
106
|
+
/**
|
|
107
|
+
* 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.
|
|
108
|
+
* Accept the highest buyer offer
|
|
109
|
+
*/
|
|
110
|
+
acceptHighestBuyerLeadOfferRaw(requestParameters: LeadsApiAcceptHighestBuyerLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
111
|
+
/**
|
|
112
|
+
* 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.
|
|
113
|
+
* Accept the highest buyer offer
|
|
114
|
+
*/
|
|
115
|
+
acceptHighestBuyerLeadOffer(requestParameters: LeadsApiAcceptHighestBuyerLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
99
116
|
/**
|
|
100
117
|
* 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.
|
|
101
118
|
* Accept the buyer offer
|
|
@@ -186,6 +203,16 @@ export declare class LeadsApi extends runtime.BaseAPI {
|
|
|
186
203
|
* Get lease-to-own configuration presets
|
|
187
204
|
*/
|
|
188
205
|
getLeadLeaseToOwnConfigurationPresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadLeaseToOwnAndRentConfigurationPresetsDto>;
|
|
206
|
+
/**
|
|
207
|
+
* 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.
|
|
208
|
+
* Get the offer summary of a lead
|
|
209
|
+
*/
|
|
210
|
+
getLeadOfferSummaryRaw(requestParameters: LeadsApiGetLeadOfferSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadOfferSummaryDto>>;
|
|
211
|
+
/**
|
|
212
|
+
* 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.
|
|
213
|
+
* Get the offer summary of a lead
|
|
214
|
+
*/
|
|
215
|
+
getLeadOfferSummary(requestParameters: LeadsApiGetLeadOfferSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadOfferSummaryDto>;
|
|
189
216
|
/**
|
|
190
217
|
* 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.
|
|
191
218
|
* List quick replies for a lead
|
package/dist/apis/LeadsApi.js
CHANGED
|
@@ -75,6 +75,72 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function LeadsApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* 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.
|
|
80
|
+
* Accept the highest buyer offer
|
|
81
|
+
*/
|
|
82
|
+
LeadsApi.prototype.acceptHighestBuyerLeadOfferRaw = function (requestParameters, initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
85
|
+
return __generator(this, function (_c) {
|
|
86
|
+
switch (_c.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
if (requestParameters['leadId'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling acceptHighestBuyerLeadOffer().');
|
|
90
|
+
}
|
|
91
|
+
if (requestParameters['acceptHighestBuyerLeadOfferInput'] == null) {
|
|
92
|
+
throw new runtime.RequiredError('acceptHighestBuyerLeadOfferInput', 'Required parameter "acceptHighestBuyerLeadOfferInput" was null or undefined when calling acceptHighestBuyerLeadOffer().');
|
|
93
|
+
}
|
|
94
|
+
queryParameters = {};
|
|
95
|
+
headerParameters = {};
|
|
96
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
97
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
98
|
+
_a = headerParameters;
|
|
99
|
+
_b = "apikey";
|
|
100
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
101
|
+
case 1:
|
|
102
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
103
|
+
_c.label = 2;
|
|
104
|
+
case 2:
|
|
105
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
106
|
+
token = this.configuration.accessToken;
|
|
107
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
108
|
+
case 3:
|
|
109
|
+
tokenString = _c.sent();
|
|
110
|
+
if (tokenString) {
|
|
111
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
112
|
+
}
|
|
113
|
+
_c.label = 4;
|
|
114
|
+
case 4: return [4 /*yield*/, this.request({
|
|
115
|
+
path: "/private/leads/{leadId}/status/accept-highest-buyer-offer".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
116
|
+
method: 'POST',
|
|
117
|
+
headers: headerParameters,
|
|
118
|
+
query: queryParameters,
|
|
119
|
+
body: (0, index_1.AcceptHighestBuyerLeadOfferInputToJSON)(requestParameters['acceptHighestBuyerLeadOfferInput']),
|
|
120
|
+
}, initOverrides)];
|
|
121
|
+
case 5:
|
|
122
|
+
response = _c.sent();
|
|
123
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* 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.
|
|
130
|
+
* Accept the highest buyer offer
|
|
131
|
+
*/
|
|
132
|
+
LeadsApi.prototype.acceptHighestBuyerLeadOffer = function (requestParameters, initOverrides) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
+
return __generator(this, function (_a) {
|
|
135
|
+
switch (_a.label) {
|
|
136
|
+
case 0: return [4 /*yield*/, this.acceptHighestBuyerLeadOfferRaw(requestParameters, initOverrides)];
|
|
137
|
+
case 1:
|
|
138
|
+
_a.sent();
|
|
139
|
+
return [2 /*return*/];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
};
|
|
78
144
|
/**
|
|
79
145
|
* 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.
|
|
80
146
|
* Accept the buyer offer
|
|
@@ -641,6 +707,69 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
641
707
|
});
|
|
642
708
|
});
|
|
643
709
|
};
|
|
710
|
+
/**
|
|
711
|
+
* 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.
|
|
712
|
+
* Get the offer summary of a lead
|
|
713
|
+
*/
|
|
714
|
+
LeadsApi.prototype.getLeadOfferSummaryRaw = function (requestParameters, initOverrides) {
|
|
715
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
716
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
717
|
+
return __generator(this, function (_c) {
|
|
718
|
+
switch (_c.label) {
|
|
719
|
+
case 0:
|
|
720
|
+
if (requestParameters['leadId'] == null) {
|
|
721
|
+
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling getLeadOfferSummary().');
|
|
722
|
+
}
|
|
723
|
+
queryParameters = {};
|
|
724
|
+
headerParameters = {};
|
|
725
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
726
|
+
_a = headerParameters;
|
|
727
|
+
_b = "apikey";
|
|
728
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
729
|
+
case 1:
|
|
730
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
731
|
+
_c.label = 2;
|
|
732
|
+
case 2:
|
|
733
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
734
|
+
token = this.configuration.accessToken;
|
|
735
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
736
|
+
case 3:
|
|
737
|
+
tokenString = _c.sent();
|
|
738
|
+
if (tokenString) {
|
|
739
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
740
|
+
}
|
|
741
|
+
_c.label = 4;
|
|
742
|
+
case 4: return [4 /*yield*/, this.request({
|
|
743
|
+
path: "/private/leads/{leadId}/offer-summary".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
744
|
+
method: 'GET',
|
|
745
|
+
headers: headerParameters,
|
|
746
|
+
query: queryParameters,
|
|
747
|
+
}, initOverrides)];
|
|
748
|
+
case 5:
|
|
749
|
+
response = _c.sent();
|
|
750
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LeadOfferSummaryDtoFromJSON)(jsonValue); })];
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
});
|
|
754
|
+
};
|
|
755
|
+
/**
|
|
756
|
+
* 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.
|
|
757
|
+
* Get the offer summary of a lead
|
|
758
|
+
*/
|
|
759
|
+
LeadsApi.prototype.getLeadOfferSummary = function (requestParameters, initOverrides) {
|
|
760
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
761
|
+
var response;
|
|
762
|
+
return __generator(this, function (_a) {
|
|
763
|
+
switch (_a.label) {
|
|
764
|
+
case 0: return [4 /*yield*/, this.getLeadOfferSummaryRaw(requestParameters, initOverrides)];
|
|
765
|
+
case 1:
|
|
766
|
+
response = _a.sent();
|
|
767
|
+
return [4 /*yield*/, response.value()];
|
|
768
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
});
|
|
772
|
+
};
|
|
644
773
|
/**
|
|
645
774
|
* 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.
|
|
646
775
|
* List quick replies for a lead
|