@dxos/protocols 0.5.3-main.f752aaa → 0.5.3-main.fffc127
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/cjs/src/errors/encoding.js.map +1 -1
- package/dist/cjs/src/errors/errors.d.ts +3 -0
- package/dist/cjs/src/errors/errors.d.ts.map +1 -1
- package/dist/cjs/src/errors/errors.js +8 -1
- package/dist/cjs/src/errors/errors.js.map +1 -1
- package/dist/cjs/src/errors/helpers.d.ts +3 -1
- package/dist/cjs/src/errors/helpers.d.ts.map +1 -1
- package/dist/cjs/src/errors/helpers.js.map +1 -1
- package/dist/cjs/src/indexing.d.ts +19 -3
- package/dist/cjs/src/indexing.d.ts.map +1 -1
- package/dist/cjs/src/indexing.js +42 -5
- package/dist/cjs/src/indexing.js.map +1 -1
- package/dist/cjs/src/indexing.test.d.ts +2 -0
- package/dist/cjs/src/indexing.test.d.ts.map +1 -0
- package/dist/cjs/src/indexing.test.js +31 -0
- package/dist/cjs/src/indexing.test.js.map +1 -0
- package/dist/cjs/src/proto/gen/dxos/agent/functions.d.ts +11 -2
- package/dist/cjs/src/proto/gen/dxos/agent/functions.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/client/services.d.ts +177 -177
- package/dist/cjs/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/client/services.js +25 -26
- package/dist/cjs/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/devtools/host.d.ts +31 -31
- package/dist/cjs/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/index.d.ts +1 -0
- package/dist/cjs/src/proto/gen/index.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/index.js +1 -1
- package/dist/cjs/src/proto/gen/index.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/src/errors/encoding.js.map +1 -1
- package/dist/esm/src/errors/errors.d.ts +3 -0
- package/dist/esm/src/errors/errors.d.ts.map +1 -1
- package/dist/esm/src/errors/errors.js +6 -0
- package/dist/esm/src/errors/errors.js.map +1 -1
- package/dist/esm/src/errors/helpers.d.ts +3 -1
- package/dist/esm/src/errors/helpers.d.ts.map +1 -1
- package/dist/esm/src/errors/helpers.js.map +1 -1
- package/dist/esm/src/indexing.d.ts +19 -3
- package/dist/esm/src/indexing.d.ts.map +1 -1
- package/dist/esm/src/indexing.js +41 -4
- package/dist/esm/src/indexing.js.map +1 -1
- package/dist/esm/src/indexing.test.d.ts +2 -0
- package/dist/esm/src/indexing.test.d.ts.map +1 -0
- package/dist/esm/src/indexing.test.js +29 -0
- package/dist/esm/src/indexing.test.js.map +1 -0
- package/dist/esm/src/proto/gen/dxos/agent/functions.d.ts +11 -2
- package/dist/esm/src/proto/gen/dxos/agent/functions.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/dxos/client/services.d.ts +177 -177
- package/dist/esm/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/dxos/client/services.js +24 -25
- package/dist/esm/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/esm/src/proto/gen/dxos/devtools/host.d.ts +31 -31
- package/dist/esm/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/index.d.ts +1 -0
- package/dist/esm/src/proto/gen/index.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/index.js +1 -1
- package/dist/esm/src/proto/gen/index.js.map +1 -1
- package/package.json +5 -5
- package/src/errors/errors.ts +8 -0
- package/src/indexing.test.ts +36 -0
- package/src/indexing.ts +44 -5
- package/src/proto/dxos/agent/functions.proto +8 -3
- package/src/proto/dxos/client/services.proto +1 -1
- package/src/proto/dxos/halo/credentials.proto +2 -2
- package/src/proto/gen/dxos/agent/functions.ts +11 -2
- package/src/proto/gen/dxos/client/services.ts +177 -177
- package/src/proto/gen/dxos/devtools/host.ts +31 -31
- package/src/proto/gen/index.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/proto/gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AA+DhE,OAAO,aAAa,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/proto/gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AA+DhE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AA2iB7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,4o0GAA4o0G,CAAC,CAAC,CAAC;AACrs0G,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAkB,UAAU,EAAE,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/protocols",
|
|
3
|
-
"version": "0.5.3-main.
|
|
3
|
+
"version": "0.5.3-main.fffc127",
|
|
4
4
|
"description": "Protobuf definitions for DXOS protocols.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"src"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
36
|
+
"@dxos/codec-protobuf": "0.5.3-main.fffc127",
|
|
37
|
+
"@dxos/timeframe": "0.5.3-main.fffc127",
|
|
38
|
+
"@dxos/keys": "0.5.3-main.fffc127",
|
|
39
|
+
"@dxos/invariant": "0.5.3-main.fffc127"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"glob": "~7.1.6"
|
package/src/errors/errors.ts
CHANGED
|
@@ -198,3 +198,11 @@ export class UnknownModelError extends DatabaseError {
|
|
|
198
198
|
registerError('UNKNOWN_MODEL', (_, context) => {
|
|
199
199
|
return new UnknownModelError(context.model);
|
|
200
200
|
});
|
|
201
|
+
|
|
202
|
+
export class AuthorizationError extends ApiError {
|
|
203
|
+
constructor(message?: string, context?: any) {
|
|
204
|
+
super('AUTHORIZATION_ERROR', message, context);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
registerErrorMessageContext('AUTHORIZATION_ERROR', AuthorizationError);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { expect } from 'chai';
|
|
6
|
+
|
|
7
|
+
import { describe, test } from '@dxos/test';
|
|
8
|
+
|
|
9
|
+
import { ObjectPointerVersion, objectPointerCodec } from './indexing';
|
|
10
|
+
|
|
11
|
+
describe('Indexing object pointer codec', () => {
|
|
12
|
+
test('getVersion', async () => {
|
|
13
|
+
expect(objectPointerCodec.getVersion('aaaa|bbbb')).to.eq(ObjectPointerVersion.V0);
|
|
14
|
+
expect(objectPointerCodec.getVersion('#01|ssss|aaaa|bbbb')).to.eq(ObjectPointerVersion.V1);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test('v0', async () => {
|
|
18
|
+
expect(objectPointerCodec.encode({ spaceKey: undefined, documentId: 'aaaa', objectId: 'bbbb' })).to.eq('aaaa|bbbb');
|
|
19
|
+
expect(objectPointerCodec.decode('aaaa|bbbb')).to.eql({
|
|
20
|
+
spaceKey: undefined,
|
|
21
|
+
documentId: 'aaaa',
|
|
22
|
+
objectId: 'bbbb',
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('v1', async () => {
|
|
27
|
+
expect(objectPointerCodec.encode({ spaceKey: 'ssss', documentId: 'aaaa', objectId: 'bbbb' })).to.eq(
|
|
28
|
+
'#01|ssss|aaaa|bbbb',
|
|
29
|
+
);
|
|
30
|
+
expect(objectPointerCodec.decode('#01|ssss|aaaa|bbbb')).to.eql({
|
|
31
|
+
spaceKey: 'ssss',
|
|
32
|
+
documentId: 'aaaa',
|
|
33
|
+
objectId: 'bbbb',
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
package/src/indexing.ts
CHANGED
|
@@ -3,19 +3,58 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
export type ObjectPointerDecoded = {
|
|
6
|
+
spaceKey: string | undefined;
|
|
6
7
|
documentId: string;
|
|
7
8
|
objectId: string;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
|
-
* Encoded object pointer:
|
|
12
|
+
* Encoded object pointer: `#01|${spaceKey}|${documentId}|${objectId}`.
|
|
13
|
+
* Old format without spaceKey: `${documentId}|${objectId}`.
|
|
14
|
+
* The spaceKey is optional and was added in the later version.
|
|
15
|
+
* Space key is encoded in the front to allow prefix iteration.
|
|
12
16
|
*/
|
|
13
17
|
export type ObjectPointerEncoded = string;
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
const V1_PREFIX = '#01';
|
|
20
|
+
|
|
21
|
+
export enum ObjectPointerVersion {
|
|
22
|
+
/**
|
|
23
|
+
* `${documentId}|${objectId}`
|
|
24
|
+
*/
|
|
25
|
+
V0 = 0,
|
|
26
|
+
/**
|
|
27
|
+
* `#01|${spaceKey}|${documentId}|${objectId}`
|
|
28
|
+
*/
|
|
29
|
+
V1 = 1,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const objectPointerCodec = {
|
|
33
|
+
encode: ({ spaceKey, documentId, objectId }: ObjectPointerDecoded): ObjectPointerEncoded => {
|
|
34
|
+
if (spaceKey === undefined) {
|
|
35
|
+
return `${documentId}|${objectId}`;
|
|
36
|
+
} else {
|
|
37
|
+
return `${V1_PREFIX}|${spaceKey}|${documentId}|${objectId}`;
|
|
38
|
+
}
|
|
39
|
+
},
|
|
17
40
|
decode: (id: ObjectPointerEncoded): ObjectPointerDecoded => {
|
|
18
|
-
|
|
19
|
-
|
|
41
|
+
if (id.startsWith(V1_PREFIX)) {
|
|
42
|
+
const [_, spaceKey, documentId, objectId] = id.split('|');
|
|
43
|
+
return { spaceKey, documentId, objectId };
|
|
44
|
+
} else {
|
|
45
|
+
const [documentId, objectId] = id.split('|');
|
|
46
|
+
return { spaceKey: undefined, documentId, objectId };
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
getVersion: (id: ObjectPointerEncoded): ObjectPointerVersion => {
|
|
50
|
+
if (id.startsWith(V1_PREFIX)) {
|
|
51
|
+
return ObjectPointerVersion.V1;
|
|
52
|
+
} else {
|
|
53
|
+
return ObjectPointerVersion.V0;
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
convertV1ToV0: (id: ObjectPointerEncoded): ObjectPointerEncoded => {
|
|
57
|
+
const { documentId, objectId } = objectPointerCodec.decode(id);
|
|
58
|
+
return objectPointerCodec.encode({ documentId, objectId, spaceKey: undefined });
|
|
20
59
|
},
|
|
21
60
|
};
|
|
@@ -14,14 +14,13 @@ message FunctionsConfig {
|
|
|
14
14
|
optional string manifest = 2;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// TODO(burdon): Reconcile with typedefs.
|
|
18
17
|
message Function {
|
|
19
|
-
string
|
|
18
|
+
string id = 1;
|
|
19
|
+
string route = 2;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
message RegisterRequest {
|
|
23
23
|
string endpoint = 1;
|
|
24
|
-
repeated Function functions = 2;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
message RegisterResponse {
|
|
@@ -29,11 +28,17 @@ message RegisterResponse {
|
|
|
29
28
|
string endpoint = 2;
|
|
30
29
|
}
|
|
31
30
|
|
|
31
|
+
message UpdateRegistrationRequest {
|
|
32
|
+
string registration_id = 1;
|
|
33
|
+
repeated Function functions = 2;
|
|
34
|
+
}
|
|
35
|
+
|
|
32
36
|
message UnregisterRequest {
|
|
33
37
|
string registration_id = 1;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
service FunctionRegistryService {
|
|
37
41
|
rpc Register(RegisterRequest) returns (RegisterResponse) {}
|
|
42
|
+
rpc UpdateRegistration(UpdateRegistrationRequest) returns (google.protobuf.Empty) {}
|
|
38
43
|
rpc Unregister(UnregisterRequest) returns (google.protobuf.Empty) {}
|
|
39
44
|
}
|
|
@@ -203,12 +203,12 @@ message SpaceMember {
|
|
|
203
203
|
enum PresenceState {
|
|
204
204
|
OFFLINE = 0;
|
|
205
205
|
ONLINE = 1;
|
|
206
|
-
REMOVED = 2;
|
|
207
206
|
}
|
|
208
207
|
|
|
209
208
|
Identity identity = 1;
|
|
210
209
|
PresenceState presence = 2;
|
|
211
210
|
repeated dxos.mesh.presence.PeerState peerStates = 3;
|
|
211
|
+
dxos.halo.credentials.SpaceMember.Role role = 4;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
/// Runtime state of the space object.
|
|
@@ -170,13 +170,13 @@ message DeviceProfileDocument {
|
|
|
170
170
|
|
|
171
171
|
optional string platform = 2;
|
|
172
172
|
optional string platform_version = 3;
|
|
173
|
-
optional string architecture = 4;
|
|
173
|
+
optional string architecture = 4;
|
|
174
174
|
optional string os = 5;
|
|
175
175
|
optional string os_version = 6;
|
|
176
176
|
optional DeviceType type = 7;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
/// [ASSERTION]: Sets device profile information.
|
|
179
|
+
/// [ASSERTION]: Sets device profile information.
|
|
180
180
|
message DeviceProfile {
|
|
181
181
|
DeviceProfileDocument profile = 1;
|
|
182
182
|
}
|
|
@@ -82,7 +82,8 @@ export interface FunctionsConfig {
|
|
|
82
82
|
* {@link file://./../../../dxos/agent/functions.proto}
|
|
83
83
|
*/
|
|
84
84
|
export interface Function {
|
|
85
|
-
|
|
85
|
+
id: string;
|
|
86
|
+
route: string;
|
|
86
87
|
}
|
|
87
88
|
/**
|
|
88
89
|
* Defined in:
|
|
@@ -90,7 +91,6 @@ export interface Function {
|
|
|
90
91
|
*/
|
|
91
92
|
export interface RegisterRequest {
|
|
92
93
|
endpoint: string;
|
|
93
|
-
functions?: Function[];
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* Defined in:
|
|
@@ -100,6 +100,14 @@ export interface RegisterResponse {
|
|
|
100
100
|
registrationId: string;
|
|
101
101
|
endpoint: string;
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Defined in:
|
|
105
|
+
* {@link file://./../../../dxos/agent/functions.proto}
|
|
106
|
+
*/
|
|
107
|
+
export interface UpdateRegistrationRequest {
|
|
108
|
+
registrationId: string;
|
|
109
|
+
functions?: Function[];
|
|
110
|
+
}
|
|
103
111
|
/**
|
|
104
112
|
* Defined in:
|
|
105
113
|
* {@link file://./../../../dxos/agent/functions.proto}
|
|
@@ -113,5 +121,6 @@ export interface UnregisterRequest {
|
|
|
113
121
|
*/
|
|
114
122
|
export interface FunctionRegistryService {
|
|
115
123
|
register: (request: RegisterRequest, options?: RequestOptions) => Promise<RegisterResponse>;
|
|
124
|
+
updateRegistration: (request: UpdateRegistrationRequest, options?: RequestOptions) => Promise<void>;
|
|
116
125
|
unregister: (request: UnregisterRequest, options?: RequestOptions) => Promise<void>;
|
|
117
126
|
}
|
|
@@ -61,181 +61,6 @@ import * as dxos_value from "../value";
|
|
|
61
61
|
import * as example_testing_data from "../../example/testing/data";
|
|
62
62
|
import * as example_testing_rpc from "../../example/testing/rpc";
|
|
63
63
|
import * as google_protobuf from "../../google/protobuf";
|
|
64
|
-
/**
|
|
65
|
-
* Defined in:
|
|
66
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
67
|
-
*/
|
|
68
|
-
export interface Metrics {
|
|
69
|
-
timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
70
|
-
values?: Metrics.KeyPair[];
|
|
71
|
-
}
|
|
72
|
-
export namespace Metrics {
|
|
73
|
-
/**
|
|
74
|
-
* Defined in:
|
|
75
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
76
|
-
*/
|
|
77
|
-
export interface KeyPair {
|
|
78
|
-
/**
|
|
79
|
-
* Options:
|
|
80
|
-
* - proto3_optional = true
|
|
81
|
-
*/
|
|
82
|
-
key?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Options:
|
|
85
|
-
* - proto3_optional = true
|
|
86
|
-
*/
|
|
87
|
-
value?: dxos_value.Value;
|
|
88
|
-
/**
|
|
89
|
-
* Options:
|
|
90
|
-
* - proto3_optional = true
|
|
91
|
-
*/
|
|
92
|
-
stats?: dxos_value.Stats;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Defined in:
|
|
97
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
98
|
-
*/
|
|
99
|
-
export interface ControlMetricsRequest {
|
|
100
|
-
/**
|
|
101
|
-
* Options:
|
|
102
|
-
* - proto3_optional = true
|
|
103
|
-
*/
|
|
104
|
-
reset?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Options:
|
|
107
|
-
* - proto3_optional = true
|
|
108
|
-
*/
|
|
109
|
-
record?: boolean;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Defined in:
|
|
113
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
114
|
-
*/
|
|
115
|
-
export interface ControlMetricsResponse {
|
|
116
|
-
/**
|
|
117
|
-
* Options:
|
|
118
|
-
* - proto3_optional = true
|
|
119
|
-
*/
|
|
120
|
-
recording?: boolean;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Defined in:
|
|
124
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
125
|
-
*/
|
|
126
|
-
export interface QueryMetricsRequest {
|
|
127
|
-
/**
|
|
128
|
-
* Options:
|
|
129
|
-
* - proto3_optional = true
|
|
130
|
-
*/
|
|
131
|
-
interval?: number;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Defined in:
|
|
135
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
136
|
-
*/
|
|
137
|
-
export interface QueryMetricsResponse {
|
|
138
|
-
timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
139
|
-
metrics: Metrics;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Defined in:
|
|
143
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
144
|
-
*/
|
|
145
|
-
export enum LogLevel {
|
|
146
|
-
TRACE = 5,
|
|
147
|
-
DEBUG = 10,
|
|
148
|
-
INFO = 11,
|
|
149
|
-
WARN = 12,
|
|
150
|
-
ERROR = 13
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Defined in:
|
|
154
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
155
|
-
*/
|
|
156
|
-
export interface QueryLogsRequest {
|
|
157
|
-
filters?: QueryLogsRequest.Filter[];
|
|
158
|
-
/**
|
|
159
|
-
* Options:
|
|
160
|
-
* - proto3_optional = true
|
|
161
|
-
*/
|
|
162
|
-
options?: QueryLogsRequest.MatchingOptions;
|
|
163
|
-
}
|
|
164
|
-
export namespace QueryLogsRequest {
|
|
165
|
-
/**
|
|
166
|
-
* Defined in:
|
|
167
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
168
|
-
*/
|
|
169
|
-
export enum MatchingOptions {
|
|
170
|
-
INCLUSIVE = 1,
|
|
171
|
-
EXPLICIT = 2
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Defined in:
|
|
175
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
176
|
-
*/
|
|
177
|
-
export interface Filter {
|
|
178
|
-
level: LogLevel;
|
|
179
|
-
/**
|
|
180
|
-
* Options:
|
|
181
|
-
* - proto3_optional = true
|
|
182
|
-
*/
|
|
183
|
-
pattern?: string;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Defined in:
|
|
188
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
189
|
-
*/
|
|
190
|
-
export interface LogEntry {
|
|
191
|
-
level: LogLevel;
|
|
192
|
-
message: string;
|
|
193
|
-
/**
|
|
194
|
-
* Options:
|
|
195
|
-
* - proto3_optional = true
|
|
196
|
-
*/
|
|
197
|
-
context?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
|
|
198
|
-
/**
|
|
199
|
-
* Options:
|
|
200
|
-
* - proto3_optional = true
|
|
201
|
-
*/
|
|
202
|
-
meta?: LogEntry.Meta;
|
|
203
|
-
/**
|
|
204
|
-
* Options:
|
|
205
|
-
* - proto3_optional = true
|
|
206
|
-
*/
|
|
207
|
-
error?: dxos_error.Error;
|
|
208
|
-
timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
209
|
-
}
|
|
210
|
-
export namespace LogEntry {
|
|
211
|
-
/**
|
|
212
|
-
* Defined in:
|
|
213
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
214
|
-
*/
|
|
215
|
-
export interface Meta {
|
|
216
|
-
file: string;
|
|
217
|
-
line: number;
|
|
218
|
-
/**
|
|
219
|
-
* Options:
|
|
220
|
-
* - proto3_optional = true
|
|
221
|
-
*/
|
|
222
|
-
scope?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
|
|
223
|
-
/**
|
|
224
|
-
* Options:
|
|
225
|
-
* - proto3_optional = true
|
|
226
|
-
*/
|
|
227
|
-
resourceId?: number;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Defined in:
|
|
232
|
-
* {@link file://./../../../dxos/client/logging.proto}
|
|
233
|
-
*/
|
|
234
|
-
export interface LoggingService {
|
|
235
|
-
controlMetrics: (request: ControlMetricsRequest, options?: RequestOptions) => Promise<ControlMetricsResponse>;
|
|
236
|
-
queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
|
|
237
|
-
queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
|
|
238
|
-
}
|
|
239
64
|
/**
|
|
240
65
|
* Defined in:
|
|
241
66
|
* {@link file://./../../../dxos/client/services.proto}
|
|
@@ -534,6 +359,7 @@ export interface SpaceMember {
|
|
|
534
359
|
identity: Identity;
|
|
535
360
|
presence: SpaceMember.PresenceState;
|
|
536
361
|
peerStates?: dxos_mesh_presence.PeerState[];
|
|
362
|
+
role: dxos_halo_credentials.SpaceMember.Role;
|
|
537
363
|
}
|
|
538
364
|
export namespace SpaceMember {
|
|
539
365
|
/**
|
|
@@ -542,8 +368,7 @@ export namespace SpaceMember {
|
|
|
542
368
|
*/
|
|
543
369
|
export enum PresenceState {
|
|
544
370
|
OFFLINE = 0,
|
|
545
|
-
ONLINE = 1
|
|
546
|
-
REMOVED = 2
|
|
371
|
+
ONLINE = 1
|
|
547
372
|
}
|
|
548
373
|
}
|
|
549
374
|
/**
|
|
@@ -1142,3 +967,178 @@ export interface NetworkService {
|
|
|
1142
967
|
updateConfig: (request: UpdateConfigRequest, options?: RequestOptions) => Promise<void>;
|
|
1143
968
|
queryStatus: (request: void, options?: RequestOptions) => Stream<NetworkStatus>;
|
|
1144
969
|
}
|
|
970
|
+
/**
|
|
971
|
+
* Defined in:
|
|
972
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
973
|
+
*/
|
|
974
|
+
export interface Metrics {
|
|
975
|
+
timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
976
|
+
values?: Metrics.KeyPair[];
|
|
977
|
+
}
|
|
978
|
+
export namespace Metrics {
|
|
979
|
+
/**
|
|
980
|
+
* Defined in:
|
|
981
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
982
|
+
*/
|
|
983
|
+
export interface KeyPair {
|
|
984
|
+
/**
|
|
985
|
+
* Options:
|
|
986
|
+
* - proto3_optional = true
|
|
987
|
+
*/
|
|
988
|
+
key?: string;
|
|
989
|
+
/**
|
|
990
|
+
* Options:
|
|
991
|
+
* - proto3_optional = true
|
|
992
|
+
*/
|
|
993
|
+
value?: dxos_value.Value;
|
|
994
|
+
/**
|
|
995
|
+
* Options:
|
|
996
|
+
* - proto3_optional = true
|
|
997
|
+
*/
|
|
998
|
+
stats?: dxos_value.Stats;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Defined in:
|
|
1003
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1004
|
+
*/
|
|
1005
|
+
export interface ControlMetricsRequest {
|
|
1006
|
+
/**
|
|
1007
|
+
* Options:
|
|
1008
|
+
* - proto3_optional = true
|
|
1009
|
+
*/
|
|
1010
|
+
reset?: boolean;
|
|
1011
|
+
/**
|
|
1012
|
+
* Options:
|
|
1013
|
+
* - proto3_optional = true
|
|
1014
|
+
*/
|
|
1015
|
+
record?: boolean;
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Defined in:
|
|
1019
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1020
|
+
*/
|
|
1021
|
+
export interface ControlMetricsResponse {
|
|
1022
|
+
/**
|
|
1023
|
+
* Options:
|
|
1024
|
+
* - proto3_optional = true
|
|
1025
|
+
*/
|
|
1026
|
+
recording?: boolean;
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Defined in:
|
|
1030
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1031
|
+
*/
|
|
1032
|
+
export interface QueryMetricsRequest {
|
|
1033
|
+
/**
|
|
1034
|
+
* Options:
|
|
1035
|
+
* - proto3_optional = true
|
|
1036
|
+
*/
|
|
1037
|
+
interval?: number;
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Defined in:
|
|
1041
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1042
|
+
*/
|
|
1043
|
+
export interface QueryMetricsResponse {
|
|
1044
|
+
timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
1045
|
+
metrics: Metrics;
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* Defined in:
|
|
1049
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1050
|
+
*/
|
|
1051
|
+
export enum LogLevel {
|
|
1052
|
+
TRACE = 5,
|
|
1053
|
+
DEBUG = 10,
|
|
1054
|
+
INFO = 11,
|
|
1055
|
+
WARN = 12,
|
|
1056
|
+
ERROR = 13
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Defined in:
|
|
1060
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1061
|
+
*/
|
|
1062
|
+
export interface QueryLogsRequest {
|
|
1063
|
+
filters?: QueryLogsRequest.Filter[];
|
|
1064
|
+
/**
|
|
1065
|
+
* Options:
|
|
1066
|
+
* - proto3_optional = true
|
|
1067
|
+
*/
|
|
1068
|
+
options?: QueryLogsRequest.MatchingOptions;
|
|
1069
|
+
}
|
|
1070
|
+
export namespace QueryLogsRequest {
|
|
1071
|
+
/**
|
|
1072
|
+
* Defined in:
|
|
1073
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1074
|
+
*/
|
|
1075
|
+
export enum MatchingOptions {
|
|
1076
|
+
INCLUSIVE = 1,
|
|
1077
|
+
EXPLICIT = 2
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Defined in:
|
|
1081
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1082
|
+
*/
|
|
1083
|
+
export interface Filter {
|
|
1084
|
+
level: LogLevel;
|
|
1085
|
+
/**
|
|
1086
|
+
* Options:
|
|
1087
|
+
* - proto3_optional = true
|
|
1088
|
+
*/
|
|
1089
|
+
pattern?: string;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Defined in:
|
|
1094
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1095
|
+
*/
|
|
1096
|
+
export interface LogEntry {
|
|
1097
|
+
level: LogLevel;
|
|
1098
|
+
message: string;
|
|
1099
|
+
/**
|
|
1100
|
+
* Options:
|
|
1101
|
+
* - proto3_optional = true
|
|
1102
|
+
*/
|
|
1103
|
+
context?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
|
|
1104
|
+
/**
|
|
1105
|
+
* Options:
|
|
1106
|
+
* - proto3_optional = true
|
|
1107
|
+
*/
|
|
1108
|
+
meta?: LogEntry.Meta;
|
|
1109
|
+
/**
|
|
1110
|
+
* Options:
|
|
1111
|
+
* - proto3_optional = true
|
|
1112
|
+
*/
|
|
1113
|
+
error?: dxos_error.Error;
|
|
1114
|
+
timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
1115
|
+
}
|
|
1116
|
+
export namespace LogEntry {
|
|
1117
|
+
/**
|
|
1118
|
+
* Defined in:
|
|
1119
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1120
|
+
*/
|
|
1121
|
+
export interface Meta {
|
|
1122
|
+
file: string;
|
|
1123
|
+
line: number;
|
|
1124
|
+
/**
|
|
1125
|
+
* Options:
|
|
1126
|
+
* - proto3_optional = true
|
|
1127
|
+
*/
|
|
1128
|
+
scope?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
|
|
1129
|
+
/**
|
|
1130
|
+
* Options:
|
|
1131
|
+
* - proto3_optional = true
|
|
1132
|
+
*/
|
|
1133
|
+
resourceId?: number;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Defined in:
|
|
1138
|
+
* {@link file://./../../../dxos/client/logging.proto}
|
|
1139
|
+
*/
|
|
1140
|
+
export interface LoggingService {
|
|
1141
|
+
controlMetrics: (request: ControlMetricsRequest, options?: RequestOptions) => Promise<ControlMetricsResponse>;
|
|
1142
|
+
queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
|
|
1143
|
+
queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
|
|
1144
|
+
}
|
|
@@ -61,37 +61,6 @@ import * as dxos_value from "../value";
|
|
|
61
61
|
import * as example_testing_data from "../../example/testing/data";
|
|
62
62
|
import * as example_testing_rpc from "../../example/testing/rpc";
|
|
63
63
|
import * as google_protobuf from "../../google/protobuf";
|
|
64
|
-
/**
|
|
65
|
-
* Defined in:
|
|
66
|
-
* {@link file://./../../../dxos/devtools/diagnostics.proto}
|
|
67
|
-
*/
|
|
68
|
-
export interface Services {
|
|
69
|
-
spaces?: SpaceStats[];
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Defined in:
|
|
73
|
-
* {@link file://./../../../dxos/devtools/diagnostics.proto}
|
|
74
|
-
*/
|
|
75
|
-
export interface SpaceStats {
|
|
76
|
-
key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
77
|
-
peers?: PeerStats[];
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Defined in:
|
|
81
|
-
* {@link file://./../../../dxos/devtools/diagnostics.proto}
|
|
82
|
-
*/
|
|
83
|
-
export interface PeerStats {
|
|
84
|
-
controlFeed: FeedStats;
|
|
85
|
-
dataFeed: FeedStats;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Defined in:
|
|
89
|
-
* {@link file://./../../../dxos/devtools/diagnostics.proto}
|
|
90
|
-
*/
|
|
91
|
-
export interface FeedStats {
|
|
92
|
-
key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
93
|
-
length: number;
|
|
94
|
-
}
|
|
95
64
|
/**
|
|
96
65
|
* Defined in:
|
|
97
66
|
* {@link file://./../../../dxos/devtools/host.proto}
|
|
@@ -514,3 +483,34 @@ export interface SubscribeToSwarmInfoRequest {
|
|
|
514
483
|
export interface SubscribeToSwarmInfoResponse {
|
|
515
484
|
data?: dxos_devtools_swarm.SwarmInfo[];
|
|
516
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* Defined in:
|
|
488
|
+
* {@link file://./../../../dxos/devtools/diagnostics.proto}
|
|
489
|
+
*/
|
|
490
|
+
export interface Services {
|
|
491
|
+
spaces?: SpaceStats[];
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Defined in:
|
|
495
|
+
* {@link file://./../../../dxos/devtools/diagnostics.proto}
|
|
496
|
+
*/
|
|
497
|
+
export interface SpaceStats {
|
|
498
|
+
key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
499
|
+
peers?: PeerStats[];
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Defined in:
|
|
503
|
+
* {@link file://./../../../dxos/devtools/diagnostics.proto}
|
|
504
|
+
*/
|
|
505
|
+
export interface PeerStats {
|
|
506
|
+
controlFeed: FeedStats;
|
|
507
|
+
dataFeed: FeedStats;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Defined in:
|
|
511
|
+
* {@link file://./../../../dxos/devtools/diagnostics.proto}
|
|
512
|
+
*/
|
|
513
|
+
export interface FeedStats {
|
|
514
|
+
key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
515
|
+
length: number;
|
|
516
|
+
}
|