@camstack/types 1.2.22 → 1.2.23
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.
|
@@ -201,6 +201,7 @@ export declare const dataStoreProviderCapability: {
|
|
|
201
201
|
primaryKey: z.ZodOptional<z.ZodBoolean>;
|
|
202
202
|
notNull: z.ZodOptional<z.ZodBoolean>;
|
|
203
203
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
+
defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
204
205
|
}, z.core.$strip>>>;
|
|
205
206
|
indexes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
206
207
|
name: z.ZodString;
|
|
@@ -57,6 +57,7 @@ declare const CollectionColumnSchema: z.ZodObject<{
|
|
|
57
57
|
primaryKey: z.ZodOptional<z.ZodBoolean>;
|
|
58
58
|
notNull: z.ZodOptional<z.ZodBoolean>;
|
|
59
59
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
60
61
|
}, z.core.$strip>;
|
|
61
62
|
declare const CollectionIndexSchema: z.ZodObject<{
|
|
62
63
|
name: z.ZodString;
|
|
@@ -276,6 +277,7 @@ export declare const settingsStoreCapability: {
|
|
|
276
277
|
primaryKey: z.ZodOptional<z.ZodBoolean>;
|
|
277
278
|
notNull: z.ZodOptional<z.ZodBoolean>;
|
|
278
279
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
280
|
+
defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
279
281
|
}, z.core.$strip>>>;
|
|
280
282
|
indexes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
281
283
|
name: z.ZodString;
|
package/dist/index.js
CHANGED
|
@@ -17480,7 +17480,18 @@ var CollectionColumnSchema = zod.z.object({
|
|
|
17480
17480
|
]),
|
|
17481
17481
|
primaryKey: zod.z.boolean().optional(),
|
|
17482
17482
|
notNull: zod.z.boolean().optional(),
|
|
17483
|
-
unique: zod.z.boolean().optional()
|
|
17483
|
+
unique: zod.z.boolean().optional(),
|
|
17484
|
+
/**
|
|
17485
|
+
* Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
|
|
17486
|
+
* columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
|
|
17487
|
+
* collection surface simply cannot express their existing tables — which is
|
|
17488
|
+
* why they were still on the uncapped `table*` API.
|
|
17489
|
+
*/
|
|
17490
|
+
defaultValue: zod.z.union([
|
|
17491
|
+
zod.z.string(),
|
|
17492
|
+
zod.z.number(),
|
|
17493
|
+
zod.z.boolean()
|
|
17494
|
+
]).optional()
|
|
17484
17495
|
});
|
|
17485
17496
|
var CollectionIndexSchema = zod.z.object({
|
|
17486
17497
|
name: zod.z.string(),
|
package/dist/index.mjs
CHANGED
|
@@ -17479,7 +17479,18 @@ var CollectionColumnSchema = z.object({
|
|
|
17479
17479
|
]),
|
|
17480
17480
|
primaryKey: z.boolean().optional(),
|
|
17481
17481
|
notNull: z.boolean().optional(),
|
|
17482
|
-
unique: z.boolean().optional()
|
|
17482
|
+
unique: z.boolean().optional(),
|
|
17483
|
+
/**
|
|
17484
|
+
* Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
|
|
17485
|
+
* columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
|
|
17486
|
+
* collection surface simply cannot express their existing tables — which is
|
|
17487
|
+
* why they were still on the uncapped `table*` API.
|
|
17488
|
+
*/
|
|
17489
|
+
defaultValue: z.union([
|
|
17490
|
+
z.string(),
|
|
17491
|
+
z.number(),
|
|
17492
|
+
z.boolean()
|
|
17493
|
+
]).optional()
|
|
17483
17494
|
});
|
|
17484
17495
|
var CollectionIndexSchema = z.object({
|
|
17485
17496
|
name: z.string(),
|
|
@@ -142,20 +142,6 @@ export interface ISettingsBackend {
|
|
|
142
142
|
columns: readonly import('../capabilities/settings-store.cap.js').CollectionColumn[];
|
|
143
143
|
indexes?: readonly import('../capabilities/settings-store.cap.js').CollectionIndex[];
|
|
144
144
|
}): Promise<void>;
|
|
145
|
-
/** Ensure a structured table exists (CREATE TABLE IF NOT EXISTS) */
|
|
146
|
-
ensureTable?(table: string, schema: TableSchema): Promise<void>;
|
|
147
|
-
/** Insert a row into a structured table */
|
|
148
|
-
tableInsert?(table: string, row: Record<string, unknown>): Promise<void>;
|
|
149
|
-
/** Update rows matching a filter */
|
|
150
|
-
tableUpdate?(table: string, filter: Record<string, unknown>, updates: Record<string, unknown>): Promise<number>;
|
|
151
|
-
/** Delete rows matching a filter. Returns count of deleted rows. */
|
|
152
|
-
tableDelete?(table: string, filter: Record<string, unknown>): Promise<number>;
|
|
153
|
-
/** Query rows from a structured table */
|
|
154
|
-
tableQuery?(table: string, options?: TableQueryOptions): Promise<readonly Record<string, unknown>[]>;
|
|
155
|
-
/** Get a single row by primary key or filter */
|
|
156
|
-
tableGet?(table: string, filter: Record<string, unknown>): Promise<Record<string, unknown> | null>;
|
|
157
|
-
/** Count rows matching a filter */
|
|
158
|
-
tableCount?(table: string, filter?: Record<string, unknown>): Promise<number>;
|
|
159
145
|
}
|
|
160
146
|
export interface SettingsRecord<T extends object = Record<string, unknown>> {
|
|
161
147
|
readonly id: string;
|
|
@@ -205,16 +191,6 @@ export interface TableIndexSchema {
|
|
|
205
191
|
readonly columns: readonly string[];
|
|
206
192
|
readonly unique?: boolean;
|
|
207
193
|
}
|
|
208
|
-
/** Query options for structured tables */
|
|
209
|
-
export interface TableQueryOptions {
|
|
210
|
-
readonly where?: Record<string, unknown>;
|
|
211
|
-
readonly orderBy?: {
|
|
212
|
-
field: string;
|
|
213
|
-
direction: 'asc' | 'desc';
|
|
214
|
-
};
|
|
215
|
-
readonly limit?: number;
|
|
216
|
-
readonly offset?: number;
|
|
217
|
-
}
|
|
218
194
|
/**
|
|
219
195
|
* Embeddings backend — vector storage with approximate nearest neighbor search.
|
|
220
196
|
* Used for CLIP frame search, face recognition, plate matching.
|