@rebasepro/types 0.16.0 → 0.16.1-canary.g701140a
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/call_context.d.ts +5 -5
- package/dist/controllers/auth_state.d.ts +1 -1
- package/dist/controllers/client.d.ts +21 -8
- package/dist/controllers/collection_registry.d.ts +2 -2
- package/dist/controllers/data.d.ts +4 -4
- package/dist/controllers/data_driver.d.ts +7 -7
- package/dist/controllers/database_admin.d.ts +2 -2
- package/dist/controllers/index.d.ts +9 -9
- package/dist/index.d.ts +5 -5
- package/dist/index.es.js.map +1 -1
- package/dist/types/backend.d.ts +9 -9
- package/dist/types/collection_contract.d.ts +1 -1
- package/dist/types/collections.d.ts +7 -7
- package/dist/types/cron.d.ts +2 -2
- package/dist/types/data_source.d.ts +1 -1
- package/dist/types/database_adapter.d.ts +5 -5
- package/dist/types/entities.d.ts +1 -1
- package/dist/types/entity_callbacks.d.ts +4 -4
- package/dist/types/index.d.ts +29 -29
- package/dist/types/project_manifest.d.ts +52 -1
- package/dist/types/properties.d.ts +58 -6
- package/dist/types/relations.d.ts +1 -1
- package/dist/types/schema_version.d.ts +1 -1
- package/dist/types/security_rules.d.ts +1 -1
- package/dist/users/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/controllers/client.ts +13 -0
- package/src/types/project_manifest.ts +52 -0
- package/src/types/properties.ts +54 -0
package/dist/call_context.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { DataDriver } from "./controllers/data_driver";
|
|
2
|
-
import type { StorageSource } from "./controllers/storage";
|
|
3
|
-
import type { RebaseClient } from "./controllers/client";
|
|
4
|
-
import type { RebaseSdkData } from "./controllers/data";
|
|
5
|
-
import type { User } from "./users";
|
|
1
|
+
import type { DataDriver } from "./controllers/data_driver.js";
|
|
2
|
+
import type { StorageSource } from "./controllers/storage.js";
|
|
3
|
+
import type { RebaseClient } from "./controllers/client.js";
|
|
4
|
+
import type { RebaseSdkData } from "./controllers/data.js";
|
|
5
|
+
import type { User } from "./users/index.js";
|
|
6
6
|
/**
|
|
7
7
|
* Context that is provided to entity callbacks (hooks).
|
|
8
8
|
* It contains only the dependencies that are available in both the frontend and the backend.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { User } from "../users";
|
|
2
|
-
import type { RebaseSdkData } from "./data";
|
|
3
|
-
import type { EmailService } from "./email";
|
|
4
|
-
import type { StorageSource } from "./storage";
|
|
5
|
-
import type { CronJobStatus, CronJobLogEntry } from "../types/cron";
|
|
6
|
-
import type { BackupInfo, BackupDestinationKind } from "../types/backup";
|
|
7
|
-
import type { ApiKeysAPI } from "../types/api_keys";
|
|
8
|
-
import type { StorageSourceDefinition } from "../types/storage_source";
|
|
1
|
+
import type { User } from "../users/index.js";
|
|
2
|
+
import type { RebaseSdkData } from "./data.js";
|
|
3
|
+
import type { EmailService } from "./email.js";
|
|
4
|
+
import type { StorageSource } from "./storage.js";
|
|
5
|
+
import type { CronJobStatus, CronJobLogEntry } from "../types/cron.js";
|
|
6
|
+
import type { BackupInfo, BackupDestinationKind } from "../types/backup.js";
|
|
7
|
+
import type { ApiKeysAPI } from "../types/api_keys.js";
|
|
8
|
+
import type { StorageSourceDefinition } from "../types/storage_source.js";
|
|
9
9
|
/**
|
|
10
10
|
* Event type for authentication state changes
|
|
11
11
|
*/
|
|
@@ -443,6 +443,19 @@ export interface RebaseServerClient<DB = unknown> extends Omit<RebaseClient<DB>,
|
|
|
443
443
|
* Execute raw SQL against the database. Always present server-side for SQL
|
|
444
444
|
* engines. Values interpolated into the query should be passed via
|
|
445
445
|
* `params`, referenced as `$1`, `$2`, … placeholders in the query text.
|
|
446
|
+
*
|
|
447
|
+
* **Runtime note.** This is the one accessor on this object that is not
|
|
448
|
+
* portable. It runs on the database owner connection over a TCP socket, so
|
|
449
|
+
* it is available wherever the framework holds that connection — every Node
|
|
450
|
+
* deployment, self-hosted or managed — and not on a host that has no
|
|
451
|
+
* sockets and no business holding owner credentials.
|
|
452
|
+
*
|
|
453
|
+
* Nothing about that is a problem for a Node deployment, and it is not a
|
|
454
|
+
* reason to avoid it there. It is a reason not to build a function's *only*
|
|
455
|
+
* data path on it if that function may later move: `c.get("driver")` and
|
|
456
|
+
* `rebase.dataAsAdmin` go over the same wire wherever they run. A function
|
|
457
|
+
* that genuinely needs raw SQL can ask `runtimeKey()` and degrade, rather
|
|
458
|
+
* than discovering it at the call.
|
|
446
459
|
*/
|
|
447
460
|
sql(query: string, options?: {
|
|
448
461
|
database?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CollectionConfig } from "../types/collections";
|
|
2
|
-
import type { EntityReference } from "../types/entities";
|
|
1
|
+
import type { CollectionConfig } from "../types/collections.js";
|
|
2
|
+
import type { EntityReference } from "../types/entities.js";
|
|
3
3
|
/**
|
|
4
4
|
* Controller that provides access to the registered entity collections.
|
|
5
5
|
* @group Models
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { VectorSearchParams } from "./data_driver";
|
|
2
|
-
import type { ComputedSortField, SearchMatch } from "../types/search";
|
|
3
|
-
import { Entity, EntityValues } from "../types/entities";
|
|
4
|
-
import { WhereFilterOp, FieldPath, FilterValues, OrderBySpec } from "../types/filter-operators";
|
|
1
|
+
import type { VectorSearchParams } from "./data_driver.js";
|
|
2
|
+
import type { ComputedSortField, SearchMatch } from "../types/search.js";
|
|
3
|
+
import { Entity, EntityValues } from "../types/entities.js";
|
|
4
|
+
import { WhereFilterOp, FieldPath, FilterValues, OrderBySpec } from "../types/filter-operators.js";
|
|
5
5
|
/**
|
|
6
6
|
* Operator-blind filter value: whatever the column holds, a list of it, or null.
|
|
7
7
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { RebaseApiError } from "../errors";
|
|
2
|
-
import type { EntityStatus, EntityValues } from "../types/entities";
|
|
3
|
-
import type { CollectionConfig, FilterValues } from "../types/collections";
|
|
4
|
-
import type { OrderByTuple } from "../types/filter-operators";
|
|
5
|
-
import type { RebaseCallContext } from "../call_context";
|
|
6
|
-
import type { LogicalCondition } from "./data";
|
|
1
|
+
import { RebaseApiError } from "../errors.js";
|
|
2
|
+
import type { EntityStatus, EntityValues } from "../types/entities.js";
|
|
3
|
+
import type { CollectionConfig, FilterValues } from "../types/collections.js";
|
|
4
|
+
import type { OrderByTuple } from "../types/filter-operators.js";
|
|
5
|
+
import type { RebaseCallContext } from "../call_context.js";
|
|
6
|
+
import type { LogicalCondition } from "./data.js";
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
@@ -384,7 +384,7 @@ export interface DataDriver {
|
|
|
384
384
|
* @see DocumentAdmin
|
|
385
385
|
* @see SchemaAdmin
|
|
386
386
|
*/
|
|
387
|
-
admin?: import("../types/backend").DatabaseAdmin;
|
|
387
|
+
admin?: import("../types/backend.js").DatabaseAdmin;
|
|
388
388
|
}
|
|
389
389
|
/**
|
|
390
390
|
* REST-optimised fetch service exposed by drivers that support
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @group Admin
|
|
9
9
|
*/
|
|
10
|
-
export type { SQLAdmin, DocumentAdmin, SchemaAdmin, DatabaseAdmin, HealthCheckResult } from "../types/backend";
|
|
11
|
-
export { isSQLAdmin, isDocumentAdmin, isSchemaAdmin } from "../types/backend";
|
|
10
|
+
export type { SQLAdmin, DocumentAdmin, SchemaAdmin, DatabaseAdmin, HealthCheckResult } from "../types/backend.js";
|
|
11
|
+
export { isSQLAdmin, isDocumentAdmin, isSchemaAdmin } from "../types/backend.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./collection_registry";
|
|
2
|
-
export * from "./auth_state";
|
|
3
|
-
export * from "./data";
|
|
4
|
-
export * from "./database_admin";
|
|
5
|
-
export * from "./data_driver";
|
|
6
|
-
export * from "./effective_role";
|
|
7
|
-
export * from "./storage";
|
|
8
|
-
export * from "./email";
|
|
9
|
-
export * from "./client";
|
|
1
|
+
export * from "./collection_registry.js";
|
|
2
|
+
export * from "./auth_state.js";
|
|
3
|
+
export * from "./data.js";
|
|
4
|
+
export * from "./database_admin.js";
|
|
5
|
+
export * from "./data_driver.js";
|
|
6
|
+
export * from "./effective_role.js";
|
|
7
|
+
export * from "./storage.js";
|
|
8
|
+
export * from "./email.js";
|
|
9
|
+
export * from "./client.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./errors";
|
|
2
|
-
export * from "./call_context";
|
|
3
|
-
export * from "./types";
|
|
4
|
-
export * from "./controllers";
|
|
5
|
-
export * from "./users";
|
|
1
|
+
export * from "./errors.js";
|
|
2
|
+
export * from "./call_context.js";
|
|
3
|
+
export * from "./types/index.js";
|
|
4
|
+
export * from "./controllers/index.js";
|
|
5
|
+
export * from "./users/index.js";
|