@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.
Files changed (39) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +3 -3
  3. package/dist/apis/QuickRepliesApi.d.ts +66 -3
  4. package/dist/apis/QuickRepliesApi.js +319 -2
  5. package/dist/models/AccountQuickReplyCustomVariableDto.d.ts +51 -0
  6. package/dist/models/AccountQuickReplyCustomVariableDto.js +64 -0
  7. package/dist/models/AccountQuickReplyCustomVariableInput.d.ts +39 -0
  8. package/dist/models/AccountQuickReplyCustomVariableInput.js +56 -0
  9. package/dist/models/AccountQuickReplyCustomVariableListDto.d.ts +33 -0
  10. package/dist/models/AccountQuickReplyCustomVariableListDto.js +52 -0
  11. package/dist/models/LeadQuickReplyDto.d.ts +8 -1
  12. package/dist/models/LeadQuickReplyDto.js +5 -0
  13. package/dist/models/LeadQuickReplyListDto.d.ts +12 -0
  14. package/dist/models/LeadQuickReplyListDto.js +8 -0
  15. package/dist/models/QuickReplyCustomVariableDto.d.ts +45 -0
  16. package/dist/models/QuickReplyCustomVariableDto.js +60 -0
  17. package/dist/models/QuickReplyCustomVariableInput.d.ts +45 -0
  18. package/dist/models/QuickReplyCustomVariableInput.js +60 -0
  19. package/dist/models/QuickReplyCustomVariableTypeEnum.d.ts +26 -0
  20. package/dist/models/QuickReplyCustomVariableTypeEnum.js +52 -0
  21. package/dist/models/QuickReplyDto.d.ts +8 -1
  22. package/dist/models/QuickReplyDto.js +5 -0
  23. package/dist/models/QuickReplyInput.d.ts +8 -1
  24. package/dist/models/QuickReplyInput.js +3 -0
  25. package/dist/models/index.d.ts +6 -0
  26. package/dist/models/index.js +6 -0
  27. package/package.json +1 -1
  28. package/src/apis/QuickRepliesApi.ts +268 -2
  29. package/src/models/AccountQuickReplyCustomVariableDto.ts +103 -0
  30. package/src/models/AccountQuickReplyCustomVariableInput.ts +85 -0
  31. package/src/models/AccountQuickReplyCustomVariableListDto.ts +74 -0
  32. package/src/models/LeadQuickReplyDto.ts +17 -1
  33. package/src/models/LeadQuickReplyListDto.ts +18 -0
  34. package/src/models/QuickReplyCustomVariableDto.ts +94 -0
  35. package/src/models/QuickReplyCustomVariableInput.ts +94 -0
  36. package/src/models/QuickReplyCustomVariableTypeEnum.ts +54 -0
  37. package/src/models/QuickReplyDto.ts +17 -1
  38. package/src/models/QuickReplyInput.ts +17 -1
  39. package/src/models/index.ts +6 -0
@@ -71,6 +71,9 @@ src/models/AccountPaymentDto.ts
71
71
  src/models/AccountPaymentMethodDto.ts
72
72
  src/models/AccountPaymentMethodProfileDto.ts
73
73
  src/models/AccountPayoutDto.ts
74
+ src/models/AccountQuickReplyCustomVariableDto.ts
75
+ src/models/AccountQuickReplyCustomVariableInput.ts
76
+ src/models/AccountQuickReplyCustomVariableListDto.ts
74
77
  src/models/AccountSettingsAffiliateCommissionDto.ts
75
78
  src/models/AccountSettingsAffiliateCommissionReferralDuration.ts
76
79
  src/models/AccountSettingsAffiliateDto.ts
@@ -523,6 +526,9 @@ src/models/PublicSaleDto.ts
523
526
  src/models/PublicSalesDto.ts
524
527
  src/models/PutBuyerLeadOfferInput.ts
525
528
  src/models/PutLeadOfferInput.ts
529
+ src/models/QuickReplyCustomVariableDto.ts
530
+ src/models/QuickReplyCustomVariableInput.ts
531
+ src/models/QuickReplyCustomVariableTypeEnum.ts
526
532
  src/models/QuickReplyDto.ts
