@randock/nameshift-api-client 0.0.11 → 0.0.13

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 (39) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/dist/apis/LeadsApi.d.ts +35 -1
  3. package/dist/apis/LeadsApi.js +164 -0
  4. package/dist/models/CreateLeadMessageInput.d.ts +52 -0
  5. package/dist/models/CreateLeadMessageInput.js +64 -0
  6. package/dist/models/CreateLeadMessageInputData.d.ts +32 -0
  7. package/dist/models/CreateLeadMessageInputData.js +51 -0
  8. package/dist/models/IntersectionDomainDtoWithAccountDto.d.ts +75 -0
  9. package/dist/models/IntersectionDomainDtoWithAccountDto.js +73 -0
  10. package/dist/models/IntersectionLeadDto.d.ts +52 -0
  11. package/dist/models/IntersectionLeadDto.js +64 -0
  12. package/dist/models/IntersectionLeadDtoWithLeadDetailsDto.d.ts +59 -0
  13. package/dist/models/IntersectionLeadDtoWithLeadDetailsDto.js +68 -0
  14. package/dist/models/IntersectionLeadDtoWithListFieldsDto.d.ts +3 -3
  15. package/dist/models/LeadDto.d.ts +3 -3
  16. package/dist/models/LeadMessageData.d.ts +32 -0
  17. package/dist/models/LeadMessageData.js +51 -0
  18. package/dist/models/LeadMessageDto.d.ts +79 -0
  19. package/dist/models/LeadMessageDto.js +81 -0
  20. package/dist/models/LeadMessageDtoData.d.ts +32 -0
  21. package/dist/models/LeadMessageDtoData.js +51 -0
  22. package/dist/models/ListLeadMessagesDto.d.ts +32 -0
  23. package/dist/models/ListLeadMessagesDto.js +51 -0
  24. package/dist/models/index.d.ts +9 -0
  25. package/dist/models/index.js +9 -0
  26. package/package.json +1 -2
  27. package/src/apis/LeadsApi.ts +146 -0
  28. package/src/models/CreateLeadMessageInput.ts +102 -0
  29. package/src/models/CreateLeadMessageInputData.ts +73 -0
  30. package/src/models/IntersectionDomainDtoWithAccountDto.ts +142 -0
  31. package/src/models/IntersectionLeadDto.ts +96 -0
  32. package/src/models/IntersectionLeadDtoWithLeadDetailsDto.ts +112 -0
  33. package/src/models/IntersectionLeadDtoWithListFieldsDto.ts +3 -3
  34. package/src/models/LeadDto.ts +3 -3
  35. package/src/models/LeadMessageData.ts +73 -0
  36. package/src/models/LeadMessageDto.ts +139 -0
  37. package/src/models/LeadMessageDtoData.ts +73 -0
  38. package/src/models/ListLeadMessagesDto.ts +73 -0
  39. package/src/models/index.ts +9 -0
@@ -18,11 +18,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./AccountAddressDto"), exports);
20
20
  __exportStar(require("./AccountAddressInput"), exports);
21
+ __exportStar(require("./AccountDto"), exports);
21
22
  __exportStar(require("./AccountFinancialInput"), exports);
22
23
  __exportStar(require("./AccountSettingsInput"), exports);
23
24
  __exportStar(require("./BatchUpdate404Response"), exports);
24
25
  __exportStar(require("./BatchUpdateDomainsInput"), exports);
25
26
  __exportStar(require("./CreateLeadInput"), exports);
27
+ __exportStar(require("./CreateLeadMessageInput"), exports);
28
+ __exportStar(require("./CreateLeadMessageInputData"), exports);
26
29
  __exportStar(require("./DeleteDomainsInput"), exports);
27
30
  __exportStar(require("./DomainDto"), exports);
28
31
  __exportStar(require("./ImportDomainsDto"), exports);
