Skip to content

Commit 450e0f0

Browse files
vaishakdineshstainless-app[bot]
authored andcommitted
chore(d1): update generated types and methods
1 parent 1ff832a commit 450e0f0

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

src/resources/d1/d1.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ export namespace D1 {
7575
*/
7676
export interface ReadReplication {
7777
/**
78-
* The read replication mode for the database. Use 'auto' to create replicas and
79-
* allow D1 automatically place them around the world, or 'disabled' to not use any
80-
* database replicas (it can take a few hours for all replicas to be deleted).
78+
* The read replication mode for the database. Mode 'auto' denotes that D1 creates
79+
* replicas and automatically places them around the world. Mode 'disabled' denotes
80+
* that no database replicas are used.
8181
*/
8282
mode: 'auto' | 'disabled';
8383
}

src/resources/d1/database/database.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,25 @@ export interface DatabaseCreateParams {
701701
* user.
702702
*/
703703
primary_location_hint?: 'wnam' | 'enam' | 'weur' | 'eeur' | 'apac' | 'oc';
704+
705+
/**
706+
* Body param: Configuration for D1 read replication.
707+
*/
708+
read_replication?: DatabaseCreateParams.ReadReplication;
709+
}
710+
711+
export namespace DatabaseCreateParams {
712+
/**
713+
* Configuration for D1 read replication.
714+
*/
715+
export interface ReadReplication {
716+
/**
717+
* The read replication mode for the database. Use 'auto' to create replicas and
718+
* allow D1 automatically place them around the world, or 'disabled' to not use any
719+
* database replicas (it can take a few hours for all replicas to be deleted).
720+
*/
721+
mode: 'auto' | 'disabled';
722+
}
704723
}
705724

706725
export interface DatabaseUpdateParams {

tests/api-resources/d1/database/database.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe('resource database', () => {
3030
name: 'my-database',
3131
jurisdiction: 'eu',
3232
primary_location_hint: 'wnam',
33+
read_replication: { mode: 'auto' },
3334
});
3435
});
3536

0 commit comments

Comments
 (0)