UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

49 lines 4.14 kB
"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ManagementAPIGroup_2_0 = void 0; const GenericAPIFn_1 = require("../GenericAPIFn"); const query_1 = require("../shared/helper/rest/query"); function ManagementAPIGroup_2_0(instance) { const self = instance; return { readVendor: (options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/v2.0/vendor", "GET", self)(undefined, options), getBillingInformation: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/billing?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), indexOrganisations: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/organisations?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), readOrganisation: ({ organisationId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/organisations/${organisationId}`, "GET", self)(undefined, options), createOrganisation: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/v2.0/organisations", "POST", self)(args, options), updateOrganisation: (_a, options) => { var { organisationId } = _a, args = __rest(_a, ["organisationId"]); return (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/organisations/${organisationId}`, "PATCH", self)(args, options); }, deleteOrganisation: (_a, options) => { var { organisationId, verificationToken } = _a, args = __rest(_a, ["organisationId", "verificationToken"]); return (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/organisations/${organisationId}?verificationToken=${verificationToken}`, "DELETE", self)(args, options); }, enforcePasswordPolicy: ({ organisationId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/organisations/${organisationId}/enforcepasswordpolicy`, "POST", self)(undefined, options), indexUsersManagement: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/users?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(args, options), createUserManagement: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/v2.0/users", "POST", self)(args, options), readUserManagement: ({ userId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/users/${userId}`, "GET", self)(undefined, options), updateUserManagement: (_a, options) => { var { userId } = _a, args = __rest(_a, ["userId"]); return (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/users/${userId}`, "PATCH", self)(args, options); }, deleteUserManagement: ({ userId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/users/${userId}`, "DELETE", self)(undefined, options), impersonateUserManagement: ({ userId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/management/v2.0/users/${userId}/impersonate`, "POST", self)(undefined, options), createApiKeyManagement: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/v2.0/organisations/apikeys", "POST", self)(args, options), createSystemMessage: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/v2.0/system/createsystemmessage", "POST", self)(args, options), generateAuthenticationToken: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/management/auth/token", "POST", self)(args, options) }; } exports.ManagementAPIGroup_2_0 = ManagementAPIGroup_2_0; //# sourceMappingURL=ManagementAPIGroup_2_0.js.map