@randock/nameshift-api-client 0.0.520 → 0.0.522
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/LeadsApi.d.ts +4 -4
- package/dist/apis/LeadsApi.js +4 -4
- 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/IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDto.d.ts +1 -1
- package/dist/models/LeadDto.d.ts +1 -1
- 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/ListLeadsResultItem.d.ts +1 -1
- 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/SellerLeadDetails.d.ts +1 -1
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/LeadsApi.ts +4 -4
- 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/IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDto.ts +1 -1
- package/src/models/LeadDto.ts +1 -1
- package/src/models/LeadQuickReplyDto.ts +17 -1
- package/src/models/LeadQuickReplyListDto.ts +18 -0
- package/src/models/ListLeadsResultItem.ts +1 -1
- 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/SellerLeadDetails.ts +1 -1
- package/src/models/index.ts +6 -0
|
@@ -0,0 +1,52 @@
|
|
|
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.QuickReplyCustomVariableTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfQuickReplyCustomVariableTypeEnum = instanceOfQuickReplyCustomVariableTypeEnum;
|
|
18
|
+
exports.QuickReplyCustomVariableTypeEnumFromJSON = QuickReplyCustomVariableTypeEnumFromJSON;
|
|
19
|
+
exports.QuickReplyCustomVariableTypeEnumFromJSONTyped = QuickReplyCustomVariableTypeEnumFromJSONTyped;
|
|
20
|
+
exports.QuickReplyCustomVariableTypeEnumToJSON = QuickReplyCustomVariableTypeEnumToJSON;
|
|
21
|
+
exports.QuickReplyCustomVariableTypeEnumToJSONTyped = QuickReplyCustomVariableTypeEnumToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Kind of value the variable takes.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.QuickReplyCustomVariableTypeEnum = {
|
|
27
|
+
TEXT: 'text',
|
|
28
|
+
NUMBER: 'number',
|
|
29
|
+
PRICE: 'price'
|
|
30
|
+
};
|
|
31
|
+
function instanceOfQuickReplyCustomVariableTypeEnum(value) {
|
|
32
|
+
for (var key in exports.QuickReplyCustomVariableTypeEnum) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(exports.QuickReplyCustomVariableTypeEnum, key)) {
|
|
34
|
+
if (exports.QuickReplyCustomVariableTypeEnum[key] === value) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
function QuickReplyCustomVariableTypeEnumFromJSON(json) {
|
|
42
|
+
return QuickReplyCustomVariableTypeEnumFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function QuickReplyCustomVariableTypeEnumFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
function QuickReplyCustomVariableTypeEnumToJSON(value) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
function QuickReplyCustomVariableTypeEnumToJSONTyped(value, ignoreDiscriminator) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { QuickReplyCustomVariableDto } from './QuickReplyCustomVariableDto';
|
|
12
13
|
import type { QuickReplyVariableEnum } from './QuickReplyVariableEnum';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
@@ -29,7 +30,7 @@ export interface QuickReplyDto {
|
|
|
29
30
|
*/
|
|
30
31
|
name: string;
|
|
31
32
|
/**
|
|
32
|
-
* Message template, plain text with {{variable}} tokens.
|
|
33
|
+
* Message template, plain text with {{variable}} and {{custom.key}} tokens.
|
|
33
34
|
* @type {string}
|
|
34
35
|
* @memberof QuickReplyDto
|
|
35
36
|
*/
|
|
@@ -40,6 +41,12 @@ export interface QuickReplyDto {
|
|
|
40
41
|
* @memberof QuickReplyDto
|
|
41
42
|
*/
|
|
42
43
|
variables: Array<QuickReplyVariableEnum>;
|
|
44
|
+
/**
|
|
45
|
+
* Variables the seller fills in when using the reply.
|
|
46
|
+
* @type {Array<QuickReplyCustomVariableDto>}
|
|
47
|
+
* @memberof QuickReplyDto
|
|
48
|
+
*/
|
|
49
|
+
customVariables: Array<QuickReplyCustomVariableDto>;
|
|
43
50
|
/**
|
|
44
51
|
* When the quick reply was created.
|
|
45
52
|
* @type {Date}
|
|
@@ -18,6 +18,7 @@ exports.QuickReplyDtoFromJSON = QuickReplyDtoFromJSON;
|
|
|
18
18
|
exports.QuickReplyDtoFromJSONTyped = QuickReplyDtoFromJSONTyped;
|
|
19
19
|
exports.QuickReplyDtoToJSON = QuickReplyDtoToJSON;
|
|
20
20
|
exports.QuickReplyDtoToJSONTyped = QuickReplyDtoToJSONTyped;
|
|
21
|
+
var QuickReplyCustomVariableDto_1 = require("./QuickReplyCustomVariableDto");
|
|
21
22
|
var QuickReplyVariableEnum_1 = require("./QuickReplyVariableEnum");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the QuickReplyDto interface.
|
|
@@ -31,6 +32,8 @@ function instanceOfQuickReplyDto(value) {
|
|
|
31
32
|
return false;
|
|
32
33
|
if (!('variables' in value) || value['variables'] === undefined)
|
|
33
34
|
return false;
|
|
35
|
+
if (!('customVariables' in value) || value['customVariables'] === undefined)
|
|
36
|
+
return false;
|
|
34
37
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
35
38
|
return false;
|
|
36
39
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
@@ -49,6 +52,7 @@ function QuickReplyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
52
|
'name': json['name'],
|
|
50
53
|
'message': json['message'],
|
|
51
54
|
'variables': (json['variables'].map(QuickReplyVariableEnum_1.QuickReplyVariableEnumFromJSON)),
|
|
55
|
+
'customVariables': (json['customVariables'].map(QuickReplyCustomVariableDto_1.QuickReplyCustomVariableDtoFromJSON)),
|
|
52
56
|
'createdAt': (new Date(json['createdAt'])),
|
|
53
57
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
54
58
|
};
|
|
@@ -66,6 +70,7 @@ function QuickReplyDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
66
70
|
'name': value['name'],
|
|
67
71
|
'message': value['message'],
|
|
68
72
|
'variables': (value['variables'].map(QuickReplyVariableEnum_1.QuickReplyVariableEnumToJSON)),
|
|
73
|
+
'customVariables': (value['customVariables'].map(QuickReplyCustomVariableDto_1.QuickReplyCustomVariableDtoToJSON)),
|
|
69
74
|
'createdAt': ((value['createdAt']).toISOString()),
|
|
70
75
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
71
76
|
};
|
|
@@ -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
|
}
|
|
@@ -150,7 +150,7 @@ export interface SellerLeadDetails {
|
|
|
150
150
|
*/
|
|
151
151
|
leadOfferExpirationConfiguration: LeadOfferExpirationConfigurationDto;
|
|
152
152
|
/**
|
|
153
|
-
* Whether the lead can be closed
|
|
153
|
+
* Whether the seller can close the lead now. An accepted lead can be closed once its payment link has expired or a month after it was accepted, and a manual lead whose payment link the buyer never used at any time; never while the buyer has paid or a payment is being processed.
|
|
154
154
|
* @type {boolean}
|
|
155
155
|
* @memberof SellerLeadDetails
|
|
156
156
|
*/
|
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
package/src/apis/LeadsApi.ts
CHANGED
|
@@ -324,8 +324,8 @@ export class LeadsApi extends runtime.BaseAPI {
|
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
/**
|
|
327
|
-
* Closes an
|
|
328
|
-
* Close an
|
|
327
|
+
* Closes an accepted lead and cancels the invoices its buyer has not paid. A lead can be closed once its payment link has expired or a month after it was accepted, and a manual lead whose payment link the buyer never used at any time; never while the buyer has paid or a payment is being processed. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
328
|
+
* Close an accepted lead
|
|
329
329
|
*/
|
|
330
330
|
async closeLeadRaw(requestParameters: LeadsApiCloseLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
331
331
|
if (requestParameters['leadId'] == null) {
|
|
@@ -362,8 +362,8 @@ export class LeadsApi extends runtime.BaseAPI {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
/**
|
|
365
|
-
* Closes an
|
|
366
|
-
* Close an
|
|
365
|
+
* Closes an accepted lead and cancels the invoices its buyer has not paid. A lead can be closed once its payment link has expired or a month after it was accepted, and a manual lead whose payment link the buyer never used at any time; never while the buyer has paid or a payment is being processed. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
366
|
+
* Close an accepted lead
|
|
367
367
|
*/
|
|
368
368
|
async closeLead(requestParameters: LeadsApiCloseLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
369
369
|
await this.closeLeadRaw(requestParameters, initOverrides);
|
|
@@ -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
|
}
|