@randock/nameshift-api-client 0.0.520 → 0.0.521
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/README.md +3 -3
- package/dist/apis/QuickRepliesApi.d.ts +66 -3
- package/dist/apis/QuickRepliesApi.js +319 -2
- package/dist/models/AccountQuickReplyCustomVariableDto.d.ts +51 -0
- package/dist/models/AccountQuickReplyCustomVariableDto.js +64 -0
- package/dist/models/AccountQuickReplyCustomVariableInput.d.ts +39 -0
- package/dist/models/AccountQuickReplyCustomVariableInput.js +56 -0
- package/dist/models/AccountQuickReplyCustomVariableListDto.d.ts +33 -0
- package/dist/models/AccountQuickReplyCustomVariableListDto.js +52 -0
- package/dist/models/LeadQuickReplyDto.d.ts +8 -1
- package/dist/models/LeadQuickReplyDto.js +5 -0
- package/dist/models/LeadQuickReplyListDto.d.ts +12 -0
- package/dist/models/LeadQuickReplyListDto.js +8 -0
- package/dist/models/QuickReplyCustomVariableDto.d.ts +45 -0
- package/dist/models/QuickReplyCustomVariableDto.js +60 -0
- package/dist/models/QuickReplyCustomVariableInput.d.ts +45 -0
- package/dist/models/QuickReplyCustomVariableInput.js +60 -0
- package/dist/models/QuickReplyCustomVariableTypeEnum.d.ts +26 -0
- package/dist/models/QuickReplyCustomVariableTypeEnum.js +52 -0
- package/dist/models/QuickReplyDto.d.ts +8 -1
- package/dist/models/QuickReplyDto.js +5 -0
- package/dist/models/QuickReplyInput.d.ts +8 -1
- package/dist/models/QuickReplyInput.js +3 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/QuickRepliesApi.ts +268 -2
- package/src/models/AccountQuickReplyCustomVariableDto.ts +103 -0
- package/src/models/AccountQuickReplyCustomVariableInput.ts +85 -0
- package/src/models/AccountQuickReplyCustomVariableListDto.ts +74 -0
- package/src/models/LeadQuickReplyDto.ts +17 -1
- package/src/models/LeadQuickReplyListDto.ts +18 -0
- package/src/models/QuickReplyCustomVariableDto.ts +94 -0
- package/src/models/QuickReplyCustomVariableInput.ts +94 -0
- package/src/models/QuickReplyCustomVariableTypeEnum.ts +54 -0
- package/src/models/QuickReplyDto.ts +17 -1
- package/src/models/QuickReplyInput.ts +17 -1
- package/src/models/index.ts +6 -0
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { QuickReplyCustomVariableInput } from './QuickReplyCustomVariableInput';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -22,11 +23,17 @@ export interface QuickReplyInput {
|
|
|
22
23
|
*/
|
|
23
24
|
name: string;
|
|
24
25
|
/**
|
|
25
|
-
* Message template, plain text with {{variable}} tokens.
|
|
26
|
+
* Message template, plain text with {{variable}} and {{custom.key}} tokens.
|
|
26
27
|
* @type {string}
|
|
27
28
|
* @memberof QuickReplyInput
|
|
28
29
|
*/
|
|
29
30
|
message: string;
|
|
31
|
+
/**
|
|
32
|
+
* Variables the seller fills in when using the reply.
|
|
33
|
+
* @type {Array<QuickReplyCustomVariableInput>}
|
|
34
|
+
* @memberof QuickReplyInput
|
|
35
|
+
*/
|
|
36
|
+
customVariables?: Array<QuickReplyCustomVariableInput>;
|
|
30
37
|
}
|
|
31
38
|
/**
|
|
32
39
|
* Check if a given object implements the QuickReplyInput interface.
|
|
@@ -18,6 +18,7 @@ exports.QuickReplyInputFromJSON = QuickReplyInputFromJSON;
|
|
|
18
18
|
exports.QuickReplyInputFromJSONTyped = QuickReplyInputFromJSONTyped;
|
|
19
19
|
exports.QuickReplyInputToJSON = QuickReplyInputToJSON;
|
|
20
20
|
exports.QuickReplyInputToJSONTyped = QuickReplyInputToJSONTyped;
|
|
21
|
+
var QuickReplyCustomVariableInput_1 = require("./QuickReplyCustomVariableInput");
|
|
21
22
|
/**
|
|
22
23
|
* Check if a given object implements the QuickReplyInput interface.
|
|
23
24
|
*/
|
|
@@ -38,6 +39,7 @@ function QuickReplyInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
38
39
|
return {
|
|
39
40
|
'name': json['name'],
|
|
40
41
|
'message': json['message'],
|
|
42
|
+
'customVariables': json['customVariables'] == null ? undefined : (json['customVariables'].map(QuickReplyCustomVariableInput_1.QuickReplyCustomVariableInputFromJSON)),
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
45
|
function QuickReplyInputToJSON(json) {
|
|
@@ -51,5 +53,6 @@ function QuickReplyInputToJSONTyped(value, ignoreDiscriminator) {
|
|
|
51
53
|
return {
|
|
52
54
|
'name': value['name'],
|
|
53
55
|
'message': value['message'],
|
|
56
|
+
'customVariables': value['customVariables'] == null ? undefined : (value['customVariables'].map(QuickReplyCustomVariableInput_1.QuickReplyCustomVariableInputToJSON)),
|
|
54
57
|
};
|
|
55
58
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -27,6 +27,9 @@ export * from './AccountPaymentDto';
|
|
|
27
27
|
export * from './AccountPaymentMethodDto';
|
|
28
28
|
export * from './AccountPaymentMethodProfileDto';
|
|
29
29
|
export * from './AccountPayoutDto';
|
|
30
|
+
export * from './AccountQuickReplyCustomVariableDto';
|
|
31
|
+
export * from './AccountQuickReplyCustomVariableInput';
|
|
32
|
+
export * from './AccountQuickReplyCustomVariableListDto';
|
|
30
33
|
export * from './AccountSettingsAffiliateCommissionDto';
|
|
31
34
|
export * from './AccountSettingsAffiliateCommissionReferralDuration';
|
|
32
35
|
export * from './AccountSettingsAffiliateDto';
|
|
@@ -479,6 +482,9 @@ export * from './PublicSaleDto';
|
|
|
479
482
|
export * from './PublicSalesDto';
|
|
480
483
|
export * from './PutBuyerLeadOfferInput';
|
|
481
484
|
export * from './PutLeadOfferInput';
|
|
485
|
+
export * from './QuickReplyCustomVariableDto';
|
|
486
|
+
export * from './QuickReplyCustomVariableInput';
|
|
487
|
+
export * from './QuickReplyCustomVariableTypeEnum';
|
|
482
488
|
export * from './QuickReplyDto';
|
|
483
489
|
export * from './QuickReplyInput';
|
|
484
490
|
export * from './QuickReplyVariableEnum';
|
package/dist/models/index.js
CHANGED
|
@@ -45,6 +45,9 @@ __exportStar(require("./AccountPaymentDto"), exports);
|
|
|
45
45
|
__exportStar(require("./AccountPaymentMethodDto"), exports);
|
|
46
46
|
__exportStar(require("./AccountPaymentMethodProfileDto"), exports);
|
|
47
47
|
__exportStar(require("./AccountPayoutDto"), exports);
|
|
48
|
+
__exportStar(require("./AccountQuickReplyCustomVariableDto"), exports);
|
|
49
|
+
__exportStar(require("./AccountQuickReplyCustomVariableInput"), exports);
|
|
50
|
+
__exportStar(require("./AccountQuickReplyCustomVariableListDto"), exports);
|
|
48
51
|
__exportStar(require("./AccountSettingsAffiliateCommissionDto"), exports);
|
|
49
52
|
__exportStar(require("./AccountSettingsAffiliateCommissionReferralDuration"), exports);
|
|
50
53
|
__exportStar(require("./AccountSettingsAffiliateDto"), exports);
|
|
@@ -497,6 +500,9 @@ __exportStar(require("./PublicSaleDto"), exports);
|
|
|
497
500
|
__exportStar(require("./PublicSalesDto"), exports);
|
|
498
501
|
__exportStar(require("./PutBuyerLeadOfferInput"), exports);
|
|
499
502
|
__exportStar(require("./PutLeadOfferInput"), exports);
|
|
503
|
+
__exportStar(require("./QuickReplyCustomVariableDto"), exports);
|
|
504
|
+
__exportStar(require("./QuickReplyCustomVariableInput"), exports);
|
|
505
|
+
__exportStar(require("./QuickReplyCustomVariableTypeEnum"), exports);
|
|
500
506
|
__exportStar(require("./QuickReplyDto"), exports);
|
|
501
507
|
__exportStar(require("./QuickReplyInput"), exports);
|
|
502
508
|
__exportStar(require("./QuickReplyVariableEnum"), exports);
|
package/package.json
CHANGED
|
@@ -15,12 +15,21 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
AccountQuickReplyCustomVariableDto,
|
|
19
|
+
AccountQuickReplyCustomVariableInput,
|
|
20
|
+
AccountQuickReplyCustomVariableListDto,
|
|
18
21
|
GetQuickReplies200Response,
|
|
19
22
|
QuickReplyDto,
|
|
20
23
|
QuickReplyInput,
|
|
21
24
|
ValidationException,
|
|
22
25
|
} from '../models/index';
|
|
23
26
|
import {
|
|
27
|
+
AccountQuickReplyCustomVariableDtoFromJSON,
|
|
28
|
+
AccountQuickReplyCustomVariableDtoToJSON,
|
|
29
|
+
AccountQuickReplyCustomVariableInputFromJSON,
|
|
30
|
+
AccountQuickReplyCustomVariableInputToJSON,
|
|
31
|
+
AccountQuickReplyCustomVariableListDtoFromJSON,
|
|
32
|
+
AccountQuickReplyCustomVariableListDtoToJSON,
|
|
24
33
|
GetQuickReplies200ResponseFromJSON,
|
|
25
34
|
GetQuickReplies200ResponseToJSON,
|
|
26
35
|
QuickReplyDtoFromJSON,
|
|
@@ -35,10 +44,18 @@ export interface QuickRepliesApiCreateQuickReplyRequest {
|
|
|
35
44
|
quickReplyInput: QuickReplyInput;
|
|
36
45
|
}
|
|
37
46
|
|
|
47
|
+
export interface QuickRepliesApiCreateQuickReplyCustomVariableRequest {
|
|
48
|
+
accountQuickReplyCustomVariableInput: AccountQuickReplyCustomVariableInput;
|
|
49
|
+
}
|
|
50
|
+
|
|
38
51
|
export interface QuickRepliesApiDeleteQuickReplyRequest {
|
|
39
52
|
quickReplyId: string;
|
|
40
53
|
}
|
|
41
54
|
|
|
55
|
+
export interface QuickRepliesApiDeleteQuickReplyCustomVariableRequest {
|
|
56
|
+
customVariableId: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
42
59
|
export interface QuickRepliesApiGetQuickRepliesRequest {
|
|
43
60
|
filter?: { [key: string]: string; };
|
|
44
61
|
page?: number;
|
|
@@ -46,11 +63,20 @@ export interface QuickRepliesApiGetQuickRepliesRequest {
|
|
|
46
63
|
sortBy?: Array<string>;
|
|
47
64
|
}
|
|
48
65
|
|
|
66
|
+
export interface QuickRepliesApiGetQuickReplyRequest {
|
|
67
|
+
quickReplyId: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
49
70
|
export interface QuickRepliesApiUpdateQuickReplyRequest {
|
|
50
71
|
quickReplyId: string;
|
|
51
72
|
quickReplyInput: QuickReplyInput;
|
|
52
73
|
}
|
|
53
74
|
|
|
75
|
+
export interface QuickRepliesApiUpdateQuickReplyCustomVariableRequest {
|
|
76
|
+
customVariableId: string;
|
|
77
|
+
accountQuickReplyCustomVariableInput: AccountQuickReplyCustomVariableInput;
|
|
78
|
+
}
|
|
79
|
+
|
|
54
80
|
/**
|
|
55
81
|
*
|
|
56
82
|
*/
|
|
@@ -106,6 +132,56 @@ export class QuickRepliesApi extends runtime.BaseAPI {
|
|
|
106
132
|
return await response.value();
|
|
107
133
|
}
|
|
108
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Creates a custom variable for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
137
|
+
* Create a quick reply custom variable
|
|
138
|
+
*/
|
|
139
|
+
async createQuickReplyCustomVariableRaw(requestParameters: QuickRepliesApiCreateQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountQuickReplyCustomVariableDto>> {
|
|
140
|
+
if (requestParameters['accountQuickReplyCustomVariableInput'] == null) {
|
|
141
|
+
throw new runtime.RequiredError(
|
|
142
|
+
'accountQuickReplyCustomVariableInput',
|
|
143
|
+
'Required parameter "accountQuickReplyCustomVariableInput" was null or undefined when calling createQuickReplyCustomVariable().'
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const queryParameters: any = {};
|
|
148
|
+
|
|
149
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
150
|
+
|
|
151
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
152
|
+
|
|
153
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
154
|
+
headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
158
|
+
const token = this.configuration.accessToken;
|
|
159
|
+
const tokenString = await token("bearer", []);
|
|
160
|
+
|
|
161
|
+
if (tokenString) {
|
|
162
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const response = await this.request({
|
|
166
|
+
path: `/private/quick-reply-custom-variables`,
|
|
167
|
+
method: 'POST',
|
|
168
|
+
headers: headerParameters,
|
|
169
|
+
query: queryParameters,
|
|
170
|
+
body: AccountQuickReplyCustomVariableInputToJSON(requestParameters['accountQuickReplyCustomVariableInput']),
|
|
171
|
+
}, initOverrides);
|
|
172
|
+
|
|
173
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountQuickReplyCustomVariableDtoFromJSON(jsonValue));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Creates a custom variable for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
178
|
+
* Create a quick reply custom variable
|
|
179
|
+
*/
|
|
180
|
+
async createQuickReplyCustomVariable(requestParameters: QuickRepliesApiCreateQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountQuickReplyCustomVariableDto> {
|
|
181
|
+
const response = await this.createQuickReplyCustomVariableRaw(requestParameters, initOverrides);
|
|
182
|
+
return await response.value();
|
|
183
|
+
}
|
|
184
|
+
|
|
109
185
|
/**
|
|
110
186
|
* 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
187
|
* Delete a quick reply
|
|
@@ -152,6 +228,52 @@ export class QuickRepliesApi extends runtime.BaseAPI {
|
|
|
152
228
|
await this.deleteQuickReplyRaw(requestParameters, initOverrides);
|
|
153
229
|
}
|
|
154
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Deletes a custom variable of the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
233
|
+
* Delete a quick reply custom variable
|
|
234
|
+
*/
|
|
235
|
+
async deleteQuickReplyCustomVariableRaw(requestParameters: QuickRepliesApiDeleteQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
236
|
+
if (requestParameters['customVariableId'] == null) {
|
|
237
|
+
throw new runtime.RequiredError(
|
|
238
|
+
'customVariableId',
|
|
239
|
+
'Required parameter "customVariableId" was null or undefined when calling deleteQuickReplyCustomVariable().'
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
const queryParameters: any = {};
|
|
244
|
+
|
|
245
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
246
|
+
|
|
247
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
248
|
+
headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
252
|
+
const token = this.configuration.accessToken;
|
|
253
|
+
const tokenString = await token("bearer", []);
|
|
254
|
+
|
|
255
|
+
if (tokenString) {
|
|
256
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
const response = await this.request({
|
|
260
|
+
path: `/private/quick-reply-custom-variables/{customVariableId}`.replace(`{${"customVariableId"}}`, encodeURIComponent(String(requestParameters['customVariableId']))),
|
|
261
|
+
method: 'DELETE',
|
|
262
|
+
headers: headerParameters,
|
|
263
|
+
query: queryParameters,
|
|
264
|
+
}, initOverrides);
|
|
265
|
+
|
|
266
|
+
return new runtime.VoidApiResponse(response);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Deletes a custom variable of the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
271
|
+
* Delete a quick reply custom variable
|
|
272
|
+
*/
|
|
273
|
+
async deleteQuickReplyCustomVariable(requestParameters: QuickRepliesApiDeleteQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
274
|
+
await this.deleteQuickReplyCustomVariableRaw(requestParameters, initOverrides);
|
|
275
|
+
}
|
|
276
|
+
|
|
155
277
|
/**
|
|
156
278
|
* 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
279
|
* List quick replies
|
|
@@ -209,7 +331,94 @@ export class QuickRepliesApi extends runtime.BaseAPI {
|
|
|
209
331
|
}
|
|
210
332
|
|
|
211
333
|
/**
|
|
212
|
-
*
|
|
334
|
+
* Returns a quick reply of the seller account. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
335
|
+
* Get a quick reply
|
|
336
|
+
*/
|
|
337
|
+
async getQuickReplyRaw(requestParameters: QuickRepliesApiGetQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuickReplyDto>> {
|
|
338
|
+
if (requestParameters['quickReplyId'] == null) {
|
|
339
|
+
throw new runtime.RequiredError(
|
|
340
|
+
'quickReplyId',
|
|
341
|
+
'Required parameter "quickReplyId" was null or undefined when calling getQuickReply().'
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const queryParameters: any = {};
|
|
346
|
+
|
|
347
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
348
|
+
|
|
349
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
350
|
+
headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
354
|
+
const token = this.configuration.accessToken;
|
|
355
|
+
const tokenString = await token("bearer", []);
|
|
356
|
+
|
|
357
|
+
if (tokenString) {
|
|
358
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
const response = await this.request({
|
|
362
|
+
path: `/private/quick-replies/{quickReplyId}`.replace(`{${"quickReplyId"}}`, encodeURIComponent(String(requestParameters['quickReplyId']))),
|
|
363
|
+
method: 'GET',
|
|
364
|
+
headers: headerParameters,
|
|
365
|
+
query: queryParameters,
|
|
366
|
+
}, initOverrides);
|
|
367
|
+
|
|
368
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => QuickReplyDtoFromJSON(jsonValue));
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Returns a quick reply of the seller account. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
373
|
+
* Get a quick reply
|
|
374
|
+
*/
|
|
375
|
+
async getQuickReply(requestParameters: QuickRepliesApiGetQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuickReplyDto> {
|
|
376
|
+
const response = await this.getQuickReplyRaw(requestParameters, initOverrides);
|
|
377
|
+
return await response.value();
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Lists the custom variables the seller keeps to reuse in their quick replies. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
382
|
+
* List quick reply custom variables
|
|
383
|
+
*/
|
|
384
|
+
async getQuickReplyCustomVariablesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountQuickReplyCustomVariableListDto>> {
|
|
385
|
+
const queryParameters: any = {};
|
|
386
|
+
|
|
387
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
388
|
+
|
|
389
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
390
|
+
headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
394
|
+
const token = this.configuration.accessToken;
|
|
395
|
+
const tokenString = await token("bearer", []);
|
|
396
|
+
|
|
397
|
+
if (tokenString) {
|
|
398
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
const response = await this.request({
|
|
402
|
+
path: `/private/quick-reply-custom-variables`,
|
|
403
|
+
method: 'GET',
|
|
404
|
+
headers: headerParameters,
|
|
405
|
+
query: queryParameters,
|
|
406
|
+
}, initOverrides);
|
|
407
|
+
|
|
408
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountQuickReplyCustomVariableListDtoFromJSON(jsonValue));
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Lists the custom variables the seller keeps to reuse in their quick replies. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
413
|
+
* List quick reply custom variables
|
|
414
|
+
*/
|
|
415
|
+
async getQuickReplyCustomVariables(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountQuickReplyCustomVariableListDto> {
|
|
416
|
+
const response = await this.getQuickReplyCustomVariablesRaw(initOverrides);
|
|
417
|
+
return await response.value();
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Changes the name, message and custom variables of a quick reply. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
213
422
|
* Update a quick reply
|
|
214
423
|
*/
|
|
215
424
|
async updateQuickReplyRaw(requestParameters: QuickRepliesApiUpdateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuickReplyDto>> {
|
|
@@ -257,7 +466,7 @@ export class QuickRepliesApi extends runtime.BaseAPI {
|
|
|
257
466
|
}
|
|
258
467
|
|
|
259
468
|
/**
|
|
260
|
-
* Changes the name and
|
|
469
|
+
* Changes the name, message and custom variables of a quick reply. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
261
470
|
* Update a quick reply
|
|
262
471
|
*/
|
|
263
472
|
async updateQuickReply(requestParameters: QuickRepliesApiUpdateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuickReplyDto> {
|
|
@@ -265,4 +474,61 @@ export class QuickRepliesApi extends runtime.BaseAPI {
|
|
|
265
474
|
return await response.value();
|
|
266
475
|
}
|
|
267
476
|
|
|
477
|
+
/**
|
|
478
|
+
* Changes the label and type of a custom variable. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
479
|
+
* Update a quick reply custom variable
|
|
480
|
+
*/
|
|
481
|
+
async updateQuickReplyCustomVariableRaw(requestParameters: QuickRepliesApiUpdateQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountQuickReplyCustomVariableDto>> {
|
|
482
|
+
if (requestParameters['customVariableId'] == null) {
|
|
483
|
+
throw new runtime.RequiredError(
|
|
484
|
+
'customVariableId',
|
|
485
|
+
'Required parameter "customVariableId" was null or undefined when calling updateQuickReplyCustomVariable().'
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
if (requestParameters['accountQuickReplyCustomVariableInput'] == null) {
|
|
490
|
+
throw new runtime.RequiredError(
|
|
491
|
+
'accountQuickReplyCustomVariableInput',
|
|
492
|
+
'Required parameter "accountQuickReplyCustomVariableInput" was null or undefined when calling updateQuickReplyCustomVariable().'
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
const queryParameters: any = {};
|
|
497
|
+
|
|
498
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
499
|
+
|
|
500
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
501
|
+
|
|
502
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
503
|
+
headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
507
|
+
const token = this.configuration.accessToken;
|
|
508
|
+
const tokenString = await token("bearer", []);
|
|
509
|
+
|
|
510
|
+
if (tokenString) {
|
|
511
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
const response = await this.request({
|
|
515
|
+
path: `/private/quick-reply-custom-variables/{customVariableId}`.replace(`{${"customVariableId"}}`, encodeURIComponent(String(requestParameters['customVariableId']))),
|
|
516
|
+
method: 'PATCH',
|
|
517
|
+
headers: headerParameters,
|
|
518
|
+
query: queryParameters,
|
|
519
|
+
body: AccountQuickReplyCustomVariableInputToJSON(requestParameters['accountQuickReplyCustomVariableInput']),
|
|
520
|
+
}, initOverrides);
|
|
521
|
+
|
|
522
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountQuickReplyCustomVariableDtoFromJSON(jsonValue));
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Changes the label and type of a custom variable. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
527
|
+
* Update a quick reply custom variable
|
|
528
|
+
*/
|
|
529
|
+
async updateQuickReplyCustomVariable(requestParameters: QuickRepliesApiUpdateQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountQuickReplyCustomVariableDto> {
|
|
530
|
+
const response = await this.updateQuickReplyCustomVariableRaw(requestParameters, initOverrides);
|
|
531
|
+
return await response.value();
|
|
532
|
+
}
|
|
533
|
+
|
|
268
534
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 { QuickReplyCustomVariableTypeEnum } from './QuickReplyCustomVariableTypeEnum';
|
|
17
|
+
import {
|
|
18
|
+
QuickReplyCustomVariableTypeEnumFromJSON,
|
|
19
|
+
QuickReplyCustomVariableTypeEnumFromJSONTyped,
|
|
20
|
+
QuickReplyCustomVariableTypeEnumToJSON,
|
|
21
|
+
QuickReplyCustomVariableTypeEnumToJSONTyped,
|
|
22
|
+
} from './QuickReplyCustomVariableTypeEnum';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AccountQuickReplyCustomVariableDto
|
|
28
|
+
*/
|
|
29
|
+
export interface AccountQuickReplyCustomVariableDto {
|
|
30
|
+
/**
|
|
31
|
+
* Custom variable id.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AccountQuickReplyCustomVariableDto
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Key of the variable in its {{custom.key}} token.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof AccountQuickReplyCustomVariableDto
|
|
40
|
+
*/
|
|
41
|
+
key: string;
|
|
42
|
+
/**
|
|
43
|
+
* Name the seller gave to the variable.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof AccountQuickReplyCustomVariableDto
|
|
46
|
+
*/
|
|
47
|
+
label: string;
|
|
48
|
+
/**
|
|
49
|
+
* Kind of value the variable takes.
|
|
50
|
+
* @type {QuickReplyCustomVariableTypeEnum}
|
|
51
|
+
* @memberof AccountQuickReplyCustomVariableDto
|
|
52
|
+
*/
|
|
53
|
+
type: QuickReplyCustomVariableTypeEnum;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the AccountQuickReplyCustomVariableDto interface.
|
|
60
|
+
*/
|
|
61
|
+
export function instanceOfAccountQuickReplyCustomVariableDto(value: object): value is AccountQuickReplyCustomVariableDto {
|
|
62
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
63
|
+
if (!('key' in value) || value['key'] === undefined) return false;
|
|
64
|
+
if (!('label' in value) || value['label'] === undefined) return false;
|
|
65
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function AccountQuickReplyCustomVariableDtoFromJSON(json: any): AccountQuickReplyCustomVariableDto {
|
|
70
|
+
return AccountQuickReplyCustomVariableDtoFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function AccountQuickReplyCustomVariableDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountQuickReplyCustomVariableDto {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'id': json['id'],
|
|
80
|
+
'key': json['key'],
|
|
81
|
+
'label': json['label'],
|
|
82
|
+
'type': QuickReplyCustomVariableTypeEnumFromJSON(json['type']),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function AccountQuickReplyCustomVariableDtoToJSON(json: any): AccountQuickReplyCustomVariableDto {
|
|
87
|
+
return AccountQuickReplyCustomVariableDtoToJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function AccountQuickReplyCustomVariableDtoToJSONTyped(value?: AccountQuickReplyCustomVariableDto | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'id': value['id'],
|
|
98
|
+
'key': value['key'],
|
|
99
|
+
'label': value['label'],
|
|
100
|
+
'type': QuickReplyCustomVariableTypeEnumToJSON(value['type']),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
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 { QuickReplyCustomVariableTypeEnum } from './QuickReplyCustomVariableTypeEnum';
|
|
17
|
+
import {
|
|
18
|
+
QuickReplyCustomVariableTypeEnumFromJSON,
|
|
19
|
+
QuickReplyCustomVariableTypeEnumFromJSONTyped,
|
|
20
|
+
QuickReplyCustomVariableTypeEnumToJSON,
|
|
21
|
+
QuickReplyCustomVariableTypeEnumToJSONTyped,
|
|
22
|
+
} from './QuickReplyCustomVariableTypeEnum';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AccountQuickReplyCustomVariableInput
|
|
28
|
+
*/
|
|
29
|
+
export interface AccountQuickReplyCustomVariableInput {
|
|
30
|
+
/**
|
|
31
|
+
* Name the seller gives to the variable.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AccountQuickReplyCustomVariableInput
|
|
34
|
+
*/
|
|
35
|
+
label: string;
|
|
36
|
+
/**
|
|
37
|
+
* Kind of value the variable takes.
|
|
38
|
+
* @type {QuickReplyCustomVariableTypeEnum}
|
|
39
|
+
* @memberof AccountQuickReplyCustomVariableInput
|
|
40
|
+
*/
|
|
41
|
+
type: QuickReplyCustomVariableTypeEnum;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the AccountQuickReplyCustomVariableInput interface.
|
|
48
|
+
*/
|
|
49
|
+
export function instanceOfAccountQuickReplyCustomVariableInput(value: object): value is AccountQuickReplyCustomVariableInput {
|
|
50
|
+
if (!('label' in value) || value['label'] === undefined) return false;
|
|
51
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function AccountQuickReplyCustomVariableInputFromJSON(json: any): AccountQuickReplyCustomVariableInput {
|
|
56
|
+
return AccountQuickReplyCustomVariableInputFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function AccountQuickReplyCustomVariableInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountQuickReplyCustomVariableInput {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'label': json['label'],
|
|
66
|
+
'type': QuickReplyCustomVariableTypeEnumFromJSON(json['type']),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function AccountQuickReplyCustomVariableInputToJSON(json: any): AccountQuickReplyCustomVariableInput {
|
|
71
|
+
return AccountQuickReplyCustomVariableInputToJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function AccountQuickReplyCustomVariableInputToJSONTyped(value?: AccountQuickReplyCustomVariableInput | null, ignoreDiscriminator: boolean = false): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'label': value['label'],
|
|
82
|
+
'type': QuickReplyCustomVariableTypeEnumToJSON(value['type']),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|