527
533
  src/models/QuickReplyInput.ts
528
534
  src/models/QuickReplyVariableEnum.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.520
1
+ ## @randock/nameshift-api-client@0.0.521
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @randock/nameshift-api-client@0.0.520 --save
39
+ npm install @randock/nameshift-api-client@0.0.521 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
44
44
  ```
45
45
  npm install PATH_TO_GENERATED_PACKAGE --save
46
46
  ```
47
- 337e21fbd7dd1e22b0306f325d1ad12d0e7903b9c4fc5346819e2f343c04753d02f4f98876a394d24586b008507c8e74
47
+ 62983bcab60f847c58095adba9b58cdc943bff7d4f8bd02228a286a1d74c19f11fbc5e28c1903b1c81d5f49c48eb93db
@@ -10,13 +10,19 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetQuickReplies200Response, QuickReplyDto, QuickReplyInput } from '../models/index';
13
+ import type { AccountQuickReplyCustomVariableDto, AccountQuickReplyCustomVariableInput, AccountQuickReplyCustomVariableListDto, GetQuickReplies200Response, QuickReplyDto, QuickReplyInput } from '../models/index';
14
14
  export interface QuickRepliesApiCreateQuickReplyRequest {
15
15
  quickReplyInput: QuickReplyInput;
16
16
  }
17
+ export interface QuickRepliesApiCreateQuickReplyCustomVariableRequest {
18
+ accountQuickReplyCustomVariableInput: AccountQuickReplyCustomVariableInput;
19
+ }
17
20
  export interface QuickRepliesApiDeleteQuickReplyRequest {
18
21
  quickReplyId: string;
19
22
  }
