cloudflare/cloudflare-typescript

Public

mirrored fromhttps://github.com/cloudflare/cloudflare-typescriptAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v4.0.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/resources/ai/tasks.ts

40lines · modecode

1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
3import { APIResource } from '../../resource';
4import * as Core from '../../core';
5import { SinglePage } from '../../pagination';
6
7export class Tasks extends APIResource {
8 /**
9 * Task Search
10 */
11 list(
12 params: TaskListParams,
13 options?: Core.RequestOptions,
14 ): Core.PagePromise<TaskListResponsesSinglePage, TaskListResponse> {
15 const { account_id } = params;
16 return this._client.getAPIList(
17 `/accounts/${account_id}/ai/tasks/search`,
18 TaskListResponsesSinglePage,
19 options,
20 );
21 }
22}
23
24export class TaskListResponsesSinglePage extends SinglePage<TaskListResponse> {}
25
26export type TaskListResponse = unknown;
27
28export interface TaskListParams {
29 account_id: string;
30}
31
32Tasks.TaskListResponsesSinglePage = TaskListResponsesSinglePage;
33
34export declare namespace Tasks {
35 export {
36 type TaskListResponse as TaskListResponse,
37 TaskListResponsesSinglePage as TaskListResponsesSinglePage,
38 type TaskListParams as TaskListParams,
39 };
40}
41