Evo Voice

<back to all web services

GetInheritedSchedule

Get the inherited schedule for this customer

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
GET/customers/{customerId}/inherited-schedule
GET/endpoints/{endpointId}/inherited-schedule
"use strict";
/** @typedef {'Always'|'CustomerState'|'Time'} */
export var SimpleSchedulingRuleTypes;
(function (SimpleSchedulingRuleTypes) {
    SimpleSchedulingRuleTypes["Always"] = "Always"
    SimpleSchedulingRuleTypes["CustomerState"] = "CustomerState"
    SimpleSchedulingRuleTypes["Time"] = "Time"
})(SimpleSchedulingRuleTypes || (SimpleSchedulingRuleTypes = {}));
export class Value {
    /** @param {{boolValue?:boolean,stringValue?:string,numberValue?:number,listValue?:Struct[],structValue?:Struct}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?boolean} */
    boolValue;
    /** @type {string} */
    stringValue;
    /** @type {?number} */
    numberValue;
    /** @type {Struct[]} */
    listValue;
    /** @type {Struct} */
    structValue;
}
class Dictionary {}
export class Struct extends Dictionary {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class ScheduleDay {
    /** @param {{offset?:number,dayOfWeek?:DayOfWeek}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    offset;
    /** @type {DayOfWeek} */
    dayOfWeek;
}
/** @typedef {'None'|'Secondly'|'Minutely'|'Hourly'|'Daily'|'Weekly'|'Monthly'|'Yearly'} */
export var SchedulingRuleFrequency;
(function (SchedulingRuleFrequency) {
    SchedulingRuleFrequency["None"] = "None"
    SchedulingRuleFrequency["Secondly"] = "Secondly"
    SchedulingRuleFrequency["Minutely"] = "Minutely"
    SchedulingRuleFrequency["Hourly"] = "Hourly"
    SchedulingRuleFrequency["Daily"] = "Daily"
    SchedulingRuleFrequency["Weekly"] = "Weekly"
    SchedulingRuleFrequency["Monthly"] = "Monthly"
    SchedulingRuleFrequency["Yearly"] = "Yearly"
})(SchedulingRuleFrequency || (SchedulingRuleFrequency = {}));
export class SchedulingRule {
    /** @param {{id?:string,name?:string,priority?:number,state?:string,source?:string,condition?:string,simpleRuleType?:SimpleSchedulingRuleTypes,customerState?:string,flowId?:string,flowParams?:Struct,isAllDay?:boolean,startDate?:string,startTime?:string,endTime?:string,bySetPosition?:number[],byMonth?:number[],byWeekNo?:number[],byYearDay?:number[],byMonthDay?:number[],byDay?:ScheduleDay[],byHour?:number[],byMinute?:number[],interval?:number,count?:number,untilDate?:string,frequency?:SchedulingRuleFrequency}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {number} */
    priority;
    /** @type {string} */
    state;
    /** @type {string} */
    source;
    /** @type {string} */
    condition;
    /** @type {SimpleSchedulingRuleTypes} */
    simpleRuleType;
    /** @type {string} */
    customerState;
    /** @type {string} */
    flowId;
    /** @type {Struct} */
    flowParams;
    /** @type {boolean} */
    isAllDay;
    /** @type {string} */
    startDate;
    /** @type {string} */
    startTime;
    /** @type {string} */
    endTime;
    /** @type {number[]} */
    bySetPosition;
    /** @type {number[]} */
    byMonth;
    /** @type {number[]} */
    byWeekNo;
    /** @type {number[]} */
    byYearDay;
    /** @type {number[]} */
    byMonthDay;
    /** @type {ScheduleDay[]} */
    byDay;
    /** @type {number[]} */
    byHour;
    /** @type {number[]} */
    byMinute;
    /** @type {number} */
    interval;
    /** @type {number} */
    count;
    /** @type {string} */
    untilDate;
    /** @type {SchedulingRuleFrequency} */
    frequency;
}
export class Schedule {
    /** @param {{timeZoneId?:string,inherit?:boolean,forceClosed?:boolean,rules?:SchedulingRule[],defaultState?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    timeZoneId;
    /** @type {boolean} */
    inherit;
    /** @type {boolean} */
    forceClosed;
    /** @type {SchedulingRule[]} */
    rules;
    /** @type {string} */
    defaultState;
}
export class GetInheritedSchedule {
    /** @param {{customerId?:string,endpointId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The customer ID whose inherited schedule you want to retrieve */
    customerId;
    /**
     * @type {string}
     * @description The endpoint ID whose inherited schedule you want to retrieve (use this OR customer id */
    endpointId;
}

JavaScript GetInheritedSchedule DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /customers/{customerId}/inherited-schedule HTTP/1.1 
Host: team.evovoice.io 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	timeZoneId: String,
	inherit: False,
	forceClosed: False,
	rules: 
	[
		{
			id: String,
			name: String,
			priority: 0,
			state: String,
			source: String,
			condition: String,
			simpleRuleType: Always,
			customerState: String,
			flowId: String,
			isAllDay: False,
			startDate: String,
			startTime: String,
			endTime: String,
			bySetPosition: 
			[
				0
			],
			byMonth: 
			[
				0
			],
			byWeekNo: 
			[
				0
			],
			byYearDay: 
			[
				0
			],
			byMonthDay: 
			[
				0
			],
			byDay: 
			[
				{
					offset: 0,
					dayOfWeek: Sunday
				}
			],
			byHour: 
			[
				0
			],
			byMinute: 
			[
				0
			],
			interval: 0,
			count: 0,
			untilDate: String,
			frequency: None
		}
	],
	defaultState: String
}