@randock/nameshift-api-client 0.0.13 → 0.0.14

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.
Files changed (32) hide show
  1. package/.openapi-generator/FILES +3 -1
  2. package/dist/apis/LeadsApi.d.ts +13 -1
  3. package/dist/apis/LeadsApi.js +58 -0
  4. package/dist/models/CreateLeadMessageInput.d.ts +1 -22
  5. package/dist/models/CreateLeadMessageInput.js +1 -15
  6. package/dist/models/IntersectionLeadDtoWithLeadDetailsDto.d.ts +22 -0
  7. package/dist/models/IntersectionLeadDtoWithLeadDetailsDto.js +16 -1
  8. package/dist/models/IntersectionLeadDtoWithListFieldsDto.d.ts +37 -2
  9. package/dist/models/IntersectionLeadDtoWithListFieldsDto.js +23 -1
  10. package/dist/models/IntersectionLeadDtoWithListFieldsDtoLastMessageData.d.ts +32 -0
  11. package/dist/models/IntersectionLeadDtoWithListFieldsDtoLastMessageData.js +51 -0
  12. package/dist/models/IntersectionLeadDtoWithListFieldsDtoLastOffer.d.ts +37 -0
  13. package/dist/models/IntersectionLeadDtoWithListFieldsDtoLastOffer.js +53 -0
  14. package/dist/models/LeadDto.d.ts +22 -0
  15. package/dist/models/LeadDto.js +16 -1
  16. package/dist/models/LeadMessageDto.d.ts +6 -0
  17. package/dist/models/LeadMessageDto.js +3 -0
  18. package/dist/models/PutLeadInput.d.ts +32 -0
  19. package/dist/models/PutLeadInput.js +51 -0
  20. package/dist/models/index.d.ts +3 -1
  21. package/dist/models/index.js +3 -1
  22. package/package.json +2 -1
  23. package/src/apis/LeadsApi.ts +53 -0
  24. package/src/models/CreateLeadMessageInput.ts +1 -37
  25. package/src/models/IntersectionLeadDtoWithLeadDetailsDto.ts +34 -0
  26. package/src/models/IntersectionLeadDtoWithListFieldsDto.ts +61 -2
  27. package/src/models/IntersectionLeadDtoWithListFieldsDtoLastMessageData.ts +73 -0
  28. package/src/models/IntersectionLeadDtoWithListFieldsDtoLastOffer.ts +75 -0
  29. package/src/models/LeadDto.ts +35 -0
  30. package/src/models/LeadMessageDto.ts +9 -0
  31. package/src/models/PutLeadInput.ts +73 -0
  32. package/src/models/index.ts +3 -1
@@ -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;
@@ -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';
@@ -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.13",
3
+ "version": "0.0.14",
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": {
@@ -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
  }
@@ -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
- type: CreateLeadMessageInputTypeEnum;
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
  };
@@ -13,6 +13,19 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { IntersectionLeadDtoWithListFieldsDtoLastMessageData } from './IntersectionLeadDtoWithListFieldsDtoLastMessageData';
17
+ import {
18
+ IntersectionLeadDtoWithListFieldsDtoLastMessageDataFromJSON,
19
+ IntersectionLeadDtoWithListFieldsDtoLastMessageDataFromJSONTyped,
20
+ IntersectionLeadDtoWithListFieldsDtoLastMessageDataToJSON,
21
+ } from './IntersectionLeadDtoWithListFieldsDtoLastMessageData';
22
+ import type { IntersectionLeadDtoWithListFieldsDtoLastOffer } from './IntersectionLeadDtoWithListFieldsDtoLastOffer';
23
+ import {
24
+ IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSON,
25
+ IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSONTyped,
26
+ IntersectionLeadDtoWithListFieldsDtoLastOfferToJSON,
27
+ } from './IntersectionLeadDtoWithListFieldsDtoLastOffer';
28
+
16
29
  /**
17
30
  *
18
31
  * @export
@@ -31,6 +44,18 @@ export interface IntersectionLeadDtoWithListFieldsDto {
31
44
  * @memberof IntersectionLeadDtoWithListFieldsDto
32
45
  */
