@randock/nameshift-api-client 0.0.10 → 0.0.11

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.
@@ -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,7 @@ 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/IntersectionLeadDtoWithListFieldsDto.ts
26
28
  src/models/LeadDto.ts
27
29
  src/models/List200Response.ts
28
30
  src/models/List400Response.ts
@@ -10,18 +10,17 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateLeadInput, LeadDto } from '../models/index';
14
- export interface LeadControllerPostLeadRequest {
15
- createLeadInput: CreateLeadInput;
16
- }
13
+ import type { IntersectionLeadDtoWithListFieldsDto } from '../models/index';
17
14
  /**
18
15
  *
19
16
  */
20
17
  export declare class LeadsApi extends runtime.BaseAPI {
21
18
  /**
19
+ *
22
20
  */
23
- leadControllerPostLeadRaw(requestParameters: LeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadDto>>;
21
+ listLeadsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IntersectionLeadDtoWithListFieldsDto>>>;
24
22
  /**
23
+ *
25
24
  */
26
- leadControllerPostLead(requestParameters: LeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadDto>;
25
+ listLeads(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IntersectionLeadDtoWithListFieldsDto>>;
27
26
  }
@@ -76,41 +76,47 @@ 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.leadControllerPostLeadRaw = function (requestParameters, initOverrides) {
81
+ LeadsApi.prototype.listLeadsRaw = function (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.createLeadInput === null || requestParameters.createLeadInput === undefined) {
87
- throw new runtime.RequiredError('createLeadInput', 'Required parameter requestParameters.createLeadInput was null or undefined when calling leadControllerPostLead.');
88
- }
89
87
  queryParameters = {};
90
88
  headerParameters = {};
91
- headerParameters['Content-Type'] = 'application/json';
92
- return [4 /*yield*/, this.request({
93
- path: "/leads",
94
- method: 'POST',
95
- headers: headerParameters,
96
- query: queryParameters,
97
- body: (0, index_1.CreateLeadInputToJSON)(requestParameters.createLeadInput),
98
- }, initOverrides)];
89
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
90
+ token = this.configuration.accessToken;
91
+ return [4 /*yield*/, token("bearer", [])];
99
92
  case 1:
93
+ tokenString = _a.sent();
94
+ if (tokenString) {
95
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
96
+ }
97
+ _a.label = 2;
98
+ case 2: return [4 /*yield*/, this.request({
99
+ path: "/leads",
100
+ method: 'GET',
101
+ headers: headerParameters,
102
+ query: queryParameters,
103
+ }, initOverrides)];
104
+ case 3:
100
105
  response = _a.sent();
101
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LeadDtoFromJSON)(jsonValue); })];
106
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.IntersectionLeadDtoWithListFieldsDtoFromJSON); })];
102
107
  }
103
108
  });
104
109
  });
105
110
  };
106
111
  /**
112
+ *
107
113
  */
