@aouda/client 0.0.3 → 0.1.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/cli/index.cjs +29 -5
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +29 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/{client-Bvs1yerF.d.cts → client-B3XIGTr9.d.cts} +59 -4
- package/dist/{client-Bvs1yerF.d.ts → client-B3XIGTr9.d.ts} +59 -4
- package/dist/index.cjs +29 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +29 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -421,7 +421,7 @@ var import_node_url = require("url");
|
|
|
421
421
|
// package.json
|
|
422
422
|
var package_default = {
|
|
423
423
|
name: "@aouda/client",
|
|
424
|
-
version: "0.
|
|
424
|
+
version: "0.1.1",
|
|
425
425
|
description: "Official TypeScript/JavaScript client library for Aouda",
|
|
426
426
|
type: "module",
|
|
427
427
|
main: "./dist/index.cjs",
|
|
@@ -3922,6 +3922,24 @@ var TablesApi = class {
|
|
|
3922
3922
|
`${prefix}/tables/${encodedTable}/columns/${encodedColumn}`
|
|
3923
3923
|
);
|
|
3924
3924
|
}
|
|
3925
|
+
/**
|
|
3926
|
+
* Updates table options (auth mode, partition-level security, culture, etc.).
|
|
3927
|
+
* PUT /api/databases/{db}/tables/{name}/options.
|
|
3928
|
+
* @param name - Table name.
|
|
3929
|
+
* @param body - Options to update. Omit a field to leave it unchanged; pass null to clear a nullable field.
|
|
3930
|
+
* @returns Updated table schema.
|
|
3931
|
+
* @throws AoudaNotFoundError if table does not exist; AoudaApiError for WRITE_NOT_ALLOWED, INVALID_REQUEST, etc.
|
|
3932
|
+
*/
|
|
3933
|
+
async updateTableOptions(name, body) {
|
|
3934
|
+
validateNonEmptyString(name, "Table name");
|
|
3935
|
+
const prefix = databasePath2(this.database);
|
|
3936
|
+
const encodedName = encodeURIComponent(name);
|
|
3937
|
+
const requestBody = { database: this.database, ...body };
|
|
3938
|
+
return this.transport.put(
|
|
3939
|
+
`${prefix}/tables/${encodedName}/options`,
|
|
3940
|
+
requestBody
|
|
3941
|
+
);
|
|
3942
|
+
}
|
|
3925
3943
|
/**
|
|
3926
3944
|
* Updates a table's storage policy (temperature).
|
|
3927
3945
|
* @param name - Table name.
|
|
@@ -3950,13 +3968,19 @@ var DatabasesApi = class {
|
|
|
3950
3968
|
this.transport = transport;
|
|
3951
3969
|
}
|
|
3952
3970
|
/**
|
|
3953
|
-
* Lists
|
|
3971
|
+
* Lists databases on the server.
|
|
3954
3972
|
* GET /api/databases
|
|
3955
3973
|
*
|
|
3956
|
-
*
|
|
3974
|
+
* By default only operator-facing databases (isInternal === false) are returned.
|
|
3975
|
+
* Pass `{ includeInternal: true }` to receive the full catalog including internal
|
|
3976
|
+
* infrastructure databases such as `_serverauth` and `_settings`.
|
|
3977
|
+
*
|
|
3978
|
+
* @param options.includeInternal - When true, appends `?include=internal` to the request.
|
|
3979
|
+
* @returns Array of database info.
|
|
3957
3980
|
*/
|
|
3958
|
-
async list() {
|
|
3959
|
-
const
|
|
3981
|
+
async list(options) {
|
|
3982
|
+
const path4 = options?.includeInternal ? "/api/databases?include=internal" : "/api/databases";
|
|
3983
|
+
const response = await this.transport.get(path4);
|
|
3960
3984
|
return response.databases;
|
|
3961
3985
|
}
|
|
3962
3986
|
/**
|