33
46
  status: IntersectionLeadDtoWithListFieldsDtoStatusEnum;
47
+ /**
48
+ *
49
+ * @type {IntersectionLeadDtoWithListFieldsDtoLastOffer}
50
+ * @memberof IntersectionLeadDtoWithListFieldsDto
51
+ */
52
+ lastOffer: IntersectionLeadDtoWithListFieldsDtoLastOffer | null;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof IntersectionLeadDtoWithListFieldsDto
57
+ */
58
+ lastOfferBy: IntersectionLeadDtoWithListFieldsDtoLastOfferByEnum | null;
34
59
  /**
35
60
  *
36
61
  * @type {string}
@@ -43,6 +68,12 @@ export interface IntersectionLeadDtoWithListFieldsDto {
43
68
  * @memberof IntersectionLeadDtoWithListFieldsDto
44
69
  */
45
70
  lastMessageType: IntersectionLeadDtoWithListFieldsDtoLastMessageTypeEnum;
71
+ /**
72
+ *
73
+ * @type {IntersectionLeadDtoWithListFieldsDtoLastMessageData}
74
+ * @memberof IntersectionLeadDtoWithListFieldsDto
75
+ */
76
+ lastMessageData: IntersectionLeadDtoWithListFieldsDtoLastMessageData | null;
46
77
  /**
47
78
  * Created at date
48
79
  * @type {Date}
@@ -62,11 +93,17 @@ export interface IntersectionLeadDtoWithListFieldsDto {
62
93
  */
63
94
  buyerInitials: string;
64
95
  /**
65
- *
96
+ * The message in case lastMessageType === LeadMessageTypeEnum.MESSAGE
66
97
  * @type {string}
67
98
  * @memberof IntersectionLeadDtoWithListFieldsDto
68
99
  */
69
- lastMessageMessage: string;
100
+ lastMessageMessage: string | null;
101
+ /**
102
+ * The creation date of the message
103
+ * @type {Date}
104
+ * @memberof IntersectionLeadDtoWithListFieldsDto
105
+ */
106
+ lastMessageDate: Date;
70
107
  }
71
108
 
72
109
 
@@ -80,6 +117,16 @@ export const IntersectionLeadDtoWithListFieldsDtoStatusEnum = {
80
117
  } as const;
81
118
  export type IntersectionLeadDtoWithListFieldsDtoStatusEnum = typeof IntersectionLeadDtoWithListFieldsDtoStatusEnum[keyof typeof IntersectionLeadDtoWithListFieldsDtoStatusEnum];
82
119
 
120
+ /**
121
+ * @export
122
+ */
123
+ export const IntersectionLeadDtoWithListFieldsDtoLastOfferByEnum = {
124
+ BUYER: 'buyer',
125
+ SELLER: 'seller',
126
+ ADMIN: 'admin'
127
+ } as const;
128
+ export type IntersectionLeadDtoWithListFieldsDtoLastOfferByEnum = typeof IntersectionLeadDtoWithListFieldsDtoLastOfferByEnum[keyof typeof IntersectionLeadDtoWithListFieldsDtoLastOfferByEnum];
129
+
83
130
  /**
84
131
  * @export
85
132
  */
@@ -107,12 +154,16 @@ export function instanceOfIntersectionLeadDtoWithListFieldsDto(value: object): b
107
154
  let isInstance = true;
108
155
  isInstance = isInstance && "id" in value;
109
156
  isInstance = isInstance && "status" in value;
157
+ isInstance = isInstance && "lastOffer" in value;
158
+ isInstance = isInstance && "lastOfferBy" in value;
110
159
  isInstance = isInstance && "lastMessageFrom" in value;
111
160
  isInstance = isInstance && "lastMessageType" in value;
161
+ isInstance = isInstance && "lastMessageData" in value;
112
162
  isInstance = isInstance && "createdAt" in value;
113
163
  isInstance = isInstance && "domainName" in value;
114
164
  isInstance = isInstance && "buyerInitials" in value;
115
165
  isInstance = isInstance && "lastMessageMessage" in value;
166
+ isInstance = isInstance && "lastMessageDate" in value;
116
167
 
