@openzeppelin/relayer-sdk
Version:
OpenZeppelin Relayer SDK
452 lines (451 loc) • 32 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* OpenZeppelin Relayer API
* OpenZeppelin Relayer API
*
* The version of the OpenAPI document: 1.3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
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());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PluginsApi = exports.PluginsApiFactory = exports.PluginsApiFp = exports.PluginsApiAxiosParamCreator = void 0;
const axios_1 = require("axios");
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("../common");
// @ts-ignore
const base_1 = require("../base");
/**
* PluginsApi - axios parameter creator
* @export
*/
const PluginsApiAxiosParamCreator = function (configuration) {
return {
/**
* Logs and traces are only returned when the plugin is configured with `emit_logs` / `emit_traces`. Plugin-provided errors are normalized into a consistent payload (`code`, `details`) and a derived message so downstream clients receive a stable shape regardless of how the handler threw. The endpoint supports wildcard route routing, allowing plugins to implement custom routing logic: - `/api/v1/plugins/{plugin_id}/call` - Default endpoint (route = \"\") - `/api/v1/plugins/{plugin_id}/call?route=/verify` - Custom route via query parameter - `/api/v1/plugins/{plugin_id}/call/verify` - Custom route via URL path (route = \"/verify\") The route is passed to the plugin handler via the `context.route` field. You can specify a custom route either by appending it to the URL path or by using the `route` query parameter.
* @summary Execute a plugin with optional wildcard route routing
* @param {string} pluginId The unique identifier of the plugin
* @param {PluginCallRequest} pluginCallRequest
* @param {string} [route] Optional route suffix for custom routing (e.g., \'/verify\'). Alternative to appending the route to the URL path.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
callPlugin: (pluginId_1, pluginCallRequest_1, route_1, ...args_1) => __awaiter(this, [pluginId_1, pluginCallRequest_1, route_1, ...args_1], void 0, function* (pluginId, pluginCallRequest, route, options = {}) {
// verify required parameter 'pluginId' is not null or undefined
(0, common_1.assertParamExists)('callPlugin', 'pluginId', pluginId);
// verify required parameter 'pluginCallRequest' is not null or undefined
(0, common_1.assertParamExists)('callPlugin', 'pluginCallRequest', pluginCallRequest);
const localVarPath = `/api/v1/plugins/{plugin_id}/call`
.replace(`{${"plugin_id"}}`, encodeURIComponent(String(pluginId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearer_auth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (route !== undefined) {
localVarQueryParameter['route'] = route;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(pluginCallRequest, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint is disabled by default. To enable it for a given plugin, set `allow_get_invocation: true` in the plugin configuration. When invoked via GET: - `params` is an empty object (`{}`) - query parameters are passed to the plugin handler via `context.query` - wildcard route routing is supported the same way as POST (see `doc_call_plugin`) - Use the `route` query parameter or append the route to the URL path
* @summary Execute a plugin via GET (must be enabled per plugin)
* @param {string} pluginId The unique identifier of the plugin
* @param {string} [route] Optional route suffix for custom routing (e.g., \'/verify\'). Alternative to appending the route to the URL path.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
callPluginGet: (pluginId_1, route_1, ...args_1) => __awaiter(this, [pluginId_1, route_1, ...args_1], void 0, function* (pluginId, route, options = {}) {
// verify required parameter 'pluginId' is not null or undefined
(0, common_1.assertParamExists)('callPluginGet', 'pluginId', pluginId);
const localVarPath = `/api/v1/plugins/{plugin_id}/call`
.replace(`{${"plugin_id"}}`, encodeURIComponent(String(pluginId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearer_auth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (route !== undefined) {
localVarQueryParameter['route'] = route;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Get plugin by ID
* @param {string} pluginId The unique identifier of the plugin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlugin: (pluginId_1, ...args_1) => __awaiter(this, [pluginId_1, ...args_1], void 0, function* (pluginId, options = {}) {
// verify required parameter 'pluginId' is not null or undefined
(0, common_1.assertParamExists)('getPlugin', 'pluginId', pluginId);
const localVarPath = `/api/v1/plugins/{plugin_id}`
.replace(`{${"plugin_id"}}`, encodeURIComponent(String(pluginId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearer_auth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary List plugins.
* @param {number} [page] Page number for pagination (starts at 1)
* @param {number} [perPage] Number of items per page (default: 10)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPlugins: (page_1, perPage_1, ...args_1) => __awaiter(this, [page_1, perPage_1, ...args_1], void 0, function* (page, perPage, options = {}) {
const localVarPath = `/api/v1/plugins`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearer_auth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (perPage !== undefined) {
localVarQueryParameter['per_page'] = perPage;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Updates mutable plugin fields such as timeout, emit_logs, emit_traces, raw_response, allow_get_invocation, config, and forward_logs. The plugin id and path cannot be changed after creation. All fields are optional - only the provided fields will be updated. To clear the `config` field, pass `\"config\": null`.
* @summary Update plugin configuration
* @param {string} pluginId The unique identifier of the plugin
* @param {UpdatePluginRequest} updatePluginRequest Plugin configuration update. All fields are optional.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updatePlugin: (pluginId_1, updatePluginRequest_1, ...args_1) => __awaiter(this, [pluginId_1, updatePluginRequest_1, ...args_1], void 0, function* (pluginId, updatePluginRequest, options = {}) {
// verify required parameter 'pluginId' is not null or undefined
(0, common_1.assertParamExists)('updatePlugin', 'pluginId', pluginId);
// verify required parameter 'updatePluginRequest' is not null or undefined
(0, common_1.assertParamExists)('updatePlugin', 'updatePluginRequest', updatePluginRequest);
const localVarPath = `/api/v1/plugins/{plugin_id}`
.replace(`{${"plugin_id"}}`, encodeURIComponent(String(pluginId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearer_auth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updatePluginRequest, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
};
};
exports.PluginsApiAxiosParamCreator = PluginsApiAxiosParamCreator;
/**
* PluginsApi - functional programming interface
* @export
*/
const PluginsApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.PluginsApiAxiosParamCreator)(configuration);
return {
/**
* Logs and traces are only returned when the plugin is configured with `emit_logs` / `emit_traces`. Plugin-provided errors are normalized into a consistent payload (`code`, `details`) and a derived message so downstream clients receive a stable shape regardless of how the handler threw. The endpoint supports wildcard route routing, allowing plugins to implement custom routing logic: - `/api/v1/plugins/{plugin_id}/call` - Default endpoint (route = \"\") - `/api/v1/plugins/{plugin_id}/call?route=/verify` - Custom route via query parameter - `/api/v1/plugins/{plugin_id}/call/verify` - Custom route via URL path (route = \"/verify\") The route is passed to the plugin handler via the `context.route` field. You can specify a custom route either by appending it to the URL path or by using the `route` query parameter.
* @summary Execute a plugin with optional wildcard route routing
* @param {string} pluginId The unique identifier of the plugin
* @param {PluginCallRequest} pluginCallRequest
* @param {string} [route] Optional route suffix for custom routing (e.g., \'/verify\'). Alternative to appending the route to the URL path.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
callPlugin(pluginId, pluginCallRequest, route, options) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c;
const localVarAxiosArgs = yield localVarAxiosParamCreator.callPlugin(pluginId, pluginCallRequest, route, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PluginsApi.callPlugin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
});
},
/**
* This endpoint is disabled by default. To enable it for a given plugin, set `allow_get_invocation: true` in the plugin configuration. When invoked via GET: - `params` is an empty object (`{}`) - query parameters are passed to the plugin handler via `context.query` - wildcard route routing is supported the same way as POST (see `doc_call_plugin`) - Use the `route` query parameter or append the route to the URL path
* @summary Execute a plugin via GET (must be enabled per plugin)
* @param {string} pluginId The unique identifier of the plugin
* @param {string} [route] Optional route suffix for custom routing (e.g., \'/verify\'). Alternative to appending the route to the URL path.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
callPluginGet(pluginId, route, options) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c;
const localVarAxiosArgs = yield localVarAxiosParamCreator.callPluginGet(pluginId, route, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PluginsApi.callPluginGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
});
},
/**
*
* @summary Get plugin by ID
* @param {string} pluginId The unique identifier of the plugin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlugin(pluginId, options) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c;
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPlugin(pluginId, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PluginsApi.getPlugin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
});
},
/**
*
* @summary List plugins.
* @param {number} [page] Page number for pagination (starts at 1)
* @param {number} [perPage] Number of items per page (default: 10)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPlugins(page, perPage, options) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c;
const localVarAxiosArgs = yield localVarAxiosParamCreator.listPlugins(page, perPage, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PluginsApi.listPlugins']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
});
},
/**
* Updates mutable plugin fields such as timeout, emit_logs, emit_traces, raw_response, allow_get_invocation, config, and forward_logs. The plugin id and path cannot be changed after creation. All fields are optional - only the provided fields will be updated. To clear the `config` field, pass `\"config\": null`.
* @summary Update plugin configuration
* @param {string} pluginId The unique identifier of the plugin
* @param {UpdatePluginRequest} updatePluginRequest Plugin configuration update. All fields are optional.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updatePlugin(pluginId, updatePluginRequest, options) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c;
const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePlugin(pluginId, updatePluginRequest, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PluginsApi.updatePlugin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
});
},
};
};
exports.PluginsApiFp = PluginsApiFp;
/**
* PluginsApi - factory interface
* @export
*/
const PluginsApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.PluginsApiFp)(configuration);
return {
/**
* Logs and traces are only returned when the plugin is configured with `emit_logs` / `emit_traces`. Plugin-provided errors are normalized into a consistent payload (`code`, `details`) and a derived message so downstream clients receive a stable shape regardless of how the handler threw. The endpoint supports wildcard route routing, allowing plugins to implement custom routing logic: - `/api/v1/plugins/{plugin_id}/call` - Default endpoint (route = \"\") - `/api/v1/plugins/{plugin_id}/call?route=/verify` - Custom route via query parameter - `/api/v1/plugins/{plugin_id}/call/verify` - Custom route via URL path (route = \"/verify\") The route is passed to the plugin handler via the `context.route` field. You can specify a custom route either by appending it to the URL path or by using the `route` query parameter.
* @summary Execute a plugin with optional wildcard route routing
* @param {string} pluginId The unique identifier of the plugin
* @param {PluginCallRequest} pluginCallRequest
* @param {string} [route] Optional route suffix for custom routing (e.g., \'/verify\'). Alternative to appending the route to the URL path.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
callPlugin(pluginId, pluginCallRequest, route, options) {
return localVarFp.callPlugin(pluginId, pluginCallRequest, route, options).then((request) => request(axios, basePath));
},
/**
* This endpoint is disabled by default. To enable it for a given plugin, set `allow_get_invocation: true` in the plugin configuration. When invoked via GET: - `params` is an empty object (`{}`) - query parameters are passed to the plugin handler via `context.query` - wildcard route routing is supported the same way as POST (see `doc_call_plugin`) - Use the `route` query parameter or append the route to the URL path
* @summary Execute a plugin via GET (must be enabled per plugin)
* @param {string} pluginId The unique identifier of the plugin
* @param {string} [route] Optional route suffix for custom routing (e.g., \'/verify\'). Alternative to appending the route to the URL path.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
callPluginGet(pluginId, route, options) {
return localVarFp.callPluginGet(pluginId, route, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get plugin by ID
* @param {string} pluginId The unique identifier of the plugin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlugin(pluginId, options) {
return localVarFp.getPlugin(pluginId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary List plugins.
* @param {number} [page] Page number for pagination (starts at 1)
* @param {number} [perPage] Number of items per page (default: 10)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPlugins(page, perPage, options) {
return localVarFp.listPlugins(page, perPage, options).then((request) => request(axios, basePath));
},
/**
* Updates mutable plugin fields such as timeout, emit_logs, emit_traces, raw_response, allow_get_invocation, config, and forward_logs. The plugin id and path cannot be changed after creation. All fields are optional - only the provided fields will be updated. To clear the `config` field, pass `\"config\": null`.
* @summary Update plugin configuration
* @param {string} pluginId The unique identifier of the plugin
* @param {UpdatePluginRequest} updatePluginRequest Plugin configuration update. All fields are optional.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updatePlugin(pluginId, updatePluginRequest, options) {
return localVarFp.updatePlugin(pluginId, updatePluginRequest, options).then((request) => request(axios, basePath));
},
};
};
exports.PluginsApiFactory = PluginsApiFactory;
/**
* PluginsApi - object-oriented interface
* @export
* @class PluginsApi
* @extends {BaseAPI}
*/
class PluginsApi extends base_1.BaseAPI {
/**
* Logs and traces are only returned when the plugin is configured with `emit_logs` / `emit_traces`. Plugin-provided errors are normalized into a consistent payload (`code`, `details`) and a derived message so downstream clients receive a stable shape regardless of how the handler threw. The endpoint supports wildcard route routing, allowing plugins to implement custom routing logic: - `/api/v1/plugins/{plugin_id}/call` - Default endpoint (route = \"\") - `/api/v1/plugins/{plugin_id}/call?route=/verify` - Custom route via query parameter - `/api/v1/plugins/{plugin_id}/call/verify` - Custom route via URL path (route = \"/verify\") The route is passed to the plugin handler via the `context.route` field. You can specify a custom route either by appending it to the URL path or by using the `route` query parameter.
* @summary Execute a plugin with optional wildcard route routing
* @param {string} pluginId The unique identifier of the plugin
* @param {PluginCallRequest} pluginCallRequest
* @param {string} [route] Optional route suffix for custom routing (e.g., \'/verify\'). Alternative to appending the route to the URL path.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PluginsApi
*/
callPlugin(pluginId, pluginCallRequest, route, options) {
return (0, exports.PluginsApiFp)(this.configuration).callPlugin(pluginId, pluginCallRequest, route, options).then((request) => request(this.axios, this.basePath));
}
/**
* This endpoint is disabled by default. To enable it for a given plugin, set `allow_get_invocation: true` in the plugin configuration. When invoked via GET: - `params` is an empty object (`{}`) - query parameters are passed to the plugin handler via `context.query` - wildcard route routing is supported the same way as POST (see `doc_call_plugin`) - Use the `route` query parameter or append the route to the URL path
* @summary Execute a plugin via GET (must be enabled per plugin)
* @param {string} pluginId The unique identifier of the plugin
* @param {string} [route] Optional route suffix for custom routing (e.g., \'/verify\'). Alternative to appending the route to the URL path.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PluginsApi
*/
callPluginGet(pluginId, route, options) {
return (0, exports.PluginsApiFp)(this.configuration).callPluginGet(pluginId, route, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get plugin by ID
* @param {string} pluginId The unique identifier of the plugin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PluginsApi
*/
getPlugin(pluginId, options) {
return (0, exports.PluginsApiFp)(this.configuration).getPlugin(pluginId, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary List plugins.
* @param {number} [page] Page number for pagination (starts at 1)
* @param {number} [perPage] Number of items per page (default: 10)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PluginsApi
*/
listPlugins(page, perPage, options) {
return (0, exports.PluginsApiFp)(this.configuration).listPlugins(page, perPage, options).then((request) => request(this.axios, this.basePath));
}
/**
* Updates mutable plugin fields such as timeout, emit_logs, emit_traces, raw_response, allow_get_invocation, config, and forward_logs. The plugin id and path cannot be changed after creation. All fields are optional - only the provided fields will be updated. To clear the `config` field, pass `\"config\": null`.
* @summary Update plugin configuration
* @param {string} pluginId The unique identifier of the plugin
* @param {UpdatePluginRequest} updatePluginRequest Plugin configuration update. All fields are optional.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PluginsApi
*/
updatePlugin(pluginId, updatePluginRequest, options) {
return (0, exports.PluginsApiFp)(this.configuration).updatePlugin(pluginId, updatePluginRequest, options).then((request) => request(this.axios, this.basePath));
}
}
exports.PluginsApi = PluginsApi;