genesys-provisioning-client-js
Version:
Provisioning API used to create objects in configuration server in a way that is consistent with the BEC model
300 lines (256 loc) • 10.7 kB
JavaScript
/**
* Provisioning API
* The provisioning service will be used to create objects in configuration server in a way that is consistent with the BEC model. The \"users\" resource will be used to perform CRUD operations on config server person objects. Note that this API will extend the low level configuration server API to add additional functionality that will allow persons to be created in a way that makes them immediately useable in BEC. Operations on this resource may result in other configuration objects being modified as well.
*
* OpenAPI spec version: 9.0.000.91.4963
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.4.5
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/ApiErrorResponse', 'model/ApiSuccessResponse', 'model/GetInboundResponse', 'model/GetOutboundResponse', 'model/ModifyInboundData', 'model/ModifyOutboundData'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('../model/ApiErrorResponse'), require('../model/ApiSuccessResponse'), require('../model/GetInboundResponse'), require('../model/GetOutboundResponse'), require('../model/ModifyInboundData'), require('../model/ModifyOutboundData'));
} else {
// Browser globals (root is window)
if (!root.ProvisioningApi) {
root.ProvisioningApi = {};
}
root.ProvisioningApi.EmailSettingsApi = factory(root.ProvisioningApi.ApiClient, root.ProvisioningApi.ApiErrorResponse, root.ProvisioningApi.ApiSuccessResponse, root.ProvisioningApi.GetInboundResponse, root.ProvisioningApi.GetOutboundResponse, root.ProvisioningApi.ModifyInboundData, root.ProvisioningApi.ModifyOutboundData);
}
}(this, function(ApiClient, ApiErrorResponse, ApiSuccessResponse, GetInboundResponse, GetOutboundResponse, ModifyInboundData, ModifyOutboundData) {
'use strict';
/**
* EmailSettings service.
* @module api/EmailSettingsApi
* @version 9.0.000.91.4963
*/
/**
* Constructs a new EmailSettingsApi.
* @alias module:api/EmailSettingsApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
var exports = function(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
/**
* Delete inbound mailbox settings
* Delete data for the inbound corporate mailbox specified in the **name** parameter.
* @param {String} name The name of the inbound corporate mailbox.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetInboundResponse} and HTTP response
*/
this.deleteInboundSettingsWithHttpInfo = function(name) {
var postBody = null;
// verify the required parameter 'name' is set
if (name === undefined || name === null) {
throw new Error("Missing the required parameter 'name' when calling deleteInboundSettings");
}
var pathParams = {
};
var queryParams = {
'name': name,
};
var collectionQueryParams = {
};
var headerParams = {
};
var formParams = {
};
var authNames = [];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = GetInboundResponse;
return this.apiClient.callApi(
'/email-settings/inbound', 'DELETE',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}
/**
* Delete inbound mailbox settings
* Delete data for the inbound corporate mailbox specified in the **name** parameter.
* @param {String} name The name of the inbound corporate mailbox.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetInboundResponse}
*/
this.deleteInboundSettings = function(name) {
return this.deleteInboundSettingsWithHttpInfo(name)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Get inbound email settings
* Get settings for an inbound mailbox.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetInboundResponse} and HTTP response
*/
this.getInboundSettingsWithHttpInfo = function() {
var postBody = null;
var pathParams = {
};
var queryParams = {
};
var collectionQueryParams = {
};
var headerParams = {
};
var formParams = {
};
var authNames = [];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = GetInboundResponse;
return this.apiClient.callApi(
'/email-settings/inbound', 'GET',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}
/**
* Get inbound email settings
* Get settings for an inbound mailbox.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetInboundResponse}
*/
this.getInboundSettings = function() {
return this.getInboundSettingsWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Get outbound email settings
* Get settings for an outbound mailbox.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetOutboundResponse} and HTTP response
*/
this.getOutboundSettingsWithHttpInfo = function() {
var postBody = null;
var pathParams = {
};
var queryParams = {
};
var collectionQueryParams = {
};
var headerParams = {
};
var formParams = {
};
var authNames = [];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = GetOutboundResponse;
return this.apiClient.callApi(
'/email-settings/outbound', 'GET',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}
/**
* Get outbound email settings
* Get settings for an outbound mailbox.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetOutboundResponse}
*/
this.getOutboundSettings = function() {
return this.getOutboundSettingsWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Modify inbound email settings
* Add or update settings for an inbound mailbox.
* @param {module:model/ModifyInboundData} body Body Data
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
*/
this.modifyInboundSettingsWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling modifyInboundSettings");
}
var pathParams = {
};
var queryParams = {
};
var collectionQueryParams = {
};
var headerParams = {
};
var formParams = {
};
var authNames = [];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = ApiSuccessResponse;
return this.apiClient.callApi(
'/email-settings/inbound', 'POST',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}
/**
* Modify inbound email settings
* Add or update settings for an inbound mailbox.
* @param {module:model/ModifyInboundData} body Body Data
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
*/
this.modifyInboundSettings = function(body) {
return this.modifyInboundSettingsWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Modify outbound email settings
* Add or update settings for an outbound mailbox.
* @param {module:model/ModifyOutboundData} body Body Data
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
*/
this.modifyOutboundSettingsWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling modifyOutboundSettings");
}
var pathParams = {
};
var queryParams = {
};
var collectionQueryParams = {
};
var headerParams = {
};
var formParams = {
};
var authNames = [];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = ApiSuccessResponse;
return this.apiClient.callApi(
'/email-settings/outbound', 'POST',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}
/**
* Modify outbound email settings
* Add or update settings for an outbound mailbox.
* @param {module:model/ModifyOutboundData} body Body Data
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
*/
this.modifyOutboundSettings = function(body) {
return this.modifyOutboundSettingsWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
}
};
return exports;
}));