@@ -30,11 +33,17 @@ __exportStar(require("./IntersectionAccountDtoWithAddressDto"), exports);
30
33
  __exportStar(require("./IntersectionAccountDtoWithFinancialDto"), exports);
31
34
  __exportStar(require("./IntersectionAccountDtoWithFinancialDtoWithSettingsDtoWithAddressDto"), exports);
32
35
  __exportStar(require("./IntersectionAccountDtoWithSettingsDto"), exports);
36
+ __exportStar(require("./IntersectionDomainDtoWithAccountDto"), exports);
37
+ __exportStar(require("./IntersectionLeadDtoWithLeadDetailsDto"), exports);
33
38
  __exportStar(require("./IntersectionLeadDtoWithListFieldsDto"), exports);
34
39
  __exportStar(require("./LeadDto"), exports);
40
+ __exportStar(require("./LeadMessageData"), exports);
41
+ __exportStar(require("./LeadMessageDto"), exports);
42
+ __exportStar(require("./LeadMessageDtoData"), exports);
35
43
  __exportStar(require("./List200Response"), exports);
36
44
  __exportStar(require("./List400Response"), exports);
37
45
  __exportStar(require("./List401Response"), exports);
46
+ __exportStar(require("./ListLeadMessagesDto"), exports);
38
47
  __exportStar(require("./Login401Response"), exports);
39
48
  __exportStar(require("./Login429Response"), exports);
40
49
  __exportStar(require("./LoginInput"), exports);
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
- "author": "OpenAPI-Generator",
6
5
  "main": "./dist/index.js",
7
6
  "typings": "./dist/index.d.ts",
8
7
  "scripts": {
@@ -15,21 +15,167 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ CreateLeadMessageInput,
19
+ IntersectionLeadDtoWithLeadDetailsDto,
18
20
  IntersectionLeadDtoWithListFieldsDto,
21
+ LeadMessageDto,
22
+ ListLeadMessagesDto,
19
23
  UpdateSettings429Response,
20
24
  } from '../models/index';
21
25
  import {
26
+ CreateLeadMessageInputFromJSON,
27
+ CreateLeadMessageInputToJSON,
28
+ IntersectionLeadDtoWithLeadDetailsDtoFromJSON,
29
+ IntersectionLeadDtoWithLeadDetailsDtoToJSON,
22
30
  IntersectionLeadDtoWithListFieldsDtoFromJSON,
23
31
  IntersectionLeadDtoWithListFieldsDtoToJSON,
32
+ LeadMessageDtoFromJSON,
33
+ LeadMessageDtoToJSON,
34
+ ListLeadMessagesDtoFromJSON,
35
+ ListLeadMessagesDtoToJSON,
24
36
  UpdateSettings429ResponseFromJSON,
25
37
  UpdateSettings429ResponseToJSON,
26
38
  } from '../models/index';
27
39
 
40
+ export interface CreateMessageRequest {
41
+ leadId: string;
42
+ createLeadMessageInput: CreateLeadMessageInput;
43
+ }
44
+
45
+ export interface GetRequest {
46
+ leadId: string;
47
+ }
48
+
49
+ export interface GetMessagesRequest {
50
+ leadId: string;
51
+ }
52
+
28
53
  /**
29
54
  *
30
55
  */
