@telepath-computer/autofile 0.4.0 → 0.5.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/README.md +57 -38
- package/dist/blobs.d.ts +4 -6
- package/dist/blobs.js +48 -81
- package/dist/blobs.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/http.d.ts +1 -1
- package/dist/http.js +131 -5
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/mcp-resources.d.ts +5 -1
- package/dist/mcp-resources.js +20 -4
- package/dist/mcp-resources.js.map +1 -1
- package/dist/mcp-tools.d.ts +4 -1
- package/dist/mcp-tools.js +11 -8
- package/dist/mcp-tools.js.map +1 -1
- package/dist/mcp-upload.d.ts +1 -1
- package/dist/mcp-upload.js +29 -29
- package/dist/mcp-upload.js.map +1 -1
- package/dist/mcp-watch.js +3 -3
- package/dist/mcp-watch.js.map +1 -1
- package/dist/server.d.ts +2 -1
- package/dist/server.js +26 -9
- package/dist/server.js.map +1 -1
- package/dist/store.d.ts +21 -1
- package/dist/store.js +274 -84
- package/dist/store.js.map +1 -1
- package/dist/watch.js +21 -24
- package/dist/watch.js.map +1 -1
- package/package.json +1 -1
package/dist/store.d.ts
CHANGED
|
@@ -26,11 +26,14 @@ export interface AutofileRecord {
|
|
|
26
26
|
problems?: AutofileProblem[];
|
|
27
27
|
createdAt: string;
|
|
28
28
|
updatedAt: string;
|
|
29
|
+
collections?: string[];
|
|
29
30
|
value: JsonObject;
|
|
30
31
|
}
|
|
31
32
|
/** Optional filters and paging controls; where and fields apply only to value. */
|
|
32
33
|
export interface RecordQuery {
|
|
33
34
|
type?: string | string[];
|
|
35
|
+
/** A collection URI for its direct members, or null for records in no collection. */
|
|
36
|
+
collection?: string | null;
|
|
34
37
|
q?: string;
|
|
35
38
|
where?: JsonObject;
|
|
36
39
|
fields?: string[];
|
|
@@ -64,6 +67,17 @@ export type TypeChanges = Partial<Omit<TypeDefinition, "titleField" | "title">>
|
|
|
64
67
|
titleField?: string | null;
|
|
65
68
|
title?: string | null;
|
|
66
69
|
};
|
|
70
|
+
/** Metadata for a blob, including a read-only local file when available. */
|
|
71
|
+
export interface BlobStat {
|
|
72
|
+
size: number;
|
|
73
|
+
mimeType: string;
|
|
74
|
+
path?: string;
|
|
75
|
+
}
|
|
76
|
+
/** A half-open interval of attachment bytes, like Uint8Array.subarray. */
|
|
77
|
+
export interface BlobRange {
|
|
78
|
+
start: number;
|
|
79
|
+
end: number;
|
|
80
|
+
}
|
|
67
81
|
/** A record or type was created, changed, or deleted. */
|
|
68
82
|
export interface ChangeEvent {
|
|
69
83
|
uri: string;
|
|
@@ -85,8 +99,11 @@ export declare class Autofile {
|
|
|
85
99
|
get: (uri: string) => Promise<AutofileRecord | undefined>;
|
|
86
100
|
create: (type: string, value: JsonObject, options?: {
|
|
87
101
|
key?: string;
|
|
102
|
+
collections?: string[];
|
|
103
|
+
}) => Promise<AutofileRecord>;
|
|
104
|
+
update: (uri: string, patch: JsonObject, options?: {
|
|
105
|
+
collections?: string[];
|
|
88
106
|
}) => Promise<AutofileRecord>;
|
|
89
|
-
update: (uri: string, patch: JsonObject) => Promise<AutofileRecord>;
|
|
90
107
|
delete: (uri: string) => Promise<void>;
|
|
91
108
|
};
|
|
92
109
|
readonly types: {
|
|
@@ -98,10 +115,13 @@ export declare class Autofile {
|
|
|
98
115
|
};
|
|
99
116
|
readonly blobs: {
|
|
100
117
|
put: (bytes: Uint8Array, mediaType: string) => Promise<string>;
|
|
118
|
+
putStream: (chunks: AsyncIterable<Uint8Array>, mediaType: string) => Promise<string>;
|
|
101
119
|
get: (uri: string) => Promise<{
|
|
102
120
|
bytes: Uint8Array;
|
|
103
121
|
mimeType: string;
|
|
104
122
|
} | undefined>;
|
|
123
|
+
stat: (uri: string) => Promise<BlobStat | undefined>;
|
|
124
|
+
stream: (uri: string, range?: BlobRange) => Promise<ReadableStream<Uint8Array> | undefined>;
|
|
105
125
|
};
|
|
106
126
|
/** Checks a schema without accessing storage or checking link targets. */
|
|
107
127
|
static prepareSchema(schema: JsonObject): Promise<PreparedSchema>;
|