117
168
  return isInstance;
118
169
  }
@@ -129,12 +180,16 @@ export function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json: any, ign
129
180
 
130
181
  'id': json['id'],
131
182
  'status': json['status'],
183
+ 'lastOffer': IntersectionLeadDtoWithListFieldsDtoLastOfferFromJSON(json['lastOffer']),
184
+ 'lastOfferBy': json['lastOfferBy'],
132
185
  'lastMessageFrom': json['lastMessageFrom'],
133
186
  'lastMessageType': json['lastMessageType'],
187
+ 'lastMessageData': IntersectionLeadDtoWithListFieldsDtoLastMessageDataFromJSON(json['lastMessageData']),
134
188
  'createdAt': (new Date(json['createdAt'])),
135
189
  'domainName': json['domainName'],
136
190
  'buyerInitials': json['buyerInitials'],
137
191
  'lastMessageMessage': json['lastMessageMessage'],
192
+ 'lastMessageDate': (new Date(json['lastMessageDate'])),
138
193
  };
139
194
  }
140
195
 
@@ -149,12 +204,16 @@ export function IntersectionLeadDtoWithListFieldsDtoToJSON(value?: IntersectionL
149
204
 
150
205
  'id': value.id,
151
206
  'status': value.status,
207
+ 'lastOffer': IntersectionLeadDtoWithListFieldsDtoLastOfferToJSON(value.lastOffer),
208
+ 'lastOfferBy': value.lastOfferBy,
152
209
  'lastMessageFrom': value.lastMessageFrom,
153
210
  'lastMessageType': value.lastMessageType,
211
+ 'lastMessageData': IntersectionLeadDtoWithListFieldsDtoLastMessageDataToJSON(value.lastMessageData),
154
212
  'createdAt': (value.createdAt.toISOString()),
155
213
  'domainName': value.domainName,
156
214
  'buyerInitials': value.buyerInitials,
157
215
  'lastMessageMessage': value.lastMessageMessage,
216
+ 'lastMessageDate': (value.lastMessageDate.toISOString()),
158
217
  };
159
218
  }
160
219
 
@@ -0,0 +1,73 @@
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
+ import type { MoneyDto } from './MoneyDto';
17
+ import {
18
+ MoneyDtoFromJSON,
19
+ MoneyDtoFromJSONTyped,
20
+ MoneyDtoToJSON,
21
+ } from './MoneyDto';
22
+
23
+ /**
24
+ * The data
25
+ * @export
26
+ * @interface IntersectionLeadDtoWithListFieldsDtoLastMessageData
27
+ */
28
+ export interface IntersectionLeadDtoWithListFieldsDtoLastMessageData {
29
+ /**
30
+ *
31
+ * @type {MoneyDto}
32
+ * @memberof IntersectionLeadDtoWithListFieldsDtoLastMessageData
33
+ */
34
+ price: MoneyDto;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the IntersectionLeadDtoWithListFieldsDtoLastMessageData interface.
39
+ */
40
+ export function instanceOfIntersectionLeadDtoWithListFieldsDtoLastMessageData(value: object): boolean {
41
+ let isInstance = true;
42
+ isInstance = isInstance && "price" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function IntersectionLeadDtoWithListFieldsDtoLastMessageDataFromJSON(json: any): IntersectionLeadDtoWithListFieldsDtoLastMessageData {
48
+ return IntersectionLeadDtoWithListFieldsDtoLastMessageDataFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function IntersectionLeadDtoWithListFieldsDtoLastMessageDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntersectionLeadDtoWithListFieldsDtoLastMessageData {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'price': MoneyDtoFromJSON(json['price']),
58
+ };
59
+ }
60
+
61
+ export function IntersectionLeadDtoWithListFieldsDtoLastMessageDataToJSON(value?: IntersectionLeadDtoWithListFieldsDtoLastMessageData | null): any {
62
+ if (value === undefined) {
63
+ return undefined;
64
+ }
65
+ if (value === null) {
66
+ return null;
67
+ }
68
+ return {
69
+
70
+ 'price': MoneyDtoToJSON(value.price),
71
+ };
72
+ }
73
+