From bc10dc63522b2c88b135ca43fc612156c269fa24 Mon Sep 17 00:00:00 2001 From: SferaDev <2181866+SferaDev@users.noreply.github.com> Date: Tue, 16 Dec 2025 08:35:40 +0000 Subject: [PATCH] Update OpenAPI Spec --- .changeset/gpd8ec.md | 5 + packages/cloudflare-api/src/api/components.ts | 823 ++++++++++-------- packages/cloudflare-api/src/api/extra.ts | 31 +- .../cloudflare-api/src/api/requestBodies.ts | 34 +- packages/cloudflare-api/src/api/schemas.ts | 89 +- 5 files changed, 552 insertions(+), 430 deletions(-) create mode 100644 .changeset/gpd8ec.md diff --git a/.changeset/gpd8ec.md b/.changeset/gpd8ec.md new file mode 100644 index 000000000..aaf9b0d76 --- /dev/null +++ b/.changeset/gpd8ec.md @@ -0,0 +1,5 @@ +--- +"cloudflare-api-js": undefined +--- + +undefined \ No newline at end of file diff --git a/packages/cloudflare-api/src/api/components.ts b/packages/cloudflare-api/src/api/components.ts index a26d8bd66..8489eaeba 100644 --- a/packages/cloudflare-api/src/api/components.ts +++ b/packages/cloudflare-api/src/api/components.ts @@ -7390,6 +7390,10 @@ export type AigConfigListGatewayResponse = { payload: string; }[]; } | null; + /** + * @x-auditable true + */ + zdr?: boolean; }[]; success: boolean; }; @@ -7557,6 +7561,10 @@ export type AigConfigCreateGatewayResponse = { payload: string; }[]; } | null; + /** + * @x-auditable true + */ + zdr?: boolean; }; success: boolean; }; @@ -7623,6 +7631,10 @@ export type AigConfigCreateGatewayRequestBody = { * @x-auditable true */ rate_limiting_technique: "fixed" | "sliding"; + /** + * @x-auditable true + */ + zdr?: boolean; }; export type AigConfigCreateGatewayVariables = { @@ -12050,6 +12062,10 @@ export type AigConfigDeleteGatewayResponse = { payload: string; }[]; } | null; + /** + * @x-auditable true + */ + zdr?: boolean; }; success: boolean; }; @@ -12223,6 +12239,10 @@ export type AigConfigFetchGatewayResponse = { payload: string; }[]; } | null; + /** + * @x-auditable true + */ + zdr?: boolean; }; success: boolean; }; @@ -12415,6 +12435,10 @@ export type AigConfigUpdateGatewayResponse = { payload: string; }[]; } | null; + /** + * @x-auditable true + */ + zdr?: boolean; }; success: boolean; }; @@ -12509,6 +12533,10 @@ export type AigConfigUpdateGatewayRequestBody = { payload: string; }[]; } | null; + /** + * @x-auditable true + */ + zdr?: boolean; }; export type AigConfigUpdateGatewayVariables = { @@ -12743,6 +12771,24 @@ export type AiSearchListInstancesResponse = { * @default {"r2_jurisdiction":"default"} */ source_params?: { + /** + * [see original specs] + * + * @example /admin/* + * @example /private/** + * @example *\temp\* + * @maxItems 10 + */ + exclude_items?: string[]; + /** + * [see original specs] + * + * @example /blog/* + * @example [see original specs] + * @example *\blog\*.html + * @maxItems 10 + */ + include_items?: string[]; prefix?: string; /** * @default default @@ -12753,7 +12799,6 @@ export type AiSearchListInstancesResponse = { */ web_crawler?: { parse_options?: { - exclude_regex?: string; include_headers?: { [key: string]: string; }; @@ -12761,7 +12806,6 @@ export type AiSearchListInstancesResponse = { * @default false */ include_images?: boolean; - include_regex?: string; /** * @default false */ @@ -13053,6 +13097,24 @@ export type AiSearchCreateInstancesResponse = { * @default {"r2_jurisdiction":"default"} */ source_params?: { + /** + * [see original specs] + * + * @example /admin/* + * @example /private/** + * @example *\temp\* + * @maxItems 10 + */ + exclude_items?: string[]; + /** + * [see original specs] + * + * @example /blog/* + * @example [see original specs] + * @example *\blog\*.html + * @maxItems 10 + */ + include_items?: string[]; prefix?: string; /** * @default default @@ -13063,7 +13125,6 @@ export type AiSearchCreateInstancesResponse = { */ web_crawler?: { parse_options?: { - exclude_regex?: string; include_headers?: { [key: string]: string; }; @@ -13071,7 +13132,6 @@ export type AiSearchCreateInstancesResponse = { * @default false */ include_images?: boolean; - include_regex?: string; /** * @default false */ @@ -13270,6 +13330,24 @@ export type AiSearchCreateInstancesRequestBody = { * @default {"r2_jurisdiction":"default"} */ source_params?: { + /** + * [see original specs] + * + * @example /admin/* + * @example /private/** + * @example *\temp\* + * @maxItems 10 + */ + exclude_items?: string[]; + /** + * [see original specs] + * + * @example /blog/* + * @example [see original specs] + * @example *\blog\*.html + * @maxItems 10 + */ + include_items?: string[]; prefix?: string; /** * @default default @@ -13280,7 +13358,6 @@ export type AiSearchCreateInstancesRequestBody = { */ web_crawler?: { parse_options?: { - exclude_regex?: string; include_headers?: { [key: string]: string; }; @@ -13288,7 +13365,6 @@ export type AiSearchCreateInstancesRequestBody = { * @default false */ include_images?: boolean; - include_regex?: string; /** * @default false */ @@ -13544,6 +13620,24 @@ export type AiSearchDeleteInstancesResponse = { * @default {"r2_jurisdiction":"default"} */ source_params?: { + /** + * [see original specs] + * + * @example /admin/* + * @example /private/** + * @example *\temp\* + * @maxItems 10 + */ + exclude_items?: string[]; + /** + * [see original specs] + * + * @example /blog/* + * @example [see original specs] + * @example *\blog\*.html + * @maxItems 10 + */ + include_items?: string[]; prefix?: string; /** * @default default @@ -13554,7 +13648,6 @@ export type AiSearchDeleteInstancesResponse = { */ web_crawler?: { parse_options?: { - exclude_regex?: string; include_headers?: { [key: string]: string; }; @@ -13562,7 +13655,6 @@ export type AiSearchDeleteInstancesResponse = { * @default false */ include_images?: boolean; - include_regex?: string; /** * @default false */ @@ -13861,6 +13953,24 @@ export type AiSearchFetchInstancesResponse = { * @default {"r2_jurisdiction":"default"} */ source_params?: { + /** + * [see original specs] + * + * @example /admin/* + * @example /private/** + * @example *\temp\* + * @maxItems 10 + */ + exclude_items?: string[]; + /** + * [see original specs] + * + * @example /blog/* + * @example [see original specs] + * @example *\blog\*.html + * @maxItems 10 + */ + include_items?: string[]; prefix?: string; /** * @default default @@ -13871,7 +13981,6 @@ export type AiSearchFetchInstancesResponse = { */ web_crawler?: { parse_options?: { - exclude_regex?: string; include_headers?: { [key: string]: string; }; @@ -13879,7 +13988,6 @@ export type AiSearchFetchInstancesResponse = { * @default false */ include_images?: boolean; - include_regex?: string; /** * @default false */ @@ -14197,6 +14305,24 @@ export type AiSearchUpdateInstancesResponse = { * @default {"r2_jurisdiction":"default"} */ source_params?: { + /** + * [see original specs] + * + * @example /admin/* + * @example /private/** + * @example *\temp\* + * @maxItems 10 + */ + exclude_items?: string[]; + /** + * [see original specs] + * + * @example /blog/* + * @example [see original specs] + * @example *\blog\*.html + * @maxItems 10 + */ + include_items?: string[]; prefix?: string; /** * @default default @@ -14207,7 +14333,6 @@ export type AiSearchUpdateInstancesResponse = { */ web_crawler?: { parse_options?: { - exclude_regex?: string; include_headers?: { [key: string]: string; }; @@ -14215,7 +14340,6 @@ export type AiSearchUpdateInstancesResponse = { * @default false */ include_images?: boolean; - include_regex?: string; /** * @default false */ @@ -14420,6 +14544,24 @@ export type AiSearchUpdateInstancesRequestBody = { * @default {"r2_jurisdiction":"default"} */ source_params?: { + /** + * [see original specs] + * + * @example /admin/* + * @example /private/** + * @example *\temp\* + * @maxItems 10 + */ + exclude_items?: string[]; + /** + * [see original specs] + * + * @example /blog/* + * @example [see original specs] + * @example *\blog\*.html + * @maxItems 10 + */ + include_items?: string[]; prefix?: string; /** * @default default @@ -14430,7 +14572,6 @@ export type AiSearchUpdateInstancesRequestBody = { */ web_crawler?: { parse_options?: { - exclude_regex?: string; include_headers?: { [key: string]: string; }; @@ -14438,7 +14579,6 @@ export type AiSearchUpdateInstancesRequestBody = { * @default false */ include_images?: boolean; - include_regex?: string; /** * @default false */ @@ -14526,7 +14666,7 @@ export const aiSearchUpdateInstances = ( signal, }); -export type AiSearchInstanceFilesPathParams = { +export type AiSearchInstanceListItemsPathParams = { /** * Use your AI Search ID. * @@ -14542,7 +14682,7 @@ export type AiSearchInstanceFilesPathParams = { accountId: string; }; -export type AiSearchInstanceFilesQueryParams = { +export type AiSearchInstanceListItemsQueryParams = { /** * @default 1 * @minimum 1 @@ -14555,10 +14695,10 @@ export type AiSearchInstanceFilesQueryParams = { */ per_page?: number; search?: string; - status?: "completed" | "queued" | "running" | "error"; + status?: "queued" | "running" | "completed" | "error" | "skipped"; }; -export type AiSearchInstanceFilesError = Fetcher.ErrorWrapper< +export type AiSearchInstanceListItemsError = Fetcher.ErrorWrapper< | { status: 404; payload: { @@ -14593,10 +14733,17 @@ export type AiSearchInstanceFilesError = Fetcher.ErrorWrapper< } >; -export type AiSearchInstanceFilesResponse = { +export type AiSearchInstanceListItemsResponse = { result: { - error: string; + error?: string; + id: string; key: string; + /** + * @format date-time + */ + last_seen_at?: string; + next_action?: string; + status: "queued" | "running" | "completed" | "error" | "skipped"; }[]; result_info: { count: number; @@ -14612,24 +14759,110 @@ export type AiSearchInstanceFilesResponse = { success: boolean; }; -export type AiSearchInstanceFilesVariables = { - pathParams: AiSearchInstanceFilesPathParams; - queryParams?: AiSearchInstanceFilesQueryParams; +export type AiSearchInstanceListItemsVariables = { + pathParams: AiSearchInstanceListItemsPathParams; + queryParams?: AiSearchInstanceListItemsQueryParams; +} & FetcherExtraProps; + +export const aiSearchInstanceListItems = ( + variables: AiSearchInstanceListItemsVariables, + signal?: AbortSignal, +) => + fetch< + AiSearchInstanceListItemsResponse, + AiSearchInstanceListItemsError, + undefined, + {}, + AiSearchInstanceListItemsQueryParams, + AiSearchInstanceListItemsPathParams + >({ + url: "/accounts/{accountId}/ai-search/instances/{id}/items", + method: "get", + ...variables, + signal, + }); + +export type AiSearchInstanceGetItemPathParams = { + /** + * Use your AI Search ID. + * + * @example my-ai-search + * @maxLength 32 + * @minLength 1 + * @pattern ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ + */ + id: string; + itemId: string; + /** + * @example c3dc5f0b34a14ff8e1b3ec04895e1b22 + */ + accountId: string; +}; + +export type AiSearchInstanceGetItemError = Fetcher.ErrorWrapper< + | { + status: 400; + payload: { + errors: { + message: string; + }[]; + result: Record; + /** + * @example false + */ + success: boolean; + }; + } + | { + status: 500; + payload: { + errors: { + /** + * @example 7000 + */ + code: number; + /** + * @example Internal Error + */ + message: string; + }[]; + success: false; + }; + } +>; + +export type AiSearchInstanceGetItemResponse = { + result: { + error?: string; + id: string; + key: string; + /** + * @format date-time + */ + last_seen_at?: string; + next_action?: string; + status: "queued" | "running" | "completed" | "error" | "skipped"; + }; + success: boolean; +}; + +export type AiSearchInstanceGetItemVariables = { + pathParams: AiSearchInstanceGetItemPathParams; } & FetcherExtraProps; -export const aiSearchInstanceFiles = ( - variables: AiSearchInstanceFilesVariables, +export const aiSearchInstanceGetItem = ( + variables: AiSearchInstanceGetItemVariables, signal?: AbortSignal, ) => fetch< - AiSearchInstanceFilesResponse, - AiSearchInstanceFilesError, + AiSearchInstanceGetItemResponse, + AiSearchInstanceGetItemError, undefined, {}, - AiSearchInstanceFilesQueryParams, - AiSearchInstanceFilesPathParams + {}, + AiSearchInstanceGetItemPathParams >({ - url: "/accounts/{accountId}/ai-search/instances/{id}/files", + url: "/accounts/{accountId}/ai-search/instances/{id}/items/{itemId}", method: "get", ...variables, signal, @@ -14738,6 +14971,88 @@ export const aiSearchInstanceListJobs = ( signal, }); +export type AiSearchInstanceCreateJobPathParams = { + /** + * Use your AI Search ID. + * + * @example my-ai-search + * @maxLength 32 + * @minLength 1 + * @pattern ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ + */ + id: string; + /** + * @example c3dc5f0b34a14ff8e1b3ec04895e1b22 + */ + accountId: string; +}; + +export type AiSearchInstanceCreateJobError = Fetcher.ErrorWrapper< + | { + status: 400; + payload: { + errors: { + message: string; + }[]; + result: Record; + /** + * @example false + */ + success: boolean; + }; + } + | { + status: 500; + payload: { + errors: { + /** + * @example 7000 + */ + code: number; + /** + * @example Internal Error + */ + message: string; + }[]; + success: false; + }; + } +>; + +export type AiSearchInstanceCreateJobResponse = { + result: { + end_reason?: string; + ended_at?: string; + id: string; + last_seen_at?: string; + source: "user" | "schedule"; + started_at?: string; + }; + success: boolean; +}; + +export type AiSearchInstanceCreateJobVariables = { + pathParams: AiSearchInstanceCreateJobPathParams; +} & FetcherExtraProps; + +export const aiSearchInstanceCreateJob = ( + variables: AiSearchInstanceCreateJobVariables, + signal?: AbortSignal, +) => + fetch< + AiSearchInstanceCreateJobResponse, + AiSearchInstanceCreateJobError, + undefined, + {}, + {}, + AiSearchInstanceCreateJobPathParams + >({ + url: "/accounts/{accountId}/ai-search/instances/{id}/jobs", + method: "post", + ...variables, + signal, + }); + export type AiSearchInstanceGetJobPathParams = { /** * Use your AI Search ID. @@ -14972,6 +15287,7 @@ export type AiSearchStatsResponse = { last_activity?: string; queued?: number; running?: number; + skipped?: number; }; success: boolean; }; @@ -14998,83 +15314,6 @@ export const aiSearchStats = ( signal, }); -export type AiSearchSyncPathParams = { - /** - * Use your AI Search ID. - * - * @example my-ai-search - * @maxLength 32 - * @minLength 1 - * @pattern ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ - */ - id: string; - /** - * @example c3dc5f0b34a14ff8e1b3ec04895e1b22 - */ - accountId: string; -}; - -export type AiSearchSyncError = Fetcher.ErrorWrapper< - | { - status: 400; - payload: { - errors: { - message: string; - }[]; - result: Record; - /** - * @example false - */ - success: boolean; - }; - } - | { - status: 500; - payload: { - errors: { - /** - * @example 7000 - */ - code: number; - /** - * @example Internal Error - */ - message: string; - }[]; - success: false; - }; - } ->; - -export type AiSearchSyncResponse = { - result: { - job_id: string; - }; - success: boolean; -}; - -export type AiSearchSyncVariables = { - pathParams: AiSearchSyncPathParams; -} & FetcherExtraProps; - -export const aiSearchSync = ( - variables: AiSearchSyncVariables, - signal?: AbortSignal, -) => - fetch< - AiSearchSyncResponse, - AiSearchSyncError, - undefined, - {}, - {}, - AiSearchSyncPathParams - >({ - url: "/accounts/{accountId}/ai-search/instances/{id}/sync", - method: "patch", - ...variables, - signal, - }); - export type AiSearchListTokensPathParams = { /** * @example c3dc5f0b34a14ff8e1b3ec04895e1b22 @@ -77054,26 +77293,12 @@ export type DlpEntriesListAllEntriesError = Fetcher.ErrorWrapper<{ }>; export type DlpEntriesListAllEntriesResponse = Schemas.DlpApiResponseSingle & { - result?: ( - | (Schemas.DlpCustomEntry & { - type: "custom"; - }) - | (Schemas.DlpPredefinedEntry & { - type: "predefined"; - }) - | (Schemas.DlpIntegrationEntry & { - type: "integration"; - }) - | (Schemas.DlpExactDataEntry & { - type: "exact_data"; - }) - | (Schemas.DlpDocumentFingerprintEntry & { - type: "document_fingerprint"; - }) - | (Schemas.DlpWordListEntry & { - type: "word_list"; - }) - )[]; + result?: (Schemas.DlpEntry & { + /** + * @x-stainless-terraform-configurability computed_optional + */ + upload_status?: Schemas.DlpDatasetUploadStatus; + })[]; }; export type DlpEntriesListAllEntriesVariables = { @@ -77600,7 +77825,10 @@ export type DlpEntriesGetDlpEntryError = Fetcher.ErrorWrapper<{ }>; export type DlpEntriesGetDlpEntryResponse = Schemas.DlpApiResponseSingle & { - result?: Schemas.DlpEntry & { + result?: Schemas.DlpEntryWithUploadStatus & { + /** + * @x-stainless-terraform-configurability computed_optional + */ profiles: Schemas.DlpEntryProfile[]; }; }; @@ -79065,6 +79293,41 @@ export const dnsFirewallUpdateDnsFirewallClusterReverseDns = ( signal, }); +export type DnsRecordsForAnAccountGetUsagePathParams = { + accountId: Schemas.DnsRecordsIdentifier; +}; + +export type DnsRecordsForAnAccountGetUsageError = Fetcher.ErrorWrapper<{ + status: 400; + payload: Schemas.DnsRecordsDnsResponseAccountUsage & + Schemas.DnsRecordsApiResponseCommonFailure; +}>; + +export type DnsRecordsForAnAccountGetUsageVariables = { + pathParams: DnsRecordsForAnAccountGetUsagePathParams; +} & FetcherExtraProps; + +/** + * Get the current DNS record usage and quota for an account. May include internal DNS usage and quota. + */ +export const dnsRecordsForAnAccountGetUsage = ( + variables: DnsRecordsForAnAccountGetUsageVariables, + signal?: AbortSignal, +) => + fetch< + Schemas.DnsRecordsDnsResponseAccountUsage, + DnsRecordsForAnAccountGetUsageError, + undefined, + {}, + {}, + DnsRecordsForAnAccountGetUsagePathParams + >({ + url: "/accounts/{accountId}/dns_records/usage", + method: "get", + ...variables, + signal, + }); + export type DnsSettingsForAnAccountListDnsSettingsPathParams = { accountId: Schemas.DnsSettingsIdentifier; }; @@ -90190,6 +90453,10 @@ export type AuditLogsV2GetAccountAuditLogsQueryParams = { actor_token_id?: string[]; actor_token_name?: string[]; actor_type?: ("account" | "cloudflare_admin" | "system" | "user")[]; + /** + * @deprecated true + */ + audit_log_id?: string[]; id?: string[]; raw_cf_ray_id?: string[]; raw_method?: string[]; @@ -90220,6 +90487,10 @@ export type AuditLogsV2GetAccountAuditLogsQueryParams = { ["actor_token_id.not"]?: string[]; ["actor_token_name.not"]?: string[]; ["actor_type.not"]?: ("account" | "cloudflare_admin" | "system" | "user")[]; + /** + * @deprecated true + */ + ["audit_log_id.not"]?: string[]; ["id.not"]?: string[]; ["raw_cf_ray_id.not"]?: string[]; ["raw_method.not"]?: string[]; @@ -105031,12 +105302,8 @@ export type CreateAppResponse = { success?: boolean; }; -export type CreateAppRequestBody = { - name?: string; -}; - export type CreateAppVariables = { - body?: CreateAppRequestBody; + body: RequestBodies.RealtimekitCreateApp; pathParams: CreateAppPathParams; } & FetcherExtraProps; @@ -105050,7 +105317,7 @@ export const createApp = ( fetch< CreateAppResponse, CreateAppError, - CreateAppRequestBody, + RequestBodies.RealtimekitCreateApp, {}, {}, CreateAppPathParams @@ -105169,77 +105436,6 @@ export const getOrgAnalytics = ( signal, }); -export type GetLivestreamAnalyticsDaywisePathParams = { - accountId: Schemas.RealtimekitAccountIdentifier; - appId: Schemas.RealtimekitAppId; -}; - -export type GetLivestreamAnalyticsDaywiseQueryParams = { - /** - * Specify the start time range in ISO format to access the livestream analytics. - * - * @format date-time - */ - start_time?: string; - /** - * Specify the end time range in ISO format to access the livestream analytics. - * - * @format date-time - */ - end_time?: string; -}; - -export type GetLivestreamAnalyticsDaywiseError = - Fetcher.ErrorWrapper; - -export type GetLivestreamAnalyticsDaywiseResponse = { - data?: { - /** - * Count of total livestreams. - */ - count?: string; - /** - * The livestream timestamp, provided in ISO format. - */ - date?: string; - /** - * Total time duration for which the input was given or the meeting was streamed. - */ - total_ingest_seconds?: string; - /** - * Total view time for which the viewers watched the stream. - */ - total_viewer_seconds?: string; - }; - success?: boolean; -}; - -export type GetLivestreamAnalyticsDaywiseVariables = { - pathParams: GetLivestreamAnalyticsDaywisePathParams; - queryParams?: GetLivestreamAnalyticsDaywiseQueryParams; -} & FetcherExtraProps; - -/** - * Returns day-wise livestream analytics data for the specified time range. - */ -export const getLivestreamAnalyticsDaywise = ( - variables: GetLivestreamAnalyticsDaywiseVariables, - signal?: AbortSignal, -) => - fetch< - GetLivestreamAnalyticsDaywiseResponse, - GetLivestreamAnalyticsDaywiseError, - undefined, - {}, - GetLivestreamAnalyticsDaywiseQueryParams, - GetLivestreamAnalyticsDaywisePathParams - >({ - url: "/accounts/{accountId}/realtime/kit/{appId}/analytics/livestreams/daywise", - method: "get", - ...variables, - signal, - }); - export type GetLivestreamAnalyticsCompletePathParams = { accountId: Schemas.RealtimekitAccountIdentifier; appId: Schemas.RealtimekitAppId; @@ -105872,162 +106068,6 @@ export const getV2ActiveLivestreamSessionDetails = ( signal, }); -export type DisableLivestreamPathParams = { - accountId: Schemas.RealtimekitAccountIdentifier; - appId: Schemas.RealtimekitAppId; - livestreamId: string; -}; - -export type DisableLivestreamError = Fetcher.ErrorWrapper; - -export type DisableLivestreamResponse = { - LivestreamBase?: Schemas.RealtimekitLivestreamBase; - success?: Schemas.RealtimekitSuccess; -}; - -export type DisableLivestreamVariables = { - pathParams: DisableLivestreamPathParams; -} & FetcherExtraProps; - -/** - * Disables a livestream for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API. - */ -export const disableLivestream = ( - variables: DisableLivestreamVariables, - signal?: AbortSignal, -) => - fetch< - DisableLivestreamResponse, - DisableLivestreamError, - undefined, - {}, - {}, - DisableLivestreamPathParams - >({ - url: "/accounts/{accountId}/realtime/kit/{appId}/livestreams/{livestreamId}/disable", - method: "put", - ...variables, - signal, - }); - -export type EnableLivestreamPathParams = { - accountId: Schemas.RealtimekitAccountIdentifier; - appId: Schemas.RealtimekitAppId; - livestreamId: string; -}; - -export type EnableLivestreamError = Fetcher.ErrorWrapper; - -export type EnableLivestreamResponse = { - data?: Schemas.RealtimekitLivestreamBase; - success?: boolean; -}; - -export type EnableLivestreamVariables = { - pathParams: EnableLivestreamPathParams; -} & FetcherExtraProps; - -/** - * Enables a livestream for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API. - */ -export const enableLivestream = ( - variables: EnableLivestreamVariables, - signal?: AbortSignal, -) => - fetch< - EnableLivestreamResponse, - EnableLivestreamError, - undefined, - {}, - {}, - EnableLivestreamPathParams - >({ - url: "/accounts/{accountId}/realtime/kit/{appId}/livestreams/{livestreamId}/enable", - method: "put", - ...variables, - signal, - }); - -export type ResetStreamKeyPathParams = { - accountId: Schemas.RealtimekitAccountIdentifier; - appId: Schemas.RealtimekitAppId; - livestreamId: string; -}; - -export type ResetStreamKeyError = Fetcher.ErrorWrapper; - -export type ResetStreamKeyResponse = { - data?: { - /** - * Timestamp the object was created at. The time is returned in ISO format. - * - * @format date-time - */ - created_at?: string; - /** - * Specifies if the livestream was disabled. - */ - disabled?: string; - /** - * The ID of the livestream. - */ - id?: string; - /** - * The server URL to which the RTMP encoder sends the video and audio data. - */ - ingest_server?: string; - /** - * The ID of the meeting. - */ - meeting_id?: string; - /** - * Name of the livestream. - */ - name?: string; - /** - * The web address that viewers can use to watch the livestream. - */ - playback_url?: string; - status?: "LIVE" | "IDLE" | "ERRORED" | "INVOKED"; - /** - * Unique key for accessing each livestream. - */ - stream_key?: string; - /** - * Timestamp the object was updated at. The time is returned in ISO format. - * - * @format date-time - */ - updated_at?: string; - }; - success?: boolean; -}; - -export type ResetStreamKeyVariables = { - pathParams: ResetStreamKeyPathParams; -} & FetcherExtraProps; - -/** - * Resets the stream key for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API. - */ -export const resetStreamKey = ( - variables: ResetStreamKeyVariables, - signal?: AbortSignal, -) => - fetch< - ResetStreamKeyResponse, - ResetStreamKeyError, - undefined, - {}, - {}, - ResetStreamKeyPathParams - >({ - url: "/accounts/{accountId}/realtime/kit/{appId}/livestreams/{livestreamId}/reset-stream-key", - method: "post", - ...variables, - signal, - }); - export type GetAllMeetingsPathParams = { accountId: Schemas.RealtimekitAccountIdentifier; appId: Schemas.RealtimekitAppId; @@ -106434,7 +106474,7 @@ export type KickPartcipantsError = Fetcher.ErrorWrapper<{ }>; export type KickPartcipantsVariables = { - body?: RequestBodies.RealtimekitKickParticipantsBody; + body: RequestBodies.RealtimekitKickParticipantsBody; pathParams: KickPartcipantsPathParams; } & FetcherExtraProps; @@ -106507,7 +106547,7 @@ export type MuteParticipantsPathParams = { export type MuteParticipantsError = Fetcher.ErrorWrapper; export type MuteParticipantsVariables = { - body?: RequestBodies.RealtimekitKickParticipantsBody; + body: RequestBodies.RealtimekitKickParticipantsBody; pathParams: MuteParticipantsPathParams; } & FetcherExtraProps; @@ -106544,7 +106584,7 @@ export type MuteAllParticipantsPathParams = { export type MuteAllParticipantsError = Fetcher.ErrorWrapper; export type MuteAllParticipantsVariables = { - body?: RequestBodies.RealtimekitMuteAllParticipantsBody; + body: RequestBodies.RealtimekitMuteAllParticipantsBody; pathParams: MuteAllParticipantsPathParams; } & FetcherExtraProps; @@ -106581,7 +106621,7 @@ export type CreatePollPathParams = { export type CreatePollError = Fetcher.ErrorWrapper; export type CreatePollVariables = { - body?: RequestBodies.RealtimekitCreatePollBody; + body: RequestBodies.RealtimekitCreatePollBody; pathParams: CreatePollPathParams; } & FetcherExtraProps; @@ -207461,6 +207501,41 @@ export const dnsRecordsForAZoneTriggerDnsScan = ( signal, }); +export type DnsRecordsForAZoneGetUsagePathParams = { + zoneId: Schemas.DnsRecordsIdentifier; +}; + +export type DnsRecordsForAZoneGetUsageError = Fetcher.ErrorWrapper<{ + status: 400; + payload: Schemas.DnsRecordsDnsResponseZoneUsage & + Schemas.DnsRecordsApiResponseCommonFailure; +}>; + +export type DnsRecordsForAZoneGetUsageVariables = { + pathParams: DnsRecordsForAZoneGetUsagePathParams; +} & FetcherExtraProps; + +/** + * Get the current DNS record usage for a zone, including the number of records and the quota limit. + */ +export const dnsRecordsForAZoneGetUsage = ( + variables: DnsRecordsForAZoneGetUsageVariables, + signal?: AbortSignal, +) => + fetch< + Schemas.DnsRecordsDnsResponseZoneUsage, + DnsRecordsForAZoneGetUsageError, + undefined, + {}, + {}, + DnsRecordsForAZoneGetUsagePathParams + >({ + url: "/zones/{zoneId}/dns_records/usage", + method: "get", + ...variables, + signal, + }); + export type DnsRecordsForAZoneDeleteDnsRecordPathParams = { dnsRecordId: Schemas.DnsRecordsIdentifier; zoneId: Schemas.DnsRecordsIdentifier; @@ -222564,12 +222639,15 @@ export const operationsByTag = { aiSearchDeleteInstances, aiSearchFetchInstances, aiSearchUpdateInstances, - aiSearchInstanceFiles, aiSearchStats, - aiSearchSync, + }, + aISearchInstancesItems: { + aiSearchInstanceListItems, + aiSearchInstanceGetItem, }, aISearchInstancesJobs: { aiSearchInstanceListJobs, + aiSearchInstanceCreateJob, aiSearchInstanceGetJob, aiSearchInstanceListJobLogs, }, @@ -223253,6 +223331,7 @@ export const operationsByTag = { dnsFirewallAnalyticsTable, dnsFirewallAnalyticsByTime, }, + dNSRecordsForAnAccount: { dnsRecordsForAnAccountGetUsage }, dNSSettingsForAnAccount: { dnsSettingsForAnAccountListDnsSettings, dnsSettingsForAnAccountUpdateDnsSettings, @@ -223918,26 +223997,19 @@ export const operationsByTag = { organizationsModifyProfile, }, liveStreams: { - getLivestreamAnalyticsDaywise, getLivestreamAnalyticsComplete, fetchAllLivestreams, postAccountsAccountIdRealtimeKitAppIdLivestreams, getV2LivestreamsLivestreamSessionId, getV2LivestreamSessionLivestreamId, getV2ActiveLivestreamSessionDetails, - disableLivestream, - enableLivestream, - resetStreamKey, getV2MeetingsMeetingIdActiveLivestream, stopLivestreaming, livestreamSessionDetails, startLivestreaming, getV2LivestreamsessionSessionMeetingIdActiveLivestream, }, - livestreamAnalytics: { - getLivestreamAnalyticsDaywise, - getLivestreamAnalyticsComplete, - }, + livestreamAnalytics: { getLivestreamAnalyticsComplete }, meetings: { getAllMeetings, createMeeting, @@ -225081,6 +225153,7 @@ export const operationsByTag = { dnsRecordsForAZoneReviewDnsScan, dnsRecordsForAZoneApplyDnsScanResults, dnsRecordsForAZoneTriggerDnsScan, + dnsRecordsForAZoneGetUsage, dnsRecordsForAZoneDeleteDnsRecord, dnsRecordsForAZoneDnsRecordDetails, dnsRecordsForAZonePatchDnsRecord, diff --git a/packages/cloudflare-api/src/api/extra.ts b/packages/cloudflare-api/src/api/extra.ts index c303fe1d8..2e6ee28f1 100644 --- a/packages/cloudflare-api/src/api/extra.ts +++ b/packages/cloudflare-api/src/api/extra.ts @@ -189,12 +189,13 @@ import { aiSearchDeleteInstances, aiSearchFetchInstances, aiSearchUpdateInstances, - aiSearchInstanceFiles, + aiSearchInstanceListItems, + aiSearchInstanceGetItem, aiSearchInstanceListJobs, + aiSearchInstanceCreateJob, aiSearchInstanceGetJob, aiSearchInstanceListJobLogs, aiSearchStats, - aiSearchSync, aiSearchListTokens, aiSearchCreateTokens, aiSearchDeleteTokens, @@ -719,6 +720,7 @@ import { dnsFirewallAnalyticsByTime, dnsFirewallShowDnsFirewallClusterReverseDns, dnsFirewallUpdateDnsFirewallClusterReverseDns, + dnsRecordsForAnAccountGetUsage, dnsSettingsForAnAccountListDnsSettings, dnsSettingsForAnAccountUpdateDnsSettings, dnsViewsForAnAccountListInternalDnsViews, @@ -1242,16 +1244,12 @@ import { getApps, createApp, getOrgAnalytics, - getLivestreamAnalyticsDaywise, getLivestreamAnalyticsComplete, fetchAllLivestreams, postAccountsAccountIdRealtimeKitAppIdLivestreams, getV2LivestreamsLivestreamSessionId, getV2LivestreamSessionLivestreamId, getV2ActiveLivestreamSessionDetails, - disableLivestream, - enableLivestream, - resetStreamKey, getAllMeetings, createMeeting, getMeeting, @@ -2170,6 +2168,7 @@ import { dnsRecordsForAZoneReviewDnsScan, dnsRecordsForAZoneApplyDnsScanResults, dnsRecordsForAZoneTriggerDnsScan, + dnsRecordsForAZoneGetUsage, dnsRecordsForAZoneDeleteDnsRecord, dnsRecordsForAZoneDnsRecordDetails, dnsRecordsForAZonePatchDnsRecord, @@ -2876,16 +2875,19 @@ export const operationsByPath = { "GET /accounts/{account_id}/ai-search/instances/{id}": aiSearchFetchInstances, "PUT /accounts/{account_id}/ai-search/instances/{id}": aiSearchUpdateInstances, - "GET /accounts/{account_id}/ai-search/instances/{id}/files": - aiSearchInstanceFiles, + "GET /accounts/{account_id}/ai-search/instances/{id}/items": + aiSearchInstanceListItems, + "GET /accounts/{account_id}/ai-search/instances/{id}/items/{item_id}": + aiSearchInstanceGetItem, "GET /accounts/{account_id}/ai-search/instances/{id}/jobs": aiSearchInstanceListJobs, + "POST /accounts/{account_id}/ai-search/instances/{id}/jobs": + aiSearchInstanceCreateJob, "GET /accounts/{account_id}/ai-search/instances/{id}/jobs/{job_id}": aiSearchInstanceGetJob, "GET /accounts/{account_id}/ai-search/instances/{id}/jobs/{job_id}/logs": aiSearchInstanceListJobLogs, "GET /accounts/{account_id}/ai-search/instances/{id}/stats": aiSearchStats, - "PATCH /accounts/{account_id}/ai-search/instances/{id}/sync": aiSearchSync, "GET /accounts/{account_id}/ai-search/tokens": aiSearchListTokens, "POST /accounts/{account_id}/ai-search/tokens": aiSearchCreateTokens, "DELETE /accounts/{account_id}/ai-search/tokens/{id}": aiSearchDeleteTokens, @@ -3825,6 +3827,8 @@ export const operationsByPath = { dnsFirewallShowDnsFirewallClusterReverseDns, "PATCH /accounts/{account_id}/dns_firewall/{dns_firewall_id}/reverse_dns": dnsFirewallUpdateDnsFirewallClusterReverseDns, + "GET /accounts/{account_id}/dns_records/usage": + dnsRecordsForAnAccountGetUsage, "GET /accounts/{account_id}/dns_settings": dnsSettingsForAnAccountListDnsSettings, "PATCH /accounts/{account_id}/dns_settings": @@ -4791,8 +4795,6 @@ export const operationsByPath = { "POST /accounts/{account_id}/realtime/kit/apps": createApp, "GET /accounts/{account_id}/realtime/kit/{app_id}/analytics/daywise": getOrgAnalytics, - "GET /accounts/{account_id}/realtime/kit/{app_id}/analytics/livestreams/daywise": - getLivestreamAnalyticsDaywise, "GET /accounts/{account_id}/realtime/kit/{app_id}/analytics/livestreams/overall": getLivestreamAnalyticsComplete, "GET /accounts/{account_id}/realtime/kit/{app_id}/livestreams": @@ -4805,12 +4807,6 @@ export const operationsByPath = { getV2LivestreamSessionLivestreamId, "GET /accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}/active-livestream-session": getV2ActiveLivestreamSessionDetails, - "PUT /accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}/disable": - disableLivestream, - "PUT /accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}/enable": - enableLivestream, - "POST /accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}/reset-stream-key": - resetStreamKey, "GET /accounts/{account_id}/realtime/kit/{app_id}/meetings": getAllMeetings, "POST /accounts/{account_id}/realtime/kit/{app_id}/meetings": createMeeting, "GET /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}": @@ -6341,6 +6337,7 @@ export const operationsByPath = { dnsRecordsForAZoneApplyDnsScanResults, "POST /zones/{zone_id}/dns_records/scan/trigger": dnsRecordsForAZoneTriggerDnsScan, + "GET /zones/{zone_id}/dns_records/usage": dnsRecordsForAZoneGetUsage, "DELETE /zones/{zone_id}/dns_records/{dns_record_id}": dnsRecordsForAZoneDeleteDnsRecord, "GET /zones/{zone_id}/dns_records/{dns_record_id}": diff --git a/packages/cloudflare-api/src/api/requestBodies.ts b/packages/cloudflare-api/src/api/requestBodies.ts index ef24d2c50..68b27451c 100644 --- a/packages/cloudflare-api/src/api/requestBodies.ts +++ b/packages/cloudflare-api/src/api/requestBodies.ts @@ -164,6 +164,10 @@ export type RealtimekitAddParticipantBody = { preset_name: string; }; +export type RealtimekitCreateApp = { + name: string; +}; + export type RealtimekitCreateMeetingBody = { ai_config?: Schemas.RealtimekitAIConfig; /** @@ -178,16 +182,6 @@ export type RealtimekitCreateMeetingBody = { * @default false */ persist_chat?: boolean; - /** - * The region in which this meeting should be created. - */ - preferred_region?: - | "ap-south-1" - | "ap-southeast-1" - | "us-east-1" - | "eu-central-1" - | any - | null; /** * Specifies if the meeting should start getting recorded as soon as someone joins the meeting. * @@ -227,11 +221,11 @@ export type RealtimekitCreatePollBody = { /** * Different options for the question */ - options?: string[]; + options: string[]; /** * Question of the poll */ - question?: string; + question: string; }; export type RealtimekitCreatePresetBody = Schemas.RealtimekitPreset; @@ -256,15 +250,15 @@ export type RealtimekitEditParticipantBody = { }; export type RealtimekitKickParticipantsBody = { - custom_participant_ids?: string[]; - participant_ids?: string[]; + custom_participant_ids: string[]; + participant_ids: string[]; }; export type RealtimekitMuteAllParticipantsBody = { /** * if false, participants won't be able to unmute themselves after they are muted */ - allow_unmute?: boolean; + allow_unmute: boolean; }; export type RealtimekitStartRecording = { @@ -316,7 +310,7 @@ export type RealtimekitStartTrackRecordingBody = { /** * ID of the meeting to record. */ - meeting_id?: string; + meeting_id: string; }; export type RealtimekitUpdateMeetingBody = { @@ -333,14 +327,6 @@ export type RealtimekitUpdateMeetingBody = { * @default false */ persist_chat?: boolean; - /** - * The region in which this meeting should be created. - */ - preferred_region?: - | "ap-south-1" - | "ap-southeast-1" - | "us-east-1" - | "eu-central-1"; /** * Specifies if the meeting should start getting recorded as soon as someone joins the meeting. * diff --git a/packages/cloudflare-api/src/api/schemas.ts b/packages/cloudflare-api/src/api/schemas.ts index afb00202f..f78f15263 100644 --- a/packages/cloudflare-api/src/api/schemas.ts +++ b/packages/cloudflare-api/src/api/schemas.ts @@ -19027,13 +19027,20 @@ export type DlpEntryUpdateType = type: "integration"; }; -export type DlpEntryWithSharedProfiles = DlpEntry & { +export type DlpEntryWithSharedProfiles = DlpEntryWithUploadStatus & { /** * @x-stainless-terraform-configurability computed_optional */ profiles: DlpEntryProfile[]; }; +export type DlpEntryWithUploadStatus = DlpEntry & { + /** + * @x-stainless-terraform-configurability computed_optional + */ + upload_status?: DlpDatasetUploadStatus; +}; + export type DlpExactDataEntry = { /** * Only applies to custom word lists. @@ -21695,6 +21702,39 @@ export type DnsRecordsDnsResponseReviewScanObject = { rejects?: DnsRecordsIdentifier[]; }; +export type DnsRecordsDnsResponseAccountUsage = DnsRecordsApiResponseSingle & { + result?: { + /** + * Maximum number of DNS records allowed across all internal zones in the account. Only present if internal DNS is enabled. + * + * @example 1000000 + * @minimum 0 + */ + internal_record_quota?: number | null; + /** + * Current number of DNS records across all internal zones in the account. Only present if internal DNS is enabled. + * + * @example 5000 + * @minimum 0 + */ + internal_record_usage?: number | null; + /** + * Maximum number of DNS records allowed across all public zones in the account. Null if using zone-level quota. + * + * @example 1000000 + * @minimum 0 + */ + record_quota?: number | null; + /** + * Current number of DNS records across all public zones in the account. + * + * @example 5000 + * @minimum 0 + */ + record_usage?: number; + }; +}; + export type DnsRecordsDnsResponseBatch = DnsRecordsApiResponseSingle & { result?: DnsRecordsDnsResponseBatchObject; }; @@ -21731,6 +21771,25 @@ export type DnsRecordsDnsResponseSingle = DnsRecordsApiResponseSingle & { export type DnsRecordsDnsResponseTriggerScan = DnsRecordsApiResponseSingle; +export type DnsRecordsDnsResponseZoneUsage = DnsRecordsApiResponseSingle & { + result?: { + /** + * Maximum number of DNS records allowed for the zone. Null if using account-level quota. + * + * @example 200 + * @minimum 0 + */ + record_quota?: number | null; + /** + * Current number of DNS records in the zone. + * + * @example 150 + * @minimum 0 + */ + record_usage?: number; + }; +}; + /** * Identifier. * @@ -30810,7 +30869,7 @@ export type LoadBalancingLoadShedding = { * @x-auditable true */ session_policy?: "hash"; -}; +} | null; /** * Controls location-based steering for non-proxied requests. See `steering_policy` to learn how steering is affected. @@ -31218,7 +31277,7 @@ export type LoadBalancingOriginSteering = { | "hash" | "least_outstanding_requests" | "least_connections"; -}; +} | null; /** * The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. @@ -31313,7 +31372,7 @@ export type LoadBalancingPopPools = { * * @x-auditable true */ -export type LoadBalancingPort = number; +export type LoadBalancingPort = number | null; /** * @example f1aba936b94213e5b8dca0c0dbf1f9cc @@ -34375,6 +34434,7 @@ export type MagicIpsecTunnelAddSingleRequest = { automatic_return_routing?: MagicAutomaticReturnRouting; bgp?: MagicBgpConfig; cloudflare_endpoint: MagicCloudflareIpsecEndpoint; + custom_remote_identities?: MagicCustomRemoteIdentities; customer_endpoint?: MagicCustomerIpsecEndpoint; description?: MagicComponentsSchemasDescription; health_check?: MagicTunnelHealthCheck; @@ -41964,17 +42024,20 @@ export type R2SlurperJobResponse = { | { bucket?: string; endpoint?: string | null; + keys?: string[] | null; pathPrefix?: string | null; vendor?: "s3"; } | { bucket?: string; + keys?: string[] | null; pathPrefix?: string | null; vendor?: "gcs"; } | { bucket?: string; jurisdiction?: R2SlurperJurisdiction; + keys?: string[] | null; pathPrefix?: string | null; vendor?: "r2"; }; @@ -43421,16 +43484,6 @@ export type RealtimekitMeeting = { * Specifies if Chat within a meeting should persist for a week. */ persist_chat?: boolean; - /** - * The region in which this meeting should be created. - */ - preferred_region?: - | "ap-south-1" - | "ap-southeast-1" - | "us-east-1" - | "eu-central-1" - | any - | null; /** * Specifies if the meeting should start getting recorded as soon as someone joins the meeting. */ @@ -57079,6 +57132,8 @@ export type TlsCertificatesAndHostnamesSchemasHostnames = string[]; * @example example.com * @example *.example.com * @example www.example.com + * @x-stainless-collection-type set + * @x-stainless-terraform-configurability computed_optional */ export type TlsCertificatesAndHostnamesSchemasHosts = string[]; @@ -62737,6 +62792,12 @@ export type WorkersVersion = { * @example wrangler */ source?: string; + /** + * Time in milliseconds spent on [Worker startup](https://developers.cloudflare.com/workers/platform/limits/#worker-startup-time). + * + * @example 10 + */ + startup_time_ms?: number; /** * Usage model for the version. *