UNPKG

@paciolan/cybersource-sdk

Version:
542 lines (541 loc) 33.6 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ManageWebhooksApi = exports.ManageWebhooksApiFactory = exports.ManageWebhooksApiFp = exports.ManageWebhooksApiAxiosParamCreator = void 0; /* tslint:disable */ /* eslint-disable */ /** * CyberSource Merged Spec * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html * * OpenAPI spec version: 0.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ const axios_1 = __importDefault(require("axios")); const AuthenticationHeader_1 = require("../authentication/core/AuthenticationHeader"); // Some imports not used depending on template conditions // @ts-ignore const base_1 = require("../base"); /** * ManageWebhooksApi - axios parameter creator * @export */ const ManageWebhooksApiAxiosParamCreator = function (configuration) { return { /** * Delete the webhook. Please note that deleting a particular webhook does not delete the history of the webhook notifications. * @summary Delete a Webhook Subscription * @param {string} webhookId The webhook identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteWebhookSubscription: (webhookId, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'webhookId' is not null or undefined if (webhookId === null || webhookId === undefined) { throw new base_1.RequiredError('webhookId', 'Required parameter webhookId was null or undefined when calling deleteWebhookSubscription.'); } const localVarPath = `/notification-subscriptions/v1/webhooks/{webhookId}` .replace(`{${"webhookId"}}`, encodeURIComponent(String(webhookId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); const authHeader = new AuthenticationHeader_1.AuthenticationHeader(); authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options)); localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }), /** * Retrieve the details of a specific webhook by supplying the webhook ID in the path. * @summary Get Details On a Single Webhook * @param {string} webhookId The webhook Identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWebhookSubscriptionById: (webhookId, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'webhookId' is not null or undefined if (webhookId === null || webhookId === undefined) { throw new base_1.RequiredError('webhookId', 'Required parameter webhookId was null or undefined when calling getWebhookSubscriptionById.'); } const localVarPath = `/notification-subscriptions/v1/webhooks/{webhookId}` .replace(`{${"webhookId"}}`, encodeURIComponent(String(webhookId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); const authHeader = new AuthenticationHeader_1.AuthenticationHeader(); authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options)); localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }), /** * Retrieve a list of all previously created webhooks. * @summary Get Details On All Created Webhooks * @param {string} organizationId The Organization Identifier. * @param {string} productId The Product Identifier. * @param {string} eventType The Event Type. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWebhookSubscriptionsByOrg: (organizationId, productId, eventType, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'organizationId' is not null or undefined if (organizationId === null || organizationId === undefined) { throw new base_1.RequiredError('organizationId', 'Required parameter organizationId was null or undefined when calling getWebhookSubscriptionsByOrg.'); } // verify required parameter 'productId' is not null or undefined if (productId === null || productId === undefined) { throw new base_1.RequiredError('productId', 'Required parameter productId was null or undefined when calling getWebhookSubscriptionsByOrg.'); } // verify required parameter 'eventType' is not null or undefined if (eventType === null || eventType === undefined) { throw new base_1.RequiredError('eventType', 'Required parameter eventType was null or undefined when calling getWebhookSubscriptionsByOrg.'); } const localVarPath = `/notification-subscriptions/v1/webhooks`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (organizationId !== undefined) { localVarQueryParameter['organizationId'] = organizationId; } if (productId !== undefined) { localVarQueryParameter['productId'] = productId; } if (eventType !== undefined) { localVarQueryParameter['eventType'] = eventType; } const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); const authHeader = new AuthenticationHeader_1.AuthenticationHeader(); authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options)); localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }), /** * Store and manage certificates that will be used to preform Message Level Encryption (MLE). Each new webhook will need its own unique asymmetric certificate. You can either use a digital certificate issued/signed by a CA or self-sign your own using the documentation available on the Developer Guide. * @summary Message Level Encryption * @param {V2KeysasymBody1} body Provide egress Asymmetric key information to save (create or store) * @param {string} vCSenderOrganizationId Sender organization id * @param {string} vCPermissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding * @param {string} [vCCorrelationId] A globally unique id associated with your request * @param {*} [options] Override http request option. * @throws {RequiredError} */ saveAsymEgressKey: (body, vCSenderOrganizationId, vCPermissions, vCCorrelationId, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling saveAsymEgressKey.'); } // verify required parameter 'vCSenderOrganizationId' is not null or undefined if (vCSenderOrganizationId === null || vCSenderOrganizationId === undefined) { throw new base_1.RequiredError('vCSenderOrganizationId', 'Required parameter vCSenderOrganizationId was null or undefined when calling saveAsymEgressKey.'); } // verify required parameter 'vCPermissions' is not null or undefined if (vCPermissions === null || vCPermissions === undefined) { throw new base_1.RequiredError('vCPermissions', 'Required parameter vCPermissions was null or undefined when calling saveAsymEgressKey.'); } const localVarPath = `/kms/egress/v2/keys-asym`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (vCCorrelationId !== undefined && vCCorrelationId !== null) { localVarHeaderParameter['v-c-correlation-id'] = String(vCCorrelationId); } if (vCSenderOrganizationId !== undefined && vCSenderOrganizationId !== null) { localVarHeaderParameter['v-c-sender-organization-id'] = String(vCSenderOrganizationId); } if (vCPermissions !== undefined && vCPermissions !== null) { localVarHeaderParameter['v-c-permissions'] = String(vCPermissions); } localVarHeaderParameter['Content-Type'] = 'application/json;charset=utf-8'; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); const authHeader = new AuthenticationHeader_1.AuthenticationHeader(); authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options)); localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }), /** * Update the webhook subscription using PATCH. * @summary Update a Webhook Subscription * @param {string} webhookId The Webhook Identifier. * @param {WebhooksWebhookIdBody} [body] The webhook payload or changes to apply. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateWebhookSubscription: (webhookId, body, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'webhookId' is not null or undefined if (webhookId === null || webhookId === undefined) { throw new base_1.RequiredError('webhookId', 'Required parameter webhookId was null or undefined when calling updateWebhookSubscription.'); } const localVarPath = `/notification-subscriptions/v1/webhooks/{webhookId}` .replace(`{${"webhookId"}}`, encodeURIComponent(String(webhookId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json;charset=utf-8'; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); const authHeader = new AuthenticationHeader_1.AuthenticationHeader(); authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options)); localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }), }; }; exports.ManageWebhooksApiAxiosParamCreator = ManageWebhooksApiAxiosParamCreator; /** * ManageWebhooksApi - functional programming interface * @export */ const ManageWebhooksApiFp = function (configuration) { return { /** * Delete the webhook. Please note that deleting a particular webhook does not delete the history of the webhook notifications. * @summary Delete a Webhook Subscription * @param {string} webhookId The webhook identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteWebhookSubscription(webhookId, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield (0, exports.ManageWebhooksApiAxiosParamCreator)(configuration).deleteWebhookSubscription(webhookId, options); return (axios = axios_1.default, basePath = base_1.BASE_PATH) => { const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url }); return axios.request(axiosRequestArgs); }; }); }, /** * Retrieve the details of a specific webhook by supplying the webhook ID in the path. * @summary Get Details On a Single Webhook * @param {string} webhookId The webhook Identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWebhookSubscriptionById(webhookId, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield (0, exports.ManageWebhooksApiAxiosParamCreator)(configuration).getWebhookSubscriptionById(webhookId, options); return (axios = axios_1.default, basePath = base_1.BASE_PATH) => { const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url }); return axios.request(axiosRequestArgs); }; }); }, /** * Retrieve a list of all previously created webhooks. * @summary Get Details On All Created Webhooks * @param {string} organizationId The Organization Identifier. * @param {string} productId The Product Identifier. * @param {string} eventType The Event Type. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWebhookSubscriptionsByOrg(organizationId, productId, eventType, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield (0, exports.ManageWebhooksApiAxiosParamCreator)(configuration).getWebhookSubscriptionsByOrg(organizationId, productId, eventType, options); return (axios = axios_1.default, basePath = base_1.BASE_PATH) => { const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url }); return axios.request(axiosRequestArgs); }; }); }, /** * Store and manage certificates that will be used to preform Message Level Encryption (MLE). Each new webhook will need its own unique asymmetric certificate. You can either use a digital certificate issued/signed by a CA or self-sign your own using the documentation available on the Developer Guide. * @summary Message Level Encryption * @param {V2KeysasymBody1} body Provide egress Asymmetric key information to save (create or store) * @param {string} vCSenderOrganizationId Sender organization id * @param {string} vCPermissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding * @param {string} [vCCorrelationId] A globally unique id associated with your request * @param {*} [options] Override http request option. * @throws {RequiredError} */ saveAsymEgressKey(body, vCSenderOrganizationId, vCPermissions, vCCorrelationId, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield (0, exports.ManageWebhooksApiAxiosParamCreator)(configuration).saveAsymEgressKey(body, vCSenderOrganizationId, vCPermissions, vCCorrelationId, options); return (axios = axios_1.default, basePath = base_1.BASE_PATH) => { const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url }); return axios.request(axiosRequestArgs); }; }); }, /** * Update the webhook subscription using PATCH. * @summary Update a Webhook Subscription * @param {string} webhookId The Webhook Identifier. * @param {WebhooksWebhookIdBody} [body] The webhook payload or changes to apply. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateWebhookSubscription(webhookId, body, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield (0, exports.ManageWebhooksApiAxiosParamCreator)(configuration).updateWebhookSubscription(webhookId, body, options); return (axios = axios_1.default, basePath = base_1.BASE_PATH) => { const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url }); return axios.request(axiosRequestArgs); }; }); }, }; }; exports.ManageWebhooksApiFp = ManageWebhooksApiFp; /** * ManageWebhooksApi - factory interface * @export */ const ManageWebhooksApiFactory = function (configuration, basePath, axios) { return { /** * Delete the webhook. Please note that deleting a particular webhook does not delete the history of the webhook notifications. * @summary Delete a Webhook Subscription * @param {string} webhookId The webhook identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteWebhookSubscription(webhookId, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(configuration).deleteWebhookSubscription(webhookId, options).then((request) => request(axios, basePath)); }); }, /** * Retrieve the details of a specific webhook by supplying the webhook ID in the path. * @summary Get Details On a Single Webhook * @param {string} webhookId The webhook Identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWebhookSubscriptionById(webhookId, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(configuration).getWebhookSubscriptionById(webhookId, options).then((request) => request(axios, basePath)); }); }, /** * Retrieve a list of all previously created webhooks. * @summary Get Details On All Created Webhooks * @param {string} organizationId The Organization Identifier. * @param {string} productId The Product Identifier. * @param {string} eventType The Event Type. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWebhookSubscriptionsByOrg(organizationId, productId, eventType, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(configuration).getWebhookSubscriptionsByOrg(organizationId, productId, eventType, options).then((request) => request(axios, basePath)); }); }, /** * Store and manage certificates that will be used to preform Message Level Encryption (MLE). Each new webhook will need its own unique asymmetric certificate. You can either use a digital certificate issued/signed by a CA or self-sign your own using the documentation available on the Developer Guide. * @summary Message Level Encryption * @param {V2KeysasymBody1} body Provide egress Asymmetric key information to save (create or store) * @param {string} vCSenderOrganizationId Sender organization id * @param {string} vCPermissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding * @param {string} [vCCorrelationId] A globally unique id associated with your request * @param {*} [options] Override http request option. * @throws {RequiredError} */ saveAsymEgressKey(body, vCSenderOrganizationId, vCPermissions, vCCorrelationId, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(configuration).saveAsymEgressKey(body, vCSenderOrganizationId, vCPermissions, vCCorrelationId, options).then((request) => request(axios, basePath)); }); }, /** * Update the webhook subscription using PATCH. * @summary Update a Webhook Subscription * @param {string} webhookId The Webhook Identifier. * @param {WebhooksWebhookIdBody} [body] The webhook payload or changes to apply. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateWebhookSubscription(webhookId, body, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(configuration).updateWebhookSubscription(webhookId, body, options).then((request) => request(axios, basePath)); }); }, }; }; exports.ManageWebhooksApiFactory = ManageWebhooksApiFactory; /** * ManageWebhooksApi - object-oriented interface * @export * @class ManageWebhooksApi * @extends {BaseAPI} */ class ManageWebhooksApi extends base_1.BaseAPI { /** * Delete the webhook. Please note that deleting a particular webhook does not delete the history of the webhook notifications. * @summary Delete a Webhook Subscription * @param {string} webhookId The webhook identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ManageWebhooksApi */ deleteWebhookSubscription(webhookId, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(this.configuration).deleteWebhookSubscription(webhookId, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath)); }); } /** * Retrieve the details of a specific webhook by supplying the webhook ID in the path. * @summary Get Details On a Single Webhook * @param {string} webhookId The webhook Identifier * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ManageWebhooksApi */ getWebhookSubscriptionById(webhookId, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(this.configuration).getWebhookSubscriptionById(webhookId, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath)); }); } /** * Retrieve a list of all previously created webhooks. * @summary Get Details On All Created Webhooks * @param {string} organizationId The Organization Identifier. * @param {string} productId The Product Identifier. * @param {string} eventType The Event Type. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ManageWebhooksApi */ getWebhookSubscriptionsByOrg(organizationId, productId, eventType, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(this.configuration).getWebhookSubscriptionsByOrg(organizationId, productId, eventType, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath)); }); } /** * Store and manage certificates that will be used to preform Message Level Encryption (MLE). Each new webhook will need its own unique asymmetric certificate. You can either use a digital certificate issued/signed by a CA or self-sign your own using the documentation available on the Developer Guide. * @summary Message Level Encryption * @param {V2KeysasymBody1} body Provide egress Asymmetric key information to save (create or store) * @param {string} vCSenderOrganizationId Sender organization id * @param {string} vCPermissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding * @param {string} [vCCorrelationId] A globally unique id associated with your request * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ManageWebhooksApi */ saveAsymEgressKey(body, vCSenderOrganizationId, vCPermissions, vCCorrelationId, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(this.configuration).saveAsymEgressKey(body, vCSenderOrganizationId, vCPermissions, vCCorrelationId, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath)); }); } /** * Update the webhook subscription using PATCH. * @summary Update a Webhook Subscription * @param {string} webhookId The Webhook Identifier. * @param {WebhooksWebhookIdBody} [body] The webhook payload or changes to apply. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ManageWebhooksApi */ updateWebhookSubscription(webhookId, body, options) { return __awaiter(this, void 0, void 0, function* () { return (0, exports.ManageWebhooksApiFp)(this.configuration).updateWebhookSubscription(webhookId, body, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath)); }); } } exports.ManageWebhooksApi = ManageWebhooksApi;