@randock/nameshift-api-client 0.0.562 → 0.0.563
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 +12 -0
- package/README.md +3 -3
- 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/LeadsPublicApi.d.ts +5 -5
- package/dist/apis/LeadsPublicApi.js +6 -4
- 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/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/LeadPhoneVerificationResultOutput.d.ts +47 -0
- package/dist/models/LeadPhoneVerificationResultOutput.js +62 -0
- package/dist/models/VerifyBuyerSessionEmailOtpInput.d.ts +32 -0
- package/dist/models/VerifyBuyerSessionEmailOtpInput.js +51 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/package.json +1 -1
- package/src/apis/BuyersApi.ts +56 -0
- package/src/apis/BuyersPublicApi.ts +378 -0
- package/src/apis/LeadsPublicApi.ts +14 -7
- package/src/models/BuyerCheckoutProfileDto.ts +192 -0
- package/src/models/BuyerCheckoutProfileSummaryDto.ts +129 -0
- package/src/models/BuyerLandingSessionOutput.ts +120 -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/LeadPhoneVerificationResultOutput.ts +106 -0
- package/src/models/VerifyBuyerSessionEmailOtpInput.ts +66 -0
- package/src/models/index.ts +12 -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
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AssociateVisitorInput, CreateInformationRequestLeadInput, CreateLeadInput, LeadPhoneVerificationDeliveryDto, LeadStatusDto, LeadVerificationDto, ObjectId, PublicLeadDto, RequestLeadPhoneVerificationCodeInput, UpdateLeadInput, VerifyLeadInput, VerifyLeadPhoneInput } from '../models/index';
|
|
13
|
+
import type { AssociateVisitorInput, CreateInformationRequestLeadInput, CreateLeadInput, LeadEmailVerificationResultOutput, LeadPhoneVerificationDeliveryDto, LeadPhoneVerificationResultOutput, LeadStatusDto, LeadVerificationDto, ObjectId, PublicLeadDto, RequestLeadPhoneVerificationCodeInput, UpdateLeadInput, VerifyLeadInput, VerifyLeadPhoneInput } from '../models/index';
|
|
14
14
|
export interface LeadsPublicApiAssociateLeadVisitorRequest {
|
|
15
15
|
leadId: string;
|
|
16
16
|
associateVisitorInput: AssociateVisitorInput;
|
|
@@ -150,20 +150,20 @@ export declare class LeadsPublicApi extends runtime.BaseAPI {
|
|
|
150
150
|
* Verifies a lead using the one-time code sent to the buyer email. No authentication required.
|
|
151
151
|
* Verify a lead
|
|
152
152
|
*/
|
|
153
|
-
verifyLeadRaw(requestParameters: LeadsPublicApiVerifyLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
153
|
+
verifyLeadRaw(requestParameters: LeadsPublicApiVerifyLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadEmailVerificationResultOutput>>;
|
|
154
154
|
/**
|
|
155
155
|
* Verifies a lead using the one-time code sent to the buyer email. No authentication required.
|
|
156
156
|
* Verify a lead
|
|
157
157
|
*/
|
|
158
|
-
verifyLead(requestParameters: LeadsPublicApiVerifyLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
158
|
+
verifyLead(requestParameters: LeadsPublicApiVerifyLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadEmailVerificationResultOutput>;
|
|
159
159
|
/**
|
|
160
160
|
* Checks the one-time code the buyer received by Telegram, WhatsApp, SMS or a voice call. No authentication required.
|
|
161
161
|
* Verify a lead phone code
|
|
162
162
|
*/
|
|
163
|
-
verifyLeadPhoneRaw(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
163
|
+
verifyLeadPhoneRaw(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadPhoneVerificationResultOutput>>;
|
|
164
164
|
/**
|
|
165
165
|
* Checks the one-time code the buyer received by Telegram, WhatsApp, SMS or a voice call. No authentication required.
|
|
166
166
|
* Verify a lead phone code
|
|
167
167
|
*/
|
|
168
|
-
verifyLeadPhone(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
168
|
+
verifyLeadPhone(requestParameters: LeadsPublicApiVerifyLeadPhoneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadPhoneVerificationResultOutput>;
|
|
169
169
|
}
|
|
@@ -539,7 +539,7 @@ var LeadsPublicApi = /** @class */ (function (_super) {
|
|
|
539
539
|
}, initOverrides)];
|
|
540
540
|
case 1:
|
|
541
541
|
response = _a.sent();
|
|
542
|
-
return [2 /*return*/, new runtime.
|
|
542
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LeadEmailVerificationResultOutputFromJSON)(jsonValue); })];
|
|
543
543
|
}
|
|
544
544
|
});
|
|
545
545
|
});
|
|
@@ -550,12 +550,14 @@ var LeadsPublicApi = /** @class */ (function (_super) {
|
|
|
550
550
|
*/
|
|
551
551
|
LeadsPublicApi.prototype.verifyLead = function (requestParameters, initOverrides) {
|
|
552
552
|
return __awaiter(this, void 0, void 0, function () {
|
|
553
|
+
var response;
|
|
553
554
|
return __generator(this, function (_a) {
|
|
554
555
|
switch (_a.label) {
|
|
555
556
|
case 0: return [4 /*yield*/, this.verifyLeadRaw(requestParameters, initOverrides)];
|
|
556
557
|
case 1:
|
|
557
|
-
_a.sent();
|
|
558
|
-
return [
|
|
558
|
+
response = _a.sent();
|
|
559
|
+
return [4 /*yield*/, response.value()];
|
|
560
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
559
561
|
}
|
|
560
562
|
});
|
|
561
563
|
});
|
|
@@ -588,7 +590,7 @@ var LeadsPublicApi = /** @class */ (function (_super) {
|
|
|
588
590
|
}, initOverrides)];
|
|
589
591
|
case 1:
|
|
590
592
|
response = _a.sent();
|
|
591
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.
|
|
593
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LeadPhoneVerificationResultOutputFromJSON)(jsonValue); })];
|
|
592
594
|
}
|
|
593
595
|
});
|
|
594
596
|
});
|
|
@@ -0,0 +1,116 @@
|
|
|
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 BuyerCheckoutProfileDto
|
|
16
|
+
*/
|
|
17
|
+
export interface BuyerCheckoutProfileDto {
|
|
18
|
+
/**
|
|
19
|
+
* Profile identifier.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof BuyerCheckoutProfileDto
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* First name.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof BuyerCheckoutProfileDto
|
|
28
|
+
*/
|
|
29
|
+
firstName: string;
|
|
30
|
+
/**
|
|
31
|
+
* Last name.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof BuyerCheckoutProfileDto
|
|
34
|
+
*/
|
|
35
|
+
lastName: string;
|
|
36
|
+
/**
|
|
37
|
+
* First line of the billing address.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof BuyerCheckoutProfileDto
|
|
40
|
+
*/
|
|
41
|
+
addressLine1: string;
|
|
42
|
+
/**
|
|
43
|
+
* Second line of the billing address.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof BuyerCheckoutProfileDto
|
|
46
|
+
*/
|
|
47
|
+
addressLine2: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Postal code of the billing address.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof BuyerCheckoutProfileDto
|
|
52
|
+
*/
|
|
53
|
+
addressPostalCode: string;
|
|
54
|
+
/**
|
|
55
|
+
* City of the billing address.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof BuyerCheckoutProfileDto
|
|
58
|
+
*/
|
|
59
|
+
addressCity: string;
|
|
60
|
+
/**
|
|
61
|
+
* State or province code of the billing address.
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof BuyerCheckoutProfileDto
|
|
64
|
+
*/
|
|
65
|
+
addressStateCode: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* ISO 3166-1 alpha-2 country of the billing address.
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof BuyerCheckoutProfileDto
|
|
70
|
+
*/
|
|
71
|
+
addressCountryCode: string;
|
|
72
|
+
/**
|
|
73
|
+
* Company name, for a company profile.
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof BuyerCheckoutProfileDto
|
|
76
|
+
*/
|
|
77
|
+
companyName: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Company registration number.
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof BuyerCheckoutProfileDto
|
|
82
|
+
*/
|
|
83
|
+
companyId: string | null;
|
|
84
|
+
/**
|
|
85
|
+
* Type of the company tax ID.
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof BuyerCheckoutProfileDto
|
|
88
|
+
*/
|
|
89
|
+
companyTaxIdType: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* Company tax ID.
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof BuyerCheckoutProfileDto
|
|
94
|
+
*/
|
|
95
|
+
companyTaxIdValue: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* ISO 3166-1 alpha-2 country of the company tax ID.
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof BuyerCheckoutProfileDto
|
|
100
|
+
*/
|
|
101
|
+
companyTaxIdCountryCode: string | null;
|
|
102
|
+
/**
|
|
103
|
+
* Tax country the buyer declared.
|
|
104
|
+
* @type {string}
|
|
105
|
+
* @memberof BuyerCheckoutProfileDto
|
|
106
|
+
*/
|
|
107
|
+
selfDeclaredTaxCountry: string | null;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Check if a given object implements the BuyerCheckoutProfileDto interface.
|
|
111
|
+
*/
|
|
112
|
+
export declare function instanceOfBuyerCheckoutProfileDto(value: object): value is BuyerCheckoutProfileDto;
|
|
113
|
+
export declare function BuyerCheckoutProfileDtoFromJSON(json: any): BuyerCheckoutProfileDto;
|
|
114
|
+
export declare function BuyerCheckoutProfileDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuyerCheckoutProfileDto;
|
|
115
|
+
export declare function BuyerCheckoutProfileDtoToJSON(json: any): BuyerCheckoutProfileDto;
|
|
116
|
+
export declare function BuyerCheckoutProfileDtoToJSONTyped(value?: BuyerCheckoutProfileDto | null, ignoreDiscriminator?: boolean): any;
|