@dxos/protocols 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65
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/src/FeedProtocol.d.ts +1 -1
- package/dist/src/FeedProtocol.js +1 -1
- package/dist/src/edge/EdgeFunctionEnv.d.ts +10 -23
- package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/client/services.d.ts +995 -995
- package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/client/services.js +94 -94
- package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/src/proto/gen/google/protobuf.d.ts +296 -10
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
- package/dist/src/proto/gen/google/protobuf.js +127 -1
- package/dist/src/proto/gen/google/protobuf.js.map +1 -1
- package/dist/src/proto/gen/index.d.ts +24 -0
- package/dist/src/proto/gen/index.d.ts.map +1 -1
- package/dist/src/proto/gen/index.js +1 -1
- package/dist/src/proto/gen/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/FeedProtocol.ts +1 -1
- package/src/edge/EdgeFunctionEnv.ts +10 -26
- package/src/proto/dxos/config.proto +1 -1
- package/src/proto/gen/dxos/client/services.ts +995 -995
- package/src/proto/gen/google/protobuf.ts +296 -10
- package/src/proto/gen/index.ts +25 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { type QueueService, type QueueQuery, type QueueQueryResult as QueryResult, type QueryQueueRequest, type InsertIntoQueueRequest, type DeleteFromQueueRequest, type SyncQueueRequest, } from './proto/gen/dxos/client/services.js';
|
|
2
|
-
export declare const KEY_QUEUE_POSITION = "dxos.
|
|
2
|
+
export declare const KEY_QUEUE_POSITION = "org.dxos.key.queue-position";
|
|
3
3
|
import * as Schema from 'effect/Schema';
|
|
4
4
|
import { SpaceId } from '@dxos/keys';
|
|
5
5
|
/**
|
package/dist/src/FeedProtocol.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//
|
|
2
2
|
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
|
-
export const KEY_QUEUE_POSITION = 'dxos.
|
|
4
|
+
export const KEY_QUEUE_POSITION = 'org.dxos.key.queue-position';
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
import { invariant } from '@dxos/invariant';
|
|
7
7
|
import { SpaceId } from '@dxos/keys';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type SpaceId } from '@dxos/keys';
|
|
2
2
|
import type * as FeedProtocol from '../FeedProtocol';
|
|
3
3
|
import { type CreateDocumentRequest, type CreateDocumentResponse } from '../proto/gen/dxos/echo/service';
|
|
4
|
+
import { type QueryRequest, type QueryResponse } from '../proto/gen/dxos/echo/query';
|
|
4
5
|
/**
|
|
5
6
|
* Environment available to the function running on Cloudflare.
|
|
6
7
|
*/
|
|
@@ -14,24 +15,22 @@ export interface Env {
|
|
|
14
15
|
*
|
|
15
16
|
* NOTE: Currently unused in functions.
|
|
16
17
|
*/
|
|
17
|
-
export interface
|
|
18
|
+
export interface TraceContext {
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* Database API for other CF services like functions.
|
|
21
22
|
*/
|
|
22
23
|
export interface DataService {
|
|
23
|
-
getSpaceMeta(ctx:
|
|
24
|
-
getDocument(ctx:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
createDocument(ctx: ExecutionContext, request: CreateDocumentRequest): Promise<RpcResult<CreateDocumentResponse>>;
|
|
29
|
-
changeDocument(ctx: ExecutionContext, spaceId: SpaceId, documentId: string, changes: Uint8Array): Promise<void>;
|
|
24
|
+
getSpaceMeta(ctx: TraceContext, spaceId: SpaceId): Promise<RpcResult<SpaceMeta | undefined>>;
|
|
25
|
+
getDocument(ctx: TraceContext, spaceId: SpaceId, documentId: string): Promise<RpcResult<RawDocument | undefined>>;
|
|
26
|
+
execQuery(ctx: TraceContext, request: QueryRequest): Promise<RpcResult<QueryResponse>>;
|
|
27
|
+
createDocument(ctx: TraceContext, request: CreateDocumentRequest): Promise<RpcResult<CreateDocumentResponse>>;
|
|
28
|
+
changeDocument(ctx: TraceContext, spaceId: SpaceId, documentId: string, changes: Uint8Array): Promise<void>;
|
|
30
29
|
}
|
|
31
30
|
export interface QueueService {
|
|
32
|
-
queryQueue: (ctx:
|
|
33
|
-
insertIntoQueue: (ctx:
|
|
34
|
-
deleteFromQueue: (ctx:
|
|
31
|
+
queryQueue: (ctx: TraceContext, request: FeedProtocol.QueryQueueRequest) => Promise<RpcResult<FeedProtocol.QueryResult>>;
|
|
32
|
+
insertIntoQueue: (ctx: TraceContext, request: FeedProtocol.InsertIntoQueueRequest) => Promise<RpcResult<RpcDisposable>>;
|
|
33
|
+
deleteFromQueue: (ctx: TraceContext, request: FeedProtocol.DeleteFromQueueRequest) => Promise<RpcResult<RpcDisposable>>;
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
36
|
* FunctionsAiService API for other CF services like functions.
|
|
@@ -53,18 +52,6 @@ export type SpaceMeta = {
|
|
|
53
52
|
spaceKey: string;
|
|
54
53
|
rootDocumentId: string;
|
|
55
54
|
};
|
|
56
|
-
export type QueryRequest = {
|
|
57
|
-
spaceId: string;
|
|
58
|
-
type?: string;
|
|
59
|
-
where?: Record<string, any>;
|
|
60
|
-
objectIds?: string[];
|
|
61
|
-
cursor?: string;
|
|
62
|
-
limit?: number;
|
|
63
|
-
};
|
|
64
|
-
export type QueryResponse = {
|
|
65
|
-
results: ObjectSnapshot[];
|
|
66
|
-
cursor?: string;
|
|
67
|
-
};
|
|
68
55
|
/**
|
|
69
56
|
* TODO(yaroslav): make Indexer return EchoObject after create() can properly reconstruct an object
|
|
70
57
|
* from this structure (meta, id and type aren't handled properly)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeFunctionEnv.d.ts","sourceRoot":"","sources":["../../../src/edge/EdgeFunctionEnv.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,KAAK,YAAY,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"EdgeFunctionEnv.d.ts","sourceRoot":"","sources":["../../../src/edge/EdgeFunctionEnv.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,KAAK,YAAY,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACzG,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAiDrF;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,aAAa,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,WAAW,CAAC;IAC1B,oBAAoB,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;CAAG;AAEhC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;IAC7F,WAAW,CAAC,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC;IAElH,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;IACvF,c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