@aouda/client 0.0.3 → 0.1.0

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.
@@ -923,6 +923,23 @@ interface DatabaseInfo {
923
923
  state: string;
924
924
  createdAt: string;
925
925
  options: DatabaseOptionsInfo;
926
+ /**
927
+ * True if this is an Aouda-owned infrastructure database (e.g. `_serverauth`, `_settings`).
928
+ * Internal databases are hidden from the default catalog list.
929
+ * Clients should not use internal databases as data-explorer targets.
930
+ */
931
+ isInternal: boolean;
932
+ /**
933
+ * True if this database contains auth system tables (_users, _roles, etc.).
934
+ * Application auth databases have isInternal=false and remain in the default list.
935
+ */
936
+ isAuthDatabase: boolean;
937
+ /**
938
+ * Auth database classification: "none" | "server" | "application".
939
+ * "server" databases are managed via /api/auth/admin/... (never in data explorer).
940
+ * "application" databases are end-user auth stores browsable via the data explorer.
941
+ */
942
+ authDatabaseKind: "none" | "server" | "application";
926
943
  }
927
944
  /**
928
945
  * Options when creating a database (camelCase, matches server request).
@@ -2927,12 +2944,19 @@ declare class DatabasesApi {
2927
2944
  private readonly transport;
2928
2945
  constructor(transport: Transport);
2929
2946
  /**
2930
- * Lists all databases on the server.
2947
+ * Lists databases on the server.
2931
2948
  * GET /api/databases
2932
2949
  *
2933
- * @returns Array of database info (name, state, createdAt, options).
2950
+ * By default only operator-facing databases (isInternal === false) are returned.
2951
+ * Pass `{ includeInternal: true }` to receive the full catalog including internal
2952
+ * infrastructure databases such as `_serverauth` and `_settings`.
2953
+ *
2954
+ * @param options.includeInternal - When true, appends `?include=internal` to the request.
2955
+ * @returns Array of database info.
2934
2956
  */
2935
- list(): Promise<DatabaseInfo[]>;
2957
+ list(options?: {
2958
+ includeInternal?: boolean;
2959
+ }): Promise<DatabaseInfo[]>;
2936
2960
  /**
2937
2961
  * Creates a new database.
2938
2962
  * POST /api/databases
@@ -923,6 +923,23 @@ interface DatabaseInfo {
923
923
  state: string;
924
924
  createdAt: string;
925
925
  options: DatabaseOptionsInfo;
926
+ /**
927
+ * True if this is an Aouda-owned infrastructure database (e.g. `_serverauth`, `_settings`).
928
+ * Internal databases are hidden from the default catalog list.
929
+ * Clients should not use internal databases as data-explorer targets.
930
+ */
931
+ isInternal: boolean;
932
+ /**
933
+ * True if this database contains auth system tables (_users, _roles, etc.).
934
+ * Application auth databases have isInternal=false and remain in the default list.
935
+ */
936
+ isAuthDatabase: boolean;
937
+ /**
938
+ * Auth database classification: "none" | "server" | "application".
939
+ * "server" databases are managed via /api/auth/admin/... (never in data explorer).
940
+ * "application" databases are end-user auth stores browsable via the data explorer.
941
+ */
942
+ authDatabaseKind: "none" | "server" | "application";
926
943
  }
927
944
  /**
928
945
  * Options when creating a database (camelCase, matches server request).
@@ -2927,12 +2944,19 @@ declare class DatabasesApi {
2927
2944
  private readonly transport;
2928
2945
  constructor(transport: Transport);
2929
2946
  /**
2930
- * Lists all databases on the server.
2947
+ * Lists databases on the server.
2931
2948
  * GET /api/databases
2932
2949
  *
2933
- * @returns Array of database info (name, state, createdAt, options).
2950
+ * By default only operator-facing databases (isInternal === false) are returned.
2951
+ * Pass `{ includeInternal: true }` to receive the full catalog including internal
2952
+ * infrastructure databases such as `_serverauth` and `_settings`.
2953
+ *
2954
+ * @param options.includeInternal - When true, appends `?include=internal` to the request.
2955
+ * @returns Array of database info.
2934
2956
  */
2935
- list(): Promise<DatabaseInfo[]>;
2957
+ list(options?: {
2958
+ includeInternal?: boolean;
2959
+ }): Promise<DatabaseInfo[]>;
2936
2960
  /**
2937
2961
  * Creates a new database.
2938
2962
  * POST /api/databases
package/dist/index.cjs CHANGED
@@ -79,7 +79,7 @@ module.exports = __toCommonJS(index_exports);
79
79
  // package.json
80
80
  var package_default = {
81
81
  name: "@aouda/client",
82
- version: "0.0.3",
82
+ version: "0.1.0",
83
83
  description: "Official TypeScript/JavaScript client library for Aouda",
84
84
  type: "module",
85
85
  main: "./dist/index.cjs",
@@ -3641,13 +3641,19 @@ var DatabasesApi = class {
3641
3641
  this.transport = transport;
3642
3642
  }
3643
3643
  /**
3644
- * Lists all databases on the server.
3644
+ * Lists databases on the server.
3645
3645
  * GET /api/databases
3646
3646
  *
3647
- * @returns Array of database info (name, state, createdAt, options).
3647
+ * By default only operator-facing databases (isInternal === false) are returned.
3648
+ * Pass `{ includeInternal: true }` to receive the full catalog including internal
3649
+ * infrastructure databases such as `_serverauth` and `_settings`.
3650
+ *
3651
+ * @param options.includeInternal - When true, appends `?include=internal` to the request.
3652
+ * @returns Array of database info.
3648
3653
  */
3649
- async list() {
3650
- const response = await this.transport.get("/api/databases");
3654
+ async list(options) {
3655
+ const path = options?.includeInternal ? "/api/databases?include=internal" : "/api/databases";
3656
+ const response = await this.transport.get(path);
3651
3657
  return response.databases;
3652
3658
  }
3653
3659
  /**