@randock/nameshift-api-client 0.0.517 → 0.0.519

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.
@@ -23,6 +23,7 @@ import type {
23
23
  LeadEnrichmentDto,
24
24
  LeadLeaseToOwnAndRentConfigurationPresetsDto,
25
25
  LeadOfferExpirationConfigurationInput,
26
+ LeadQuickReplyListDto,
26
27
  List200Response,
27
28
  ListAdminRelatedLeads200Response,
28
29
  ListLeadMessagesDto,
@@ -50,6 +51,8 @@ import {
50
51
  LeadLeaseToOwnAndRentConfigurationPresetsDtoToJSON,
51
52
  LeadOfferExpirationConfigurationInputFromJSON,
52
53
  LeadOfferExpirationConfigurationInputToJSON,
54
+ LeadQuickReplyListDtoFromJSON,
55
+ LeadQuickReplyListDtoToJSON,
53
56
  List200ResponseFromJSON,
54
57
  List200ResponseToJSON,
55
58
  ListAdminRelatedLeads200ResponseFromJSON,
@@ -104,6 +107,10 @@ export interface LeadsApiGetLeadEnrichmentRequest {
104
107
  leadId: string;
105
108
  }
106
109
 
110
+ export interface LeadsApiGetLeadQuickRepliesRequest {
111
+ leadId: string;
112
+ }
113
+
107
114
  export interface LeadsApiGetManualLeadRequest {
108
115
  leadId: string;
109
116
  }
@@ -602,6 +609,53 @@ export class LeadsApi extends runtime.BaseAPI {
602
609
  return await response.value();
603
610
  }
604
611
 
612
+ /**
613
+ * Lists the quick replies of the seller account with their variables replaced by the values of the lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
614
+ * List quick replies for a lead
615
+ */
616
+ async getLeadQuickRepliesRaw(requestParameters: LeadsApiGetLeadQuickRepliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadQuickReplyListDto>> {
617
+ if (requestParameters['leadId'] == null) {
618
+ throw new runtime.RequiredError(
619
+ 'leadId',
620
+ 'Required parameter "leadId" was null or undefined when calling getLeadQuickReplies().'
621
+ );
622
+ }
623
+
624
+ const queryParameters: any = {};
625
+
626
+ const headerParameters: runtime.HTTPHeaders = {};
627
+
628
+ if (this.configuration && this.configuration.apiKey) {
629
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
630
+ }
631
+
632
+ if (this.configuration && this.configuration.accessToken) {
633
+ const token = this.configuration.accessToken;
634
+ const tokenString = await token("bearer", []);
635
+
636
+ if (tokenString) {
637
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
638
+ }
639
+ }
640
+ const response = await this.request({
641
+ path: `/private/leads/{leadId}/quick-replies`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
642
+ method: 'GET',
643
+ headers: headerParameters,
644
+ query: queryParameters,
645
+ }, initOverrides);
646
+
647
+ return new runtime.JSONApiResponse(response, (jsonValue) => LeadQuickReplyListDtoFromJSON(jsonValue));
648
+ }
649
+
650
+ /**
651
+ * Lists the quick replies of the seller account with their variables replaced by the values of the lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
652
+ * List quick replies for a lead
653
+ */
654
+ async getLeadQuickReplies(requestParameters: LeadsApiGetLeadQuickRepliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadQuickReplyListDto> {
655
+ const response = await this.getLeadQuickRepliesRaw(requestParameters, initOverrides);
656
+ return await response.value();
657
+ }
658
+
605
659
  /**
606
660
  * Returns manual lead information. Requires account ownership. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
607
661
  * Get manual lead details
@@ -0,0 +1,268 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ GetQuickReplies200Response,
19
+ QuickReplyDto,
20
+ QuickReplyInput,
21
+ ValidationException,
22
+ } from '../models/index';
23
+ import {
24
+ GetQuickReplies200ResponseFromJSON,
25
+ GetQuickReplies200ResponseToJSON,
26
+ QuickReplyDtoFromJSON,
27
+ QuickReplyDtoToJSON,
28
+ QuickReplyInputFromJSON,
29
+ QuickReplyInputToJSON,
30
+ ValidationExceptionFromJSON,
31
+ ValidationExceptionToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface QuickRepliesApiCreateQuickReplyRequest {
35
+ quickReplyInput: QuickReplyInput;
36
+ }
37
+
38
+ export interface QuickRepliesApiDeleteQuickReplyRequest {
39
+ quickReplyId: string;
40
+ }
41
+
42
+ export interface QuickRepliesApiGetQuickRepliesRequest {
43
+ filter?: { [key: string]: string; };
44
+ page?: number;
45
+ limit?: number;
46
+ sortBy?: Array<string>;
47
+ }
48
+
49
+ export interface QuickRepliesApiUpdateQuickReplyRequest {
50
+ quickReplyId: string;
51
+ quickReplyInput: QuickReplyInput;
52
+ }
53
+
54
+ /**
55
+ *
56
+ */
57
+ export class QuickRepliesApi extends runtime.BaseAPI {
58
+
59
+ /**
60
+ * Creates a quick reply for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
61
+ * Create a quick reply
62
+ */
63
+ async createQuickReplyRaw(requestParameters: QuickRepliesApiCreateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuickReplyDto>> {
64
+ if (requestParameters['quickReplyInput'] == null) {
65
+ throw new runtime.RequiredError(
66
+ 'quickReplyInput',
67
+ 'Required parameter "quickReplyInput" was null or undefined when calling createQuickReply().'
68
+ );
69
+ }
70
+
71
+ const queryParameters: any = {};
72
+
73
+ const headerParameters: runtime.HTTPHeaders = {};
74
+
75
+ headerParameters['Content-Type'] = 'application/json';
76
+
77
+ if (this.configuration && this.configuration.apiKey) {
78
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
79
+ }
80
+
81
+ if (this.configuration && this.configuration.accessToken) {
82
+ const token = this.configuration.accessToken;
83
+ const tokenString = await token("bearer", []);
84
+
85
+ if (tokenString) {
86
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
87
+ }
88
+ }
89
+ const response = await this.request({
90
+ path: `/private/quick-replies`,
91
+ method: 'POST',
92
+ headers: headerParameters,
93
+ query: queryParameters,
94
+ body: QuickReplyInputToJSON(requestParameters['quickReplyInput']),
95
+ }, initOverrides);
96
+
97
+ return new runtime.JSONApiResponse(response, (jsonValue) => QuickReplyDtoFromJSON(jsonValue));
98
+ }
99
+
100
+ /**
101
+ * Creates a quick reply for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
102
+ * Create a quick reply
103
+ */
104
+ async createQuickReply(requestParameters: QuickRepliesApiCreateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuickReplyDto> {
105
+ const response = await this.createQuickReplyRaw(requestParameters, initOverrides);
106
+ return await response.value();
107
+ }
108
+
109
+ /**
110
+ * Deletes a quick reply of the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
111
+ * Delete a quick reply
112
+ */
113
+ async deleteQuickReplyRaw(requestParameters: QuickRepliesApiDeleteQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
114
+ if (requestParameters['quickReplyId'] == null) {
115
+ throw new runtime.RequiredError(
116
+ 'quickReplyId',
117
+ 'Required parameter "quickReplyId" was null or undefined when calling deleteQuickReply().'
118
+ );
119
+ }
120
+
121
+ const queryParameters: any = {};
122
+
123
+ const headerParameters: runtime.HTTPHeaders = {};
124
+
125
+ if (this.configuration && this.configuration.apiKey) {
126
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
127
+ }
128
+
129
+ if (this.configuration && this.configuration.accessToken) {
130
+ const token = this.configuration.accessToken;
131
+ const tokenString = await token("bearer", []);
132
+
133
+ if (tokenString) {
134
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
135
+ }
136
+ }
137
+ const response = await this.request({
138
+ path: `/private/quick-replies/{quickReplyId}`.replace(`{${"quickReplyId"}}`, encodeURIComponent(String(requestParameters['quickReplyId']))),
139
+ method: 'DELETE',
140
+ headers: headerParameters,
141
+ query: queryParameters,
142
+ }, initOverrides);
143
+
144
+ return new runtime.VoidApiResponse(response);
145
+ }
146
+
147
+ /**
148
+ * Deletes a quick reply of the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
149
+ * Delete a quick reply
150
+ */
151
+ async deleteQuickReply(requestParameters: QuickRepliesApiDeleteQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
152
+ await this.deleteQuickReplyRaw(requestParameters, initOverrides);
153
+ }
154
+
155
+ /**
156
+ * Lists the quick replies of the seller account, sorted by name by default. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
157
+ * List quick replies
158
+ */
159
+ async getQuickRepliesRaw(requestParameters: QuickRepliesApiGetQuickRepliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuickReplies200Response>> {
160
+ const queryParameters: any = {};
161
+
162
+ if (requestParameters['filter'] != null) {
163
+ queryParameters['filter'] = requestParameters['filter'];
164
+ }
165
+
166
+ if (requestParameters['page'] != null) {
167
+ queryParameters['page'] = requestParameters['page'];
168
+ }
169
+
170
+ if (requestParameters['limit'] != null) {
171
+ queryParameters['limit'] = requestParameters['limit'];
172
+ }
173
+
174
+ if (requestParameters['sortBy'] != null) {
175
+ queryParameters['sortBy'] = requestParameters['sortBy'];
176
+ }
177
+
178
+ const headerParameters: runtime.HTTPHeaders = {};
179
+
180
+ if (this.configuration && this.configuration.apiKey) {
181
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
182
+ }
183
+
184
+ if (this.configuration && this.configuration.accessToken) {
185
+ const token = this.configuration.accessToken;
186
+ const tokenString = await token("bearer", []);
187
+
188
+ if (tokenString) {
189
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
190
+ }
191
+ }
192
+ const response = await this.request({
193
+ path: `/private/quick-replies`,
194
+ method: 'GET',
195
+ headers: headerParameters,
196
+ query: queryParameters,
197
+ }, initOverrides);
198
+
199
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetQuickReplies200ResponseFromJSON(jsonValue));
200
+ }
201
+
202
+ /**
203
+ * Lists the quick replies of the seller account, sorted by name by default. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
204
+ * List quick replies
205
+ */
206
+ async getQuickReplies(requestParameters: QuickRepliesApiGetQuickRepliesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuickReplies200Response> {
207
+ const response = await this.getQuickRepliesRaw(requestParameters, initOverrides);
208
+ return await response.value();
209
+ }
210
+
211
+ /**
212
+ * Changes the name and message of a quick reply. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
213
+ * Update a quick reply
214
+ */
215
+ async updateQuickReplyRaw(requestParameters: QuickRepliesApiUpdateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuickReplyDto>> {
216
+ if (requestParameters['quickReplyId'] == null) {
217
+ throw new runtime.RequiredError(
218
+ 'quickReplyId',
219
+ 'Required parameter "quickReplyId" was null or undefined when calling updateQuickReply().'
220
+ );
221
+ }
222
+
223
+ if (requestParameters['quickReplyInput'] == null) {
224
+ throw new runtime.RequiredError(
225
+ 'quickReplyInput',
226
+ 'Required parameter "quickReplyInput" was null or undefined when calling updateQuickReply().'
227
+ );
228
+ }
229
+
230
+ const queryParameters: any = {};
231
+
232
+ const headerParameters: runtime.HTTPHeaders = {};
233
+
234
+ headerParameters['Content-Type'] = 'application/json';
235
+
236
+ if (this.configuration && this.configuration.apiKey) {
237
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
238
+ }
239
+
240
+ if (this.configuration && this.configuration.accessToken) {
241
+ const token = this.configuration.accessToken;
242
+ const tokenString = await token("bearer", []);
243
+
244
+ if (tokenString) {
245
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
246
+ }
247
+ }
248
+ const response = await this.request({
249
+ path: `/private/quick-replies/{quickReplyId}`.replace(`{${"quickReplyId"}}`, encodeURIComponent(String(requestParameters['quickReplyId']))),
250
+ method: 'PATCH',
251
+ headers: headerParameters,
252
+ query: queryParameters,
253
+ body: QuickReplyInputToJSON(requestParameters['quickReplyInput']),
254
+ }, initOverrides);
255
+
256
+ return new runtime.JSONApiResponse(response, (jsonValue) => QuickReplyDtoFromJSON(jsonValue));
257
+ }
258
+
259
+ /**
260
+ * Changes the name and message of a quick reply. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
261
+ * Update a quick reply
262
+ */
263
+ async updateQuickReply(requestParameters: QuickRepliesApiUpdateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuickReplyDto> {
264
+ const response = await this.updateQuickReplyRaw(requestParameters, initOverrides);
265
+ return await response.value();
266
+ }
267
+
268
+ }
package/src/apis/index.ts CHANGED
@@ -28,6 +28,7 @@ export * from './MarketplacesApi';
28
28
  export * from './NotificationsApi';
29
29
  export * from './OrdersPublicApi';
30
30
  export * from './PartnerApi';
31
+ export * from './QuickRepliesApi';
31
32
  export * from './SalesPublicApi';
32
33
  export * from './StatsApi';
33
34
  export * from './SubscriptionsApi';
@@ -0,0 +1,106 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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 { mapValues } from '../runtime';
16
+ import type { PaginateResponseLinks } from './PaginateResponseLinks';
17
+ import {
18
+ PaginateResponseLinksFromJSON,
19
+ PaginateResponseLinksFromJSONTyped,
20
+ PaginateResponseLinksToJSON,
21
+ PaginateResponseLinksToJSONTyped,
22
+ } from './PaginateResponseLinks';
23
+ import type { QuickReplyDto } from './QuickReplyDto';
24
+ import {
25
+ QuickReplyDtoFromJSON,
26
+ QuickReplyDtoFromJSONTyped,
27
+ QuickReplyDtoToJSON,
28
+ QuickReplyDtoToJSONTyped,
29
+ } from './QuickReplyDto';
30
+ import type { PaginateResponseMeta } from './PaginateResponseMeta';
31
+ import {
32
+ PaginateResponseMetaFromJSON,
33
+ PaginateResponseMetaFromJSONTyped,
34
+ PaginateResponseMetaToJSON,
35
+ PaginateResponseMetaToJSONTyped,
36
+ } from './PaginateResponseMeta';
37
+
38
+ /**
39
+ *
40
+ * @export
41
+ * @interface GetQuickReplies200Response
42
+ */
43
+ export interface GetQuickReplies200Response {
44
+ /**
45
+ *
46
+ * @type {Array<QuickReplyDto>}
47
+ * @memberof GetQuickReplies200Response
48
+ */
49
+ data: Array<QuickReplyDto>;
50
+ /**
51
+ *
52
+ * @type {PaginateResponseMeta}
53
+ * @memberof GetQuickReplies200Response
54
+ */
55
+ meta: PaginateResponseMeta;
56
+ /**
57
+ *
58
+ * @type {PaginateResponseLinks}
59
+ * @memberof GetQuickReplies200Response
60
+ */
61
+ links: PaginateResponseLinks;
62
+ }
63
+
64
+ /**
65
+ * Check if a given object implements the GetQuickReplies200Response interface.
66
+ */
67
+ export function instanceOfGetQuickReplies200Response(value: object): value is GetQuickReplies200Response {
68
+ if (!('data' in value) || value['data'] === undefined) return false;
69
+ if (!('meta' in value) || value['meta'] === undefined) return false;
70
+ if (!('links' in value) || value['links'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function GetQuickReplies200ResponseFromJSON(json: any): GetQuickReplies200Response {
75
+ return GetQuickReplies200ResponseFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function GetQuickReplies200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuickReplies200Response {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'data': ((json['data'] as Array<any>).map(QuickReplyDtoFromJSON)),
85
+ 'meta': PaginateResponseMetaFromJSON(json['meta']),
86
+ 'links': PaginateResponseLinksFromJSON(json['links']),
87
+ };
88
+ }
89
+
90
+ export function GetQuickReplies200ResponseToJSON(json: any): GetQuickReplies200Response {
91
+ return GetQuickReplies200ResponseToJSONTyped(json, false);
92
+ }
93
+
94
+ export function GetQuickReplies200ResponseToJSONTyped(value?: GetQuickReplies200Response | null, ignoreDiscriminator: boolean = false): any {
95
+ if (value == null) {
96
+ return value;
97
+ }
98
+
99
+ return {
100
+
101
+ 'data': ((value['data'] as Array<any>).map(QuickReplyDtoToJSON)),
102
+ 'meta': PaginateResponseMetaToJSON(value['meta']),
103
+ 'links': PaginateResponseLinksToJSON(value['links']),
104
+ };
105
+ }
106
+
@@ -0,0 +1,101 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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 { mapValues } from '../runtime';
16
+ import type { QuickReplyVariableEnum } from './QuickReplyVariableEnum';
17
+ import {
18
+ QuickReplyVariableEnumFromJSON,
19
+ QuickReplyVariableEnumFromJSONTyped,
20
+ QuickReplyVariableEnumToJSON,
21
+ QuickReplyVariableEnumToJSONTyped,
22
+ } from './QuickReplyVariableEnum';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface LeadQuickReplyDto
28
+ */
29
+ export interface LeadQuickReplyDto {
30
+ /**
31
+ * Quick reply id.
32
+ * @type {string}
33
+ * @memberof LeadQuickReplyDto
34
+ */
35
+ id: string;
36
+ /**
37
+ * Name the seller recognises the reply by.
38
+ * @type {string}
39
+ * @memberof LeadQuickReplyDto
40
+ */
41
+ name: string;
42
+ /**
43
+ * Message with the variables replaced by the values of the lead.
44
+ * @type {string}
45
+ * @memberof LeadQuickReplyDto
46
+ */
47
+ message: string;
48
+ /**
49
+ * Variables that have no value for the lead.
50
+ * @type {Array<QuickReplyVariableEnum>}
51
+ * @memberof LeadQuickReplyDto
52
+ */
53
+ missingVariables: Array<QuickReplyVariableEnum>;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the LeadQuickReplyDto interface.
58
+ */
59
+ export function instanceOfLeadQuickReplyDto(value: object): value is LeadQuickReplyDto {
60
+ if (!('id' in value) || value['id'] === undefined) return false;
61
+ if (!('name' in value) || value['name'] === undefined) return false;
62
+ if (!('message' in value) || value['message'] === undefined) return false;
63
+ if (!('missingVariables' in value) || value['missingVariables'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function LeadQuickReplyDtoFromJSON(json: any): LeadQuickReplyDto {
68
+ return LeadQuickReplyDtoFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function LeadQuickReplyDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeadQuickReplyDto {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'id': json['id'],
78
+ 'name': json['name'],
79
+ 'message': json['message'],
80
+ 'missingVariables': ((json['missingVariables'] as Array<any>).map(QuickReplyVariableEnumFromJSON)),
81
+ };
82
+ }
83
+
84
+ export function LeadQuickReplyDtoToJSON(json: any): LeadQuickReplyDto {
85
+ return LeadQuickReplyDtoToJSONTyped(json, false);
86
+ }
87
+
88
+ export function LeadQuickReplyDtoToJSONTyped(value?: LeadQuickReplyDto | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'id': value['id'],
96
+ 'name': value['name'],
97
+ 'message': value['message'],
98
+ 'missingVariables': ((value['missingVariables'] as Array<any>).map(QuickReplyVariableEnumToJSON)),
99
+ };
100
+ }
101
+
@@ -0,0 +1,74 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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 { mapValues } from '../runtime';
16
+ import type { LeadQuickReplyDto } from './LeadQuickReplyDto';
17
+ import {
18
+ LeadQuickReplyDtoFromJSON,
19
+ LeadQuickReplyDtoFromJSONTyped,
20
+ LeadQuickReplyDtoToJSON,
21
+ LeadQuickReplyDtoToJSONTyped,
22
+ } from './LeadQuickReplyDto';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface LeadQuickReplyListDto
28
+ */
29
+ export interface LeadQuickReplyListDto {
30
+ /**
31
+ * Quick replies of the account, sorted by name.
32
+ * @type {Array<LeadQuickReplyDto>}
33
+ * @memberof LeadQuickReplyListDto
34
+ */
35
+ data: Array<LeadQuickReplyDto>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the LeadQuickReplyListDto interface.
40
+ */
41
+ export function instanceOfLeadQuickReplyListDto(value: object): value is LeadQuickReplyListDto {
42
+ if (!('data' in value) || value['data'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function LeadQuickReplyListDtoFromJSON(json: any): LeadQuickReplyListDto {
47
+ return LeadQuickReplyListDtoFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function LeadQuickReplyListDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeadQuickReplyListDto {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'data': ((json['data'] as Array<any>).map(LeadQuickReplyDtoFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function LeadQuickReplyListDtoToJSON(json: any): LeadQuickReplyListDto {
61
+ return LeadQuickReplyListDtoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function LeadQuickReplyListDtoToJSONTyped(value?: LeadQuickReplyListDto | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'data': ((value['data'] as Array<any>).map(LeadQuickReplyDtoToJSON)),
72
+ };
73
+ }
74
+