import * as pulumi from "@pulumi/pulumi"; /** * Hooks are secure, self-contained functions that allow you to customize the behavior of Auth0 when executed for selected extensibility points of the Auth0 platform. Auth0 invokes Hooks during runtime to execute your custom Node.js code. Depending on the extensibility point, you can use hooks with Database Connections and/or Passwordless Connections. * * !> This resource is deprecated. Refer to the [guide on how to migrate from hooks to actions](https://auth0.com/docs/customize/actions/migrate/migrate-from-hooks-to-actions) and manage your actions using the `auth0.Action` resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * * const myHook = new auth0.Hook("my_hook", { * name: "My Pre User Registration Hook", * script: ` function (user, context, callback) { * callback(null, { user }); * } * `, * triggerId: "pre-user-registration", * enabled: true, * secrets: { * foo: "bar", * }, * dependencies: { * auth0: "2.30.0", * }, * }); * ``` * * ## Import * * This resource can be imported by specifying the hook ID. * * Example: * * ```sh * $ pulumi import auth0:index/hook:Hook my_hook "00001" * ``` */ export declare class Hook extends pulumi.CustomResource { /** * Get an existing Hook resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: HookState, opts?: pulumi.CustomResourceOptions): Hook; /** * Returns true if the given object is an instance of Hook. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Hook; /** * Dependencies of this hook used by the WebTask server. */ readonly dependencies: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Whether the hook is enabled, or disabled. */ readonly enabled: pulumi.Output; /** * Name of this hook. */ readonly name: pulumi.Output; /** * Code to be executed when this hook runs. */ readonly script: pulumi.Output; /** * The secrets associated with the hook. */ readonly secrets: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Execution stage of this rule. Can be credentials-exchange, pre-user-registration, post-user-registration, post-change-password, or send-phone-message. */ readonly triggerId: pulumi.Output; /** * Create a Hook resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: HookArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Hook resources. */ export interface HookState { /** * Dependencies of this hook used by the WebTask server. */ dependencies?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Whether the hook is enabled, or disabled. */ enabled?: pulumi.Input; /** * Name of this hook. */ name?: pulumi.Input; /** * Code to be executed when this hook runs. */ script?: pulumi.Input; /** * The secrets associated with the hook. */ secrets?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Execution stage of this rule. Can be credentials-exchange, pre-user-registration, post-user-registration, post-change-password, or send-phone-message. */ triggerId?: pulumi.Input; } /** * The set of arguments for constructing a Hook resource. */ export interface HookArgs { /** * Dependencies of this hook used by the WebTask server. */ dependencies?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Whether the hook is enabled, or disabled. */ enabled?: pulumi.Input; /** * Name of this hook. */ name?: pulumi.Input; /** * Code to be executed when this hook runs. */ script: pulumi.Input; /** * The secrets associated with the hook. */ secrets?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Execution stage of this rule. Can be credentials-exchange, pre-user-registration, post-user-registration, post-change-password, or send-phone-message. */ triggerId: pulumi.Input; }