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

318 lines (272 loc) 12.8 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/RecCertCheckResponseStatusError', 'model/RecCertCheckResponseStatusSuccess', 'model/RecCertDeleteResponseError', 'model/RecCertDeleteResponseSuccess', 'model/RecCertGetResponseError', 'model/RecCertGetResponseSuccess', 'model/RecCertKeyCheckResponseStatusError', 'model/RecCertKeyCheckResponseStatusSuccess', 'model/RecCertPostResponseStatusError', 'model/RecCertPostResponseStatusSuccess'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('../model/RecCertCheckResponseStatusError'), require('../model/RecCertCheckResponseStatusSuccess'), require('../model/RecCertDeleteResponseError'), require('../model/RecCertDeleteResponseSuccess'), require('../model/RecCertGetResponseError'), require('../model/RecCertGetResponseSuccess'), require('../model/RecCertKeyCheckResponseStatusError'), require('../model/RecCertKeyCheckResponseStatusSuccess'), require('../model/RecCertPostResponseStatusError'), require('../model/RecCertPostResponseStatusSuccess')); } else { // Browser globals (root is window) if (!root.ProvisioningApi) { root.ProvisioningApi = {}; } root.ProvisioningApi.RecordingCertificatesApi = factory(root.ProvisioningApi.ApiClient, root.ProvisioningApi.RecCertCheckResponseStatusError, root.ProvisioningApi.RecCertCheckResponseStatusSuccess, root.ProvisioningApi.RecCertDeleteResponseError, root.ProvisioningApi.RecCertDeleteResponseSuccess, root.ProvisioningApi.RecCertGetResponseError, root.ProvisioningApi.RecCertGetResponseSuccess, root.ProvisioningApi.RecCertKeyCheckResponseStatusError, root.ProvisioningApi.RecCertKeyCheckResponseStatusSuccess, root.ProvisioningApi.RecCertPostResponseStatusError, root.ProvisioningApi.RecCertPostResponseStatusSuccess); } }(this, function(ApiClient, RecCertCheckResponseStatusError, RecCertCheckResponseStatusSuccess, RecCertDeleteResponseError, RecCertDeleteResponseSuccess, RecCertGetResponseError, RecCertGetResponseSuccess, RecCertKeyCheckResponseStatusError, RecCertKeyCheckResponseStatusSuccess, RecCertPostResponseStatusError, RecCertPostResponseStatusSuccess) { 'use strict'; /** * RecordingCertificates service. * @module api/RecordingCertificatesApi * @version 9.0.000.91.4963 */ /** * Constructs a new RecordingCertificatesApi. * @alias module:api/RecordingCertificatesApi * @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; /** * Check a pem certificate * The POST operation will check a pem certificate and return it's properties * @param {File} certificateFile PEM certificate file * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RecCertCheckResponseStatusSuccess} and HTTP response */ this.recCertCheckWithHttpInfo = function(certificateFile) { var postBody = null; // verify the required parameter 'certificateFile' is set if (certificateFile === undefined || certificateFile === null) { throw new Error("Missing the required parameter 'certificateFile' when calling recCertCheck"); } var pathParams = { }; var queryParams = { }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { 'certificate_file': certificateFile }; var authNames = []; var contentTypes = ['multipart/form-data']; var accepts = ['application/json']; var returnType = RecCertCheckResponseStatusSuccess; return this.apiClient.callApi( '/recording/certificates/check', 'POST', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Check a pem certificate * The POST operation will check a pem certificate and return it's properties * @param {File} certificateFile PEM certificate file * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RecCertCheckResponseStatusSuccess} */ this.recCertCheck = function(certificateFile) { return this.recCertCheckWithHttpInfo(certificateFile) .then(function(response_and_data) { return response_and_data.data; }); } /** * Check a pem certificate * The POST operation will check a pem certificate key * @param {File} keyFile PEM key file * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RecCertKeyCheckResponseStatusSuccess} and HTTP response */ this.recCertCheckKeyWithHttpInfo = function(keyFile) { var postBody = null; // verify the required parameter 'keyFile' is set if (keyFile === undefined || keyFile === null) { throw new Error("Missing the required parameter 'keyFile' when calling recCertCheckKey"); } var pathParams = { }; var queryParams = { }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { 'key_file': keyFile }; var authNames = []; var contentTypes = ['multipart/form-data']; var accepts = ['application/json']; var returnType = RecCertKeyCheckResponseStatusSuccess; return this.apiClient.callApi( '/recording/certificates/check-key', 'POST', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Check a pem certificate * The POST operation will check a pem certificate key * @param {File} keyFile PEM key file * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RecCertKeyCheckResponseStatusSuccess} */ this.recCertCheckKey = function(keyFile) { return this.recCertCheckKeyWithHttpInfo(keyFile) .then(function(response_and_data) { return response_and_data.data; }); } /** * Delete a GIR certificate. * The DELETE operation will delete a GIR certificate by it's alias * @param {String} alias Alias of a certificate * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RecCertDeleteResponseSuccess} and HTTP response */ this.recCertDeleteWithHttpInfo = function(alias) { var postBody = null; // verify the required parameter 'alias' is set if (alias === undefined || alias === null) { throw new Error("Missing the required parameter 'alias' when calling recCertDelete"); } var pathParams = { }; var queryParams = { 'alias': alias, }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = ['application/json']; var accepts = ['application/json']; var returnType = RecCertDeleteResponseSuccess; return this.apiClient.callApi( '/recording/certificates', 'DELETE', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Delete a GIR certificate. * The DELETE operation will delete a GIR certificate by it's alias * @param {String} alias Alias of a certificate * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RecCertDeleteResponseSuccess} */ this.recCertDelete = function(alias) { return this.recCertDeleteWithHttpInfo(alias) .then(function(response_and_data) { return response_and_data.data; }); } /** * Get GIR certificates. * The GET operation will return a list of certificates * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RecCertGetResponseSuccess} and HTTP response */ this.recCertGetWithHttpInfo = 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 = RecCertGetResponseSuccess; return this.apiClient.callApi( '/recording/certificates', 'GET', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Get GIR certificates. * The GET operation will return a list of certificates * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RecCertGetResponseSuccess} */ this.recCertGet = function() { return this.recCertGetWithHttpInfo() .then(function(response_and_data) { return response_and_data.data; }); } /** * Add a pem certificate and key * The POST operation will add a pem certificate and it's key to the RCS service * @param {File} certificateFile PEM certificate file * @param {File} keyFile PEM key file * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RecCertPostResponseStatusSuccess} and HTTP response */ this.recCertPostWithHttpInfo = function(certificateFile, keyFile) { var postBody = null; // verify the required parameter 'certificateFile' is set if (certificateFile === undefined || certificateFile === null) { throw new Error("Missing the required parameter 'certificateFile' when calling recCertPost"); } // verify the required parameter 'keyFile' is set if (keyFile === undefined || keyFile === null) { throw new Error("Missing the required parameter 'keyFile' when calling recCertPost"); } var pathParams = { }; var queryParams = { }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { 'certificate_file': certificateFile, 'key_file': keyFile }; var authNames = []; var contentTypes = ['multipart/form-data']; var accepts = ['application/json']; var returnType = RecCertPostResponseStatusSuccess; return this.apiClient.callApi( '/recording/certificates', 'POST', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Add a pem certificate and key * The POST operation will add a pem certificate and it's key to the RCS service * @param {File} certificateFile PEM certificate file * @param {File} keyFile PEM key file * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RecCertPostResponseStatusSuccess} */ this.recCertPost = function(certificateFile, keyFile) { return this.recCertPostWithHttpInfo(certificateFile, keyFile) .then(function(response_and_data) { return response_and_data.data; }); } }; return exports; }));