31
56
  export class LeadsApi extends runtime.BaseAPI {
32
57
 
58
+ /**
59
+ *
60
+ */
61
+ async createMessageRaw(requestParameters: CreateMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadMessageDto>> {
62
+ if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
63
+ throw new runtime.RequiredError('leadId','Required parameter requestParameters.leadId was null or undefined when calling createMessage.');
64
+ }
65
+
66
+ if (requestParameters.createLeadMessageInput === null || requestParameters.createLeadMessageInput === undefined) {
67
+ throw new runtime.RequiredError('createLeadMessageInput','Required parameter requestParameters.createLeadMessageInput was null or undefined when calling createMessage.');
68
+ }
69
+
70
+ const queryParameters: any = {};
71
+
72
+ const headerParameters: runtime.HTTPHeaders = {};
73
+
74
+ headerParameters['Content-Type'] = 'application/json';
75
+
76
+ if (this.configuration && this.configuration.accessToken) {
77
+ const token = this.configuration.accessToken;
78
+ const tokenString = await token("bearer", []);
79
+
80
+ if (tokenString) {
81
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
82
+ }
83
+ }
84
+ const response = await this.request({
85
+ path: `/leads/{leadId}/messages`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters.leadId))),
86
+ method: 'POST',
87
+ headers: headerParameters,
88
+ query: queryParameters,
89
+ body: CreateLeadMessageInputToJSON(requestParameters.createLeadMessageInput),
90
+ }, initOverrides);
91
+
92
+ return new runtime.JSONApiResponse(response, (jsonValue) => LeadMessageDtoFromJSON(jsonValue));
93
+ }
94
+
95
+ /**
96
+ *
97
+ */
98
+ async createMessage(requestParameters: CreateMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadMessageDto> {
99
+ const response = await this.createMessageRaw(requestParameters, initOverrides);
100
+ return await response.value();
101
+ }
102
+
103
+ /**
104
+ *
105
+ */
106
+ async getRaw(requestParameters: GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionLeadDtoWithLeadDetailsDto>> {
107
+ if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
108
+ throw new runtime.RequiredError('leadId','Required parameter requestParameters.leadId was null or undefined when calling get.');
109
+ }
110
+
111
+ const queryParameters: any = {};
112
+
113
+ const headerParameters: runtime.HTTPHeaders = {};
114
+
115
+ if (this.configuration && this.configuration.accessToken) {
116
+ const token = this.configuration.accessToken;
117
+ const tokenString = await token("bearer", []);
118
+
119
+ if (tokenString) {
120
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
121
+ }
122
+ }
123
+ const response = await this.request({
124
+ path: `/leads/{leadId}`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters.leadId))),
125
+ method: 'GET',
126
+ headers: headerParameters,
127
+ query: queryParameters,
128
+ }, initOverrides);
129
+
130
+ return new runtime.JSONApiResponse(response, (jsonValue) => IntersectionLeadDtoWithLeadDetailsDtoFromJSON(jsonValue));
131
+ }
132
+
133
+ /**
134
+ *
135
+ */
136
+ async get(requestParameters: GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionLeadDtoWithLeadDetailsDto> {
137
+ const response = await this.getRaw(requestParameters, initOverrides);
138
+ return await response.value();
139
+ }
140
+
141
+ /**
142
+ *
143
+ */
144
+ async getMessagesRaw(requestParameters: GetMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListLeadMessagesDto>> {
145
+ if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
146
+ throw new runtime.RequiredError('leadId','Required parameter requestParameters.leadId was null or undefined when calling getMessages.');
147
+ }
148
+
149
+ const queryParameters: any = {};
150
+
151
+ const headerParameters: runtime.HTTPHeaders = {};
152
+
153
+ if (this.configuration && this.configuration.accessToken) {
154
+ const token = this.configuration.accessToken;
155
+ const tokenString = await token("bearer", []);
156
+
157
+ if (tokenString) {
158
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
159
+ }
160
+ }
161
+ const response = await this.request({
162
+ path: `/leads/{leadId}/messages`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters.leadId))),
163
+ method: 'GET',
164
+ headers: headerParameters,
165
+ query: queryParameters,
166
+ }, initOverrides);
167
+
168
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListLeadMessagesDtoFromJSON(jsonValue));
169
+ }
170
+
171
+ /**
172
+ *
173
+ */
174
+ async getMessages(requestParameters: GetMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListLeadMessagesDto> {
175
+ const response = await this.getMessagesRaw(requestParameters, initOverrides);
176
+ return await response.value();
177
+ }
178
+
33
179
  /**
34
180
  *
35
181
  */
@@ -0,0 +1,102 @@
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 { CreateLeadMessageInputData } from './CreateLeadMessageInputData';
17
+ import {
18
+ CreateLeadMessageInputDataFromJSON,
19
+ CreateLeadMessageInputDataFromJSONTyped,
20
+ CreateLeadMessageInputDataToJSON,
21
+ } from './CreateLeadMessageInputData';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface CreateLeadMessageInput
27
+ */
28
+ export interface CreateLeadMessageInput {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof CreateLeadMessageInput
33
+ */
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;
47
+ }
48
+
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
+ /**
61
+ * Check if a given object implements the CreateLeadMessageInput interface.
62
+ */
63
+ export function instanceOfCreateLeadMessageInput(value: object): boolean {
64
+ let isInstance = true;
65
+ isInstance = isInstance && "type" in value;
66
+ isInstance = isInstance && "data" in value;
67
+ isInstance = isInstance && "message" in value;
68
+
69
+ return isInstance;
70
+ }
71
+
72
+ export function CreateLeadMessageInputFromJSON(json: any): CreateLeadMessageInput {
73
+ return CreateLeadMessageInputFromJSONTyped(json, false);
74
+ }
75
+
76
+ export function CreateLeadMessageInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateLeadMessageInput {
77
+ if ((json === undefined) || (json === null)) {
78
+ return json;
79
+ }
80
+ return {
81
+
82
+ 'type': json['type'],
83
+ 'data': CreateLeadMessageInputDataFromJSON(json['data']),
84
+ 'message': json['message'],
85
+ };
86
+ }
87
+
88
+ export function CreateLeadMessageInputToJSON(value?: CreateLeadMessageInput | null): any {
89
+ if (value === undefined) {
90
+ return undefined;
91
+ }
92
+ if (value === null) {
93
+ return null;
94
+ }
95
+ return {
96
+
97
+ 'type': value.type,
98
+ 'data': CreateLeadMessageInputDataToJSON(value.data),
99
+ 'message': value.message,
100
+ };
101
+ }
102
+
@@ -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
+ *
25
+ * @export
26
+ * @interface CreateLeadMessageInputData
27
+ */
28
+ export interface CreateLeadMessageInputData {
29
+ /**
30
+ *
31
+ * @type {MoneyDto}
32
+ * @memberof CreateLeadMessageInputData
33
+ */
34
+ price: MoneyDto;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the CreateLeadMessageInputData interface.
39
+ */
40
+ export function instanceOfCreateLeadMessageInputData(value: object): boolean {
41
+ let isInstance = true;
42
+ isInstance = isInstance && "price" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function CreateLeadMessageInputDataFromJSON(json: any): CreateLeadMessageInputData {
48
+ return CreateLeadMessageInputDataFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function CreateLeadMessageInputDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateLeadMessageInputData {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'price': MoneyDtoFromJSON(json['price']),
58
+ };
59
+ }
60
+
61
+ export function CreateLeadMessageInputDataToJSON(value?: CreateLeadMessageInputData | 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
+
@@ -0,0 +1,142 @@
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 { AccountDto } from './AccountDto';
17
+ import {
18
+ AccountDtoFromJSON,
19
+ AccountDtoFromJSONTyped,
20
+ AccountDtoToJSON,
21
+ } from './AccountDto';
22
+ import type { MoneyDto } from './MoneyDto';
23
+ import {
24
+ MoneyDtoFromJSON,
25
+ MoneyDtoFromJSONTyped,
26
+ MoneyDtoToJSON,
27
+ } from './MoneyDto';
28
+
29
+ /**
30
+ *
31
+ * @export
32
+ * @interface IntersectionDomainDtoWithAccountDto
33
+ */
34
+ export interface IntersectionDomainDtoWithAccountDto {
35
+ /**
36
+ * The uuid for this domain.
37
+ * @type {string}
38
+ * @memberof IntersectionDomainDtoWithAccountDto
39
+ */
40
+ id: string;
41
+ /**
42
+ * The TLD for this domain.
43
+ * @type {string}
44
+ * @memberof IntersectionDomainDtoWithAccountDto
45
+ */
46
+ tld: string;
47
+ /**
48
+ * Whether this domain is verified by the owner (ns3, txt) or not.
49
+ * @type {boolean}
50
+ * @memberof IntersectionDomainDtoWithAccountDto
51
+ */
52
+ verified: boolean;
53
+ /**
54
+ * Whether the nameservers (ns1,ns2) are set or not.
55
+ * @type {boolean}
56
+ * @memberof IntersectionDomainDtoWithAccountDto
57
+ */
58
+ nameservers: boolean;
59
+ /**
60
+ * The domain name (example.com)
61
+ * @type {string}
62
+ * @memberof IntersectionDomainDtoWithAccountDto
63
+ */
64
+ name: string;
65
+ /**
66
+ *
67
+ * @type {MoneyDto}
68
+ * @memberof IntersectionDomainDtoWithAccountDto
69
+ */
70
+ buyNow: MoneyDto;
71
+ /**
72
+ *
73
+ * @type {MoneyDto}
74
+ * @memberof IntersectionDomainDtoWithAccountDto
75
+ */
76
+ minOffer: MoneyDto;
77
+ /**
78
+ *
79
+ * @type {AccountDto}
80
+ * @memberof IntersectionDomainDtoWithAccountDto
81
+ */
82
+ account: AccountDto;
83
+ }
84
+
85
+ /**
86
+ * Check if a given object implements the IntersectionDomainDtoWithAccountDto interface.
87
+ */
88
+ export function instanceOfIntersectionDomainDtoWithAccountDto(value: object): boolean {
89
+ let isInstance = true;
90
+ isInstance = isInstance && "id" in value;
91
+ isInstance = isInstance && "tld" in value;
92
+ isInstance = isInstance && "verified" in value;
93
+ isInstance = isInstance && "nameservers" in value;
94
+ isInstance = isInstance && "name" in value;
95
+ isInstance = isInstance && "buyNow" in value;
96
+ isInstance = isInstance && "minOffer" in value;
97
+ isInstance = isInstance && "account" in value;
98
+
99
+ return isInstance;
100
+ }
101
+
102
+ export function IntersectionDomainDtoWithAccountDtoFromJSON(json: any): IntersectionDomainDtoWithAccountDto {
103
+ return IntersectionDomainDtoWithAccountDtoFromJSONTyped(json, false);
104
+ }
105
+
106
+ export function IntersectionDomainDtoWithAccountDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntersectionDomainDtoWithAccountDto {
107
+ if ((json === undefined) || (json === null)) {
108
+ return json;
109
+ }
110
+ return {
111
+
112
+ 'id': json['id'],
113
+ 'tld': json['tld'],
114
+ 'verified': json['verified'],
115
+ 'nameservers': json['nameservers'],
116
+ 'name': json['name'],
117
+ 'buyNow': MoneyDtoFromJSON(json['buyNow']),
118
+ 'minOffer': MoneyDtoFromJSON(json['minOffer']),
119
+ 'account': AccountDtoFromJSON(json['account']),
120
+ };
121
+ }
122
+
123
+ export function IntersectionDomainDtoWithAccountDtoToJSON(value?: IntersectionDomainDtoWithAccountDto | null): any {
124
+ if (value === undefined) {
125
+ return undefined;
126
+ }
127
+ if (value === null) {
128
+ return null;
129
+ }
130
+ return {
131
+
132
+ 'id': value.id,
133
+ 'tld': value.tld,
134
+ 'verified': value.verified,
135
+ 'nameservers': value.nameservers,
136
+ 'name': value.name,
137
+ 'buyNow': MoneyDtoToJSON(value.buyNow),
138
+ 'minOffer': MoneyDtoToJSON(value.minOffer),
139
+ 'account': AccountDtoToJSON(value.account),
140
+ };
141
+ }
142
+
@@ -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
+