@randock/nameshift-api-client 0.0.13 → 0.0.15
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 -1
- package/dist/apis/LeadsApi.d.ts +13 -1
- package/dist/apis/LeadsApi.js +58 -0
- package/dist/apis/LeadsPublicApi.d.ts +5 -3
- package/dist/apis/LeadsPublicApi.js +6 -4
- package/dist/models/CreateLeadMessageInput.d.ts +1 -22
- package/dist/models/CreateLeadMessageInput.js +1 -15
- package/dist/models/IntersectionLeadDtoWithLeadDetailsDto.d.ts +22 -0
- package/dist/models/IntersectionLeadDtoWithLeadDetailsDto.js +16 -1
- package/dist/models/IntersectionLeadDtoWithListFieldsDto.d.ts +37 -2
- package/dist/models/IntersectionLeadDtoWithListFieldsDto.js +23 -1
- package/dist/models/IntersectionLeadDtoWithListFieldsDtoLastMessageData.d.ts +32 -0
- package/dist/models/IntersectionLeadDtoWithListFieldsDtoLastMessageData.js +51 -0
- package/dist/models/IntersectionLeadDtoWithListFieldsDtoLastOffer.d.ts +37 -0
- package/dist/models/IntersectionLeadDtoWithListFieldsDtoLastOffer.js +53 -0
- package/dist/models/LeadDto.d.ts +22 -0
- package/dist/models/LeadDto.js +16 -1
- package/dist/models/LeadMessageDto.d.ts +6 -0
- package/dist/models/LeadMessageDto.js +3 -0
- package/dist/models/PutLeadInput.d.ts +32 -0
- package/dist/models/PutLeadInput.js +51 -0
- package/dist/models/index.d.ts +3 -1
- package/dist/models/index.js +3 -1
- package/package.json +2 -1
- package/src/apis/LeadsApi.ts +53 -0
- package/src/apis/LeadsPublicApi.ts +10 -5
- package/src/models/CreateLeadMessageInput.ts +1 -37
- package/src/models/IntersectionLeadDtoWithLeadDetailsDto.ts +34 -0
- package/src/models/IntersectionLeadDtoWithListFieldsDto.ts +61 -2
- package/src/models/IntersectionLeadDtoWithListFieldsDtoLastMessageData.ts +73 -0
- package/src/models/IntersectionLeadDtoWithListFieldsDtoLastOffer.ts +75 -0
- package/src/models/LeadDto.ts +35 -0
- package/src/models/LeadMessageDto.ts +9 -0
- package/src/models/PutLeadInput.ts +73 -0
- package/src/models/index.ts +3 -1
|
@@ -0,0 +1,53 @@
|
|
|
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.IntersectionLeadDtoWithListFieldsDtoLastOfferToJSON = exports.IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSONTyped = exports.IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSON = exports.instanceOfIntersectionLeadDtoWithListFieldsDtoLastOffer = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the IntersectionLeadDtoWithListFieldsDtoLastOffer interface.
|
|
19
|
+
*/
|
|
20
|
+
function instanceOfIntersectionLeadDtoWithListFieldsDtoLastOffer(value) {
|
|
21
|
+
var isInstance = true;
|
|
22
|
+
isInstance = isInstance && "amount" in value;
|
|
23
|
+
isInstance = isInstance && "currencyCode" in value;
|
|
24
|
+
return isInstance;
|
|
25
|
+
}
|
|
26
|
+
exports.instanceOfIntersectionLeadDtoWithListFieldsDtoLastOffer = instanceOfIntersectionLeadDtoWithListFieldsDtoLastOffer;
|
|
27
|
+
function IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSON(json) {
|
|
28
|
+
return IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
exports.IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSON = IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSON;
|
|
31
|
+
function IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'amount': json['amount'],
|
|
37
|
+
'currencyCode': json['currencyCode'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSONTyped = IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSONTyped;
|
|
41
|
+
function IntersectionLeadDtoWithListFieldsDtoLastOfferToJSON(value) {
|
|
42
|
+
if (value === undefined) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (value === null) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'amount': value.amount,
|
|
50
|
+
'currencyCode': value.currencyCode,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.IntersectionLeadDtoWithListFieldsDtoLastOfferToJSON = IntersectionLeadDtoWithListFieldsDtoLastOfferToJSON;
|
package/dist/models/LeadDto.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { IntersectionLeadDtoWithListFieldsDtoLastOffer } from './IntersectionLeadDtoWithListFieldsDtoLastOffer';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -27,6 +28,18 @@ export interface LeadDto {
|
|
|
27
28
|
* @memberof LeadDto
|
|
28
29
|
*/
|
|
29
30
|
status: LeadDtoStatusEnum;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {IntersectionLeadDtoWithListFieldsDtoLastOffer}
|
|
34
|
+
* @memberof LeadDto
|
|
35
|
+
*/
|
|
36
|
+
lastOffer: IntersectionLeadDtoWithListFieldsDtoLastOffer | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof LeadDto
|
|
41
|
+
*/
|
|
42
|
+
lastOfferBy: LeadDtoLastOfferByEnum | null;
|
|
30
43
|
/**
|
|
31
44
|
* Created at date
|
|
32
45
|
* @type {Date}
|
|
@@ -43,6 +56,15 @@ export declare const LeadDtoStatusEnum: {
|
|
|
43
56
|
readonly ARCHIVED: "archived";
|
|
44
57
|
};
|
|
45
58
|
export type LeadDtoStatusEnum = typeof LeadDtoStatusEnum[keyof typeof LeadDtoStatusEnum];
|
|
59
|
+
/**
|
|
60
|
+
* @export
|
|
61
|
+
*/
|
|
62
|
+
export declare const LeadDtoLastOfferByEnum: {
|
|
63
|
+
readonly BUYER: "buyer";
|
|
64
|
+
readonly SELLER: "seller";
|
|
65
|
+
readonly ADMIN: "admin";
|
|
66
|
+
};
|
|
67
|
+
export type LeadDtoLastOfferByEnum = typeof LeadDtoLastOfferByEnum[keyof typeof LeadDtoLastOfferByEnum];
|
|
46
68
|
/**
|
|
47
69
|
* Check if a given object implements the LeadDto interface.
|
|
48
70
|
*/
|
package/dist/models/LeadDto.js
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.LeadDtoToJSON = exports.LeadDtoFromJSONTyped = exports.LeadDtoFromJSON = exports.instanceOfLeadDto = exports.LeadDtoStatusEnum = void 0;
|
|
16
|
+
exports.LeadDtoToJSON = exports.LeadDtoFromJSONTyped = exports.LeadDtoFromJSON = exports.instanceOfLeadDto = exports.LeadDtoLastOfferByEnum = exports.LeadDtoStatusEnum = void 0;
|
|
17
|
+
var IntersectionLeadDtoWithListFieldsDtoLastOffer_1 = require("./IntersectionLeadDtoWithListFieldsDtoLastOffer");
|
|
17
18
|
/**
|
|
18
19
|
* @export
|
|
19
20
|
*/
|
|
@@ -22,6 +23,14 @@ exports.LeadDtoStatusEnum = {
|
|
|
22
23
|
DELETED: 'deleted',
|
|
23
24
|
ARCHIVED: 'archived'
|
|
24
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* @export
|
|
28
|
+
*/
|
|
29
|
+
exports.LeadDtoLastOfferByEnum = {
|
|
30
|
+
BUYER: 'buyer',
|
|
31
|
+
SELLER: 'seller',
|
|
32
|
+
ADMIN: 'admin'
|
|
33
|
+
};
|
|
25
34
|
/**
|
|
26
35
|
* Check if a given object implements the LeadDto interface.
|
|
27
36
|
*/
|
|
@@ -29,6 +38,8 @@ function instanceOfLeadDto(value) {
|
|
|
29
38
|
var isInstance = true;
|
|
30
39
|
isInstance = isInstance && "id" in value;
|
|
31
40
|
isInstance = isInstance && "status" in value;
|
|
41
|
+
isInstance = isInstance && "lastOffer" in value;
|
|
42
|
+
isInstance = isInstance && "lastOfferBy" in value;
|
|
32
43
|
isInstance = isInstance && "createdAt" in value;
|
|
33
44
|
return isInstance;
|
|
34
45
|
}
|
|
@@ -44,6 +55,8 @@ function LeadDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
55
|
return {
|
|
45
56
|
'id': json['id'],
|
|
46
57
|
'status': json['status'],
|
|
58
|
+
'lastOffer': (0, IntersectionLeadDtoWithListFieldsDtoLastOffer_1.IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSON)(json['lastOffer']),
|
|
59
|
+
'lastOfferBy': json['lastOfferBy'],
|
|
47
60
|
'createdAt': (new Date(json['createdAt'])),
|
|
48
61
|
};
|
|
49
62
|
}
|
|
@@ -58,6 +71,8 @@ function LeadDtoToJSON(value) {
|
|
|
58
71
|
return {
|
|
59
72
|
'id': value.id,
|
|
60
73
|
'status': value.status,
|
|
74
|
+
'lastOffer': (0, IntersectionLeadDtoWithListFieldsDtoLastOffer_1.IntersectionLeadDtoWithListFieldsDtoLastOfferToJSON)(value.lastOffer),
|
|
75
|
+
'lastOfferBy': value.lastOfferBy,
|
|
61
76
|
'createdAt': (value.createdAt.toISOString()),
|
|
62
77
|
};
|
|
63
78
|
}
|
|
@@ -46,6 +46,12 @@ export interface LeadMessageDto {
|
|
|
46
46
|
* @memberof LeadMessageDto
|
|
47
47
|
*/
|
|
48
48
|
createdAt: Date;
|
|
49
|
+
/**
|
|
50
|
+
* Initials of the buyer/seller *
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof LeadMessageDto
|
|
53
|
+
*/
|
|
54
|
+
initials: string;
|
|
49
55
|
/**
|
|
50
56
|
* Optional message *
|
|
51
57
|
* @type {string}
|
|
@@ -40,6 +40,7 @@ function instanceOfLeadMessageDto(value) {
|
|
|
40
40
|
isInstance = isInstance && "origin" in value;
|
|
41
41
|
isInstance = isInstance && "data" in value;
|
|
42
42
|
isInstance = isInstance && "createdAt" in value;
|
|
43
|
+
isInstance = isInstance && "initials" in value;
|
|
43
44
|
isInstance = isInstance && "message" in value;
|
|
44
45
|
return isInstance;
|
|
45
46
|
}
|
|
@@ -58,6 +59,7 @@ function LeadMessageDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
58
59
|
'origin': json['origin'],
|
|
59
60
|
'data': (0, LeadMessageDtoData_1.LeadMessageDtoDataFromJSON)(json['data']),
|
|
60
61
|
'createdAt': (new Date(json['createdAt'])),
|
|
62
|
+
'initials': json['initials'],
|
|
61
63
|
'message': json['message'],
|
|
62
64
|
};
|
|
63
65
|
}
|
|
@@ -75,6 +77,7 @@ function LeadMessageDtoToJSON(value) {
|
|
|
75
77
|
'origin': value.origin,
|
|
76
78
|
'data': (0, LeadMessageDtoData_1.LeadMessageDtoDataToJSON)(value.data),
|
|
77
79
|
'createdAt': (value.createdAt.toISOString()),
|
|
80
|
+
'initials': value.initials,
|
|
78
81
|
'message': value.message,
|
|
79
82
|
};
|
|
80
83
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nameshift
|
|
3
|
+
* Nameshift API
|
|
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
|
+
import type { MoneyDto } from './MoneyDto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PutLeadInput
|
|
17
|
+
*/
|
|
18
|
+
export interface PutLeadInput {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {MoneyDto}
|
|
22
|
+
* @memberof PutLeadInput
|
|
23
|
+
*/
|
|
24
|
+
offer: MoneyDto | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the PutLeadInput interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfPutLeadInput(value: object): boolean;
|
|
30
|
+
export declare function PutLeadInputFromJSON(json: any): PutLeadInput;
|
|
31
|
+
export declare function PutLeadInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutLeadInput;
|
|
32
|
+
export declare function PutLeadInputToJSON(value?: PutLeadInput | null): any;
|
|
@@ -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.PutLeadInputToJSON = exports.PutLeadInputFromJSONTyped = exports.PutLeadInputFromJSON = exports.instanceOfPutLeadInput = void 0;
|
|
17
|
+
var MoneyDto_1 = require("./MoneyDto");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the PutLeadInput interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfPutLeadInput(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
isInstance = isInstance && "offer" in value;
|
|
24
|
+
return isInstance;
|
|
25
|
+
}
|
|
26
|
+
exports.instanceOfPutLeadInput = instanceOfPutLeadInput;
|
|
27
|
+
function PutLeadInputFromJSON(json) {
|
|
28
|
+
return PutLeadInputFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
exports.PutLeadInputFromJSON = PutLeadInputFromJSON;
|
|
31
|
+
function PutLeadInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'offer': (0, MoneyDto_1.MoneyDtoFromJSON)(json['offer']),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.PutLeadInputFromJSONTyped = PutLeadInputFromJSONTyped;
|
|
40
|
+
function PutLeadInputToJSON(value) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (value === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'offer': (0, MoneyDto_1.MoneyDtoToJSON)(value.offer),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.PutLeadInputToJSON = PutLeadInputToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export * from './BatchUpdate404Response';
|
|
|
7
7
|
export * from './BatchUpdateDomainsInput';
|
|
8
8
|
export * from './CreateLeadInput';
|
|
9
9
|
export * from './CreateLeadMessageInput';
|
|
10
|
-
export * from './CreateLeadMessageInputData';
|
|
11
10
|
export * from './DeleteDomainsInput';
|
|
12
11
|
export * from './DomainDto';
|
|
13
12
|
export * from './ImportDomainsDto';
|
|
@@ -18,6 +17,8 @@ export * from './IntersectionAccountDtoWithSettingsDto';
|
|
|
18
17
|
export * from './IntersectionDomainDtoWithAccountDto';
|
|
19
18
|
export * from './IntersectionLeadDtoWithLeadDetailsDto';
|
|
20
19
|
export * from './IntersectionLeadDtoWithListFieldsDto';
|
|
20
|
+
export * from './IntersectionLeadDtoWithListFieldsDtoLastMessageData';
|
|
21
|
+
export * from './IntersectionLeadDtoWithListFieldsDtoLastOffer';
|
|
21
22
|
export * from './LeadDto';
|
|
22
23
|
export * from './LeadMessageData';
|
|
23
24
|
export * from './LeadMessageDto';
|
|
@@ -35,6 +36,7 @@ export * from './PaginateResponse';
|
|
|
35
36
|
export * from './PaginateResponseLinks';
|
|
36
37
|
export * from './PaginateResponseMeta';
|
|
37
38
|
export * from './PublicDomainControllerGetDomainIdentifier404Response';
|
|
39
|
+
export * from './PutLeadInput';
|
|
38
40
|
export * from './TokenDto';
|
|
39
41
|
export * from './UpdateDomainInput';
|
|
40
42
|
export * from './UpdateSettings401Response';
|
package/dist/models/index.js
CHANGED
|
@@ -25,7 +25,6 @@ __exportStar(require("./BatchUpdate404Response"), exports);
|
|
|
25
25
|
__exportStar(require("./BatchUpdateDomainsInput"), exports);
|
|
26
26
|
__exportStar(require("./CreateLeadInput"), exports);
|
|
27
27
|
__exportStar(require("./CreateLeadMessageInput"), exports);
|
|
28
|
-
__exportStar(require("./CreateLeadMessageInputData"), exports);
|
|
29
28
|
__exportStar(require("./DeleteDomainsInput"), exports);
|
|
30
29
|
__exportStar(require("./DomainDto"), exports);
|
|
31
30
|
__exportStar(require("./ImportDomainsDto"), exports);
|
|
@@ -36,6 +35,8 @@ __exportStar(require("./IntersectionAccountDtoWithSettingsDto"), exports);
|
|
|
36
35
|
__exportStar(require("./IntersectionDomainDtoWithAccountDto"), exports);
|
|
37
36
|
__exportStar(require("./IntersectionLeadDtoWithLeadDetailsDto"), exports);
|
|
38
37
|
__exportStar(require("./IntersectionLeadDtoWithListFieldsDto"), exports);
|
|
38
|
+
__exportStar(require("./IntersectionLeadDtoWithListFieldsDtoLastMessageData"), exports);
|
|
39
|
+
__exportStar(require("./IntersectionLeadDtoWithListFieldsDtoLastOffer"), exports);
|
|
39
40
|
__exportStar(require("./LeadDto"), exports);
|
|
40
41
|
__exportStar(require("./LeadMessageData"), exports);
|
|
41
42
|
__exportStar(require("./LeadMessageDto"), exports);
|
|
@@ -53,6 +54,7 @@ __exportStar(require("./PaginateResponse"), exports);
|
|
|
53
54
|
__exportStar(require("./PaginateResponseLinks"), exports);
|
|
54
55
|
__exportStar(require("./PaginateResponseMeta"), exports);
|
|
55
56
|
__exportStar(require("./PublicDomainControllerGetDomainIdentifier404Response"), exports);
|
|
57
|
+
__exportStar(require("./PutLeadInput"), exports);
|
|
56
58
|
__exportStar(require("./TokenDto"), exports);
|
|
57
59
|
__exportStar(require("./UpdateDomainInput"), exports);
|
|
58
60
|
__exportStar(require("./UpdateSettings401Response"), exports);
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@randock/nameshift-api-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "OpenAPI client for @randock/nameshift-api-client",
|
|
5
|
+
"author": "OpenAPI-Generator",
|
|
5
6
|
"main": "./dist/index.js",
|
|
6
7
|
"typings": "./dist/index.d.ts",
|
|
7
8
|
"scripts": {
|
package/src/apis/LeadsApi.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
IntersectionLeadDtoWithListFieldsDto,
|
|
21
21
|
LeadMessageDto,
|
|
22
22
|
ListLeadMessagesDto,
|
|
23
|
+
PutLeadInput,
|
|
23
24
|
UpdateSettings429Response,
|
|
24
25
|
} from '../models/index';
|
|
25
26
|
import {
|
|
@@ -33,6 +34,8 @@ import {
|
|
|
33
34
|
LeadMessageDtoToJSON,
|
|
34
35
|
ListLeadMessagesDtoFromJSON,
|
|
35
36
|
ListLeadMessagesDtoToJSON,
|
|
37
|
+
PutLeadInputFromJSON,
|
|
38
|
+
PutLeadInputToJSON,
|
|
36
39
|
UpdateSettings429ResponseFromJSON,
|
|
37
40
|
UpdateSettings429ResponseToJSON,
|
|
38
41
|
} from '../models/index';
|
|
@@ -50,6 +53,11 @@ export interface GetMessagesRequest {
|
|
|
50
53
|
leadId: string;
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
export interface PutOfferRequest {
|
|
57
|
+
leadId: string;
|
|
58
|
+
putLeadInput: PutLeadInput;
|
|
59
|
+
}
|
|
60
|
+
|
|
53
61
|
/**
|
|
54
62
|
*
|
|
55
63
|
*/
|
|
@@ -210,4 +218,49 @@ export class LeadsApi extends runtime.BaseAPI {
|
|
|
210
218
|
return await response.value();
|
|
211
219
|
}
|
|
212
220
|
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
*/
|
|
224
|
+
async putOfferRaw(requestParameters: PutOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadMessageDto>> {
|
|
225
|
+
if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
|
|
226
|
+
throw new runtime.RequiredError('leadId','Required parameter requestParameters.leadId was null or undefined when calling putOffer.');
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (requestParameters.putLeadInput === null || requestParameters.putLeadInput === undefined) {
|
|
230
|
+
throw new runtime.RequiredError('putLeadInput','Required parameter requestParameters.putLeadInput was null or undefined when calling putOffer.');
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const queryParameters: any = {};
|
|
234
|
+
|
|
235
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
236
|
+
|
|
237
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
238
|
+
|
|
239
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
240
|
+
const token = this.configuration.accessToken;
|
|
241
|
+
const tokenString = await token("bearer", []);
|
|
242
|
+
|
|
243
|
+
if (tokenString) {
|
|
244
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
const response = await this.request({
|
|
248
|
+
path: `/leads/{leadId}/offer`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters.leadId))),
|
|
249
|
+
method: 'PUT',
|
|
250
|
+
headers: headerParameters,
|
|
251
|
+
query: queryParameters,
|
|
252
|
+
body: PutLeadInputToJSON(requestParameters.putLeadInput),
|
|
253
|
+
}, initOverrides);
|
|
254
|
+
|
|
255
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LeadMessageDtoFromJSON(jsonValue));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
*
|
|
260
|
+
*/
|
|
261
|
+
async putOffer(requestParameters: PutOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadMessageDto> {
|
|
262
|
+
const response = await this.putOfferRaw(requestParameters, initOverrides);
|
|
263
|
+
return await response.value();
|
|
264
|
+
}
|
|
265
|
+
|
|
213
266
|
}
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
BatchUpdate404Response,
|
|
19
19
|
CreateLeadInput,
|
|
20
20
|
LeadDto,
|
|
21
|
+
UpdateSettings429Response,
|
|
21
22
|
} from '../models/index';
|
|
22
23
|
import {
|
|
23
24
|
BatchUpdate404ResponseFromJSON,
|
|
@@ -26,9 +27,11 @@ import {
|
|
|
26
27
|
CreateLeadInputToJSON,
|
|
27
28
|
LeadDtoFromJSON,
|
|
28
29
|
LeadDtoToJSON,
|
|
30
|
+
UpdateSettings429ResponseFromJSON,
|
|
31
|
+
UpdateSettings429ResponseToJSON,
|
|
29
32
|
} from '../models/index';
|
|
30
33
|
|
|
31
|
-
export interface
|
|
34
|
+
export interface CreateLeadRequest {
|
|
32
35
|
createLeadInput: CreateLeadInput;
|
|
33
36
|
}
|
|
34
37
|
|
|
@@ -38,10 +41,11 @@ export interface PublicLeadControllerPostLeadRequest {
|
|
|
38
41
|
export class LeadsPublicApi extends runtime.BaseAPI {
|
|
39
42
|
|
|
40
43
|
/**
|
|
44
|
+
*
|
|
41
45
|
*/
|
|
42
|
-
async
|
|
46
|
+
async createLeadRaw(requestParameters: CreateLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadDto>> {
|
|
43
47
|
if (requestParameters.createLeadInput === null || requestParameters.createLeadInput === undefined) {
|
|
44
|
-
throw new runtime.RequiredError('createLeadInput','Required parameter requestParameters.createLeadInput was null or undefined when calling
|
|
48
|
+
throw new runtime.RequiredError('createLeadInput','Required parameter requestParameters.createLeadInput was null or undefined when calling createLead.');
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
const queryParameters: any = {};
|
|
@@ -62,9 +66,10 @@ export class LeadsPublicApi extends runtime.BaseAPI {
|
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
/**
|
|
69
|
+
*
|
|
65
70
|
*/
|
|
66
|
-
async
|
|
67
|
-
const response = await this.
|
|
71
|
+
async createLead(requestParameters: CreateLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadDto> {
|
|
72
|
+
const response = await this.createLeadRaw(requestParameters, initOverrides);
|
|
68
73
|
return await response.value();
|
|
69
74
|
}
|
|
70
75
|
|
|
@@ -13,13 +13,6 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
|
-
import type { CreateLeadMessageInputData } from './CreateLeadMessageInputData';
|
|
17
|
-
import {
|
|
18
|
-
CreateLeadMessageInputDataFromJSON,
|
|
19
|
-
CreateLeadMessageInputDataFromJSONTyped,
|
|
20
|
-
CreateLeadMessageInputDataToJSON,
|
|
21
|
-
} from './CreateLeadMessageInputData';
|
|
22
|
-
|
|
23
16
|
/**
|
|
24
17
|
*
|
|
25
18
|
* @export
|
|
@@ -31,39 +24,14 @@ export interface CreateLeadMessageInput {
|
|
|
31
24
|
* @type {string}
|
|
32
25
|
* @memberof CreateLeadMessageInput
|
|
33
26
|
*/
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @type {CreateLeadMessageInputData}
|
|
38
|
-
* @memberof CreateLeadMessageInput
|
|
39
|
-
*/
|
|
40
|
-
data: CreateLeadMessageInputData | null;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @type {string}
|
|
44
|
-
* @memberof CreateLeadMessageInput
|
|
45
|
-
*/
|
|
46
|
-
message: string | null;
|
|
27
|
+
message: string;
|
|
47
28
|
}
|
|
48
29
|
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @export
|
|
52
|
-
*/
|
|
53
|
-
export const CreateLeadMessageInputTypeEnum = {
|
|
54
|
-
OFFER: 'offer',
|
|
55
|
-
MESSAGE: 'message'
|
|
56
|
-
} as const;
|
|
57
|
-
export type CreateLeadMessageInputTypeEnum = typeof CreateLeadMessageInputTypeEnum[keyof typeof CreateLeadMessageInputTypeEnum];
|
|
58
|
-
|
|
59
|
-
|
|
60
30
|
/**
|
|
61
31
|
* Check if a given object implements the CreateLeadMessageInput interface.
|
|
62
32
|
*/
|
|
63
33
|
export function instanceOfCreateLeadMessageInput(value: object): boolean {
|
|
64
34
|
let isInstance = true;
|
|
65
|
-
isInstance = isInstance && "type" in value;
|
|
66
|
-
isInstance = isInstance && "data" in value;
|
|
67
35
|
isInstance = isInstance && "message" in value;
|
|
68
36
|
|
|
69
37
|
return isInstance;
|
|
@@ -79,8 +47,6 @@ export function CreateLeadMessageInputFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
79
47
|
}
|
|
80
48
|
return {
|
|
81
49
|
|
|
82
|
-
'type': json['type'],
|
|
83
|
-
'data': CreateLeadMessageInputDataFromJSON(json['data']),
|
|
84
50
|
'message': json['message'],
|
|
85
51
|
};
|
|
86
52
|
}
|
|
@@ -94,8 +60,6 @@ export function CreateLeadMessageInputToJSON(value?: CreateLeadMessageInput | nu
|
|
|
94
60
|
}
|
|
95
61
|
return {
|
|
96
62
|
|
|
97
|
-
'type': value.type,
|
|
98
|
-
'data': CreateLeadMessageInputDataToJSON(value.data),
|
|
99
63
|
'message': value.message,
|
|
100
64
|
};
|
|
101
65
|
}
|
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
IntersectionDomainDtoWithAccountDtoFromJSONTyped,
|
|
20
20
|
IntersectionDomainDtoWithAccountDtoToJSON,
|
|
21
21
|
} from './IntersectionDomainDtoWithAccountDto';
|
|
22
|
+
import type { IntersectionLeadDtoWithListFieldsDtoLastOffer } from './IntersectionLeadDtoWithListFieldsDtoLastOffer';
|
|
23
|
+
import {
|
|
24
|
+
IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSON,
|
|
25
|
+
IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSONTyped,
|
|
26
|
+
IntersectionLeadDtoWithListFieldsDtoLastOfferToJSON,
|
|
27
|
+
} from './IntersectionLeadDtoWithListFieldsDtoLastOffer';
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
*
|
|
@@ -38,6 +44,18 @@ export interface IntersectionLeadDtoWithLeadDetailsDto {
|
|
|
38
44
|
* @memberof IntersectionLeadDtoWithLeadDetailsDto
|
|
39
45
|
*/
|
|
40
46
|
status: IntersectionLeadDtoWithLeadDetailsDtoStatusEnum;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {IntersectionLeadDtoWithListFieldsDtoLastOffer}
|
|
50
|
+
* @memberof IntersectionLeadDtoWithLeadDetailsDto
|
|
51
|
+
*/
|
|
52
|
+
lastOffer: IntersectionLeadDtoWithListFieldsDtoLastOffer | null;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof IntersectionLeadDtoWithLeadDetailsDto
|
|
57
|
+
*/
|
|
58
|
+
lastOfferBy: IntersectionLeadDtoWithLeadDetailsDtoLastOfferByEnum | null;
|
|
41
59
|
/**
|
|
42
60
|
*
|
|
43
61
|
* @type {IntersectionDomainDtoWithAccountDto}
|
|
@@ -63,6 +81,16 @@ export const IntersectionLeadDtoWithLeadDetailsDtoStatusEnum = {
|
|
|
63
81
|
} as const;
|
|
64
82
|
export type IntersectionLeadDtoWithLeadDetailsDtoStatusEnum = typeof IntersectionLeadDtoWithLeadDetailsDtoStatusEnum[keyof typeof IntersectionLeadDtoWithLeadDetailsDtoStatusEnum];
|
|
65
83
|
|
|
84
|
+
/**
|
|
85
|
+
* @export
|
|
86
|
+
*/
|
|
87
|
+
export const IntersectionLeadDtoWithLeadDetailsDtoLastOfferByEnum = {
|
|
88
|
+
BUYER: 'buyer',
|
|
89
|
+
SELLER: 'seller',
|
|
90
|
+
ADMIN: 'admin'
|
|
91
|
+
} as const;
|
|
92
|
+
export type IntersectionLeadDtoWithLeadDetailsDtoLastOfferByEnum = typeof IntersectionLeadDtoWithLeadDetailsDtoLastOfferByEnum[keyof typeof IntersectionLeadDtoWithLeadDetailsDtoLastOfferByEnum];
|
|
93
|
+
|
|
66
94
|
|
|
67
95
|
/**
|
|
68
96
|
* Check if a given object implements the IntersectionLeadDtoWithLeadDetailsDto interface.
|
|
@@ -71,6 +99,8 @@ export function instanceOfIntersectionLeadDtoWithLeadDetailsDto(value: object):
|
|
|
71
99
|
let isInstance = true;
|
|
72
100
|
isInstance = isInstance && "id" in value;
|
|
73
101
|
isInstance = isInstance && "status" in value;
|
|
102
|
+
isInstance = isInstance && "lastOffer" in value;
|
|
103
|
+
isInstance = isInstance && "lastOfferBy" in value;
|
|
74
104
|
isInstance = isInstance && "domain" in value;
|
|
75
105
|
isInstance = isInstance && "createdAt" in value;
|
|
76
106
|
|
|
@@ -89,6 +119,8 @@ export function IntersectionLeadDtoWithLeadDetailsDtoFromJSONTyped(json: any, ig
|
|
|
89
119
|
|
|
90
120
|
'id': json['id'],
|
|
91
121
|
'status': json['status'],
|
|
122
|
+
'lastOffer': IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSON(json['lastOffer']),
|
|
123
|
+
'lastOfferBy': json['lastOfferBy'],
|
|
92
124
|
'domain': IntersectionDomainDtoWithAccountDtoFromJSON(json['domain']),
|
|
93
125
|
'createdAt': (new Date(json['createdAt'])),
|
|
94
126
|
};
|
|
@@ -105,6 +137,8 @@ export function IntersectionLeadDtoWithLeadDetailsDtoToJSON(value?: Intersection
|
|
|
105
137
|
|
|
106
138
|
'id': value.id,
|
|
107
139
|
'status': value.status,
|
|
140
|
+
'lastOffer': IntersectionLeadDtoWithListFieldsDtoLastOfferToJSON(value.lastOffer),
|
|
141
|
+
'lastOfferBy': value.lastOfferBy,
|
|
108
142
|
'domain': IntersectionDomainDtoWithAccountDtoToJSON(value.domain),
|
|
109
143
|
'createdAt': (value.createdAt.toISOString()),
|
|
110
144
|
};
|