@randock/nameshift-api-client 0.0.563 → 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 +4 -0
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +28 -1
- package/dist/apis/AdminApi.js +113 -0
- package/dist/apis/LeadsApi.d.ts +28 -1
- package/dist/apis/LeadsApi.js +129 -0
- package/dist/models/AcceptHighestBuyerLeadOfferInput.d.ts +32 -0
- package/dist/models/AcceptHighestBuyerLeadOfferInput.js +51 -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/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/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/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +110 -0
- package/src/apis/LeadsApi.ts +118 -0
- package/src/models/AcceptHighestBuyerLeadOfferInput.ts +66 -0
- package/src/models/BuyerNotificationDto.ts +1 -0
- package/src/models/BuyerNotificationListItemDto.ts +1 -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/UserNotificationDto.ts +1 -0
- package/src/models/UserNotificationListItemDto.ts +1 -0
- package/src/models/index.ts +4 -0
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
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AcceptHighestBuyerLeadOfferInput
|
|
20
|
+
*/
|
|
21
|
+
export interface AcceptHighestBuyerLeadOfferInput {
|
|
22
|
+
/**
|
|
23
|
+
* The offer message the seller confirmed, as given by the offer summary. The request is refused with HIGHEST_BUYER_OFFER_CHANGED when it is no longer the highest buyer offer.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AcceptHighestBuyerLeadOfferInput
|
|
26
|
+
*/
|
|
27
|
+
leadMessageId: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the AcceptHighestBuyerLeadOfferInput interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfAcceptHighestBuyerLeadOfferInput(value: object): value is AcceptHighestBuyerLeadOfferInput {
|
|
34
|
+
if (!('leadMessageId' in value) || value['leadMessageId'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function AcceptHighestBuyerLeadOfferInputFromJSON(json: any): AcceptHighestBuyerLeadOfferInput {
|
|
39
|
+
return AcceptHighestBuyerLeadOfferInputFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AcceptHighestBuyerLeadOfferInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptHighestBuyerLeadOfferInput {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'leadMessageId': json['leadMessageId'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function AcceptHighestBuyerLeadOfferInputToJSON(json: any): AcceptHighestBuyerLeadOfferInput {
|
|
53
|
+
return AcceptHighestBuyerLeadOfferInputToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AcceptHighestBuyerLeadOfferInputToJSONTyped(value?: AcceptHighestBuyerLeadOfferInput | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'leadMessageId': value['leadMessageId'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -115,6 +115,7 @@ export const BuyerNotificationDtoTypeEnum = {
|
|
|
115
115
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
116
116
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
117
117
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
118
|
+
DOMAIN_EARLIER_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_earlier_offer_accepted_continue_order_email',
|
|
118
119
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_LEASE_TO_OWN_EMAIL: 'domain_offer_accepted_continue_lease_to_own_email',
|
|
119
120
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_LEASE_TO_OWN_EMAIL_INSTALLMENTS_RANGE: 'domain_offer_accepted_continue_lease_to_own_email_installments_range',
|
|
120
121
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_RENT_EMAIL: 'domain_offer_accepted_continue_rent_email',
|
|
@@ -101,6 +101,7 @@ export const BuyerNotificationListItemDtoTypeEnum = {
|
|
|
101
101
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
102
102
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
103
103
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
104
|
+
DOMAIN_EARLIER_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_earlier_offer_accepted_continue_order_email',
|
|
104
105
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_LEASE_TO_OWN_EMAIL: 'domain_offer_accepted_continue_lease_to_own_email',
|
|
105
106
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_LEASE_TO_OWN_EMAIL_INSTALLMENTS_RANGE: 'domain_offer_accepted_continue_lease_to_own_email_installments_range',
|
|
106
107
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_RENT_EMAIL: 'domain_offer_accepted_continue_rent_email',
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Why the highest buyer offer cannot be accepted, if so.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const LeadOfferSummaryCannotAcceptReason = {
|
|
21
|
+
NO_BUYER_OFFER: 'no_buyer_offer',
|
|
22
|
+
LEAD_NOT_NEGOTIABLE: 'lead_not_negotiable',
|
|
23
|
+
MANUAL_LEAD: 'manual_lead',
|
|
24
|
+
DOMAIN_IS_LOCKED: 'domain_is_locked',
|
|
25
|
+
DOMAIN_HAS_AN_AUCTION: 'domain_has_an_auction',
|
|
26
|
+
DOMAIN_NOT_PURCHASABLE: 'domain_not_purchasable'
|
|
27
|
+
} as const;
|
|
28
|
+
export type LeadOfferSummaryCannotAcceptReason = typeof LeadOfferSummaryCannotAcceptReason[keyof typeof LeadOfferSummaryCannotAcceptReason];
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export function instanceOfLeadOfferSummaryCannotAcceptReason(value: any): boolean {
|
|
32
|
+
for (const key in LeadOfferSummaryCannotAcceptReason) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(LeadOfferSummaryCannotAcceptReason, key)) {
|
|
34
|
+
if (LeadOfferSummaryCannotAcceptReason[key as keyof typeof LeadOfferSummaryCannotAcceptReason] === value) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function LeadOfferSummaryCannotAcceptReasonFromJSON(json: any): LeadOfferSummaryCannotAcceptReason {
|
|
43
|
+
return LeadOfferSummaryCannotAcceptReasonFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function LeadOfferSummaryCannotAcceptReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeadOfferSummaryCannotAcceptReason {
|
|
47
|
+
return json as LeadOfferSummaryCannotAcceptReason;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function LeadOfferSummaryCannotAcceptReasonToJSON(value?: LeadOfferSummaryCannotAcceptReason | null): any {
|
|
51
|
+
return value as any;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function LeadOfferSummaryCannotAcceptReasonToJSONTyped(value: any, ignoreDiscriminator: boolean): LeadOfferSummaryCannotAcceptReason {
|
|
55
|
+
return value as LeadOfferSummaryCannotAcceptReason;
|
|
56
|
+
}
|
|
57
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { LeadOfferSummaryCannotAcceptReason } from './LeadOfferSummaryCannotAcceptReason';
|
|
17
|
+
import {
|
|
18
|
+
LeadOfferSummaryCannotAcceptReasonFromJSON,
|
|
19
|
+
LeadOfferSummaryCannotAcceptReasonFromJSONTyped,
|
|
20
|
+
LeadOfferSummaryCannotAcceptReasonToJSON,
|
|
21
|
+
LeadOfferSummaryCannotAcceptReasonToJSONTyped,
|
|
22
|
+
} from './LeadOfferSummaryCannotAcceptReason';
|
|
23
|
+
import type { LeadOfferSummaryItemDto } from './LeadOfferSummaryItemDto';
|
|
24
|
+
import {
|
|
25
|
+
LeadOfferSummaryItemDtoFromJSON,
|
|
26
|
+
LeadOfferSummaryItemDtoFromJSONTyped,
|
|
27
|
+
LeadOfferSummaryItemDtoToJSON,
|
|
28
|
+
LeadOfferSummaryItemDtoToJSONTyped,
|
|
29
|
+
} from './LeadOfferSummaryItemDto';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface LeadOfferSummaryDto
|
|
35
|
+
*/
|
|
36
|
+
export interface LeadOfferSummaryDto {
|
|
37
|
+
/**
|
|
38
|
+
* The highest plain purchase offer the buyer made and did not withdraw, in the domain currency. Null when there is none.
|
|
39
|
+
* @type {LeadOfferSummaryItemDto}
|
|
40
|
+
* @memberof LeadOfferSummaryDto
|
|
41
|
+
*/
|
|
42
|
+
highestBuyerOffer: LeadOfferSummaryItemDto | null;
|
|
43
|
+
/**
|
|
44
|
+
* The lowest plain purchase offer the seller side (seller or price negotiator) made and did not withdraw, in the domain currency. Null when there is none.
|
|
45
|
+
* @type {LeadOfferSummaryItemDto}
|
|
46
|
+
* @memberof LeadOfferSummaryDto
|
|
47
|
+
*/
|
|
48
|
+
lowestSellerOffer: LeadOfferSummaryItemDto | null;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the highest buyer offer can be accepted right now with the accept-highest-buyer-offer endpoint.
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof LeadOfferSummaryDto
|
|
53
|
+
*/
|
|
54
|
+
canAcceptHighestBuyerOffer: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Why the highest buyer offer cannot be accepted, if so.
|
|
57
|
+
* @type {LeadOfferSummaryCannotAcceptReason}
|
|
58
|
+
* @memberof LeadOfferSummaryDto
|
|
59
|
+
*/
|
|
60
|
+
cannotAcceptReason: LeadOfferSummaryCannotAcceptReason | null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Check if a given object implements the LeadOfferSummaryDto interface.
|
|
67
|
+
*/
|
|
68
|
+
export function instanceOfLeadOfferSummaryDto(value: object): value is LeadOfferSummaryDto {
|
|
69
|
+
if (!('highestBuyerOffer' in value) || value['highestBuyerOffer'] === undefined) return false;
|
|
70
|
+
if (!('lowestSellerOffer' in value) || value['lowestSellerOffer'] === undefined) return false;
|
|
71
|
+
if (!('canAcceptHighestBuyerOffer' in value) || value['canAcceptHighestBuyerOffer'] === undefined) return false;
|
|
72
|
+
if (!('cannotAcceptReason' in value) || value['cannotAcceptReason'] === undefined) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function LeadOfferSummaryDtoFromJSON(json: any): LeadOfferSummaryDto {
|
|
77
|
+
return LeadOfferSummaryDtoFromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function LeadOfferSummaryDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeadOfferSummaryDto {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'highestBuyerOffer': LeadOfferSummaryItemDtoFromJSON(json['highestBuyerOffer']),
|
|
87
|
+
'lowestSellerOffer': LeadOfferSummaryItemDtoFromJSON(json['lowestSellerOffer']),
|
|
88
|
+
'canAcceptHighestBuyerOffer': json['canAcceptHighestBuyerOffer'],
|
|
89
|
+
'cannotAcceptReason': LeadOfferSummaryCannotAcceptReasonFromJSON(json['cannotAcceptReason']),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function LeadOfferSummaryDtoToJSON(json: any): LeadOfferSummaryDto {
|
|
94
|
+
return LeadOfferSummaryDtoToJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function LeadOfferSummaryDtoToJSONTyped(value?: LeadOfferSummaryDto | null, ignoreDiscriminator: boolean = false): any {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'highestBuyerOffer': LeadOfferSummaryItemDtoToJSON(value['highestBuyerOffer']),
|
|
105
|
+
'lowestSellerOffer': LeadOfferSummaryItemDtoToJSON(value['lowestSellerOffer']),
|
|
106
|
+
'canAcceptHighestBuyerOffer': value['canAcceptHighestBuyerOffer'],
|
|
107
|
+
'cannotAcceptReason': LeadOfferSummaryCannotAcceptReasonToJSON(value['cannotAcceptReason']),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { MoneyDto } from './MoneyDto';
|
|
17
|
+
import {
|
|
18
|
+
MoneyDtoFromJSON,
|
|
19
|
+
MoneyDtoFromJSONTyped,
|
|
20
|
+
MoneyDtoToJSON,
|
|
21
|
+
MoneyDtoToJSONTyped,
|
|
22
|
+
} from './MoneyDto';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface LeadOfferSummaryItemDto
|
|
28
|
+
*/
|
|
29
|
+
export interface LeadOfferSummaryItemDto {
|
|
30
|
+
/**
|
|
31
|
+
* The id of the offer message in the lead conversation.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof LeadOfferSummaryItemDto
|
|
34
|
+
*/
|
|
35
|
+
leadMessageId: string;
|
|
36
|
+
/**
|
|
37
|
+
* The amount offered.
|
|
38
|
+
* @type {MoneyDto}
|
|
39
|
+
* @memberof LeadOfferSummaryItemDto
|
|
40
|
+
*/
|
|
41
|
+
price: MoneyDto;
|
|
42
|
+
/**
|
|
43
|
+
* Who made the offer.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof LeadOfferSummaryItemDto
|
|
46
|
+
*/
|
|
47
|
+
origin: LeadOfferSummaryItemDtoOriginEnum;
|
|
48
|
+
/**
|
|
49
|
+
* When the offer was made.
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof LeadOfferSummaryItemDto
|
|
52
|
+
*/
|
|
53
|
+
createdAt: Date;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @export
|
|
59
|
+
*/
|
|
60
|
+
export const LeadOfferSummaryItemDtoOriginEnum = {
|
|
61
|
+
BUYER: 'buyer',
|
|
62
|
+
SELLER: 'seller',
|
|
63
|
+
AI: 'ai',
|
|
64
|
+
ADMIN: 'admin'
|
|
65
|
+
} as const;
|
|
66
|
+
export type LeadOfferSummaryItemDtoOriginEnum = typeof LeadOfferSummaryItemDtoOriginEnum[keyof typeof LeadOfferSummaryItemDtoOriginEnum];
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Check if a given object implements the LeadOfferSummaryItemDto interface.
|
|
71
|
+
*/
|
|
72
|
+
export function instanceOfLeadOfferSummaryItemDto(value: object): value is LeadOfferSummaryItemDto {
|
|
73
|
+
if (!('leadMessageId' in value) || value['leadMessageId'] === undefined) return false;
|
|
74
|
+
if (!('price' in value) || value['price'] === undefined) return false;
|
|
75
|
+
if (!('origin' in value) || value['origin'] === undefined) return false;
|
|
76
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function LeadOfferSummaryItemDtoFromJSON(json: any): LeadOfferSummaryItemDto {
|
|
81
|
+
return LeadOfferSummaryItemDtoFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function LeadOfferSummaryItemDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeadOfferSummaryItemDto {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'leadMessageId': json['leadMessageId'],
|
|
91
|
+
'price': MoneyDtoFromJSON(json['price']),
|
|
92
|
+
'origin': json['origin'],
|
|
93
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function LeadOfferSummaryItemDtoToJSON(json: any): LeadOfferSummaryItemDto {
|
|
98
|
+
return LeadOfferSummaryItemDtoToJSONTyped(json, false);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function LeadOfferSummaryItemDtoToJSONTyped(value?: LeadOfferSummaryItemDto | null, ignoreDiscriminator: boolean = false): any {
|
|
102
|
+
if (value == null) {
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
|
|
108
|
+
'leadMessageId': value['leadMessageId'],
|
|
109
|
+
'price': MoneyDtoToJSON(value['price']),
|
|
110
|
+
'origin': value['origin'],
|
|
111
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
@@ -115,6 +115,7 @@ export const UserNotificationDtoTypeEnum = {
|
|
|
115
115
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
116
116
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
117
117
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
118
|
+
DOMAIN_EARLIER_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_earlier_offer_accepted_continue_order_email',
|
|
118
119
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_LEASE_TO_OWN_EMAIL: 'domain_offer_accepted_continue_lease_to_own_email',
|
|
119
120
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_LEASE_TO_OWN_EMAIL_INSTALLMENTS_RANGE: 'domain_offer_accepted_continue_lease_to_own_email_installments_range',
|
|
120
121
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_RENT_EMAIL: 'domain_offer_accepted_continue_rent_email',
|
|
@@ -101,6 +101,7 @@ export const UserNotificationListItemDtoTypeEnum = {
|
|
|
101
101
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
102
102
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
103
103
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
104
|
+
DOMAIN_EARLIER_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_earlier_offer_accepted_continue_order_email',
|
|
104
105
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_LEASE_TO_OWN_EMAIL: 'domain_offer_accepted_continue_lease_to_own_email',
|
|
105
106
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_LEASE_TO_OWN_EMAIL_INSTALLMENTS_RANGE: 'domain_offer_accepted_continue_lease_to_own_email_installments_range',
|
|
106
107
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_RENT_EMAIL: 'domain_offer_accepted_continue_rent_email',
|
package/src/models/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './AcceptHighestBuyerLeadOfferInput';
|
|
3
4
|
export * from './AccountAliasDto';
|
|
4
5
|
export * from './AccountAliasInput';
|
|
5
6
|
export * from './AccountBankAccountDetailsDto';
|
|
@@ -438,6 +439,9 @@ export * from './LeadOfferDto';
|
|
|
438
439
|
export * from './LeadOfferExpirationConfigurationDto';
|
|
439
440
|
export * from './LeadOfferExpirationConfigurationInput';
|
|
440
441
|
export * from './LeadOfferExpirationDurationInput';
|
|
442
|
+
export * from './LeadOfferSummaryCannotAcceptReason';
|
|
443
|
+
export * from './LeadOfferSummaryDto';
|
|
444
|
+
export * from './LeadOfferSummaryItemDto';
|
|
441
445
|
export * from './LeadPhoneVerificationDeliveryDto';
|
|
442
446
|
export * from './LeadPhoneVerificationDto';
|
|
443
447
|
export * from './LeadPhoneVerificationReason';
|