• Used to define a Connector Push Trigger. Push triggers can be triggered either via POSTing to the /trigger-push-event endpoint, or by calling the handlePushTriggerEvent function.

    Type Parameters

    Returns (<Name, InputParamsSchema, PayloadSchema>(definitionInput) => PushTriggerDefinition<Name, Creds, InputParamsSchema, PayloadSchema>)

      • <Name, InputParamsSchema, PayloadSchema>(definitionInput): PushTriggerDefinition<Name, Creds, InputParamsSchema, PayloadSchema>
      • Type Parameters

        • Name extends string

        • InputParamsSchema extends TObject<TProperties>

        • PayloadSchema extends AnyTriggerPayloadSchemaShape | TriggerPayloadSchemaFn<Creds, InputParamsSchema>

        Parameters

        • definitionInput: PushTriggerDefinitionInput<Name, Creds, InputParamsSchema, PayloadSchema>

        Returns PushTriggerDefinition<Name, Creds, InputParamsSchema, PayloadSchema>

    See

    Triggers

    Example

    import { definePushTrigger } from "@rollout/framework";
    import { MyAppCredential } from "./auth";
    import { inputParamsSchema } from "./input";
    import { payloadSchema } from "./payload";

    export const trigger = definePushTrigger<MyAppCredential>()({
    name: "My Push Trigger",
    inputParamsSchema,
    payloadSchema,
    });