@openzeppelin/relayer-sdk
Version:
OpenZeppelin Relayer SDK
231 lines (230 loc) • 17.5 kB
TypeScript
/**
* 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.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { type RequestArgs, BaseAPI } from '../base';
import type { ApiResponsePaginatedResultPluginModel } from '../models';
import type { ApiResponsePluginModel } from '../models';
import type { ApiResponseValue } from '../models';
import type { PluginCallRequest } from '../models';
import type { UpdatePluginRequest } from '../models';
/**
* PluginsApi - axios parameter creator
* @export
*/
export declare const PluginsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* 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: string, pluginCallRequest: PluginCallRequest, route?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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: string, route?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Get plugin by ID
* @param {string} pluginId The unique identifier of the plugin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlugin: (pluginId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @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?: number, perPage?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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: string, updatePluginRequest: UpdatePluginRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* PluginsApi - functional programming interface
* @export
*/
export declare const PluginsApiFp: (configuration?: Configuration) => {
/**
* 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: string, pluginCallRequest: PluginCallRequest, route?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponseValue>>;
/**
* 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: string, route?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponseValue>>;
/**
*
* @summary Get plugin by ID
* @param {string} pluginId The unique identifier of the plugin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlugin(pluginId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponsePluginModel>>;
/**
*
* @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?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponsePaginatedResultPluginModel>>;
/**
* 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: string, updatePluginRequest: UpdatePluginRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponsePluginModel>>;
};
/**
* PluginsApi - factory interface
* @export
*/
export declare const PluginsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* 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: string, pluginCallRequest: PluginCallRequest, route?: string, options?: RawAxiosRequestConfig): AxiosPromise<ApiResponseValue>;
/**
* 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: string, route?: string, options?: RawAxiosRequestConfig): AxiosPromise<ApiResponseValue>;
/**
*
* @summary Get plugin by ID
* @param {string} pluginId The unique identifier of the plugin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlugin(pluginId: string, options?: RawAxiosRequestConfig): AxiosPromise<ApiResponsePluginModel>;
/**
*
* @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?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiResponsePaginatedResultPluginModel>;
/**
* 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: string, updatePluginRequest: UpdatePluginRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiResponsePluginModel>;
};
/**
* PluginsApi - object-oriented interface
* @export
* @class PluginsApi
* @extends {BaseAPI}
*/
export declare class PluginsApi extends 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: string, pluginCallRequest: PluginCallRequest, route?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ApiResponseValue, any, {}>>;
/**
* 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: string, route?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ApiResponseValue, any, {}>>;
/**
*
* @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: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ApiResponsePluginModel, any, {}>>;
/**
*
* @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?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ApiResponsePaginatedResultPluginModel, any, {}>>;
/**
* 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: string, updatePluginRequest: UpdatePluginRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ApiResponsePluginModel, any, {}>>;
}