Back to Node Auth0

Class ModulesClient

docs/classes/management.SDK.ModulesClient.html

5.9.113.1 KB
Original Source

Class ModulesClient

Index

Accessors

versions

Constructors

constructor

Methods

listcreategetdeleteupdatelistActionsrollback

Properties

_options_versions

Accessors

versions

get versions(): VersionsClient

Returns VersionsClient

Constructors

constructor

new ModulesClient(options: BaseClientOptions): ModulesClient

Parameters

Returns ModulesClient

Methods

list

list(
request?: GetActionModulesRequestParameters,
requestOptions?: ModulesClient.RequestOptions,
): Promise<Page<ActionModuleListItem, GetActionModulesResponseContent>>

Retrieve a paginated list of all Actions Modules with optional filtering and totals.

Parameters

Request-specific configuration.

Returns Promise<Page<ActionModuleListItem, GetActionModulesResponseContent>>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.actions.modules.list({ page: 1, per_page: 1 })Copy

create

create(
request: CreateActionModuleRequestContent,
requestOptions?: ModulesClient.RequestOptions,
): HttpResponsePromise<CreateActionModuleResponseContent>

Create a new Actions Module for reusable code across actions.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<CreateActionModuleResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.actions.modules.create({ name: "name", code: "code" })Copy

get

get(
id: string,
requestOptions?: ModulesClient.RequestOptions,
): HttpResponsePromise<GetActionModuleResponseContent>

Retrieve details of a specific Actions Module by its unique identifier.

Parameters

  • id: string

The ID of the action module to retrieve.

Request-specific configuration.

Returns HttpResponsePromise<GetActionModuleResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.actions.modules.get("id")Copy

delete

delete(
id: string,
requestOptions?: ModulesClient.RequestOptions,
): HttpResponsePromise<void>

Permanently delete an Actions Module. This will fail if the module is still in use by any actions.

Parameters

  • id: string

The ID of the Actions Module to delete.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.PreconditionFailedError

Throws

Management.TooManyRequestsError

Example

await client.actions.modules.delete("id")Copy

update

update(
id: string,
request?: UpdateActionModuleRequestContent,
requestOptions?: ModulesClient.RequestOptions,
): HttpResponsePromise<UpdateActionModuleResponseContent>

Update properties of an existing Actions Module, such as code, dependencies, or secrets.

Parameters

  • id: string

The ID of the action module to update.

Request-specific configuration.

Returns HttpResponsePromise<UpdateActionModuleResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.actions.modules.update("id")Copy

listActions

listActions(
id: string,
request?: GetActionModuleActionsRequestParameters,
requestOptions?: ModulesClient.RequestOptions,
): Promise<Page<ActionModuleAction, GetActionModuleActionsResponseContent>>

Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module.

Parameters

  • id: string

The unique ID of the module.

Request-specific configuration.

Returns Promise<Page<ActionModuleAction, GetActionModuleActionsResponseContent>>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.actions.modules.listActions("id", { page: 1, per_page: 1 })Copy

rollback

rollback(
id: string,
request: RollbackActionModuleRequestParameters,
requestOptions?: ModulesClient.RequestOptions,
): HttpResponsePromise<RollbackActionModuleResponseContent>

Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft.

Parameters

  • id: string

The unique ID of the module to roll back.

Request-specific configuration.

Returns HttpResponsePromise<RollbackActionModuleResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.actions.modules.rollback("id", { module_version_id: "module_version_id" })Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Protected_versions

_versions: VersionsClient | undefined

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Accessors versions Constructors constructor Methods listcreategetdeleteupdatelistActionsrollback Properties _options_versions