108
- LeadsApi.prototype.leadControllerPostLead = function (requestParameters, initOverrides) {
114
+ LeadsApi.prototype.listLeads = function (initOverrides) {
109
115
  return __awaiter(this, void 0, void 0, function () {
110
116
  var response;
111
117
  return __generator(this, function (_a) {
112
118
  switch (_a.label) {
113
- case 0: return [4 /*yield*/, this.leadControllerPostLeadRaw(requestParameters, initOverrides)];
119
+ case 0: return [4 /*yield*/, this.listLeadsRaw(initOverrides)];
114
120
  case 1:
115
121
  response = _a.sent();
116
122
  return [4 /*yield*/, response.value()];
@@ -2,4 +2,5 @@ export * from './AccountsApi';
2
2
  export * from './AuthApi';
3
3
  export * from './DomainsApi';
4
4
  export * from './DomainsPublicApi';
5
+ export * from './LeadsApi';
5
6
  export * from './LeadsPublicApi';
@@ -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,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
+ *
20
+ * @type {string}
21
+ * @memberof IntersectionLeadDtoWithListFieldsDto
22
+ */
23
+ id: string;
24
+ /**
25
+ *
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
+ *
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;
@@ -21,7 +21,28 @@ export interface LeadDto {
21
21
  * @memberof LeadDto
22
22
  */
23
23
  id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof LeadDto
28
+ */
29
+ status: LeadDtoStatusEnum;
30
+ /**
31
+ *
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
  */
@@ -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;
@@ -12,6 +12,7 @@ export * from './IntersectionAccountDtoWithAddressDto';
12
12
  export * from './IntersectionAccountDtoWithFinancialDto';
13
13
  export * from './IntersectionAccountDtoWithFinancialDtoWithSettingsDtoWithAddressDto';
14
14
  export * from './IntersectionAccountDtoWithSettingsDto';
15
+ export * from './IntersectionLeadDtoWithListFieldsDto';
15
16
  export * from './LeadDto';
16
17
  export * from './List200Response';
17
18
  export * from './List400Response';
@@ -30,6 +30,7 @@ __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("./IntersectionLeadDtoWithListFieldsDto"), exports);
33
34
  __exportStar(require("./LeadDto"), exports);
34
35
  __exportStar(require("./List200Response"), exports);
35
36
  __exportStar(require("./List400Response"), exports);
package/package.json CHANGED
@@ -1,12 +1,8 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
9
- },
10
6
  "main": "./dist/index.js",
11
7
  "typings": "./dist/index.d.ts",
12
8
  "scripts": {
@@ -15,56 +15,52 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
- BatchUpdate404Response,
19
- CreateLeadInput,
20
- LeadDto,
18
+ IntersectionLeadDtoWithListFieldsDto,
19
+ UpdateSettings429Response,
21
20
  } from '../models/index';
22
21
  import {
23
- BatchUpdate404ResponseFromJSON,
24
- BatchUpdate404ResponseToJSON,
25
- CreateLeadInputFromJSON,
26
- CreateLeadInputToJSON,
27
- LeadDtoFromJSON,
28
- LeadDtoToJSON,
22
+ IntersectionLeadDtoWithListFieldsDtoFromJSON,
23
+ IntersectionLeadDtoWithListFieldsDtoToJSON,
24
+ UpdateSettings429ResponseFromJSON,
25
+ UpdateSettings429ResponseToJSON,
29
26
  } from '../models/index';
30
27
 
31
- export interface LeadControllerPostLeadRequest {
32
- createLeadInput: CreateLeadInput;
33
- }
34
-
35
28
  /**
36
29
  *
37
30
  */
38
31
  export class LeadsApi extends runtime.BaseAPI {
39
32
 
40
33
  /**
34
+ *
41
35
  */
42
- async leadControllerPostLeadRaw(requestParameters: LeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadDto>> {
43
- if (requestParameters.createLeadInput === null || requestParameters.createLeadInput === undefined) {
44
- throw new runtime.RequiredError('createLeadInput','Required parameter requestParameters.createLeadInput was null or undefined when calling leadControllerPostLead.');
45
- }
46
-
36
+ async listLeadsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IntersectionLeadDtoWithListFieldsDto>>> {
47
37
  const queryParameters: any = {};
48
38
 
49
39
  const headerParameters: runtime.HTTPHeaders = {};
50
40
 
51
- headerParameters['Content-Type'] = 'application/json';
41
+ if (this.configuration && this.configuration.accessToken) {
42
+ const token = this.configuration.accessToken;
43
+ const tokenString = await token("bearer", []);
52
44
 
45
+ if (tokenString) {
46
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
47
+ }
48
+ }
53
49
  const response = await this.request({
54
50
  path: `/leads`,
55
- method: 'POST',
51
+ method: 'GET',
56
52
  headers: headerParameters,
57
53
  query: queryParameters,
58
- body: CreateLeadInputToJSON(requestParameters.createLeadInput),
59
54
  }, initOverrides);
60
55
 
61
- return new runtime.JSONApiResponse(response, (jsonValue) => LeadDtoFromJSON(jsonValue));
56
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IntersectionLeadDtoWithListFieldsDtoFromJSON));
62
57
  }
63
58
 
64
59
  /**
60
+ *
65
61
  */
66
- async leadControllerPostLead(requestParameters: LeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadDto> {
67
- const response = await this.leadControllerPostLeadRaw(requestParameters, initOverrides);
62
+ async listLeads(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IntersectionLeadDtoWithListFieldsDto>> {
63
+ const response = await this.listLeadsRaw(initOverrides);
68
64
  return await response.value();
69
65
  }
70
66
 
package/src/apis/index.ts CHANGED
@@ -4,4 +4,5 @@ export * from './AccountsApi';
4
4
  export * from './AuthApi';
5
5
  export * from './DomainsApi';
6
6
  export * from './DomainsPublicApi';
7
+ export * from './LeadsApi';
7
8
  export * from './LeadsPublicApi';
@@ -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
+ *
24
+ * @type {string}
25
+ * @memberof IntersectionLeadDtoWithListFieldsDto
26
+ */
27
+ id: string;
28
+ /**
29
+ *
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
+ *
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
+
@@ -25,14 +25,40 @@ export interface LeadDto {
25
25
  * @memberof LeadDto
26
26
  */
27
27
  id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof LeadDto
32
+ */
33
+ status: LeadDtoStatusEnum;
34
+ /**
35
+ *
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
 
@@ -14,6 +14,7 @@ export * from './IntersectionAccountDtoWithAddressDto';
14
14
  export * from './IntersectionAccountDtoWithFinancialDto';
15
15
  export * from './IntersectionAccountDtoWithFinancialDtoWithSettingsDtoWithAddressDto';
16
16
  export * from './IntersectionAccountDtoWithSettingsDto';
17
+ export * from './IntersectionLeadDtoWithListFieldsDto';
17
18
  export * from './LeadDto';
18
19
  export * from './List200Response';
19
20
  export * from './List400Response';