@azure-utils/durable-functions
Version:
Utilities for Azure Durable functions.
63 lines (62 loc) • 2.42 kB
TypeScript
/**
* @module
* Helper utils to interact with Azure Functions - Durable Task framework (v2).
*/
/**
* Request options for Azure Functions Durable Task Webhook.
*/
export type RequestAzureFunctionsDurableTaskWebhookOptions = {
/**
* The base URL for the APIs mentioned in this article is the same as the base URL for your function app.
* When developing locally using the Azure Functions Core Tools,
* the base URL is typically http://localhost:7071.
* In the Azure Functions hosted service, the base URL is typically https://{appName}.azurewebsites.net.
* Custom hostnames are also supported if configured on your App Service app.
*/
baseUrl: string;
/**
* The authorization key required to invoke the API.
* systemKey is an authorization key autogenerated by the Azure Functions host.
* It specifically grants access to the Durable Task extension APIs.
*/
systemKey: string;
/**
* The name of the [task hub](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-task-hubs).
* If not specified, the current function app's task hub name is assumed.
*/
taskHub?: string;
/**
* The name of the connection app setting for the backend storage provider.
* If not specified, the default connection configuration for the function app is assumed.
*/
connection?: string;
/**
* The abort signal to cancel the request.
*/
abortSignal?: AbortSignal;
/**
* The HTTP method to use for the request.
*/
method?: "POST" | "GET" | "DELETE" | "PUT";
/**
* The request body to send with the request.
*/
body?: BodyInit;
/**
* The URL search parameters to include in the request.
*/
searchParams?: URLSearchParamsInit;
/**
* The headers to include in the request.
*/
headers?: HeadersInit;
};
/**
* Makes an HTTP Request to Azure Functions Durable Task Webhook.
* @param path URL path to the Durable Task Webhook API.
* @param requestOptions Options for the request.
* @returns The HTTP response from the Durable Task Webhook API.
*/
export declare function requestAzureFunctionsDurableTaskWebhookOrThrow(path: string, requestOptions: RequestAzureFunctionsDurableTaskWebhookOptions): Promise<Response>;
type URLSearchParamsInit = string[][] | Record<string, string> | string | URLSearchParams;
export {};