@closerplatform/spinner-openapi
Version:
swagger client for @closerplatform/spinner-openapi
966 lines • 942 kB
JavaScript
"use strict";
/// <reference path="./custom.d.ts" />
// tslint:disable
/**
* Spinner API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 0.0.1
*
*
* NOTE: This file is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the file manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.CobrowsingApi = exports.CobrowsingApiFactory = exports.CobrowsingApiFp = exports.CobrowsingApiFetchParamCreator = exports.CallsApi = exports.CallsApiFactory = exports.CallsApiFp = exports.CallsApiFetchParamCreator = exports.CalendarsApi = exports.CalendarsApiFactory = exports.CalendarsApiFp = exports.CalendarsApiFetchParamCreator = exports.BotsApi = exports.BotsApiFactory = exports.BotsApiFp = exports.BotsApiFetchParamCreator = exports.BillingsApi = exports.BillingsApiFactory = exports.BillingsApiFp = exports.BillingsApiFetchParamCreator = exports.AgentStatusesApi = exports.AgentStatusesApiFactory = exports.AgentStatusesApiFp = exports.AgentStatusesApiFetchParamCreator = exports.AgentGroupsApi = exports.AgentGroupsApiFactory = exports.AgentGroupsApiFp = exports.AgentGroupsApiFetchParamCreator = exports.WidgetButtonsInput = exports.UserRole = exports.UrlParameter = exports.UnreadySubstatus = exports.SnoozedStatus = exports.RegisterInPushService = exports.Presence = exports.ModelTrainingStatus = exports.MessageWidgetConfigContextType = exports.MatchingStrategy = exports.Locale = exports.InboxSorting = exports.InboxEntryType = exports.EventActionEvent = exports.ConversationStatus = exports.BotType = exports.AvailableSubstatus = exports.AppicationErrorReason = exports.AppPermission = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = void 0;
exports.OplAddressApiFp = exports.OplAddressApiFetchParamCreator = exports.OIDCApi = exports.OIDCApiFactory = exports.OIDCApiFp = exports.OIDCApiFetchParamCreator = exports.OAuthApi = exports.OAuthApiFactory = exports.OAuthApiFp = exports.OAuthApiFetchParamCreator = exports.NLUApi = exports.NLUApiFactory = exports.NLUApiFp = exports.NLUApiFetchParamCreator = exports.MessageWidgetsApi = exports.MessageWidgetsApiFactory = exports.MessageWidgetsApiFp = exports.MessageWidgetsApiFetchParamCreator = exports.MeetingsApi = exports.MeetingsApiFactory = exports.MeetingsApiFp = exports.MeetingsApiFetchParamCreator = exports.MainNotificationsApi = exports.MainNotificationsApiFactory = exports.MainNotificationsApiFp = exports.MainNotificationsApiFetchParamCreator = exports.KnowledgeBasesApi = exports.KnowledgeBasesApiFactory = exports.KnowledgeBasesApiFp = exports.KnowledgeBasesApiFetchParamCreator = exports.InviteesApi = exports.InviteesApiFactory = exports.InviteesApiFp = exports.InviteesApiFetchParamCreator = exports.FilesApi = exports.FilesApiFactory = exports.FilesApiFp = exports.FilesApiFetchParamCreator = exports.EventActionsApi = exports.EventActionsApiFactory = exports.EventActionsApiFp = exports.EventActionsApiFetchParamCreator = exports.ConversationsApi = exports.ConversationsApiFactory = exports.ConversationsApiFp = exports.ConversationsApiFetchParamCreator = exports.CompatibilityApi = exports.CompatibilityApiFactory = exports.CompatibilityApiFp = exports.CompatibilityApiFetchParamCreator = void 0;
exports.TagMappingsApi = exports.TagMappingsApiFactory = exports.TagMappingsApiFp = exports.TagMappingsApiFetchParamCreator = exports.TagGroupsApi = exports.TagGroupsApiFactory = exports.TagGroupsApiFp = exports.TagGroupsApiFetchParamCreator = exports.TagGroupTransfersParametersApi = exports.TagGroupTransfersParametersApiFactory = exports.TagGroupTransfersParametersApiFp = exports.TagGroupTransfersParametersApiFetchParamCreator = exports.TagGroupTransfersApi = exports.TagGroupTransfersApiFactory = exports.TagGroupTransfersApiFp = exports.TagGroupTransfersApiFetchParamCreator = exports.StatusApi = exports.StatusApiFactory = exports.StatusApiFp = exports.StatusApiFetchParamCreator = exports.SessionApi = exports.SessionApiFactory = exports.SessionApiFp = exports.SessionApiFetchParamCreator = exports.RoomsApi = exports.RoomsApiFactory = exports.RoomsApiFp = exports.RoomsApiFetchParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = exports.RolesApiFetchParamCreator = exports.PushApi = exports.PushApiFactory = exports.PushApiFp = exports.PushApiFetchParamCreator = exports.ProfanitiesApi = exports.ProfanitiesApiFactory = exports.ProfanitiesApiFp = exports.ProfanitiesApiFetchParamCreator = exports.ProactiveMsgApi = exports.ProactiveMsgApiFactory = exports.ProactiveMsgApiFp = exports.ProactiveMsgApiFetchParamCreator = exports.OrgsApi = exports.OrgsApiFactory = exports.OrgsApiFp = exports.OrgsApiFetchParamCreator = exports.OplAddressApi = exports.OplAddressApiFactory = void 0;
exports.WidgetsFormsSubmissionsApi = exports.WidgetsFormsSubmissionsApiFactory = exports.WidgetsFormsSubmissionsApiFp = exports.WidgetsFormsSubmissionsApiFetchParamCreator = exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiFetchParamCreator = exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiFetchParamCreator = exports.UrlTagMappingsApi = exports.UrlTagMappingsApiFactory = exports.UrlTagMappingsApiFp = exports.UrlTagMappingsApiFetchParamCreator = exports.UnreadApi = exports.UnreadApiFactory = exports.UnreadApiFp = exports.UnreadApiFetchParamCreator = exports.TopicsApi = exports.TopicsApiFactory = exports.TopicsApiFp = exports.TopicsApiFetchParamCreator = exports.TagsApi = exports.TagsApiFactory = exports.TagsApiFp = exports.TagsApiFetchParamCreator = void 0;
const url = require("url");
const isomorphicFetch = require("isomorphic-fetch");
const BASE_PATH = "/api".replace(/\/+$/, "");
/**
*
* @export
*/
exports.COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
/**
*
* @export
* @class BaseAPI
*/
class BaseAPI {
constructor(configuration, basePath = BASE_PATH, fetch = isomorphicFetch) {
this.basePath = basePath;
this.fetch = fetch;
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
exports.BaseAPI = BaseAPI;
;
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
class RequiredError extends Error {
constructor(field, msg) {
super(msg);
this.field = field;
}
}
exports.RequiredError = RequiredError;
/**
*
* @export
* @enum {string}
*/
var AppPermission;
(function (AppPermission) {
AppPermission["AdminPermission"] = "admin_permission";
AppPermission["DisplayClosedConversations"] = "display_closed_conversations";
AppPermission["DisplayWaitingConversations"] = "display_waiting_conversations";
AppPermission["DisplayFollowedConversations"] = "display_followed_conversations";
AppPermission["DisplayInProgressConversations"] = "display_in_progress_conversations";
AppPermission["DisplayYoursConversations"] = "display_yours_conversations";
AppPermission["DisplayCalls"] = "display_calls";
AppPermission["DisplayCallRecordings"] = "display_call_recordings";
AppPermission["SettingsProactiveMessages"] = "settings_proactive_messages";
AppPermission["SettingsTags"] = "settings_tags";
AppPermission["SettingsAiSuggestions"] = "settings_ai_suggestions";
AppPermission["SettingsWebhooks"] = "settings_webhooks";
AppPermission["SettingsKnowledgeBases"] = "settings_knowledge_bases";
AppPermission["SettingsAdvisersConfiguration"] = "settings_advisers_configuration";
AppPermission["SettingsAgentGroupsConfiguration"] = "settings_agent_groups_configuration";
AppPermission["SettingsAdvisersAssignments"] = "settings_advisers_assignments";
AppPermission["SettingsAdvisersAutoAssignedLimit"] = "settings_advisers_auto_assigned_limit";
AppPermission["SettingsAdvisersAvatar"] = "settings_advisers_avatar";
AppPermission["SettingsActionForms"] = "settings_action_forms";
AppPermission["SettingsStatuses"] = "settings_statuses";
AppPermission["SettingsRoles"] = "settings_roles";
AppPermission["SettingsGeneral"] = "settings_general";
AppPermission["ReportsYours"] = "reports_yours";
AppPermission["ReportsGroups"] = "reports_groups";
AppPermission["ReportsOrg"] = "reports_org";
AppPermission["ReportsYoursEfficiency"] = "reports_yours_efficiency";
AppPermission["ReportsGroupsEfficiency"] = "reports_groups_efficiency";
AppPermission["ReportsConversationsServiceLevelTagGroups"] = "reports_conversations_service_level_tag_groups";
AppPermission["ReportsConversationsServiceLevelTags"] = "reports_conversations_service_level_tags";
AppPermission["ReportsConversationsBackLineTags"] = "reports_conversations_back_line_tags";
AppPermission["ReportsAdvisersAdviserGroups"] = "reports_advisers_adviser_groups";
AppPermission["ReportsAdvisersTagGroups"] = "reports_advisers_tag_groups";
AppPermission["ReportsOrgOther"] = "reports_org_other";
AppPermission["ReportsOrgEfficiency"] = "reports_org_efficiency";
AppPermission["LeadDeleteProfile"] = "lead_delete_profile";
AppPermission["LeadUpdateProfile"] = "lead_update_profile";
AppPermission["UpdatePersonalData"] = "update_personal_data";
AppPermission["RoomAssignSelf"] = "room_assign_self";
AppPermission["RoomAssignAgent"] = "room_assign_agent";
AppPermission["RoomAssignByTag"] = "room_assign_by_tag";
AppPermission["RoomAssignByTagGroup"] = "room_assign_by_tag_group";
AppPermission["RoomCloseNotOwn"] = "room_close_not_own";
AppPermission["AiIntentsClassify"] = "ai_intents_classify";
AppPermission["DisplayOwnTagGroupsConversations"] = "display_own_tag_groups_conversations";
AppPermission["DisplayHistoricallyAssignedConversations"] = "display_historically_assigned_conversations";
AppPermission["SettingsPasswordChange"] = "settings_password_change";
AppPermission["SettingsPersonal"] = "settings_personal";
AppPermission["MeetingsPageVisibility"] = "meetings_page_visibility";
AppPermission["HelpPageVisibility"] = "help_page_visibility";
})(AppPermission = exports.AppPermission || (exports.AppPermission = {}));
/**
*
* @export
* @enum {string}
*/
var AppicationErrorReason;
(function (AppicationErrorReason) {
AppicationErrorReason["WidgetNotAvailable"] = "widget_not_available";
AppicationErrorReason["WidgetNotAllowed"] = "widget_not_allowed";
AppicationErrorReason["WidgetPreviousUnsubmitted"] = "widget_previous_unsubmitted";
AppicationErrorReason["WidgetIntervalNotPassed"] = "widget_interval_not_passed";
AppicationErrorReason["WidgetInvalidTagGroups"] = "widget_invalid_tag_groups";
AppicationErrorReason["SubmissionAlreadySubmitted"] = "submission_already_submitted";
AppicationErrorReason["SubmissionInputsNotFilled"] = "submission_inputs_not_filled";
AppicationErrorReason["SubmissionTextLimitsExceeded"] = "submission_text_limits_exceeded";
AppicationErrorReason["SubmissionFormExpired"] = "submission_form_expired";
AppicationErrorReason["SubmissionIncorrectTagGroupId"] = "submission_incorrect_tag_group_id";
AppicationErrorReason["SubmissionIncorrectAutoAssignFormInputs"] = "submission_incorrect_auto_assign_form_inputs";
AppicationErrorReason["SubmissionNoContactInput"] = "submission_no_contact_input";
AppicationErrorReason["SubmissionNoAgreementInput"] = "submission_no_agreement_input";
AppicationErrorReason["SubmissionInvalidPhoneNumber"] = "submission_invalid_phone_number";
AppicationErrorReason["AgentEmailAlreadyUsed"] = "agent_email_already_used";
AppicationErrorReason["SessionExpired"] = "session_expired";
AppicationErrorReason["SessionInvalidCredentials"] = "session_invalid_credentials";
})(AppicationErrorReason = exports.AppicationErrorReason || (exports.AppicationErrorReason = {}));
/**
*
* @export
* @enum {string}
*/
var AvailableSubstatus;
(function (AvailableSubstatus) {
AvailableSubstatus["Only"] = "chat_only";
AvailableSubstatus["AndCall"] = "chat_and_call";
})(AvailableSubstatus = exports.AvailableSubstatus || (exports.AvailableSubstatus = {}));
/**
*
* @export
* @enum {string}
*/
var BotType;
(function (BotType) {
BotType["LektaBotType"] = "LektaBotType";
BotType["Disabled"] = "Disabled";
})(BotType = exports.BotType || (exports.BotType = {}));
/**
*
* @export
* @enum {string}
*/
var ConversationStatus;
(function (ConversationStatus) {
ConversationStatus["Waiting"] = "waiting";
ConversationStatus["InProgress"] = "inProgress";
ConversationStatus["Solved"] = "solved";
ConversationStatus["Unsolved"] = "unsolved";
})(ConversationStatus = exports.ConversationStatus || (exports.ConversationStatus = {}));
/**
*
* @export
* @enum {string}
*/
var EventActionEvent;
(function (EventActionEvent) {
EventActionEvent["ThreadOpenedOutsideWorkingHours"] = "thread_opened_outside_working_hours";
EventActionEvent["ClosedSolvedThreadAction"] = "closed_solved_thread_action";
EventActionEvent["ClosedUnsolvedThreadAction"] = "closed_unsolved_thread_action";
EventActionEvent["ThreadOpened"] = "thread_opened";
EventActionEvent["AssignedConversationAction"] = "assigned_conversation_action";
EventActionEvent["ThreadOpenedAgentsUnavailable"] = "thread_opened_agents_unavailable";
EventActionEvent["WidgetOpenedNoOpenThread"] = "widget_opened_no_open_thread";
})(EventActionEvent = exports.EventActionEvent || (exports.EventActionEvent = {}));
/**
*
* @export
* @enum {string}
*/
var InboxEntryType;
(function (InboxEntryType) {
InboxEntryType["MESSAGE"] = "MESSAGE";
InboxEntryType["NOTE"] = "NOTE";
InboxEntryType["FILES"] = "FILES";
InboxEntryType["MEETINGSCHEDULED"] = "MEETING_SCHEDULED";
InboxEntryType["MEETINGRESCHEDULED"] = "MEETING_RESCHEDULED";
InboxEntryType["MEETINGCANCELLED"] = "MEETING_CANCELLED";
InboxEntryType["CALLSTARTED"] = "CALL_STARTED";
InboxEntryType["CALLENDED"] = "CALL_ENDED";
InboxEntryType["FORM"] = "FORM";
})(InboxEntryType = exports.InboxEntryType || (exports.InboxEntryType = {}));
/**
*
* @export
* @enum {string}
*/
var InboxSorting;
(function (InboxSorting) {
InboxSorting["Newest"] = "newest";
InboxSorting["Oldest"] = "oldest";
})(InboxSorting = exports.InboxSorting || (exports.InboxSorting = {}));
/**
*
* @export
* @enum {string}
*/
var Locale;
(function (Locale) {
Locale["En"] = "en";
Locale["Pl"] = "pl";
})(Locale = exports.Locale || (exports.Locale = {}));
/**
*
* @export
* @enum {string}
*/
var MatchingStrategy;
(function (MatchingStrategy) {
MatchingStrategy["WholeDomain"] = "whole_domain";
MatchingStrategy["PathRecursively"] = "path_recursively";
MatchingStrategy["ExactUrl"] = "exact_url";
MatchingStrategy["PathArgs"] = "path_args";
})(MatchingStrategy = exports.MatchingStrategy || (exports.MatchingStrategy = {}));
/**
*
* @export
* @enum {string}
*/
var MessageWidgetConfigContextType;
(function (MessageWidgetConfigContextType) {
MessageWidgetConfigContextType["AutoAssignForm"] = "auto_assign_form";
MessageWidgetConfigContextType["ContactEnquiry"] = "contact_enquiry";
MessageWidgetConfigContextType["CallProposal"] = "call_proposal";
MessageWidgetConfigContextType["OplShowAddressForm"] = "opl_show_address_form";
MessageWidgetConfigContextType["PredefinedMessageForm"] = "predefined_message_form";
})(MessageWidgetConfigContextType = exports.MessageWidgetConfigContextType || (exports.MessageWidgetConfigContextType = {}));
/**
*
* @export
* @enum {string}
*/
var ModelTrainingStatus;
(function (ModelTrainingStatus) {
ModelTrainingStatus["TrainingInProgress"] = "TrainingInProgress";
ModelTrainingStatus["TrainingDone"] = "TrainingDone";
ModelTrainingStatus["TrainingNeverDone"] = "TrainingNeverDone";
})(ModelTrainingStatus = exports.ModelTrainingStatus || (exports.ModelTrainingStatus = {}));
/**
*
* @export
* @enum {string}
*/
var Presence;
(function (Presence) {
Presence["Available"] = "available";
Presence["Unavailable"] = "unavailable";
})(Presence = exports.Presence || (exports.Presence = {}));
/**
* @export
* @namespace RegisterInPushService
*/
var RegisterInPushService;
(function (RegisterInPushService) {
/**
* @export
* @enum {string}
*/
let DeviceTypeEnum;
(function (DeviceTypeEnum) {
DeviceTypeEnum["Android"] = "android";
DeviceTypeEnum["Ios"] = "ios";
})(DeviceTypeEnum = RegisterInPushService.DeviceTypeEnum || (RegisterInPushService.DeviceTypeEnum = {}));
})(RegisterInPushService = exports.RegisterInPushService || (exports.RegisterInPushService = {}));
/**
*
* @export
* @enum {string}
*/
var SnoozedStatus;
(function (SnoozedStatus) {
SnoozedStatus["Snoozed"] = "snoozed";
SnoozedStatus["Unsnoozed"] = "unsnoozed";
})(SnoozedStatus = exports.SnoozedStatus || (exports.SnoozedStatus = {}));
/**
*
* @export
* @enum {string}
*/
var UnreadySubstatus;
(function (UnreadySubstatus) {
UnreadySubstatus["Preparing"] = "preparing";
UnreadySubstatus["CoolDown"] = "cool_down";
UnreadySubstatus["OnCall"] = "on_call";
UnreadySubstatus["AfterCall"] = "after_call";
})(UnreadySubstatus = exports.UnreadySubstatus || (exports.UnreadySubstatus = {}));
/**
*
* @export
* @enum {string}
*/
var UrlParameter;
(function (UrlParameter) {
UrlParameter["RoomId"] = "roomId";
UrlParameter["Token"] = "token";
})(UrlParameter = exports.UrlParameter || (exports.UrlParameter = {}));
/**
*
* @export
* @enum {string}
*/
var UserRole;
(function (UserRole) {
UserRole["ADVISER"] = "ADVISER";
UserRole["BOT"] = "BOT";
UserRole["LEAD"] = "LEAD";
UserRole["ORGANIZATION"] = "ORGANIZATION";
UserRole["MASTER"] = "MASTER";
})(UserRole = exports.UserRole || (exports.UserRole = {}));
/**
* @export
* @namespace WidgetButtonsInput
*/
var WidgetButtonsInput;
(function (WidgetButtonsInput) {
/**
* @export
* @enum {string}
*/
let StyleEnum;
(function (StyleEnum) {
StyleEnum["VerticallyAligned"] = "vertically_aligned";
})(StyleEnum = WidgetButtonsInput.StyleEnum || (WidgetButtonsInput.StyleEnum = {}));
})(WidgetButtonsInput = exports.WidgetButtonsInput || (exports.WidgetButtonsInput = {}));
/**
* AgentGroupsApi - fetch parameter creator
* @export
*/
const AgentGroupsApiFetchParamCreator = function (configuration) {
return {
/**
*
* @summary create agent group
* @param {CreateAgentGroupForm} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAgentGroup(body, options = {}) {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createAgentGroup.');
}
const localVarPath = `/agent-groups`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization = ("CreateAgentGroupForm" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary delete agent group
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAgentGroup(agentGroupId, options = {}) {
// verify required parameter 'agentGroupId' is not null or undefined
if (agentGroupId === null || agentGroupId === undefined) {
throw new RequiredError('agentGroupId', 'Required parameter agentGroupId was null or undefined when calling deleteAgentGroup.');
}
const localVarPath = `/agent-groups/{agentGroupId}`
.replace(`{${"agentGroupId"}}`, encodeURIComponent(String(agentGroupId)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary get agent group
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAgentGroup(agentGroupId, options = {}) {
// verify required parameter 'agentGroupId' is not null or undefined
if (agentGroupId === null || agentGroupId === undefined) {
throw new RequiredError('agentGroupId', 'Required parameter agentGroupId was null or undefined when calling getAgentGroup.');
}
const localVarPath = `/agent-groups/{agentGroupId}`
.replace(`{${"agentGroupId"}}`, encodeURIComponent(String(agentGroupId)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary get agent groups for org
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAgentGroups(options = {}) {
const localVarPath = `/agent-groups`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary patch agent group
* @param {AgentGroupPatchDto} body
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchAgentGroup(body, agentGroupId, options = {}) {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body', 'Required parameter body was null or undefined when calling patchAgentGroup.');
}
// verify required parameter 'agentGroupId' is not null or undefined
if (agentGroupId === null || agentGroupId === undefined) {
throw new RequiredError('agentGroupId', 'Required parameter agentGroupId was null or undefined when calling patchAgentGroup.');
}
const localVarPath = `/agent-groups/{agentGroupId}`
.replace(`{${"agentGroupId"}}`, encodeURIComponent(String(agentGroupId)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization = ("AgentGroupPatchDto" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary patch agent groups
* @param {Array<AgentGroupBatchPatchDto>} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchAgentGroups(body, options = {}) {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body', 'Required parameter body was null or undefined when calling patchAgentGroups.');
}
const localVarPath = `/agent-groups`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization = ("Array<AgentGroupBatchPatchDto>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary update agent group assignments
* @param {UpdateAgentGroupAssignmentsForm} body
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAgentGroupAssignments(body, agentGroupId, options = {}) {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateAgentGroupAssignments.');
}
// verify required parameter 'agentGroupId' is not null or undefined
if (agentGroupId === null || agentGroupId === undefined) {
throw new RequiredError('agentGroupId', 'Required parameter agentGroupId was null or undefined when calling updateAgentGroupAssignments.');
}
const localVarPath = `/agent-groups/{agentGroupId}/assignments`
.replace(`{${"agentGroupId"}}`, encodeURIComponent(String(agentGroupId)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization = ("UpdateAgentGroupAssignmentsForm" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary update agent group configuration
* @param {UpdateAgentGroupConfigurationForm} body
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAgentGroupConfiguration(body, agentGroupId, options = {}) {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateAgentGroupConfiguration.');
}
// verify required parameter 'agentGroupId' is not null or undefined
if (agentGroupId === null || agentGroupId === undefined) {
throw new RequiredError('agentGroupId', 'Required parameter agentGroupId was null or undefined when calling updateAgentGroupConfiguration.');
}
const localVarPath = `/agent-groups/{agentGroupId}/configuration`
.replace(`{${"agentGroupId"}}`, encodeURIComponent(String(agentGroupId)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization = ("UpdateAgentGroupConfigurationForm" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary update agent groups assignments
* @param {Array<UpdateAgentGroupAssignmentsForm>} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAgentGroupsAssignments(body, options = {}) {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateAgentGroupsAssignments.');
}
const localVarPath = `/agent-groups/assignments`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization = ("Array<UpdateAgentGroupAssignmentsForm>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary update agent groups configuration
* @param {Array<UpdateAgentGroupConfigurationForm>} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAgentGroupsConfiguration(body, options = {}) {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateAgentGroupsConfiguration.');
}
const localVarPath = `/agent-groups/configuration`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apiKey required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("X-Api-Key")
: configuration.apiKey;
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization = ("Array<UpdateAgentGroupConfigurationForm>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
exports.AgentGroupsApiFetchParamCreator = AgentGroupsApiFetchParamCreator;
/**
* AgentGroupsApi - functional programming interface
* @export
*/
const AgentGroupsApiFp = function (configuration) {
return {
/**
*
* @summary create agent group
* @param {CreateAgentGroupForm} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAgentGroup(body, options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).createAgentGroup(body, options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
*
* @summary delete agent group
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAgentGroup(agentGroupId, options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).deleteAgentGroup(agentGroupId, options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response;
}
else {
throw response;
}
});
};
},
/**
*
* @summary get agent group
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAgentGroup(agentGroupId, options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).getAgentGroup(agentGroupId, options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
*
* @summary get agent groups for org
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAgentGroups(options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).getAgentGroups(options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
*
* @summary patch agent group
* @param {AgentGroupPatchDto} body
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchAgentGroup(body, agentGroupId, options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).patchAgentGroup(body, agentGroupId, options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
*
* @summary patch agent groups
* @param {Array<AgentGroupBatchPatchDto>} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchAgentGroups(body, options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).patchAgentGroups(body, options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
*
* @summary update agent group assignments
* @param {UpdateAgentGroupAssignmentsForm} body
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAgentGroupAssignments(body, agentGroupId, options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).updateAgentGroupAssignments(body, agentGroupId, options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response;
}
else {
throw response;
}
});
};
},
/**
*
* @summary update agent group configuration
* @param {UpdateAgentGroupConfigurationForm} body
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAgentGroupConfiguration(body, agentGroupId, options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).updateAgentGroupConfiguration(body, agentGroupId, options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response;
}
else {
throw response;
}
});
};
},
/**
*
* @summary update agent groups assignments
* @param {Array<UpdateAgentGroupAssignmentsForm>} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAgentGroupsAssignments(body, options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).updateAgentGroupsAssignments(body, options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response;
}
else {
throw response;
}
});
};
},
/**
*
* @summary update agent groups configuration
* @param {Array<UpdateAgentGroupConfigurationForm>} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAgentGroupsConfiguration(body, options) {
const localVarFetchArgs = (0, exports.AgentGroupsApiFetchParamCreator)(configuration).updateAgentGroupsConfiguration(body, options);
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response;
}
else {
throw response;
}
});
};
},
};
};
exports.AgentGroupsApiFp = AgentGroupsApiFp;
/**
* AgentGroupsApi - factory interface
* @export
*/
const AgentGroupsApiFactory = function (configuration, fetch, basePath) {
return {
/**
*
* @summary create agent group
* @param {CreateAgentGroupForm} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAgentGroup(body, options) {
return (0, exports.AgentGroupsApiFp)(configuration).createAgentGroup(body, options)(fetch, basePath);
},
/**
*
* @summary delete agent group
* @param {string} agentGroupId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAgentGroup(agentGroupId, options) {
return (0, exports.AgentGroupsApiFp)(configuration).deleteAgentGroup(agentGroupId, options)(fetch, basePath);
},
/**
*
* @summary get agent group
* @param {s