23
+ export interface QuickRepliesApiDeleteQuickReplyCustomVariableRequest {
24
+ customVariableId: string;
25
+ }
20
26
  export interface QuickRepliesApiGetQuickRepliesRequest {
21
27
  filter?: {
22
28
  [key: string]: string;
@@ -25,10 +31,17 @@ export interface QuickRepliesApiGetQuickRepliesRequest {
25
31
  limit?: number;
26
32
  sortBy?: Array<string>;
27
33
  }
34
+ export interface QuickRepliesApiGetQuickReplyRequest {
35
+ quickReplyId: string;
36
+ }
28
37
  export interface QuickRepliesApiUpdateQuickReplyRequest {
29
38
  quickReplyId: string;
30
39
  quickReplyInput: QuickReplyInput;
31
40
  }
41
+ export interface QuickRepliesApiUpdateQuickReplyCustomVariableRequest {
42
+ customVariableId: string;
43
+ accountQuickReplyCustomVariableInput: AccountQuickReplyCustomVariableInput;
44
+ }
32
45
  /**
33
46
  *
34
47
  */
@@ -43,6 +56,16 @@ export declare class QuickRepliesApi extends runtime.BaseAPI {
43
56
  * Create a quick reply
44
57
  */
45
58
  createQuickReply(requestParameters: QuickRepliesApiCreateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuickReplyDto>;
59
+ /**
60
+ * 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.
61
+ * Create a quick reply custom variable
62
+ */
63
+ createQuickReplyCustomVariableRaw(requestParameters: QuickRepliesApiCreateQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountQuickReplyCustomVariableDto>>;
64
+ /**
65
+ * 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.
66
+ * Create a quick reply custom variable
67
+ */
68
+ createQuickReplyCustomVariable(requestParameters: QuickRepliesApiCreateQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountQuickReplyCustomVariableDto>;
46
69
  /**
47
70
  * 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.
48
71
  * Delete a quick reply
@@ -53,6 +76,16 @@ export declare class QuickRepliesApi extends runtime.BaseAPI {
53
76
  * Delete a quick reply
54
77
  */
55
78
  deleteQuickReply(requestParameters: QuickRepliesApiDeleteQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
79
+ /**
80
+ * 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.
81
+ * Delete a quick reply custom variable
82
+ */
83
+ deleteQuickReplyCustomVariableRaw(requestParameters: QuickRepliesApiDeleteQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
84
+ /**
85
+ * 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.
86
+ * Delete a quick reply custom variable
87
+ */
88
+ deleteQuickReplyCustomVariable(requestParameters: QuickRepliesApiDeleteQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
56
89
  /**
57
90
  * 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.
58
91
  * List quick replies
@@ -64,13 +97,43 @@ export declare class QuickRepliesApi extends runtime.BaseAPI {
64
97
  */
65
98
  getQuickReplies(requestParameters?: QuickRepliesApiGetQuickRepliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuickReplies200Response>;
66
99
  /**
67
- * 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.
100
+ * 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.
101
+ * Get a quick reply
102
+ */
103
+ getQuickReplyRaw(requestParameters: QuickRepliesApiGetQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuickReplyDto>>;
104
+ /**
105
+ * 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.
106
+ * Get a quick reply
107
+ */
108
+ getQuickReply(requestParameters: QuickRepliesApiGetQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuickReplyDto>;
109
+ /**
110
+ * 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.
111
+ * List quick reply custom variables
112
+ */
113
+ getQuickReplyCustomVariablesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountQuickReplyCustomVariableListDto>>;
114
+ /**
115
+ * 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.
116
+ * List quick reply custom variables
117
+ */
118
+ getQuickReplyCustomVariables(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountQuickReplyCustomVariableListDto>;
119
+ /**
120
+ * 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.
68
121
  * Update a quick reply
69
122
  */
70
123
  updateQuickReplyRaw(requestParameters: QuickRepliesApiUpdateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuickReplyDto>>;
71
124
  /**
72
- * 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.
125
+ * 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.
73
126
  * Update a quick reply
74
127
  */
75
128
  updateQuickReply(requestParameters: QuickRepliesApiUpdateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuickReplyDto>;
129
+ /**
130
+ * 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.
131
+ * Update a quick reply custom variable
132
+ */
133
+ updateQuickReplyCustomVariableRaw(requestParameters: QuickRepliesApiUpdateQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountQuickReplyCustomVariableDto>>;
134
+ /**
135
+ * 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.
136
+ * Update a quick reply custom variable
137
+ */
138
+ updateQuickReplyCustomVariable(requestParameters: QuickRepliesApiUpdateQuickReplyCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountQuickReplyCustomVariableDto>;
76
139
  }
@@ -140,6 +140,71 @@ var QuickRepliesApi = /** @class */ (function (_super) {
140
140
  });
141
141
  });
142
142
  };
143
+ /**
144
+ * 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.
145
+ * Create a quick reply custom variable
146
+ */
147
+ QuickRepliesApi.prototype.createQuickReplyCustomVariableRaw = function (requestParameters, initOverrides) {
148
+ return __awaiter(this, void 0, void 0, function () {
149
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
150
+ return __generator(this, function (_c) {
151
+ switch (_c.label) {
152
+ case 0:
153
+ if (requestParameters['accountQuickReplyCustomVariableInput'] == null) {
154
+ throw new runtime.RequiredError('accountQuickReplyCustomVariableInput', 'Required parameter "accountQuickReplyCustomVariableInput" was null or undefined when calling createQuickReplyCustomVariable().');
155
+ }
156
+ queryParameters = {};
157
+ headerParameters = {};
158
+ headerParameters['Content-Type'] = 'application/json';
159
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
160
+ _a = headerParameters;
161
+ _b = "apikey";
162
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
163
+ case 1:
164
+ _a[_b] = _c.sent(); // api_key authentication
165
+ _c.label = 2;
166
+ case 2:
167
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
168
+ token = this.configuration.accessToken;
169
+ return [4 /*yield*/, token("bearer", [])];
170
+ case 3:
171
+ tokenString = _c.sent();
172
+ if (tokenString) {
173
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
174
+ }
175
+ _c.label = 4;
176
+ case 4: return [4 /*yield*/, this.request({
177
+ path: "/private/quick-reply-custom-variables",
178
+ method: 'POST',
179
+ headers: headerParameters,
180
+ query: queryParameters,
181
+ body: (0, index_1.AccountQuickReplyCustomVariableInputToJSON)(requestParameters['accountQuickReplyCustomVariableInput']),
182
+ }, initOverrides)];
183
+ case 5:
184
+ response = _c.sent();
185
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AccountQuickReplyCustomVariableDtoFromJSON)(jsonValue); })];
186
+ }
187
+ });
188
+ });
189
+ };
190
+ /**
191
+ * 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.
192
+ * Create a quick reply custom variable
193
+ */
194
+ QuickRepliesApi.prototype.createQuickReplyCustomVariable = function (requestParameters, initOverrides) {
195
+ return __awaiter(this, void 0, void 0, function () {
196
+ var response;
197
+ return __generator(this, function (_a) {
198
+ switch (_a.label) {
199
+ case 0: return [4 /*yield*/, this.createQuickReplyCustomVariableRaw(requestParameters, initOverrides)];
200
+ case 1:
201
+ response = _a.sent();
202
+ return [4 /*yield*/, response.value()];
203
+ case 2: return [2 /*return*/, _a.sent()];
204
+ }
205
+ });
206
+ });
207
+ };
143
208
  /**
144
209
  * 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.
145
210
  * Delete a quick reply
@@ -201,6 +266,67 @@ var QuickRepliesApi = /** @class */ (function (_super) {
201
266
  });
202
267
  });
203
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
+ QuickRepliesApi.prototype.deleteQuickReplyCustomVariableRaw = function (requestParameters, initOverrides) {
274
+ return __awaiter(this, void 0, void 0, function () {
275
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
276
+ return __generator(this, function (_c) {
277
+ switch (_c.label) {
278
+ case 0:
279
+ if (requestParameters['customVariableId'] == null) {
280
+ throw new runtime.RequiredError('customVariableId', 'Required parameter "customVariableId" was null or undefined when calling deleteQuickReplyCustomVariable().');
281
+ }
282
+ queryParameters = {};
283
+ headerParameters = {};
284
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
285
+ _a = headerParameters;
286
+ _b = "apikey";
287
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
288
+ case 1:
289
+ _a[_b] = _c.sent(); // api_key authentication
290
+ _c.label = 2;
291
+ case 2:
292
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
293
+ token = this.configuration.accessToken;
294
+ return [4 /*yield*/, token("bearer", [])];
295
+ case 3:
296
+ tokenString = _c.sent();
297
+ if (tokenString) {
298
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
299
+ }
300
+ _c.label = 4;
301
+ case 4: return [4 /*yield*/, this.request({
302
+ path: "/private/quick-reply-custom-variables/{customVariableId}".replace("{".concat("customVariableId", "}"), encodeURIComponent(String(requestParameters['customVariableId']))),
303
+ method: 'DELETE',
304
+ headers: headerParameters,
305
+ query: queryParameters,
306
+ }, initOverrides)];
307
+ case 5:
308
+ response = _c.sent();
309
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
310
+ }
311
+ });
312
+ });
313
+ };
314
+ /**
315
+ * 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.
316
+ * Delete a quick reply custom variable
317
+ */
318
+ QuickRepliesApi.prototype.deleteQuickReplyCustomVariable = function (requestParameters, initOverrides) {
319
+ return __awaiter(this, void 0, void 0, function () {
320
+ return __generator(this, function (_a) {
321
+ switch (_a.label) {
322
+ case 0: return [4 /*yield*/, this.deleteQuickReplyCustomVariableRaw(requestParameters, initOverrides)];
323
+ case 1:
324
+ _a.sent();
325
+ return [2 /*return*/];
326
+ }
327
+ });
328
+ });
329
+ };
204
330
  /**
205
331
  * 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.
206
332
  * List quick replies
@@ -275,7 +401,130 @@ var QuickRepliesApi = /** @class */ (function (_super) {
275
401
  });
276
402
  };
277
403
  /**
278
- * 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.
404
+ * 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.
405
+ * Get a quick reply
406
+ */
407
+ QuickRepliesApi.prototype.getQuickReplyRaw = function (requestParameters, initOverrides) {
408
+ return __awaiter(this, void 0, void 0, function () {
409
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
410
+ return __generator(this, function (_c) {
411
+ switch (_c.label) {
412
+ case 0:
413
+ if (requestParameters['quickReplyId'] == null) {
414
+ throw new runtime.RequiredError('quickReplyId', 'Required parameter "quickReplyId" was null or undefined when calling getQuickReply().');
415
+ }
416
+ queryParameters = {};
417
+ headerParameters = {};
418
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
419
+ _a = headerParameters;
420
+ _b = "apikey";
421
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
422
+ case 1:
423
+ _a[_b] = _c.sent(); // api_key authentication
424
+ _c.label = 2;
425
+ case 2:
426
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
427
+ token = this.configuration.accessToken;
428
+ return [4 /*yield*/, token("bearer", [])];
429
+ case 3:
430
+ tokenString = _c.sent();
431
+ if (tokenString) {
432
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
433
+ }
434
+ _c.label = 4;
435
+ case 4: return [4 /*yield*/, this.request({
436
+ path: "/private/quick-replies/{quickReplyId}".replace("{".concat("quickReplyId", "}"), encodeURIComponent(String(requestParameters['quickReplyId']))),
437
+ method: 'GET',
438
+ headers: headerParameters,
439
+ query: queryParameters,
440
+ }, initOverrides)];
441
+ case 5:
442
+ response = _c.sent();
443
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.QuickReplyDtoFromJSON)(jsonValue); })];
444
+ }
445
+ });
446
+ });
447
+ };
448
+ /**
449
+ * 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.
450
+ * Get a quick reply
451
+ */
452
+ QuickRepliesApi.prototype.getQuickReply = function (requestParameters, initOverrides) {
453
+ return __awaiter(this, void 0, void 0, function () {
454
+ var response;
455
+ return __generator(this, function (_a) {
456
+ switch (_a.label) {
457
+ case 0: return [4 /*yield*/, this.getQuickReplyRaw(requestParameters, initOverrides)];
458
+ case 1:
459
+ response = _a.sent();
460
+ return [4 /*yield*/, response.value()];
461
+ case 2: return [2 /*return*/, _a.sent()];
462
+ }
463
+ });
464
+ });
465
+ };
466
+ /**
467
+ * 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.
468
+ * List quick reply custom variables
469
+ */
470
+ QuickRepliesApi.prototype.getQuickReplyCustomVariablesRaw = function (initOverrides) {
471
+ return __awaiter(this, void 0, void 0, function () {
472
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
473
+ return __generator(this, function (_c) {
474
+ switch (_c.label) {
475
+ case 0:
476
+ queryParameters = {};
477
+ headerParameters = {};
478
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
479
+ _a = headerParameters;
480
+ _b = "apikey";
481
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
482
+ case 1:
483
+ _a[_b] = _c.sent(); // api_key authentication
484
+ _c.label = 2;
485
+ case 2:
486
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
487
+ token = this.configuration.accessToken;
488
+ return [4 /*yield*/, token("bearer", [])];
489
+ case 3:
490
+ tokenString = _c.sent();
491
+ if (tokenString) {
492
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
493
+ }
494
+ _c.label = 4;
495
+ case 4: return [4 /*yield*/, this.request({
496
+ path: "/private/quick-reply-custom-variables",
497
+ method: 'GET',
498
+ headers: headerParameters,
499
+ query: queryParameters,
500
+ }, initOverrides)];
501
+ case 5:
502
+ response = _c.sent();
503
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AccountQuickReplyCustomVariableListDtoFromJSON)(jsonValue); })];
504
+ }
505
+ });
506
+ });
507
+ };
508
+ /**
509
+ * 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.
510
+ * List quick reply custom variables
511
+ */
512
+ QuickRepliesApi.prototype.getQuickReplyCustomVariables = function (initOverrides) {
513
+ return __awaiter(this, void 0, void 0, function () {
514
+ var response;
515
+ return __generator(this, function (_a) {
516
+ switch (_a.label) {
517
+ case 0: return [4 /*yield*/, this.getQuickReplyCustomVariablesRaw(initOverrides)];
518
+ case 1:
519
+ response = _a.sent();
520
+ return [4 /*yield*/, response.value()];
521
+ case 2: return [2 /*return*/, _a.sent()];
522
+ }
523
+ });
524
+ });
525
+ };
526
+ /**
527
+ * 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.
279
528
  * Update a quick reply
280
529
  */
