Skip to content

Commit e2e9bbd

Browse files
chore(api): update composite API spec
1 parent b919ae7 commit e2e9bbd

File tree

2 files changed

+92
-30
lines changed

2 files changed

+92
-30
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1891
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f28fbb1a0c731820e25e5f357a4b5cfb1f047c34e3143d3d822a6e8c01d72c27.yml
3-
openapi_spec_hash: d1177ac271608ae36d73ab114c33f8d8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7e4d0f06a14e00e1fded122c6e363b955753c19f529887d691584630b9625544.yml
3+
openapi_spec_hash: f04905b36443a3e136496c9dc28ea51d
44
config_hash: f8ad41a1e87119e46c6452f8f1ea0440

src/resources/d1/database.ts

Lines changed: 90 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -862,40 +862,102 @@ export declare namespace DatabaseImportParams {
862862
}
863863
}
864864

865-
export interface DatabaseQueryParams {
866-
/**
867-
* Path param: Account identifier tag.
868-
*/
869-
account_id: string;
865+
export type DatabaseQueryParams = DatabaseQueryParams.D1SingleQuery | DatabaseQueryParams.MultipleQueries;
870866

871-
/**
872-
* Body param: Your SQL query. Supports multiple statements, joined by semicolons,
873-
* which will be executed as a batch.
874-
*/
875-
sql: string;
867+
export declare namespace DatabaseQueryParams {
868+
export interface D1SingleQuery {
869+
/**
870+
* Path param: Account identifier tag.
871+
*/
872+
account_id: string;
876873

877-
/**
878-
* Body param:
879-
*/
880-
params?: Array<string>;
874+
/**
875+
* Body param: Your SQL query. Supports multiple statements, joined by semicolons,
876+
* which will be executed as a batch.
877+
*/
878+
sql: string;
879+
880+
/**
881+
* Body param:
882+
*/
883+
params?: Array<string>;
884+
}
885+
886+
export interface MultipleQueries {
887+
/**
888+
* Path param: Account identifier tag.
889+
*/
890+
account_id: string;
891+
892+
/**
893+
* Body param:
894+
*/
895+
batch?: Array<MultipleQueries.Batch>;
896+
}
897+
898+
export namespace MultipleQueries {
899+
/**
900+
* A single query with or without parameters
901+
*/
902+
export interface Batch {
903+
/**
904+
* Your SQL query. Supports multiple statements, joined by semicolons, which will
905+
* be executed as a batch.
906+
*/
907+
sql: string;
908+
909+
params?: Array<string>;
910+
}
911+
}
881912
}
882913

883-
export interface DatabaseRawParams {
884-
/**
885-
* Path param: Account identifier tag.
886-
*/
887-
account_id: string;
914+
export type DatabaseRawParams = DatabaseRawParams.D1SingleQuery | DatabaseRawParams.MultipleQueries;
888915

889-
/**
890-
* Body param: Your SQL query. Supports multiple statements, joined by semicolons,
891-
* which will be executed as a batch.
892-
*/
893-
sql: string;
916+
export declare namespace DatabaseRawParams {
917+
export interface D1SingleQuery {
918+
/**
919+
* Path param: Account identifier tag.
920+
*/
921+
account_id: string;
894922

895-
/**
896-
* Body param:
897-
*/
898-
params?: Array<string>;
923+
/**
924+
* Body param: Your SQL query. Supports multiple statements, joined by semicolons,
925+
* which will be executed as a batch.
926+
*/
927+
sql: string;
928+
929+
/**
930+
* Body param:
931+
*/
932+
params?: Array<string>;
933+
}
934+
935+
export interface MultipleQueries {
936+
/**
937+
* Path param: Account identifier tag.
938+
*/
939+
account_id: string;
940+
941+
/**
942+
* Body param:
943+
*/
944+
batch?: Array<MultipleQueries.Batch>;
945+
}
946+
947+
export namespace MultipleQueries {
948+
/**
949+
* A single query with or without parameters
950+
*/
951+
export interface Batch {
952+
/**
953+
* Your SQL query. Supports multiple statements, joined by semicolons, which will
954+
* be executed as a batch.
955+
*/
956+
sql: string;
957+
958+
params?: Array<string>;
959+
}
960+
}
899961
}
900962

901963
Database.DatabaseListResponsesV4PagePaginationArray = DatabaseListResponsesV4PagePaginationArray;

0 commit comments

Comments
 (0)