@randock/nameshift-api-client 0.0.10 → 0.0.12
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/dist/apis/LeadsApi.d.ts +15 -5
- package/dist/apis/LeadsApi.js +74 -15
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/IntersectionLeadDto.d.ts +52 -0
- package/dist/models/IntersectionLeadDto.js +64 -0
- package/dist/models/IntersectionLeadDtoWithListFieldsDto.d.ts +99 -0
- package/dist/models/IntersectionLeadDtoWithListFieldsDto.js +94 -0
- package/dist/models/LeadDto.d.ts +22 -1
- package/dist/models/LeadDto.js +15 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -6
- package/src/apis/LeadsApi.ts +61 -20
- package/src/apis/index.ts +1 -0
- package/src/models/IntersectionLeadDto.ts +96 -0
- package/src/models/IntersectionLeadDtoWithListFieldsDto.ts +160 -0
- package/src/models/LeadDto.ts +31 -1
- package/src/models/index.ts +2 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -6,6 +6,7 @@ src/apis/AccountsApi.ts
|
|
|
6
6
|
src/apis/AuthApi.ts
|
|
7
7
|
src/apis/DomainsApi.ts
|
|
8
8
|
src/apis/DomainsPublicApi.ts
|
|
9
|
+
src/apis/LeadsApi.ts
|
|
9
10
|
src/apis/LeadsPublicApi.ts
|
|
10
11
|
src/apis/index.ts
|
|
11
12
|
src/index.ts
|
|
@@ -23,6 +24,8 @@ src/models/IntersectionAccountDtoWithAddressDto.ts
|
|
|
23
24
|
src/models/IntersectionAccountDtoWithFinancialDto.ts
|
|
24
25
|
src/models/IntersectionAccountDtoWithFinancialDtoWithSettingsDtoWithAddressDto.ts
|
|
25
26
|
src/models/IntersectionAccountDtoWithSettingsDto.ts
|
|
27
|
+
src/models/IntersectionLeadDto.ts
|
|
28
|
+
src/models/IntersectionLeadDtoWithListFieldsDto.ts
|
|
26
29
|
src/models/LeadDto.ts
|
|
27
30
|
src/models/List200Response.ts
|
|
28
31
|
src/models/List400Response.ts
|
package/dist/apis/LeadsApi.d.ts
CHANGED
|
@@ -10,18 +10,28 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
14
|
-
export interface
|
|
15
|
-
|
|
13
|
+
import type { IntersectionLeadDto, IntersectionLeadDtoWithListFieldsDto } from '../models/index';
|
|
14
|
+
export interface GetRequest {
|
|
15
|
+
leadId: string;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
export declare class LeadsApi extends runtime.BaseAPI {
|
|
21
21
|
/**
|
|
22
|
+
*
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
getRaw(requestParameters: GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IntersectionLeadDto>>>;
|
|
24
25
|
/**
|
|
26
|
+
*
|
|
25
27
|
*/
|
|
26
|
-
|
|
28
|
+
get(requestParameters: GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IntersectionLeadDto>>;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
listLeadsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IntersectionLeadDtoWithListFieldsDto>>>;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
listLeads(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IntersectionLeadDtoWithListFieldsDto>>;
|
|
27
37
|
}
|
package/dist/apis/LeadsApi.js
CHANGED
|
@@ -76,41 +76,100 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
+
*
|
|
79
80
|
*/
|
|
80
|
-
LeadsApi.prototype.
|
|
81
|
+
LeadsApi.prototype.getRaw = function (requestParameters, initOverrides) {
|
|
81
82
|
return __awaiter(this, void 0, void 0, function () {
|
|
82
|
-
var queryParameters, headerParameters, response;
|
|
83
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
83
84
|
return __generator(this, function (_a) {
|
|
84
85
|
switch (_a.label) {
|
|
85
86
|
case 0:
|
|
86
|
-
if (requestParameters.
|
|
87
|
-
throw new runtime.RequiredError('
|
|
87
|
+
if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
|
|
88
|
+
throw new runtime.RequiredError('leadId', 'Required parameter requestParameters.leadId was null or undefined when calling get.');
|
|
88
89
|
}
|
|
89
90
|
queryParameters = {};
|
|
90
91
|
headerParameters = {};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
method: 'POST',
|
|
95
|
-
headers: headerParameters,
|
|
96
|
-
query: queryParameters,
|
|
97
|
-
body: (0, index_1.CreateLeadInputToJSON)(requestParameters.createLeadInput),
|
|
98
|
-
}, initOverrides)];
|
|
92
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
93
|
+
token = this.configuration.accessToken;
|
|
94
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
99
95
|
case 1:
|
|
96
|
+
tokenString = _a.sent();
|
|
97
|
+
if (tokenString) {
|
|
98
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
99
|
+
}
|
|
100
|
+
_a.label = 2;
|
|
101
|
+
case 2: return [4 /*yield*/, this.request({
|
|
102
|
+
path: "/leads/{leadId}".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters.leadId))),
|
|
103
|
+
method: 'GET',
|
|
104
|
+
headers: headerParameters,
|
|
105
|
+
query: queryParameters,
|
|
106
|
+
}, initOverrides)];
|
|
107
|
+
case 3:
|
|
108
|
+
response = _a.sent();
|
|
109
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.IntersectionLeadDtoFromJSON); })];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
LeadsApi.prototype.get = function (requestParameters, initOverrides) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
119
|
+
var response;
|
|
120
|
+
return __generator(this, function (_a) {
|
|
121
|
+
switch (_a.label) {
|
|
122
|
+
case 0: return [4 /*yield*/, this.getRaw(requestParameters, initOverrides)];
|
|
123
|
+
case 1:
|
|
124
|
+
response = _a.sent();
|
|
125
|
+
return [4 /*yield*/, response.value()];
|
|
126
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
*/
|
|
134
|
+
LeadsApi.prototype.listLeadsRaw = function (initOverrides) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
136
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
137
|
+
return __generator(this, function (_a) {
|
|
138
|
+
switch (_a.label) {
|
|
139
|
+
case 0:
|
|
140
|
+
queryParameters = {};
|
|
141
|
+
headerParameters = {};
|
|
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: "/leads",
|
|
153
|
+
method: 'GET',
|
|
154
|
+
headers: headerParameters,
|
|
155
|
+
query: queryParameters,
|
|
156
|
+
}, initOverrides)];
|
|
157
|
+
case 3:
|
|
100
158
|
response = _a.sent();
|
|
101
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (
|
|
159
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.IntersectionLeadDtoWithListFieldsDtoFromJSON); })];
|
|
102
160
|
}
|
|
103
161
|
});
|
|
104
162
|
});
|
|
105
163
|
};
|
|
106
164
|
/**
|
|
165
|
+
*
|
|
107
166
|
*/
|
|
108
|
-
LeadsApi.prototype.
|
|
167
|
+
LeadsApi.prototype.listLeads = function (initOverrides) {
|
|
109
168
|
return __awaiter(this, void 0, void 0, function () {
|
|
110
169
|
var response;
|
|
111
170
|
return __generator(this, function (_a) {
|
|
112
171
|
switch (_a.label) {
|
|
113
|
-
case 0: return [4 /*yield*/, this.
|
|
172
|
+
case 0: return [4 /*yield*/, this.listLeadsRaw(initOverrides)];
|
|
114
173
|
case 1:
|
|
115
174
|
response = _a.sent();
|
|
116
175
|
return [4 /*yield*/, response.value()];
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -20,4 +20,5 @@ __exportStar(require("./AccountsApi"), exports);
|
|
|
20
20
|
__exportStar(require("./AuthApi"), exports);
|
|
21
21
|
__exportStar(require("./DomainsApi"), exports);
|
|
22
22
|
__exportStar(require("./DomainsPublicApi"), exports);
|
|
23
|
+
__exportStar(require("./LeadsApi"), exports);
|
|
23
24
|
__exportStar(require("./LeadsPublicApi"), exports);
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface IntersectionLeadDto
|
|
16
|
+
*/
|
|
17
|
+
export interface IntersectionLeadDto {
|
|
18
|
+
/**
|
|
19
|
+
* The current id
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof IntersectionLeadDto
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* The current lead status
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof IntersectionLeadDto
|
|
28
|
+
*/
|
|
29
|
+
status: IntersectionLeadDtoStatusEnum;
|
|
30
|
+
/**
|
|
31
|
+
* Created at date
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof IntersectionLeadDto
|
|
34
|
+
*/
|
|
35
|
+
createdAt: Date;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const IntersectionLeadDtoStatusEnum: {
|
|
41
|
+
readonly ACTIVE: "active";
|
|
42
|
+
readonly DELETED: "deleted";
|
|
43
|
+
readonly ARCHIVED: "archived";
|
|
44
|
+
};
|
|
45
|
+
export type IntersectionLeadDtoStatusEnum = typeof IntersectionLeadDtoStatusEnum[keyof typeof IntersectionLeadDtoStatusEnum];
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the IntersectionLeadDto interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfIntersectionLeadDto(value: object): boolean;
|
|
50
|
+
export declare function IntersectionLeadDtoFromJSON(json: any): IntersectionLeadDto;
|
|
51
|
+
export declare function IntersectionLeadDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntersectionLeadDto;
|
|
52
|
+
export declare function IntersectionLeadDtoToJSON(value?: IntersectionLeadDto | null): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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.IntersectionLeadDtoToJSON = exports.IntersectionLeadDtoFromJSONTyped = exports.IntersectionLeadDtoFromJSON = exports.instanceOfIntersectionLeadDto = exports.IntersectionLeadDtoStatusEnum = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
exports.IntersectionLeadDtoStatusEnum = {
|
|
21
|
+
ACTIVE: 'active',
|
|
22
|
+
DELETED: 'deleted',
|
|
23
|
+
ARCHIVED: 'archived'
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the IntersectionLeadDto interface.
|
|
27
|
+
*/
|
|
28
|
+
function instanceOfIntersectionLeadDto(value) {
|
|
29
|
+
var isInstance = true;
|
|
30
|
+
isInstance = isInstance && "id" in value;
|
|
31
|
+
isInstance = isInstance && "status" in value;
|
|
32
|
+
isInstance = isInstance && "createdAt" in value;
|
|
33
|
+
return isInstance;
|
|
34
|
+
}
|
|
35
|
+
exports.instanceOfIntersectionLeadDto = instanceOfIntersectionLeadDto;
|
|
36
|
+
function IntersectionLeadDtoFromJSON(json) {
|
|
37
|
+
return IntersectionLeadDtoFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
exports.IntersectionLeadDtoFromJSON = IntersectionLeadDtoFromJSON;
|
|
40
|
+
function IntersectionLeadDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if ((json === undefined) || (json === null)) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'id': json['id'],
|
|
46
|
+
'status': json['status'],
|
|
47
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.IntersectionLeadDtoFromJSONTyped = IntersectionLeadDtoFromJSONTyped;
|
|
51
|
+
function IntersectionLeadDtoToJSON(value) {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (value === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'id': value.id,
|
|
60
|
+
'status': value.status,
|
|
61
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
exports.IntersectionLeadDtoToJSON = IntersectionLeadDtoToJSON;
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface IntersectionLeadDtoWithListFieldsDto
|
|
16
|
+
*/
|
|
17
|
+
export interface IntersectionLeadDtoWithListFieldsDto {
|
|
18
|
+
/**
|
|
19
|
+
* The current id
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* The current lead status
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
28
|
+
*/
|
|
29
|
+
status: IntersectionLeadDtoWithListFieldsDtoStatusEnum;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
34
|
+
*/
|
|
35
|
+
lastMessageFrom: IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
40
|
+
*/
|
|
41
|
+
lastMessageType: IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum;
|
|
42
|
+
/**
|
|
43
|
+
* Created at date
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
46
|
+
*/
|
|
47
|
+
createdAt: Date;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
52
|
+
*/
|
|
53
|
+
domainName: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
58
|
+
*/
|
|
59
|
+
buyerInitials: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
64
|
+
*/
|
|
65
|
+
lastMessageMessage: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export declare const IntersectionLeadDtoWithListFieldsDtoStatusEnum: {
|
|
71
|
+
readonly ACTIVE: "active";
|
|
72
|
+
readonly DELETED: "deleted";
|
|
73
|
+
readonly ARCHIVED: "archived";
|
|
74
|
+
};
|
|
75
|
+
export type IntersectionLeadDtoWithListFieldsDtoStatusEnum = typeof IntersectionLeadDtoWithListFieldsDtoStatusEnum[keyof typeof IntersectionLeadDtoWithListFieldsDtoStatusEnum];
|
|
76
|
+
/**
|
|
77
|
+
* @export
|
|
78
|
+
*/
|
|
79
|
+
export declare const IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum: {
|
|
80
|
+
readonly BUYER: "buyer";
|
|
81
|
+
readonly SELLER: "seller";
|
|
82
|
+
readonly ADMIN: "admin";
|
|
83
|
+
};
|
|
84
|
+
export type IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum = typeof IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum[keyof typeof IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum];
|
|
85
|
+
/**
|
|
86
|
+
* @export
|
|
87
|
+
*/
|
|
88
|
+
export declare const IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum: {
|
|
89
|
+
readonly OFFER: "offer";
|
|
90
|
+
readonly MESSAGE: "message";
|
|
91
|
+
};
|
|
92
|
+
export type IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum = typeof IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum[keyof typeof IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum];
|
|
93
|
+
/**
|
|
94
|
+
* Check if a given object implements the IntersectionLeadDtoWithListFieldsDto interface.
|
|
95
|
+
*/
|
|
96
|
+
export declare function instanceOfIntersectionLeadDtoWithListFieldsDto(value: object): boolean;
|
|
97
|
+
export declare function IntersectionLeadDtoWithListFieldsDtoFromJSON(json: any): IntersectionLeadDtoWithListFieldsDto;
|
|
98
|
+
export declare function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntersectionLeadDtoWithListFieldsDto;
|
|
99
|
+
export declare function IntersectionLeadDtoWithListFieldsDtoToJSON(value?: IntersectionLeadDtoWithListFieldsDto | null): any;
|
|
@@ -0,0 +1,94 @@
|
|
|
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.IntersectionLeadDtoWithListFieldsDtoToJSON = exports.IntersectionLeadDtoWithListFieldsDtoFromJSONTyped = exports.IntersectionLeadDtoWithListFieldsDtoFromJSON = exports.instanceOfIntersectionLeadDtoWithListFieldsDto = exports.IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum = exports.IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum = exports.IntersectionLeadDtoWithListFieldsDtoStatusEnum = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
exports.IntersectionLeadDtoWithListFieldsDtoStatusEnum = {
|
|
21
|
+
ACTIVE: 'active',
|
|
22
|
+
DELETED: 'deleted',
|
|
23
|
+
ARCHIVED: 'archived'
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
exports.IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum = {
|
|
29
|
+
BUYER: 'buyer',
|
|
30
|
+
SELLER: 'seller',
|
|
31
|
+
ADMIN: 'admin'
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* @export
|
|
35
|
+
*/
|
|
36
|
+
exports.IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum = {
|
|
37
|
+
OFFER: 'offer',
|
|
38
|
+
MESSAGE: 'message'
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Check if a given object implements the IntersectionLeadDtoWithListFieldsDto interface.
|
|
42
|
+
*/
|
|
43
|
+
function instanceOfIntersectionLeadDtoWithListFieldsDto(value) {
|
|
44
|
+
var isInstance = true;
|
|
45
|
+
isInstance = isInstance && "id" in value;
|
|
46
|
+
isInstance = isInstance && "status" in value;
|
|
47
|
+
isInstance = isInstance && "lastMessageFrom" in value;
|
|
48
|
+
isInstance = isInstance && "lastMessageType" in value;
|
|
49
|
+
isInstance = isInstance && "createdAt" in value;
|
|
50
|
+
isInstance = isInstance && "domainName" in value;
|
|
51
|
+
isInstance = isInstance && "buyerInitials" in value;
|
|
52
|
+
isInstance = isInstance && "lastMessageMessage" in value;
|
|
53
|
+
return isInstance;
|
|
54
|
+
}
|
|
55
|
+
exports.instanceOfIntersectionLeadDtoWithListFieldsDto = instanceOfIntersectionLeadDtoWithListFieldsDto;
|
|
56
|
+
function IntersectionLeadDtoWithListFieldsDtoFromJSON(json) {
|
|
57
|
+
return IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
exports.IntersectionLeadDtoWithListFieldsDtoFromJSON = IntersectionLeadDtoWithListFieldsDtoFromJSON;
|
|
60
|
+
function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
61
|
+
if ((json === undefined) || (json === null)) {
|
|
62
|
+
return json;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
'id': json['id'],
|
|
66
|
+
'status': json['status'],
|
|
67
|
+
'lastMessageFrom': json['lastMessageFrom'],
|
|
68
|
+
'lastMessageType': json['lastMessageType'],
|
|
69
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
70
|
+
'domainName': json['domainName'],
|
|
71
|
+
'buyerInitials': json['buyerInitials'],
|
|
72
|
+
'lastMessageMessage': json['lastMessageMessage'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
exports.IntersectionLeadDtoWithListFieldsDtoFromJSONTyped = IntersectionLeadDtoWithListFieldsDtoFromJSONTyped;
|
|
76
|
+
function IntersectionLeadDtoWithListFieldsDtoToJSON(value) {
|
|
77
|
+
if (value === undefined) {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
if (value === null) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
'id': value.id,
|
|
85
|
+
'status': value.status,
|
|
86
|
+
'lastMessageFrom': value.lastMessageFrom,
|
|
87
|
+
'lastMessageType': value.lastMessageType,
|
|
88
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
89
|
+
'domainName': value.domainName,
|
|
90
|
+
'buyerInitials': value.buyerInitials,
|
|
91
|
+
'lastMessageMessage': value.lastMessageMessage,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
exports.IntersectionLeadDtoWithListFieldsDtoToJSON = IntersectionLeadDtoWithListFieldsDtoToJSON;
|
package/dist/models/LeadDto.d.ts
CHANGED
|
@@ -16,12 +16,33 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface LeadDto {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* The current id
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof LeadDto
|
|
22
22
|
*/
|
|
23
23
|
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* The current lead status
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof LeadDto
|
|
28
|
+
*/
|
|
29
|
+
status: LeadDtoStatusEnum;
|
|
30
|
+
/**
|
|
31
|
+
* Created at date
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof LeadDto
|
|
34
|
+
*/
|
|
35
|
+
createdAt: Date;
|
|
24
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const LeadDtoStatusEnum: {
|
|
41
|
+
readonly ACTIVE: "active";
|
|
42
|
+
readonly DELETED: "deleted";
|
|
43
|
+
readonly ARCHIVED: "archived";
|
|
44
|
+
};
|
|
45
|
+
export type LeadDtoStatusEnum = typeof LeadDtoStatusEnum[keyof typeof LeadDtoStatusEnum];
|
|
25
46
|
/**
|
|
26
47
|
* Check if a given object implements the LeadDto interface.
|
|
27
48
|
*/
|
package/dist/models/LeadDto.js
CHANGED
|
@@ -13,13 +13,23 @@
|
|
|
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 = void 0;
|
|
16
|
+
exports.LeadDtoToJSON = exports.LeadDtoFromJSONTyped = exports.LeadDtoFromJSON = exports.instanceOfLeadDto = exports.LeadDtoStatusEnum = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
exports.LeadDtoStatusEnum = {
|
|
21
|
+
ACTIVE: 'active',
|
|
22
|
+
DELETED: 'deleted',
|
|
23
|
+
ARCHIVED: 'archived'
|
|
24
|
+
};
|
|
17
25
|
/**
|
|
18
26
|
* Check if a given object implements the LeadDto interface.
|
|
19
27
|
*/
|
|
20
28
|
function instanceOfLeadDto(value) {
|
|
21
29
|
var isInstance = true;
|
|
22
30
|
isInstance = isInstance && "id" in value;
|
|
31
|
+
isInstance = isInstance && "status" in value;
|
|
32
|
+
isInstance = isInstance && "createdAt" in value;
|
|
23
33
|
return isInstance;
|
|
24
34
|
}
|
|
25
35
|
exports.instanceOfLeadDto = instanceOfLeadDto;
|
|
@@ -33,6 +43,8 @@ function LeadDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
43
|
}
|
|
34
44
|
return {
|
|
35
45
|
'id': json['id'],
|
|
46
|
+
'status': json['status'],
|
|
47
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
36
48
|
};
|
|
37
49
|
}
|
|
38
50
|
exports.LeadDtoFromJSONTyped = LeadDtoFromJSONTyped;
|
|
@@ -45,6 +57,8 @@ function LeadDtoToJSON(value) {
|
|
|
45
57
|
}
|
|
46
58
|
return {
|
|
47
59
|
'id': value.id,
|
|
60
|
+
'status': value.status,
|
|
61
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
48
62
|
};
|
|
49
63
|
}
|
|
50
64
|
exports.LeadDtoToJSON = LeadDtoToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export * from './IntersectionAccountDtoWithAddressDto';
|
|
|
12
12
|
export * from './IntersectionAccountDtoWithFinancialDto';
|
|
13
13
|
export * from './IntersectionAccountDtoWithFinancialDtoWithSettingsDtoWithAddressDto';
|
|
14
14
|
export * from './IntersectionAccountDtoWithSettingsDto';
|
|
15
|
+
export * from './IntersectionLeadDto';
|
|
16
|
+
export * from './IntersectionLeadDtoWithListFieldsDto';
|
|
15
17
|
export * from './LeadDto';
|
|
16
18
|
export * from './List200Response';
|
|
17
19
|
export * from './List400Response';
|
package/dist/models/index.js
CHANGED
|
@@ -30,6 +30,8 @@ __exportStar(require("./IntersectionAccountDtoWithAddressDto"), exports);
|
|
|
30
30
|
__exportStar(require("./IntersectionAccountDtoWithFinancialDto"), exports);
|
|
31
31
|
__exportStar(require("./IntersectionAccountDtoWithFinancialDtoWithSettingsDtoWithAddressDto"), exports);
|
|
32
32
|
__exportStar(require("./IntersectionAccountDtoWithSettingsDto"), exports);
|
|
33
|
+
__exportStar(require("./IntersectionLeadDto"), exports);
|
|
34
|
+
__exportStar(require("./IntersectionLeadDtoWithListFieldsDto"), exports);
|
|
33
35
|
__exportStar(require("./LeadDto"), exports);
|
|
34
36
|
__exportStar(require("./List200Response"), exports);
|
|
35
37
|
__exportStar(require("./List400Response"), exports);
|
package/package.json
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@randock/nameshift-api-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "OpenAPI client for @randock/nameshift-api-client",
|
|
5
|
-
"author": "OpenAPI-Generator",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
|
|
9
|
-
},
|
|
10
5
|
"main": "./dist/index.js",
|
|
11
6
|
"typings": "./dist/index.d.ts",
|
|
12
7
|
"scripts": {
|
package/src/apis/LeadsApi.ts
CHANGED
|
@@ -15,21 +15,21 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
IntersectionLeadDto,
|
|
19
|
+
IntersectionLeadDtoWithListFieldsDto,
|
|
20
|
+
UpdateSettings429Response,
|
|
21
21
|
} from '../models/index';
|
|
22
22
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
IntersectionLeadDtoFromJSON,
|
|
24
|
+
IntersectionLeadDtoToJSON,
|
|
25
|
+
IntersectionLeadDtoWithListFieldsDtoFromJSON,
|
|
26
|
+
IntersectionLeadDtoWithListFieldsDtoToJSON,
|
|
27
|
+
UpdateSettings429ResponseFromJSON,
|
|
28
|
+
UpdateSettings429ResponseToJSON,
|
|
29
29
|
} from '../models/index';
|
|
30
30
|
|
|
31
|
-
export interface
|
|
32
|
-
|
|
31
|
+
export interface GetRequest {
|
|
32
|
+
leadId: string;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -38,33 +38,74 @@ export interface LeadControllerPostLeadRequest {
|
|
|
38
38
|
export class LeadsApi extends runtime.BaseAPI {
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
+
*
|
|
41
42
|
*/
|
|
42
|
-
async
|
|
43
|
-
if (requestParameters.
|
|
44
|
-
throw new runtime.RequiredError('
|
|
43
|
+
async getRaw(requestParameters: GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IntersectionLeadDto>>> {
|
|
44
|
+
if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
|
|
45
|
+
throw new runtime.RequiredError('leadId','Required parameter requestParameters.leadId was null or undefined when calling get.');
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
const queryParameters: any = {};
|
|
48
49
|
|
|
49
50
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
53
|
+
const token = this.configuration.accessToken;
|
|
54
|
+
const tokenString = await token("bearer", []);
|
|
52
55
|
|
|
56
|
+
if (tokenString) {
|
|
57
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const response = await this.request({
|
|
61
|
+
path: `/leads/{leadId}`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters.leadId))),
|
|
62
|
+
method: 'GET',
|
|
63
|
+
headers: headerParameters,
|
|
64
|
+
query: queryParameters,
|
|
65
|
+
}, initOverrides);
|
|
66
|
+
|
|
67
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IntersectionLeadDtoFromJSON));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
async get(requestParameters: GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IntersectionLeadDto>> {
|
|
74
|
+
const response = await this.getRaw(requestParameters, initOverrides);
|
|
75
|
+
return await response.value();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
async listLeadsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IntersectionLeadDtoWithListFieldsDto>>> {
|
|
82
|
+
const queryParameters: any = {};
|
|
83
|
+
|
|
84
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
85
|
+
|
|
86
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
87
|
+
const token = this.configuration.accessToken;
|
|
88
|
+
const tokenString = await token("bearer", []);
|
|
89
|
+
|
|
90
|
+
if (tokenString) {
|
|
91
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
53
94
|
const response = await this.request({
|
|
54
95
|
path: `/leads`,
|
|
55
|
-
method: '
|
|
96
|
+
method: 'GET',
|
|
56
97
|
headers: headerParameters,
|
|
57
98
|
query: queryParameters,
|
|
58
|
-
body: CreateLeadInputToJSON(requestParameters.createLeadInput),
|
|
59
99
|
}, initOverrides);
|
|
60
100
|
|
|
61
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IntersectionLeadDtoWithListFieldsDtoFromJSON));
|
|
62
102
|
}
|
|
63
103
|
|
|
64
104
|
/**
|
|
105
|
+
*
|
|
65
106
|
*/
|
|
66
|
-
async
|
|
67
|
-
const response = await this.
|
|
107
|
+
async listLeads(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IntersectionLeadDtoWithListFieldsDto>> {
|
|
108
|
+
const response = await this.listLeadsRaw(initOverrides);
|
|
68
109
|
return await response.value();
|
|
69
110
|
}
|
|
70
111
|
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
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 { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface IntersectionLeadDto
|
|
20
|
+
*/
|
|
21
|
+
export interface IntersectionLeadDto {
|
|
22
|
+
/**
|
|
23
|
+
* The current id
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof IntersectionLeadDto
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The current lead status
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof IntersectionLeadDto
|
|
32
|
+
*/
|
|
33
|
+
status: IntersectionLeadDtoStatusEnum;
|
|
34
|
+
/**
|
|
35
|
+
* Created at date
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof IntersectionLeadDto
|
|
38
|
+
*/
|
|
39
|
+
createdAt: Date;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const IntersectionLeadDtoStatusEnum = {
|
|
47
|
+
ACTIVE: 'active',
|
|
48
|
+
DELETED: 'deleted',
|
|
49
|
+
ARCHIVED: 'archived'
|
|
50
|
+
} as const;
|
|
51
|
+
export type IntersectionLeadDtoStatusEnum = typeof IntersectionLeadDtoStatusEnum[keyof typeof IntersectionLeadDtoStatusEnum];
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the IntersectionLeadDto interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfIntersectionLeadDto(value: object): boolean {
|
|
58
|
+
let isInstance = true;
|
|
59
|
+
isInstance = isInstance && "id" in value;
|
|
60
|
+
isInstance = isInstance && "status" in value;
|
|
61
|
+
isInstance = isInstance && "createdAt" in value;
|
|
62
|
+
|
|
63
|
+
return isInstance;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function IntersectionLeadDtoFromJSON(json: any): IntersectionLeadDto {
|
|
67
|
+
return IntersectionLeadDtoFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function IntersectionLeadDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntersectionLeadDto {
|
|
71
|
+
if ((json === undefined) || (json === null)) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'status': json['status'],
|
|
78
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function IntersectionLeadDtoToJSON(value?: IntersectionLeadDto | null): any {
|
|
83
|
+
if (value === undefined) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
if (value === null) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
|
|
91
|
+
'id': value.id,
|
|
92
|
+
'status': value.status,
|
|
93
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
@@ -0,0 +1,160 @@
|
|
|
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 { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface IntersectionLeadDtoWithListFieldsDto
|
|
20
|
+
*/
|
|
21
|
+
export interface IntersectionLeadDtoWithListFieldsDto {
|
|
22
|
+
/**
|
|
23
|
+
* The current id
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The current lead status
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
32
|
+
*/
|
|
33
|
+
status: IntersectionLeadDtoWithListFieldsDtoStatusEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
38
|
+
*/
|
|
39
|
+
lastMessageFrom: IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
44
|
+
*/
|
|
45
|
+
lastMessageType: IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum;
|
|
46
|
+
/**
|
|
47
|
+
* Created at date
|
|
48
|
+
* @type {Date}
|
|
49
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
50
|
+
*/
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
56
|
+
*/
|
|
57
|
+
domainName: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
62
|
+
*/
|
|
63
|
+
buyerInitials: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof IntersectionLeadDtoWithListFieldsDto
|
|
68
|
+
*/
|
|
69
|
+
lastMessageMessage: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @export
|
|
75
|
+
*/
|
|
76
|
+
export const IntersectionLeadDtoWithListFieldsDtoStatusEnum = {
|
|
77
|
+
ACTIVE: 'active',
|
|
78
|
+
DELETED: 'deleted',
|
|
79
|
+
ARCHIVED: 'archived'
|
|
80
|
+
} as const;
|
|
81
|
+
export type IntersectionLeadDtoWithListFieldsDtoStatusEnum = typeof IntersectionLeadDtoWithListFieldsDtoStatusEnum[keyof typeof IntersectionLeadDtoWithListFieldsDtoStatusEnum];
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @export
|
|
85
|
+
*/
|
|
86
|
+
export const IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum = {
|
|
87
|
+
BUYER: 'buyer',
|
|
88
|
+
SELLER: 'seller',
|
|
89
|
+
ADMIN: 'admin'
|
|
90
|
+
} as const;
|
|
91
|
+
export type IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum = typeof IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum[keyof typeof IntersectionLeadDtoWithListFieldsDtoLastMessageFromEnum];
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export const IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum = {
|
|
97
|
+
OFFER: 'offer',
|
|
98
|
+
MESSAGE: 'message'
|
|
99
|
+
} as const;
|
|
100
|
+
export type IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum = typeof IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum[keyof typeof IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum];
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Check if a given object implements the IntersectionLeadDtoWithListFieldsDto interface.
|
|
105
|
+
*/
|
|
106
|
+
export function instanceOfIntersectionLeadDtoWithListFieldsDto(value: object): boolean {
|
|
107
|
+
let isInstance = true;
|
|
108
|
+
isInstance = isInstance && "id" in value;
|
|
109
|
+
isInstance = isInstance && "status" in value;
|
|
110
|
+
isInstance = isInstance && "lastMessageFrom" in value;
|
|
111
|
+
isInstance = isInstance && "lastMessageType" in value;
|
|
112
|
+
isInstance = isInstance && "createdAt" in value;
|
|
113
|
+
isInstance = isInstance && "domainName" in value;
|
|
114
|
+
isInstance = isInstance && "buyerInitials" in value;
|
|
115
|
+
isInstance = isInstance && "lastMessageMessage" in value;
|
|
116
|
+
|
|
117
|
+
return isInstance;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function IntersectionLeadDtoWithListFieldsDtoFromJSON(json: any): IntersectionLeadDtoWithListFieldsDto {
|
|
121
|
+
return IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json, false);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntersectionLeadDtoWithListFieldsDto {
|
|
125
|
+
if ((json === undefined) || (json === null)) {
|
|
126
|
+
return json;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
|
|
130
|
+
'id': json['id'],
|
|
131
|
+
'status': json['status'],
|
|
132
|
+
'lastMessageFrom': json['lastMessageFrom'],
|
|
133
|
+
'lastMessageType': json['lastMessageType'],
|
|
134
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
135
|
+
'domainName': json['domainName'],
|
|
136
|
+
'buyerInitials': json['buyerInitials'],
|
|
137
|
+
'lastMessageMessage': json['lastMessageMessage'],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function IntersectionLeadDtoWithListFieldsDtoToJSON(value?: IntersectionLeadDtoWithListFieldsDto | null): any {
|
|
142
|
+
if (value === undefined) {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
if (value === null) {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
|
|
150
|
+
'id': value.id,
|
|
151
|
+
'status': value.status,
|
|
152
|
+
'lastMessageFrom': value.lastMessageFrom,
|
|
153
|
+
'lastMessageType': value.lastMessageType,
|
|
154
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
155
|
+
'domainName': value.domainName,
|
|
156
|
+
'buyerInitials': value.buyerInitials,
|
|
157
|
+
'lastMessageMessage': value.lastMessageMessage,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
package/src/models/LeadDto.ts
CHANGED
|
@@ -20,19 +20,45 @@ import { exists, mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface LeadDto {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* The current id
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof LeadDto
|
|
26
26
|
*/
|
|
27
27
|
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The current lead status
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof LeadDto
|
|
32
|
+
*/
|
|
33
|
+
status: LeadDtoStatusEnum;
|
|
34
|
+
/**
|
|
35
|
+
* Created at date
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof LeadDto
|
|
38
|
+
*/
|
|
39
|
+
createdAt: Date;
|
|
28
40
|
}
|
|
29
41
|
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const LeadDtoStatusEnum = {
|
|
47
|
+
ACTIVE: 'active',
|
|
48
|
+
DELETED: 'deleted',
|
|
49
|
+
ARCHIVED: 'archived'
|
|
50
|
+
} as const;
|
|
51
|
+
export type LeadDtoStatusEnum = typeof LeadDtoStatusEnum[keyof typeof LeadDtoStatusEnum];
|
|
52
|
+
|
|
53
|
+
|
|
30
54
|
/**
|
|
31
55
|
* Check if a given object implements the LeadDto interface.
|
|
32
56
|
*/
|
|
33
57
|
export function instanceOfLeadDto(value: object): boolean {
|
|
34
58
|
let isInstance = true;
|
|
35
59
|
isInstance = isInstance && "id" in value;
|
|
60
|
+
isInstance = isInstance && "status" in value;
|
|
61
|
+
isInstance = isInstance && "createdAt" in value;
|
|
36
62
|
|
|
37
63
|
return isInstance;
|
|
38
64
|
}
|
|
@@ -48,6 +74,8 @@ export function LeadDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): L
|
|
|
48
74
|
return {
|
|
49
75
|
|
|
50
76
|
'id': json['id'],
|
|
77
|
+
'status': json['status'],
|
|
78
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
51
79
|
};
|
|
52
80
|
}
|
|
53
81
|
|
|
@@ -61,6 +89,8 @@ export function LeadDtoToJSON(value?: LeadDto | null): any {
|
|
|
61
89
|
return {
|
|
62
90
|
|
|
63
91
|
'id': value.id,
|
|
92
|
+
'status': value.status,
|
|
93
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
64
94
|
};
|
|
65
95
|
}
|
|
66
96
|
|
package/src/models/index.ts
CHANGED
|
@@ -14,6 +14,8 @@ export * from './IntersectionAccountDtoWithAddressDto';
|
|
|
14
14
|
export * from './IntersectionAccountDtoWithFinancialDto';
|
|
15
15
|
export * from './IntersectionAccountDtoWithFinancialDtoWithSettingsDtoWithAddressDto';
|
|
16
16
|
export * from './IntersectionAccountDtoWithSettingsDto';
|
|
17
|
+
export * from './IntersectionLeadDto';
|
|
18
|
+
export * from './IntersectionLeadDtoWithListFieldsDto';
|
|
17
19
|
export * from './LeadDto';
|
|
18
20
|
export * from './List200Response';
|
|
19
21
|
export * from './List400Response';
|