@randock/nameshift-api-client 0.0.45 → 0.0.47
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 +3 -0
- package/README.md +3 -3
- package/dist/apis/LeadsApi.d.ts +11 -0
- package/dist/apis/LeadsApi.js +51 -0
- package/dist/apis/LeadsPublicApi.d.ts +12 -1
- package/dist/apis/LeadsPublicApi.js +44 -0
- package/dist/models/BuyDomainInput.d.ts +16 -10
- package/dist/models/BuyDomainInput.js +6 -8
- package/dist/models/IntersectionLeadDtoWithLeadDetailsDto.d.ts +2 -0
- package/dist/models/IntersectionLeadDtoWithLeadDetailsDto.js +2 -0
- package/dist/models/IntersectionLeadDtoWithListFieldsDto.d.ts +2 -0
- package/dist/models/IntersectionLeadDtoWithListFieldsDto.js +2 -0
- package/dist/models/LeadStatusDto.d.ts +2 -0
- package/dist/models/LeadStatusDto.js +2 -0
- package/dist/models/PublicLeadBuyerDto.d.ts +55 -0
- package/dist/models/PublicLeadBuyerDto.js +63 -0
- package/dist/models/PublicLeadDto.d.ts +63 -0
- package/dist/models/PublicLeadDto.js +72 -0
- package/dist/models/PublicLeadDtoLastOffer.d.ts +37 -0
- package/dist/models/PublicLeadDtoLastOffer.js +51 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/LeadsApi.ts +44 -0
- package/src/apis/LeadsPublicApi.ts +40 -0
- package/src/models/BuyDomainInput.ts +22 -16
- package/src/models/IntersectionLeadDtoWithLeadDetailsDto.ts +2 -0
- package/src/models/IntersectionLeadDtoWithListFieldsDto.ts +2 -0
- package/src/models/LeadStatusDto.ts +2 -0
- package/src/models/PublicLeadBuyerDto.ts +97 -0
- package/src/models/PublicLeadDto.ts +116 -0
- package/src/models/PublicLeadDtoLastOffer.ts +70 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Nameshift
|
|
6
|
+
* Nameshift API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PublicLeadDtoLastOfferToJSON = exports.PublicLeadDtoLastOfferFromJSONTyped = exports.PublicLeadDtoLastOfferFromJSON = exports.instanceOfPublicLeadDtoLastOffer = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the PublicLeadDtoLastOffer interface.
|
|
19
|
+
*/
|
|
20
|
+
function instanceOfPublicLeadDtoLastOffer(value) {
|
|
21
|
+
if (!('amount' in value) || value['amount'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('currencyCode' in value) || value['currencyCode'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
exports.instanceOfPublicLeadDtoLastOffer = instanceOfPublicLeadDtoLastOffer;
|
|
28
|
+
function PublicLeadDtoLastOfferFromJSON(json) {
|
|
29
|
+
return PublicLeadDtoLastOfferFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
exports.PublicLeadDtoLastOfferFromJSON = PublicLeadDtoLastOfferFromJSON;
|
|
32
|
+
function PublicLeadDtoLastOfferFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'amount': json['amount'],
|
|
38
|
+
'currencyCode': json['currencyCode'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
exports.PublicLeadDtoLastOfferFromJSONTyped = PublicLeadDtoLastOfferFromJSONTyped;
|
|
42
|
+
function PublicLeadDtoLastOfferToJSON(value) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'amount': value['amount'],
|
|
48
|
+
'currencyCode': value['currencyCode'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.PublicLeadDtoLastOfferToJSON = PublicLeadDtoLastOfferToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -47,6 +47,9 @@ export * from './ObjectId';
|
|
|
47
47
|
export * from './PaginateResponse';
|
|
48
48
|
export * from './PaginateResponseLinks';
|
|
49
49
|
export * from './PaginateResponseMeta';
|
|
50
|
+
export * from './PublicLeadBuyerDto';
|
|
51
|
+
export * from './PublicLeadDto';
|
|
52
|
+
export * from './PublicLeadDtoLastOffer';
|
|
50
53
|
export * from './PutLeadInput';
|
|
51
54
|
export * from './RegisterAccountInput';
|
|
52
55
|
export * from './RelatedSellerDomain';
|
package/dist/models/index.js
CHANGED
|
@@ -65,6 +65,9 @@ __exportStar(require("./ObjectId"), exports);
|
|
|
65
65
|
__exportStar(require("./PaginateResponse"), exports);
|
|
66
66
|
__exportStar(require("./PaginateResponseLinks"), exports);
|
|
67
67
|
__exportStar(require("./PaginateResponseMeta"), exports);
|
|
68
|
+
__exportStar(require("./PublicLeadBuyerDto"), exports);
|
|
69
|
+
__exportStar(require("./PublicLeadDto"), exports);
|
|
70
|
+
__exportStar(require("./PublicLeadDtoLastOffer"), exports);
|
|
68
71
|
__exportStar(require("./PutLeadInput"), exports);
|
|
69
72
|
__exportStar(require("./RegisterAccountInput"), exports);
|
|
70
73
|
__exportStar(require("./RelatedSellerDomain"), exports);
|
package/package.json
CHANGED
package/src/apis/LeadsApi.ts
CHANGED
|
@@ -43,6 +43,10 @@ import {
|
|
|
43
43
|
ValidationExceptionToJSON,
|
|
44
44
|
} from '../models/index';
|
|
45
45
|
|
|
46
|
+
export interface LeadsApiAcceptLeadOfferRequest {
|
|
47
|
+
leadId: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
export interface LeadsApiCreateMessageRequest {
|
|
47
51
|
leadId: string;
|
|
48
52
|
createLeadMessageInput: CreateLeadMessageInput;
|
|
@@ -66,6 +70,46 @@ export interface LeadsApiPutOfferRequest {
|
|
|
66
70
|
*/
|
|
67
71
|
export class LeadsApi extends runtime.BaseAPI {
|
|
68
72
|
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
async acceptLeadOfferRaw(requestParameters: LeadsApiAcceptLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
77
|
+
if (requestParameters['leadId'] == null) {
|
|
78
|
+
throw new runtime.RequiredError(
|
|
79
|
+
'leadId',
|
|
80
|
+
'Required parameter "leadId" was null or undefined when calling acceptLeadOffer().'
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const queryParameters: any = {};
|
|
85
|
+
|
|
86
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
87
|
+
|
|
88
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
89
|
+
const token = this.configuration.accessToken;
|
|
90
|
+
const tokenString = await token("bearer", []);
|
|
91
|
+
|
|
92
|
+
if (tokenString) {
|
|
93
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const response = await this.request({
|
|
97
|
+
path: `/leads/{leadId}/status/accept`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
|
|
98
|
+
method: 'PATCH',
|
|
99
|
+
headers: headerParameters,
|
|
100
|
+
query: queryParameters,
|
|
101
|
+
}, initOverrides);
|
|
102
|
+
|
|
103
|
+
return new runtime.VoidApiResponse(response);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
*/
|
|
109
|
+
async acceptLeadOffer(requestParameters: LeadsApiAcceptLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
110
|
+
await this.acceptLeadOfferRaw(requestParameters, initOverrides);
|
|
111
|
+
}
|
|
112
|
+
|
|
69
113
|
/**
|
|
70
114
|
*
|
|
71
115
|
*/
|
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
LeadStatusDto,
|
|
20
20
|
NotFoundException,
|
|
21
21
|
ObjectId,
|
|
22
|
+
PublicLeadDto,
|
|
22
23
|
ThrottlerException,
|
|
23
24
|
ValidationException,
|
|
24
25
|
VerifyLeadInput,
|
|
@@ -32,6 +33,8 @@ import {
|
|
|
32
33
|
NotFoundExceptionToJSON,
|
|
33
34
|
ObjectIdFromJSON,
|
|
34
35
|
ObjectIdToJSON,
|
|
36
|
+
PublicLeadDtoFromJSON,
|
|
37
|
+
PublicLeadDtoToJSON,
|
|
35
38
|
ThrottlerExceptionFromJSON,
|
|
36
39
|
ThrottlerExceptionToJSON,
|
|
37
40
|
ValidationExceptionFromJSON,
|
|
@@ -44,6 +47,10 @@ export interface LeadsPublicApiCreateLeadRequest {
|
|
|
44
47
|
createLeadInput: CreateLeadInput;
|
|
45
48
|
}
|
|
46
49
|
|
|
50
|
+
export interface LeadsPublicApiGetLeadRequest {
|
|
51
|
+
leadId: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
47
54
|
export interface LeadsPublicApiGetLeadStatusRequest {
|
|
48
55
|
leadId: string;
|
|
49
56
|
}
|
|
@@ -94,6 +101,39 @@ export class LeadsPublicApi extends runtime.BaseAPI {
|
|
|
94
101
|
return await response.value();
|
|
95
102
|
}
|
|
96
103
|
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
107
|
+
async getLeadRaw(requestParameters: LeadsPublicApiGetLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicLeadDto>> {
|
|
108
|
+
if (requestParameters['leadId'] == null) {
|
|
109
|
+
throw new runtime.RequiredError(
|
|
110
|
+
'leadId',
|
|
111
|
+
'Required parameter "leadId" was null or undefined when calling getLead().'
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const queryParameters: any = {};
|
|
116
|
+
|
|
117
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
118
|
+
|
|
119
|
+
const response = await this.request({
|
|
120
|
+
path: `/leads/{leadId}/public`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
|
|
121
|
+
method: 'GET',
|
|
122
|
+
headers: headerParameters,
|
|
123
|
+
query: queryParameters,
|
|
124
|
+
}, initOverrides);
|
|
125
|
+
|
|
126
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PublicLeadDtoFromJSON(jsonValue));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
async getLead(requestParameters: LeadsPublicApiGetLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicLeadDto> {
|
|
133
|
+
const response = await this.getLeadRaw(requestParameters, initOverrides);
|
|
134
|
+
return await response.value();
|
|
135
|
+
}
|
|
136
|
+
|
|
97
137
|
/**
|
|
98
138
|
*
|
|
99
139
|
*/
|
|
@@ -24,61 +24,67 @@ export interface BuyDomainInput {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof BuyDomainInput
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
companyName?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof BuyDomainInput
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
companyVatNumber?: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof BuyDomainInput
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
leadId?: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof BuyDomainInput
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
firstname: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof BuyDomainInput
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
lastname: string;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof BuyDomainInput
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
email: string;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof BuyDomainInput
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
phone: string;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
67
67
|
* @memberof BuyDomainInput
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
country: string;
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
72
|
* @type {string}
|
|
73
73
|
* @memberof BuyDomainInput
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
city: string;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof BuyDomainInput
|
|
80
|
+
*/
|
|
81
|
+
postalCode: string;
|
|
76
82
|
/**
|
|
77
83
|
*
|
|
78
84
|
* @type {string}
|
|
79
85
|
* @memberof BuyDomainInput
|
|
80
86
|
*/
|
|
81
|
-
|
|
87
|
+
address: string;
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
/**
|
|
@@ -93,8 +99,6 @@ export function instanceOfBuyDomainInput(value: object): value is BuyDomainInput
|
|
|
93
99
|
if (!('city' in value) || value['city'] === undefined) return false;
|
|
94
100
|
if (!('postalCode' in value) || value['postalCode'] === undefined) return false;
|
|
95
101
|
if (!('address' in value) || value['address'] === undefined) return false;
|
|
96
|
-
if (!('companyName' in value) || value['companyName'] === undefined) return false;
|
|
97
|
-
if (!('companyVatNumber' in value) || value['companyVatNumber'] === undefined) return false;
|
|
98
102
|
return true;
|
|
99
103
|
}
|
|
100
104
|
|
|
@@ -108,6 +112,9 @@ export function BuyDomainInputFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
108
112
|
}
|
|
109
113
|
return {
|
|
110
114
|
|
|
115
|
+
'companyName': json['companyName'] == null ? undefined : json['companyName'],
|
|
116
|
+
'companyVatNumber': json['companyVatNumber'] == null ? undefined : json['companyVatNumber'],
|
|
117
|
+
'leadId': json['leadId'] == null ? undefined : json['leadId'],
|
|
111
118
|
'firstname': json['firstname'],
|
|
112
119
|
'lastname': json['lastname'],
|
|
113
120
|
'email': json['email'],
|
|
@@ -116,8 +123,6 @@ export function BuyDomainInputFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
116
123
|
'city': json['city'],
|
|
117
124
|
'postalCode': json['postalCode'],
|
|
118
125
|
'address': json['address'],
|
|
119
|
-
'companyName': json['companyName'],
|
|
120
|
-
'companyVatNumber': json['companyVatNumber'],
|
|
121
126
|
};
|
|
122
127
|
}
|
|
123
128
|
|
|
@@ -127,6 +132,9 @@ export function BuyDomainInputToJSON(value?: BuyDomainInput | null): any {
|
|
|
127
132
|
}
|
|
128
133
|
return {
|
|
129
134
|
|
|
135
|
+
'companyName': value['companyName'],
|
|
136
|
+
'companyVatNumber': value['companyVatNumber'],
|
|
137
|
+
'leadId': value['leadId'],
|
|
130
138
|
'firstname': value['firstname'],
|
|
131
139
|
'lastname': value['lastname'],
|
|
132
140
|
'email': value['email'],
|
|
@@ -135,8 +143,6 @@ export function BuyDomainInputToJSON(value?: BuyDomainInput | null): any {
|
|
|
135
143
|
'city': value['city'],
|
|
136
144
|
'postalCode': value['postalCode'],
|
|
137
145
|
'address': value['address'],
|
|
138
|
-
'companyName': value['companyName'],
|
|
139
|
-
'companyVatNumber': value['companyVatNumber'],
|
|
140
146
|
};
|
|
141
147
|
}
|
|
142
148
|
|
|
@@ -77,6 +77,8 @@ export interface IntersectionLeadDtoWithLeadDetailsDto {
|
|
|
77
77
|
export const IntersectionLeadDtoWithLeadDetailsDtoStatusEnum = {
|
|
78
78
|
UNVERIFIED: 'unverified',
|
|
79
79
|
ACTIVE: 'active',
|
|
80
|
+
ACCEPTED: 'accepted',
|
|
81
|
+
FINISHED: 'finished',
|
|
80
82
|
DELETED: 'deleted',
|
|
81
83
|
ARCHIVED: 'archived'
|
|
82
84
|
} as const;
|
|
@@ -113,6 +113,8 @@ export interface IntersectionLeadDtoWithListFieldsDto {
|
|
|
113
113
|
export const IntersectionLeadDtoWithListFieldsDtoStatusEnum = {
|
|
114
114
|
UNVERIFIED: 'unverified',
|
|
115
115
|
ACTIVE: 'active',
|
|
116
|
+
ACCEPTED: 'accepted',
|
|
117
|
+
FINISHED: 'finished',
|
|
116
118
|
DELETED: 'deleted',
|
|
117
119
|
ARCHIVED: 'archived'
|
|
118
120
|
} as const;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
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 PublicLeadBuyerDto
|
|
20
|
+
*/
|
|
21
|
+
export interface PublicLeadBuyerDto {
|
|
22
|
+
/**
|
|
23
|
+
* Lead buyer name
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof PublicLeadBuyerDto
|
|
26
|
+
*/
|
|
27
|
+
firstname: string;
|
|
28
|
+
/**
|
|
29
|
+
* Lead buyer surname
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PublicLeadBuyerDto
|
|
32
|
+
*/
|
|
33
|
+
lastname: string;
|
|
34
|
+
/**
|
|
35
|
+
* Lead buyer email address
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof PublicLeadBuyerDto
|
|
38
|
+
*/
|
|
39
|
+
email: string;
|
|
40
|
+
/**
|
|
41
|
+
* Lead buyer phone number
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof PublicLeadBuyerDto
|
|
44
|
+
*/
|
|
45
|
+
phone: string;
|
|
46
|
+
/**
|
|
47
|
+
* Lead buyer company name
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof PublicLeadBuyerDto
|
|
50
|
+
*/
|
|
51
|
+
companyName: string | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the PublicLeadBuyerDto interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfPublicLeadBuyerDto(value: object): value is PublicLeadBuyerDto {
|
|
58
|
+
if (!('firstname' in value) || value['firstname'] === undefined) return false;
|
|
59
|
+
if (!('lastname' in value) || value['lastname'] === undefined) return false;
|
|
60
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
61
|
+
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
62
|
+
if (!('companyName' in value) || value['companyName'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function PublicLeadBuyerDtoFromJSON(json: any): PublicLeadBuyerDto {
|
|
67
|
+
return PublicLeadBuyerDtoFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function PublicLeadBuyerDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicLeadBuyerDto {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'firstname': json['firstname'],
|
|
77
|
+
'lastname': json['lastname'],
|
|
78
|
+
'email': json['email'],
|
|
79
|
+
'phone': json['phone'],
|
|
80
|
+
'companyName': json['companyName'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PublicLeadBuyerDtoToJSON(value?: PublicLeadBuyerDto | null): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'firstname': value['firstname'],
|
|
91
|
+
'lastname': value['lastname'],
|
|
92
|
+
'email': value['email'],
|
|
93
|
+
'phone': value['phone'],
|
|
94
|
+
'companyName': value['companyName'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
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 { PublicLeadBuyerDto } from './PublicLeadBuyerDto';
|
|
17
|
+
import {
|
|
18
|
+
PublicLeadBuyerDtoFromJSON,
|
|
19
|
+
PublicLeadBuyerDtoFromJSONTyped,
|
|
20
|
+
PublicLeadBuyerDtoToJSON,
|
|
21
|
+
} from './PublicLeadBuyerDto';
|
|
22
|
+
import type { PublicLeadDtoLastOffer } from './PublicLeadDtoLastOffer';
|
|
23
|
+
import {
|
|
24
|
+
PublicLeadDtoLastOfferFromJSON,
|
|
25
|
+
PublicLeadDtoLastOfferFromJSONTyped,
|
|
26
|
+
PublicLeadDtoLastOfferToJSON,
|
|
27
|
+
} from './PublicLeadDtoLastOffer';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @interface PublicLeadDto
|
|
33
|
+
*/
|
|
34
|
+
export interface PublicLeadDto {
|
|
35
|
+
/**
|
|
36
|
+
* The current id
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof PublicLeadDto
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
/**
|
|
42
|
+
* The current lead status
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof PublicLeadDto
|
|
45
|
+
*/
|
|
46
|
+
status: PublicLeadDtoStatusEnum;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {PublicLeadDtoLastOffer}
|
|
50
|
+
* @memberof PublicLeadDto
|
|
51
|
+
*/
|
|
52
|
+
lastOffer: PublicLeadDtoLastOffer | null;
|
|
53
|
+
/**
|
|
54
|
+
* The buyer information
|
|
55
|
+
* @type {PublicLeadBuyerDto}
|
|
56
|
+
* @memberof PublicLeadDto
|
|
57
|
+
*/
|
|
58
|
+
buyer: PublicLeadBuyerDto;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export const PublicLeadDtoStatusEnum = {
|
|
66
|
+
UNVERIFIED: 'unverified',
|
|
67
|
+
ACTIVE: 'active',
|
|
68
|
+
ACCEPTED: 'accepted',
|
|
69
|
+
FINISHED: 'finished',
|
|
70
|
+
DELETED: 'deleted',
|
|
71
|
+
ARCHIVED: 'archived'
|
|
72
|
+
} as const;
|
|
73
|
+
export type PublicLeadDtoStatusEnum = typeof PublicLeadDtoStatusEnum[keyof typeof PublicLeadDtoStatusEnum];
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Check if a given object implements the PublicLeadDto interface.
|
|
78
|
+
*/
|
|
79
|
+
export function instanceOfPublicLeadDto(value: object): value is PublicLeadDto {
|
|
80
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
81
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
82
|
+
if (!('lastOffer' in value) || value['lastOffer'] === undefined) return false;
|
|
83
|
+
if (!('buyer' in value) || value['buyer'] === undefined) return false;
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function PublicLeadDtoFromJSON(json: any): PublicLeadDto {
|
|
88
|
+
return PublicLeadDtoFromJSONTyped(json, false);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function PublicLeadDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicLeadDto {
|
|
92
|
+
if (json == null) {
|
|
93
|
+
return json;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'id': json['id'],
|
|
98
|
+
'status': json['status'],
|
|
99
|
+
'lastOffer': PublicLeadDtoLastOfferFromJSON(json['lastOffer']),
|
|
100
|
+
'buyer': PublicLeadBuyerDtoFromJSON(json['buyer']),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function PublicLeadDtoToJSON(value?: PublicLeadDto | null): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
|
|
110
|
+
'id': value['id'],
|
|
111
|
+
'status': value['status'],
|
|
112
|
+
'lastOffer': PublicLeadDtoLastOfferToJSON(value['lastOffer']),
|
|
113
|
+
'buyer': PublicLeadBuyerDtoToJSON(value['buyer']),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
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
|
+
* The last offer price
|
|
18
|
+
* @export
|
|
19
|
+
* @interface PublicLeadDtoLastOffer
|
|
20
|
+
*/
|
|
21
|
+
export interface PublicLeadDtoLastOffer {
|
|
22
|
+
/**
|
|
23
|
+
* Monetary amount, represented as an integer without scale/decimals.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PublicLeadDtoLastOffer
|
|
26
|
+
*/
|
|
27
|
+
amount: number;
|
|
28
|
+
/**
|
|
29
|
+
* Three letter ISO currency code
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PublicLeadDtoLastOffer
|
|
32
|
+
*/
|
|
33
|
+
currencyCode: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the PublicLeadDtoLastOffer interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfPublicLeadDtoLastOffer(value: object): value is PublicLeadDtoLastOffer {
|
|
40
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
41
|
+
if (!('currencyCode' in value) || value['currencyCode'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function PublicLeadDtoLastOfferFromJSON(json: any): PublicLeadDtoLastOffer {
|
|
46
|
+
return PublicLeadDtoLastOfferFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function PublicLeadDtoLastOfferFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicLeadDtoLastOffer {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'amount': json['amount'],
|
|
56
|
+
'currencyCode': json['currencyCode'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function PublicLeadDtoLastOfferToJSON(value?: PublicLeadDtoLastOffer | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'amount': value['amount'],
|
|
67
|
+
'currencyCode': value['currencyCode'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -49,6 +49,9 @@ export * from './ObjectId';
|
|
|
49
49
|
export * from './PaginateResponse';
|
|
50
50
|
export * from './PaginateResponseLinks';
|
|
51
51
|
export * from './PaginateResponseMeta';
|
|
52
|
+
export * from './PublicLeadBuyerDto';
|
|
53
|
+
export * from './PublicLeadDto';
|
|
54
|
+
export * from './PublicLeadDtoLastOffer';
|
|
52
55
|
export * from './PutLeadInput';
|
|
53
56
|
export * from './RegisterAccountInput';
|
|
54
57
|
export * from './RelatedSellerDomain';
|