AppleIntents.Fulfillment (apple_intents v0.1.0)

Copy Markdown View Source

Main entry point for App Intents server-side fulfillment.

Summary

Types

router()

@type router() :: %{required(String.t()) => module()} | module()

Functions

approve(params, router, opts \\ [])

@spec approve(map(), router(), keyword()) ::
  {:ok, map()} | {:error, AppleIntents.Error.t()}

Resume a delegated intent after human approval.

Expects webhook params with intent_id, request_id, approved, and optional parameters (from the original approval_required response).

encode_response(arg)

@spec encode_response({:ok, map()} | {:error, AppleIntents.Error.t()}) :: map()

verify_and_handle(raw_body, router, opts \\ [])

@spec verify_and_handle(String.t(), router(), keyword()) ::
  {:ok, map()} | {:error, AppleIntents.Error.t()}

verify_only(raw_body, opts \\ [])

@spec verify_only(
  String.t(),
  keyword()
) :: {:ok, AppleIntents.Payload.t()} | {:error, AppleIntents.Error.t()}