281
530
  QuickRepliesApi.prototype.updateQuickReplyRaw = function (requestParameters, initOverrides) {
@@ -325,7 +574,7 @@ var QuickRepliesApi = /** @class */ (function (_super) {
325
574
  });
326
575
  };
327
576
  /**
328
- * 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.
577
+ * 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.
329
578
  * Update a quick reply
330
579
  */
331
580
  QuickRepliesApi.prototype.updateQuickReply = function (requestParameters, initOverrides) {
@@ -342,6 +591,74 @@ var QuickRepliesApi = /** @class */ (function (_super) {
342
591
  });
343
592
  });
344
593
  };
594
+ /**
595
+ * 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.
596
+ * Update a quick reply custom variable
597
+ */
598
+ QuickRepliesApi.prototype.updateQuickReplyCustomVariableRaw = function (requestParameters, initOverrides) {
599
+ return __awaiter(this, void 0, void 0, function () {
600
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
601
+ return __generator(this, function (_c) {
602
+ switch (_c.label) {
603
+ case 0:
604
+ if (requestParameters['customVariableId'] == null) {
605
+ throw new runtime.RequiredError('customVariableId', 'Required parameter "customVariableId" was null or undefined when calling updateQuickReplyCustomVariable().');
606
+ }
607
+ if (requestParameters['accountQuickReplyCustomVariableInput'] == null) {
608
+ throw new runtime.RequiredError('accountQuickReplyCustomVariableInput', 'Required parameter "accountQuickReplyCustomVariableInput" was null or undefined when calling updateQuickReplyCustomVariable().');
609
+ }
610
+ queryParameters = {};
611
+ headerParameters = {};
612
+ headerParameters['Content-Type'] = 'application/json';
613
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
614
+ _a = headerParameters;
615
+ _b = "apikey";
616
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
617
+ case 1:
618
+ _a[_b] = _c.sent(); // api_key authentication
619
+ _c.label = 2;
620
+ case 2:
621
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
622
+ token = this.configuration.accessToken;
623
+ return [4 /*yield*/, token("bearer", [])];
624
+ case 3:
625
+ tokenString = _c.sent();
626
+ if (tokenString) {
627
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
628
+ }
629
+ _c.label = 4;
630
+ case 4: return [4 /*yield*/, this.request({
631
+ path: "/private/quick-reply-custom-variables/{customVariableId}".replace("{".concat("customVariableId", "}"), encodeURIComponent(String(requestParameters['customVariableId']))),
632
+ method: 'PATCH',
633
+ headers: headerParameters,
634
+ query: queryParameters,
635
+ body: (0, index_1.AccountQuickReplyCustomVariableInputToJSON)(requestParameters['accountQuickReplyCustomVariableInput']),
636
+ }, initOverrides)];
637
+ case 5:
638
+ response = _c.sent();
639
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AccountQuickReplyCustomVariableDtoFromJSON)(jsonValue); })];
640
+ }
641
+ });
642
+ });
643
+ };
644
+ /**
645
+ * 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.
646
+ * Update a quick reply custom variable
647
+ */
648
+ QuickRepliesApi.prototype.updateQuickReplyCustomVariable = function (requestParameters, initOverrides) {
649
+ return __awaiter(this, void 0, void 0, function () {
650
+ var response;
651
+ return __generator(this, function (_a) {
652
+ switch (_a.label) {
653
+ case 0: return [4 /*yield*/, this.updateQuickReplyCustomVariableRaw(requestParameters, initOverrides)];
654
+ case 1:
655
+ response = _a.sent();
656
+ return [4 /*yield*/, response.value()];
657
+ case 2: return [2 /*return*/, _a.sent()];
658
+ }
659
+ });
660
+ });
661
+ };
345
662
  return QuickRepliesApi;
