sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Polly/ ListSpeechSynthesisTasks.ts

import type * as polly from "@distilled.cloud/aws/polly";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Runtime binding for `polly:ListSpeechSynthesisTasks` — list asynchronous
 * synthesis tasks ordered by creation date, optionally filtered by status.
 *
 * The binding takes no arguments and grants the function
 * `polly:ListSpeechSynthesisTasks`. Provide the implementation with
 * `Effect.provide(AWS.Polly.ListSpeechSynthesisTasksHttp)`.
 *
 * ### Asynchronous Synthesis
 * **Example:** List recently completed tasks
 * ```typescript
 * // init
 * const listSpeechSynthesisTasks = yield* AWS.Polly.ListSpeechSynthesisTasks();
 *
 * // runtime
 * const result = yield* listSpeechSynthesisTasks({
 *   Status: "completed",
 *   MaxResults: 10,
 * });
 * const taskIds = (result.SynthesisTasks ?? []).map((task) => task.TaskId);
 * ```
 *
 * @binding
 */
export interface ListSpeechSynthesisTasks extends Binding.Service<
  ListSpeechSynthesisTasks,
  "AWS.Polly.ListSpeechSynthesisTasks",
  () => Effect.Effect<
    (
      request?: polly.ListSpeechSynthesisTasksInput,
    ) => Effect.Effect<polly.ListSpeechSynthesisTasksOutput, polly.ListSpeechSynthesisTasksError>
  >
> {}
export const ListSpeechSynthesisTasks = Binding.Service<ListSpeechSynthesisTasks>(
  "AWS.Polly.ListSpeechSynthesisTasks",
);