@persql/sdk 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-5ELQCDXS.js → chunk-HTQP2S7I.js} +11 -1
- package/dist/chunk-HTQP2S7I.js.map +1 -0
- package/dist/cli.cjs +10 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5ELQCDXS.js.map +0 -1
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -604,6 +604,16 @@ var PerSQLDatabases = class {
|
|
|
604
604
|
}
|
|
605
605
|
return { data: body.data ?? [], nextCursor: body.nextCursor ?? null };
|
|
606
606
|
}
|
|
607
|
+
/** Delete a database by slug. Requires an admin-role unscoped token. */
|
|
608
|
+
async delete(slug) {
|
|
609
|
+
if (this.client.local) {
|
|
610
|
+
throw new Error("PerSQL: databases.delete() needs a server-mode token.");
|
|
611
|
+
}
|
|
612
|
+
return this.client.request(
|
|
613
|
+
"DELETE",
|
|
614
|
+
`/v1/databases/${encodeURIComponent(slug)}`
|
|
615
|
+
);
|
|
616
|
+
}
|
|
607
617
|
};
|
|
608
618
|
var PerSQLDatabase = class {
|
|
609
619
|
constructor(client, namespace, slug) {
|