346
663
  }(runtime.BaseAPI));
347
664
  exports.QuickRepliesApi = QuickRepliesApi;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Nameshift
3
+ * 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.
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 { QuickReplyCustomVariableTypeEnum } from './QuickReplyCustomVariableTypeEnum';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AccountQuickReplyCustomVariableDto
17
+ */
18
+ export interface AccountQuickReplyCustomVariableDto {
19
+ /**
20
+ * Custom variable id.
21
+ * @type {string}
22
+ * @memberof AccountQuickReplyCustomVariableDto
23
+ */
24
+ id: string;
25
+ /**
26
+ * Key of the variable in its {{custom.key}} token.
27
+ * @type {string}
28
+ * @memberof AccountQuickReplyCustomVariableDto
29
+ */
30
+ key: string;
31
+ /**
32
+ * Name the seller gave to the variable.
33
+ * @type {string}
34
+ * @memberof AccountQuickReplyCustomVariableDto
35
+ */
36
+ label: string;
37
+ /**
38
+ * Kind of value the variable takes.
39
+ * @type {QuickReplyCustomVariableTypeEnum}
40
+ * @memberof AccountQuickReplyCustomVariableDto
41
+ */
42
+ type: QuickReplyCustomVariableTypeEnum;
43
+ }
44
+ /**
45
+ * Check if a given object implements the AccountQuickReplyCustomVariableDto interface.
46
+ */
47
+ export declare function instanceOfAccountQuickReplyCustomVariableDto(value: object): value is AccountQuickReplyCustomVariableDto;
48
+ export declare function AccountQuickReplyCustomVariableDtoFromJSON(json: any): AccountQuickReplyCustomVariableDto;
49
+ export declare function AccountQuickReplyCustomVariableDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountQuickReplyCustomVariableDto;
50
+ export declare function AccountQuickReplyCustomVariableDtoToJSON(json: any): AccountQuickReplyCustomVariableDto;
51
+ export declare function AccountQuickReplyCustomVariableDtoToJSONTyped(value?: AccountQuickReplyCustomVariableDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
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.instanceOfAccountQuickReplyCustomVariableDto = instanceOfAccountQuickReplyCustomVariableDto;
17
+ exports.AccountQuickReplyCustomVariableDtoFromJSON = AccountQuickReplyCustomVariableDtoFromJSON;
18
+ exports.AccountQuickReplyCustomVariableDtoFromJSONTyped = AccountQuickReplyCustomVariableDtoFromJSONTyped;
19
+ exports.AccountQuickReplyCustomVariableDtoToJSON = AccountQuickReplyCustomVariableDtoToJSON;
20
+ exports.AccountQuickReplyCustomVariableDtoToJSONTyped = AccountQuickReplyCustomVariableDtoToJSONTyped;
21
+ var QuickReplyCustomVariableTypeEnum_1 = require("./QuickReplyCustomVariableTypeEnum");
22
+ /**
23
+ * Check if a given object implements the AccountQuickReplyCustomVariableDto interface.
24
+ */
25
+ function instanceOfAccountQuickReplyCustomVariableDto(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if (!('key' in value) || value['key'] === undefined)
29
+ return false;
30
+ if (!('label' in value) || value['label'] === undefined)
31
+ return false;
32
+ if (!('type' in value) || value['type'] === undefined)
33
+ return false;
34
+ return true;
35
+ }
36
+ function AccountQuickReplyCustomVariableDtoFromJSON(json) {
37
+ return AccountQuickReplyCustomVariableDtoFromJSONTyped(json, false);
38
+ }
39
+ function AccountQuickReplyCustomVariableDtoFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'id': json['id'],
45
+ 'key': json['key'],
46
+ 'label': json['label'],
47
+ 'type': (0, QuickReplyCustomVariableTypeEnum_1.QuickReplyCustomVariableTypeEnumFromJSON)(json['type']),
48
+ };
49
+ }
50
+ function AccountQuickReplyCustomVariableDtoToJSON(json) {
51
+ return AccountQuickReplyCustomVariableDtoToJSONTyped(json, false);
52
+ }
53
+ function AccountQuickReplyCustomVariableDtoToJSONTyped(value, ignoreDiscriminator) {
54
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'id': value['id'],
60
+ 'key': value['key'],
61
+ 'label': value['label'],
62
+ 'type': (0, QuickReplyCustomVariableTypeEnum_1.QuickReplyCustomVariableTypeEnumToJSON)(value['type']),
63
+ };
64
+ }