// This is Generated Source.
import CustomCompanyGreetingInfo from "../definitions/CustomCompanyGreetingInfo";
import CustomGreetingRequest from "../definitions/CustomGreetingRequest";
import DictionaryGreetingInfo from "../definitions/DictionaryGreetingInfo";
import DictionaryGreetingList from "../definitions/DictionaryGreetingList";
import PathSegment from "../PathSegment";
export default class Greeting extends PathSegment {
constructor(prv: PathSegment, id?: string, service?) {
super("greeting", id, prv, service);
}
/**
*
Since 8.2 (Release 1.0.26)
Returns a list of predefined standard greetings. Please note: Custom greetings recorded by user are not returned in response to this request. See Get Extension Custom Greetings.
Required Permissions
| Permission | Description |
|---|
| ReadAccounts | View Greetings |
Usage Plan Group
Light
*/
list(query?: ListQuery): Promise {
return this._send({
body: undefined,
ignoreId: false,
method: "get",
query: query,
}).then((res) => {
return res.json();
});
}
/**
* Since 8.2 (Release 1.0.26)
Returns a list of predefined standard greetings. Please note: Custom greetings recorded by user are not returned in response to this request. See Get Extension Custom Greetings.
Required Permissions
| Permission | Description |
|---|
| ReadAccounts | View Greetings |
Usage Plan Group
Light
* return {ApiResponse}
*/
listRaw(query?: ListQuery): Promise {
return this._send({
body: undefined,
ignoreId: false,
method: "get",
query: query,
});
}
/**
* Since 8.2 (Release 1.0.26)
Returns a standard greeting by ID
Required Permissions
| Permission | Description |
|---|
| ReadAccounts | View Greetings |
Usage Plan Group
Medium
*/
get(): Promise {
return this._send({
body: undefined,
ignoreId: true,
method: "get",
query: undefined,
}).then((res) => {
return res.json();
});
}
/**
* Since 8.2 (Release 1.0.26)
Returns a standard greeting by ID
Required Permissions
| Permission | Description |
|---|
| ReadAccounts | View Greetings |
Usage Plan Group
Medium
* return {ApiResponse}
*/
getRaw(): Promise {
return this._send({
body: undefined,
ignoreId: true,
method: "get",
query: undefined,
});
}
/**
*
*/
post(body: CustomGreetingRequest): Promise {
return this._send({
body: body,
ignoreId: true,
method: "post",
query: undefined,
}).then((res) => {
return res.json();
});
}
/**
*
* return {ApiResponse}
*/
postRaw(body: CustomGreetingRequest): Promise {
return this._send({
body: body,
ignoreId: true,
method: "post",
query: undefined,
});
}
}
export interface ListQuery {
/**
* Indicates the page number to retrieve. Only positive number values are allowed. Default value is '1'
*/
page?: number;
/**
* Indicates the page size (number of items). If not specified, the value is '100' by default
*/
perPage?: number;
/**
* Type of a greeting, specifying the case when the greeting is played
*/
type?: "Introductory" | "Announcement" | "ConnectingMessage" | "ConnectingAudio" | "Voicemail" | "Unavailable" | "HoldMusic" | "Company";
/**
* Usage type of a greeting, specifying if the greeting is applied for user extension or department extension
*/
usageType?: "UserExtensionAnsweringRule" | "ExtensionAnsweringRule" | "DepartmentExtensionAnsweringRule" | "CompanyAnsweringRule" | "CompanyAfterHoursAnsweringRule";
}