UNPKG

genesys-provisioning-client-js

Version:

Provisioning API used to create objects in configuration server in a way that is consistent with the BEC model

443 lines (377 loc) 14.2 kB
/** * 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/ApiEndpointsSuccess', 'model/ApiPostEndpoints', 'model/ApiPostEndpointsSuccess', 'model/GetTemplates', 'model/PostSettings', 'model/PostTemplates', 'model/Templates'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('../model/ApiEndpointsSuccess'), require('../model/ApiPostEndpoints'), require('../model/ApiPostEndpointsSuccess'), require('../model/GetTemplates'), require('../model/PostSettings'), require('../model/PostTemplates'), require('../model/Templates')); } else { // Browser globals (root is window) if (!root.ProvisioningApi) { root.ProvisioningApi = {}; } root.ProvisioningApi.SettingsApi = factory(root.ProvisioningApi.ApiClient, root.ProvisioningApi.ApiEndpointsSuccess, root.ProvisioningApi.ApiPostEndpoints, root.ProvisioningApi.ApiPostEndpointsSuccess, root.ProvisioningApi.GetTemplates, root.ProvisioningApi.PostSettings, root.ProvisioningApi.PostTemplates, root.ProvisioningApi.Templates); } }(this, function(ApiClient, ApiEndpointsSuccess, ApiPostEndpoints, ApiPostEndpointsSuccess, GetTemplates, PostSettings, PostTemplates, Templates) { 'use strict'; /** * Settings service. * @module api/SettingsApi * @version 9.0.000.91.4963 */ /** * Constructs a new SettingsApi. * @alias module:api/SettingsApi * @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 apiEndpoints. * Delete api-endpoints * @param {String} name The name of the settings api endpoint. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiPostEndpointsSuccess} and HTTP response */ this.deleteApiEndpointsWithHttpInfo = 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 deleteApiEndpoints"); } var pathParams = { }; var queryParams = { 'name': name, }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = ['application/json']; var accepts = ['application/json']; var returnType = ApiPostEndpointsSuccess; return this.apiClient.callApi( '/settings/api-endpoints', 'DELETE', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Delete apiEndpoints. * Delete api-endpoints * @param {String} name The name of the settings api endpoint. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiPostEndpointsSuccess} */ this.deleteApiEndpoints = function(name) { return this.deleteApiEndpointsWithHttpInfo(name) .then(function(response_and_data) { return response_and_data.data; }); } /** * Delete Templates. * deleteTemplates * @param {String} name The name of the settings templates. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Templates} and HTTP response */ this.deleteTemplatesWithHttpInfo = 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 deleteTemplates"); } var pathParams = { }; var queryParams = { 'name': name, }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = ['application/json']; var accepts = ['application/json']; var returnType = Templates; return this.apiClient.callApi( '/settings/templates', 'DELETE', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Delete Templates. * deleteTemplates * @param {String} name The name of the settings templates. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Templates} */ this.deleteTemplates = function(name) { return this.deleteTemplatesWithHttpInfo(name) .then(function(response_and_data) { return response_and_data.data; }); } /** * Get apiEndpoints. * Get api-endpoints * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiEndpointsSuccess} and HTTP response */ this.getApiEndpointsWithHttpInfo = 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 = ApiEndpointsSuccess; return this.apiClient.callApi( '/settings/api-endpoints', 'GET', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Get apiEndpoints. * Get api-endpoints * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiEndpointsSuccess} */ this.getApiEndpoints = function() { return this.getApiEndpointsWithHttpInfo() .then(function(response_and_data) { return response_and_data.data; }); } /** * Get Templates. * getTemplates * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetTemplates} and HTTP response */ this.getTemplatesWithHttpInfo = 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 = GetTemplates; return this.apiClient.callApi( '/settings/templates', 'GET', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Get Templates. * getTemplates * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetTemplates} */ this.getTemplates = function() { return this.getTemplatesWithHttpInfo() .then(function(response_and_data) { return response_and_data.data; }); } /** * Post apiEndpoints. * Post api-endpoints * @param {module:model/ApiPostEndpoints} body Body Data * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiPostEndpointsSuccess} and HTTP response */ this.postApiEndpointsWithHttpInfo = 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 postApiEndpoints"); } var pathParams = { }; var queryParams = { }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = ['application/json']; var accepts = ['application/json']; var returnType = ApiPostEndpointsSuccess; return this.apiClient.callApi( '/settings/api-endpoints', 'POST', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Post apiEndpoints. * Post api-endpoints * @param {module:model/ApiPostEndpoints} body Body Data * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiPostEndpointsSuccess} */ this.postApiEndpoints = function(body) { return this.postApiEndpointsWithHttpInfo(body) .then(function(response_and_data) { return response_and_data.data; }); } /** * Settings. * Post method for settings * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PostSettings} and HTTP response */ this.postSettingsWithHttpInfo = 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 = PostSettings; return this.apiClient.callApi( '/settings', 'POST', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Settings. * Post method for settings * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PostSettings} */ this.postSettings = function() { return this.postSettingsWithHttpInfo() .then(function(response_and_data) { return response_and_data.data; }); } /** * Post Templates. * postTemplates * @param {module:model/PostTemplates} body Body Data * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Templates} and HTTP response */ this.postTemplatesWithHttpInfo = 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 postTemplates"); } var pathParams = { }; var queryParams = { }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = ['application/json']; var accepts = ['application/json']; var returnType = Templates; return this.apiClient.callApi( '/settings/templates', 'POST', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Post Templates. * postTemplates * @param {module:model/PostTemplates} body Body Data * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Templates} */ this.postTemplates = function(body) { return this.postTemplatesWithHttpInfo(body) .then(function(response_and_data) { return response_and_data.data; }); } /** * Put Templates. * putTemplates * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Templates} and HTTP response */ this.putTemplatesWithHttpInfo = 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 = Templates; return this.apiClient.callApi( '/settings/templates', 'PUT', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Put Templates. * putTemplates * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Templates} */ this.putTemplates = function() { return this.putTemplatesWithHttpInfo() .then(function(response_and_data) { return response_and_data.data; }); } }; return exports; }));