@kuflow/kuflow-rest
Version:
REST SDK for KuFlow.
109 lines • 4.95 kB
JavaScript
;
/**
* The MIT License
* Copyright © 2021-present KuFlow S.L.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.KuFlowRestClientGenerated = void 0;
const coreClient = __importStar(require("@azure/core-client"));
const operations_1 = require("./operations");
/** @internal */
class KuFlowRestClientGenerated extends coreClient.ServiceClient {
$host;
/**
* Initializes a new instance of the KuFlowRestClientGenerated class.
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param options The parameter options
*/
constructor(credentials, options) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
// Initializing default values for options
if (!options) {
options = {};
}
const defaults = {
requestContentType: 'application/json; charset=utf-8',
credential: credentials,
};
const packageDetails = `sdk-js-kuflow-rest/${require('../../package.json').version}`;
const userAgentPrefix = options.userAgentOptions?.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;
const optionsWithDefaults = {
...defaults,
...options,
userAgentOptions: {
userAgentPrefix,
},
endpoint: options.endpoint ?? options.baseUri ?? 'https://api.kuflow.com/v2024-06-14',
};
super(optionsWithDefaults);
// Assigning values to Constant parameters
this.$host = options.$host || 'https://api.kuflow.com/v2024-06-14';
this.authenticationOperations = new operations_1.AuthenticationOperationsImpl(this);
this.kms = new operations_1.KmsImpl(this);
this.principalOperations = new operations_1.PrincipalOperationsImpl(this);
this.group = new operations_1.GroupImpl(this);
this.tenantOperations = new operations_1.TenantOperationsImpl(this);
this.tenantUserOperations = new operations_1.TenantUserOperationsImpl(this);
this.processOperations = new operations_1.ProcessOperationsImpl(this);
this.processItemOperations = new operations_1.ProcessItemOperationsImpl(this);
this.workerOperations = new operations_1.WorkerOperationsImpl(this);
this.robotOperations = new operations_1.RobotOperationsImpl(this);
}
authenticationOperations;
kms;
principalOperations;
group;
tenantOperations;
tenantUserOperations;
processOperations;
processItemOperations;
workerOperations;
robotOperations;
}
exports.KuFlowRestClientGenerated = KuFlowRestClientGenerated;
//# sourceMappingURL=kuFlowRestClientGenerated.js.map