@dxos/client-services 0.8.4-main.b97322e → 0.8.4-main.bc2380dfbc
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/browser/chunk-QCWEHHJW.mjs +24 -0
- package/dist/lib/browser/chunk-QCWEHHJW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WKKP35EC.mjs → chunk-TUCJORVO.mjs} +3173 -4457
- package/dist/lib/browser/chunk-TUCJORVO.mjs.map +7 -0
- package/dist/lib/browser/chunk-XJRPB3GA.mjs +22 -0
- package/dist/lib/browser/chunk-XJRPB3GA.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +451 -145
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/diagnostics/browser-diagnostics-broadcast.mjs +88 -0
- package/dist/lib/browser/packlets/diagnostics/browser-diagnostics-broadcast.mjs.map +7 -0
- package/dist/lib/browser/packlets/diagnostics/diagnostics-broadcast.mjs +11 -0
- package/dist/lib/browser/packlets/diagnostics/diagnostics-broadcast.mjs.map +7 -0
- package/dist/lib/browser/packlets/locks/browser.mjs +86 -0
- package/dist/lib/browser/packlets/locks/browser.mjs.map +7 -0
- package/dist/lib/browser/packlets/locks/node.mjs +48 -0
- package/dist/lib/browser/packlets/locks/node.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +35 -36
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/chunk-2DT3MZRL.mjs +22 -0
- package/dist/lib/node-esm/chunk-2DT3MZRL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2SZHAWBN.mjs +24 -0
- package/dist/lib/node-esm/chunk-2SZHAWBN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZE2HYS56.mjs → chunk-IQLAKNSR.mjs} +3052 -4204
- package/dist/lib/node-esm/chunk-IQLAKNSR.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +451 -145
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/packlets/diagnostics/browser-diagnostics-broadcast.mjs +88 -0
- package/dist/lib/node-esm/packlets/diagnostics/browser-diagnostics-broadcast.mjs.map +7 -0
- package/dist/lib/node-esm/packlets/diagnostics/diagnostics-broadcast.mjs +11 -0
- package/dist/lib/node-esm/packlets/diagnostics/diagnostics-broadcast.mjs.map +7 -0
- package/dist/lib/node-esm/packlets/locks/browser.mjs +86 -0
- package/dist/lib/node-esm/packlets/locks/browser.mjs.map +7 -0
- package/dist/lib/node-esm/packlets/locks/node.mjs +48 -0
- package/dist/lib/node-esm/packlets/locks/node.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +35 -36
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/packlets/agents/edge-agent-manager.d.ts +3 -2
- package/dist/types/src/packlets/agents/edge-agent-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/agents/edge-agent-service.d.ts +3 -2
- package/dist/types/src/packlets/agents/edge-agent-service.d.ts.map +1 -1
- package/dist/types/src/packlets/devices/devices-service.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/devtools.d.ts +20 -20
- package/dist/types/src/packlets/devtools/devtools.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts +1 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/keys.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/metadata.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/spaces.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/browser-diagnostics-broadcast.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/browser-diagnostics-broadcast.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics-broadcast.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics-broadcast.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics-collector.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics.d.ts +3 -4
- package/dist/types/src/packlets/diagnostics/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/index.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/index.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/authenticator.d.ts +2 -2
- package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/contacts-service.d.ts +1 -1
- package/dist/types/src/packlets/identity/contacts-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-manager.d.ts +7 -7
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts +8 -7
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts +6 -10
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts +9 -12
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts +6 -5
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/edge-invitation-handler.d.ts +2 -2
- package/dist/types/src/packlets/invitations/edge-invitation-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-guest-extenstion.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-host-extension.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-protocol.d.ts +8 -5
- package/dist/types/src/packlets/invitations/invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-state.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-topology.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts +4 -4
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-manager.d.ts +3 -3
- package/dist/types/src/packlets/invitations/invitations-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts +4 -4
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +5 -4
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/utils.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/browser.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/index.d.ts +1 -1
- package/dist/types/src/packlets/locks/index.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/node.d.ts.map +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts +5 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
- package/dist/types/src/packlets/network/network-service.d.ts +7 -6
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/client-rpc-server.d.ts +5 -5
- package/dist/types/src/packlets/services/client-rpc-server.d.ts.map +1 -1
- package/dist/types/src/packlets/services/feed-syncer.d.ts +59 -0
- package/dist/types/src/packlets/services/feed-syncer.d.ts.map +1 -0
- package/dist/types/src/packlets/services/feed-syncer.test.d.ts +2 -0
- package/dist/types/src/packlets/services/feed-syncer.test.d.ts.map +1 -0
- package/dist/types/src/packlets/services/platform.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +14 -10
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +20 -7
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-registry.d.ts.map +1 -1
- package/dist/types/src/packlets/services/util.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/archive-format.d.ts +9 -0
- package/dist/types/src/packlets/space-export/archive-format.d.ts.map +1 -0
- package/dist/types/src/packlets/space-export/index.d.ts +4 -1
- package/dist/types/src/packlets/space-export/index.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/serialized-space-reader.d.ts +23 -0
- package/dist/types/src/packlets/space-export/serialized-space-reader.d.ts.map +1 -0
- package/dist/types/src/packlets/space-export/serialized-space-writer.d.ts +36 -0
- package/dist/types/src/packlets/space-export/serialized-space-writer.d.ts.map +1 -0
- package/dist/types/src/packlets/space-export/space-archive-reader.d.ts +9 -1
- package/dist/types/src/packlets/space-export/space-archive-reader.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/space-archive-writer.d.ts +8 -2
- package/dist/types/src/packlets/space-export/space-archive-writer.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/space-archive.test.d.ts +2 -0
- package/dist/types/src/packlets/space-export/space-archive.test.d.ts.map +1 -0
- package/dist/types/src/packlets/spaces/automerge-space-state.d.ts +1 -1
- package/dist/types/src/packlets/spaces/automerge-space-state.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts +31 -20
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +30 -13
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts +2 -2
- package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/epoch-migrations.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/genesis.d.ts +2 -1
- package/dist/types/src/packlets/spaces/genesis.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts +6 -9
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +11 -8
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/level.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/profile-archive.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/storage.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/util.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +2 -2
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/credential-utils.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/invitation-utils.d.ts +6 -3
- package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts +8 -7
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-runtime.d.ts +41 -4
- package/dist/types/src/packlets/worker/worker-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-session.d.ts +2 -4
- package/dist/types/src/packlets/worker/worker-session.d.ts.map +1 -1
- package/dist/types/src/testing/setup.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +73 -56
- package/src/index.ts +1 -0
- package/src/packlets/agents/edge-agent-manager.ts +10 -7
- package/src/packlets/agents/edge-agent-service.ts +17 -5
- package/src/packlets/devices/devices-service.test.ts +3 -3
- package/src/packlets/devices/devices-service.ts +2 -2
- package/src/packlets/devtools/devtools.ts +29 -29
- package/src/packlets/devtools/feeds.ts +2 -2
- package/src/packlets/devtools/network.ts +1 -1
- package/src/packlets/diagnostics/browser-diagnostics-broadcast.ts +1 -1
- package/src/packlets/diagnostics/diagnostics-broadcast.ts +1 -1
- package/src/packlets/diagnostics/diagnostics-collector.ts +1 -1
- package/src/packlets/diagnostics/diagnostics.ts +2 -3
- package/src/packlets/diagnostics/index.ts +1 -1
- package/src/packlets/identity/authenticator.node.test.ts +1 -1
- package/src/packlets/identity/authenticator.ts +3 -3
- package/src/packlets/identity/contacts-service.ts +2 -2
- package/src/packlets/identity/identity-manager.test.ts +8 -8
- package/src/packlets/identity/identity-manager.ts +25 -24
- package/src/packlets/identity/identity-recovery-manager.ts +22 -18
- package/src/packlets/identity/identity-service.test.ts +8 -28
- package/src/packlets/identity/identity-service.ts +13 -80
- package/src/packlets/identity/identity.test.ts +11 -11
- package/src/packlets/identity/identity.ts +17 -39
- package/src/packlets/invitations/device-invitation-protocol.test.ts +1 -1
- package/src/packlets/invitations/device-invitation-protocol.ts +8 -6
- package/src/packlets/invitations/edge-invitation-handler.ts +10 -6
- package/src/packlets/invitations/invitation-guest-extenstion.ts +7 -5
- package/src/packlets/invitations/invitation-host-extension.ts +15 -16
- package/src/packlets/invitations/invitation-protocol.ts +8 -5
- package/src/packlets/invitations/invitation-state.ts +1 -15
- package/src/packlets/invitations/invitations-handler.test.ts +7 -7
- package/src/packlets/invitations/invitations-handler.ts +77 -25
- package/src/packlets/invitations/invitations-manager.ts +43 -18
- package/src/packlets/invitations/invitations-service.ts +10 -10
- package/src/packlets/invitations/space-invitation-protocol.test.ts +19 -18
- package/src/packlets/invitations/space-invitation-protocol.ts +13 -17
- package/src/packlets/invitations/utils.ts +1 -1
- package/src/packlets/locks/browser.ts +1 -1
- package/src/packlets/locks/index.ts +1 -1
- package/src/packlets/logging/logging-service.ts +22 -18
- package/src/packlets/logging/logging.test.ts +1 -1
- package/src/packlets/network/network-service.test.ts +3 -3
- package/src/packlets/network/network-service.ts +12 -10
- package/src/packlets/services/client-rpc-server.ts +20 -17
- package/src/packlets/services/feed-syncer.test.ts +340 -0
- package/src/packlets/services/feed-syncer.ts +377 -0
- package/src/packlets/services/platform.ts +7 -1
- package/src/packlets/services/service-context.test.ts +4 -3
- package/src/packlets/services/service-context.ts +160 -67
- package/src/packlets/services/service-host.test.ts +10 -9
- package/src/packlets/services/service-host.ts +85 -47
- package/src/packlets/services/service-registry.test.ts +1 -1
- package/src/packlets/space-export/archive-format.ts +42 -0
- package/src/packlets/space-export/index.ts +4 -1
- package/src/packlets/space-export/serialized-space-reader.ts +111 -0
- package/src/packlets/space-export/serialized-space-writer.ts +252 -0
- package/src/packlets/space-export/space-archive-reader.ts +65 -4
- package/src/packlets/space-export/space-archive-writer.ts +44 -6
- package/src/packlets/space-export/space-archive.test.ts +461 -0
- package/src/packlets/space-export/tar.test.ts +1 -1
- package/src/packlets/spaces/automerge-space-state.ts +1 -1
- package/src/packlets/spaces/data-space-manager.test.ts +79 -13
- package/src/packlets/spaces/data-space-manager.ts +134 -129
- package/src/packlets/spaces/data-space.ts +71 -42
- package/src/packlets/spaces/edge-feed-replicator.test.ts +4 -4
- package/src/packlets/spaces/edge-feed-replicator.ts +13 -11
- package/src/packlets/spaces/epoch-migrations.ts +6 -5
- package/src/packlets/spaces/genesis.ts +6 -1
- package/src/packlets/spaces/notarization-plugin.test.ts +3 -3
- package/src/packlets/spaces/notarization-plugin.ts +13 -12
- package/src/packlets/spaces/spaces-service.test.ts +20 -12
- package/src/packlets/spaces/spaces-service.ts +139 -38
- package/src/packlets/storage/profile-archive.ts +1 -1
- package/src/packlets/storage/storage.ts +7 -8
- package/src/packlets/system/system-service.test.ts +1 -1
- package/src/packlets/system/system-service.ts +4 -4
- package/src/packlets/testing/invitation-utils.ts +11 -7
- package/src/packlets/testing/test-builder.ts +39 -13
- package/src/packlets/worker/worker-runtime.ts +189 -17
- package/src/packlets/worker/worker-session.ts +15 -21
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-WKKP35EC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZE2HYS56.mjs.map +0 -7
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts +0 -19
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts.map +0 -1
- package/src/packlets/identity/default-space-state-machine.ts +0 -44
|
@@ -9,10 +9,10 @@ import { Device } from '@dxos/protocols/proto/dxos/client/services';
|
|
|
9
9
|
import { type Runtime } from '@dxos/protocols/proto/dxos/config';
|
|
10
10
|
import { type FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
11
11
|
import { type IdentityRecord } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
12
|
-
import { type
|
|
12
|
+
import { type Credential, type DeviceProfileDocument, type ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
13
13
|
import { Timeframe } from '@dxos/timeframe';
|
|
14
14
|
import { Identity } from './identity';
|
|
15
|
-
export type
|
|
15
|
+
export type JoinIdentityProps = {
|
|
16
16
|
identityKey: PublicKey;
|
|
17
17
|
deviceKey: PublicKey;
|
|
18
18
|
haloSpaceKey: PublicKey;
|
|
@@ -31,7 +31,7 @@ export type CreateIdentityOptions = {
|
|
|
31
31
|
profile?: ProfileDocument;
|
|
32
32
|
deviceProfile?: DeviceProfileDocument;
|
|
33
33
|
};
|
|
34
|
-
export type
|
|
34
|
+
export type IdentityManagerProps = {
|
|
35
35
|
metadataStore: MetadataStore;
|
|
36
36
|
keyring: Keyring;
|
|
37
37
|
feedStore: FeedStore<FeedMessage>;
|
|
@@ -52,16 +52,16 @@ export declare class IdentityManager {
|
|
|
52
52
|
private readonly _edgeConnection;
|
|
53
53
|
private readonly _edgeFeatures;
|
|
54
54
|
private _identity?;
|
|
55
|
-
constructor(params:
|
|
55
|
+
constructor(params: IdentityManagerProps);
|
|
56
56
|
get identity(): Identity | undefined;
|
|
57
57
|
open(ctx: Context): Promise<void>;
|
|
58
|
-
close(): Promise<void>;
|
|
59
|
-
createIdentity({ profile, deviceProfile }?: CreateIdentityOptions): Promise<Identity>;
|
|
58
|
+
close(ctx: Context): Promise<void>;
|
|
59
|
+
createIdentity({ profile, deviceProfile }?: CreateIdentityOptions, ctx?: Context): Promise<Identity>;
|
|
60
60
|
createDefaultDeviceProfile(): DeviceProfileDocument;
|
|
61
61
|
/**
|
|
62
62
|
* Prepare an identity object as the first step of acceptIdentity flow.
|
|
63
63
|
*/
|
|
64
|
-
prepareIdentity(params:
|
|
64
|
+
prepareIdentity(params: JoinIdentityProps, ctx?: Context): Promise<{
|
|
65
65
|
identity: Identity;
|
|
66
66
|
identityRecord: IdentityRecord;
|
|
67
67
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-manager.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-manager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"identity-manager.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-manager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAc,MAAM,4CAA4C,CAAC;AAChF,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}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
+
import { type Context } from '@dxos/context';
|
|
1
2
|
import { type EdgeHttpClient } from '@dxos/edge-client';
|
|
2
3
|
import { type Keyring } from '@dxos/keyring';
|
|
3
4
|
import { PublicKey } from '@dxos/keys';
|
|
4
5
|
import { type CreateRecoveryCredentialRequest, type RecoverIdentityRequest } from '@dxos/protocols/proto/dxos/client/services';
|
|
5
6
|
import { type Identity } from './identity';
|
|
6
|
-
import { type
|
|
7
|
+
import { type JoinIdentityProps } from './identity-manager';
|
|
7
8
|
export declare class EdgeIdentityRecoveryManager {
|
|
8
9
|
private readonly _keyring;
|
|
9
10
|
private readonly _edgeClient;
|
|
10
11
|
private readonly _identityProvider;
|
|
11
12
|
private readonly _acceptRecoveredIdentity;
|
|
12
|
-
constructor(_keyring: Keyring, _edgeClient: EdgeHttpClient | undefined, _identityProvider: () => Identity | undefined, _acceptRecoveredIdentity: (params:
|
|
13
|
-
createRecoveryCredential({ data
|
|
13
|
+
constructor(_keyring: Keyring, _edgeClient: EdgeHttpClient | undefined, _identityProvider: () => Identity | undefined, _acceptRecoveredIdentity: (params: JoinIdentityProps) => Promise<Identity>);
|
|
14
|
+
createRecoveryCredential({ data }: CreateRecoveryCredentialRequest): Promise<{
|
|
14
15
|
recoveryCode: string | undefined;
|
|
15
16
|
}>;
|
|
16
|
-
requestRecoveryChallenge(): Promise<{
|
|
17
|
+
requestRecoveryChallenge(ctx: Context): Promise<{
|
|
17
18
|
deviceKey: PublicKey;
|
|
18
19
|
controlFeedKey: PublicKey;
|
|
19
20
|
challenge: string;
|
|
20
21
|
}>;
|
|
21
|
-
recoverIdentityWithExternalSignature({ lookupKey, deviceKey, controlFeedKey, signature, clientDataJson, authenticatorData
|
|
22
|
+
recoverIdentityWithExternalSignature(ctx: Context, { lookupKey, deviceKey, controlFeedKey, signature, clientDataJson, authenticatorData }: RecoverIdentityRequest.ExternalSignature): Promise<void>;
|
|
22
23
|
/**
|
|
23
24
|
* Recovery identity using an opaque token sent to the user's email.
|
|
24
25
|
*/
|
|
25
|
-
recoverIdentityWithToken({ token }: {
|
|
26
|
+
recoverIdentityWithToken(ctx: Context, { token }: {
|
|
26
27
|
token: string;
|
|
27
28
|
}): Promise<void>;
|
|
28
|
-
recoverIdentity({ recoveryCode }: {
|
|
29
|
+
recoverIdentity(ctx: Context, { recoveryCode }: {
|
|
29
30
|
recoveryCode: string;
|
|
30
31
|
}): Promise<void>;
|
|
31
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-recovery-manager.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-recovery-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"identity-recovery-manager.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-recovery-manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAQvC,OAAO,EACL,KAAK,+BAA+B,EACpC,KAAK,sBAAsB,EAC5B,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,qBAAa,2BAA2B;IAEpC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,wBAAwB;IAJ3C,YACmB,QAAQ,EAAE,OAAO,EACjB,WAAW,EAAE,cAAc,GAAG,SAAS,EACvC,iBAAiB,EAAE,MAAM,QAAQ,GAAG,SAAS,EAC7C,wBAAwB,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,QAAQ,CAAC,EACzF;IAES,wBAAwB,CAAC,EACpC,IAAI,EACL,EAAE,+BAA+B,GAAG,OAAO,CAAC;QAAE,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAoCjF;IAEY,wBAAwB,CAAC,GAAG,EAAE,OAAO;;;;OAuBjD;IAEY,oCAAoC,CAC/C,GAAG,EAAE,OAAO,EACZ,EACE,SAAS,EACT,SAAS,EACT,cAAc,EACd,SAAS,EACT,cAAc,EACd,iBAAiB,EAClB,EAAE,sBAAsB,CAAC,iBAAiB,GAC1C,OAAO,CAAC,IAAI,CAAC,CA4Bf;IAED;;OAEG;IACU,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB/F;IAEY,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCpG;CACF"}
|
|
@@ -1,37 +1,33 @@
|
|
|
1
|
+
import { type RequestOptions } from '@dxos/codec-protobuf';
|
|
1
2
|
import { Stream } from '@dxos/codec-protobuf/stream';
|
|
2
|
-
import { Resource } from '@dxos/context';
|
|
3
|
+
import { Context, Resource } from '@dxos/context';
|
|
3
4
|
import { type Keyring } from '@dxos/keyring';
|
|
4
5
|
import { type CreateIdentityRequest, type CreateRecoveryCredentialRequest, type Identity as IdentityProto, type IdentityService, type QueryIdentityResponse, type RecoverIdentityRequest, type SignPresentationRequest } from '@dxos/protocols/proto/dxos/client/services';
|
|
5
6
|
import { type Presentation, type ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
6
7
|
import { type Identity } from './identity';
|
|
7
8
|
import { type CreateIdentityOptions, type IdentityManager } from './identity-manager';
|
|
8
9
|
import { type EdgeIdentityRecoveryManager } from './identity-recovery-manager';
|
|
9
|
-
import { type DataSpaceManager } from '../spaces';
|
|
10
10
|
export declare class IdentityServiceImpl extends Resource implements IdentityService {
|
|
11
11
|
private readonly _identityManager;
|
|
12
12
|
private readonly _recoveryManager;
|
|
13
13
|
private readonly _keyring;
|
|
14
|
-
private readonly _dataSpaceManagerProvider;
|
|
15
14
|
private readonly _createIdentity;
|
|
16
15
|
private readonly _onProfileUpdate?;
|
|
17
|
-
constructor(_identityManager: IdentityManager, _recoveryManager: EdgeIdentityRecoveryManager, _keyring: Keyring,
|
|
18
|
-
|
|
19
|
-
createIdentity(request: CreateIdentityRequest): Promise<IdentityProto>;
|
|
20
|
-
private _createDefaultSpace;
|
|
16
|
+
constructor(_identityManager: IdentityManager, _recoveryManager: EdgeIdentityRecoveryManager, _keyring: Keyring, _createIdentity: (params: CreateIdentityOptions, ctx?: Context) => Promise<Identity>, _onProfileUpdate?: ((profile: ProfileDocument | undefined) => Promise<void>) | undefined);
|
|
17
|
+
createIdentity(request: CreateIdentityRequest, options?: RequestOptions): Promise<IdentityProto>;
|
|
21
18
|
queryIdentity(): Stream<QueryIdentityResponse>;
|
|
22
19
|
private _getIdentity;
|
|
23
20
|
updateProfile(profile: ProfileDocument): Promise<IdentityProto>;
|
|
24
21
|
createRecoveryCredential(request: CreateRecoveryCredentialRequest): Promise<{
|
|
25
22
|
recoveryCode: string | undefined;
|
|
26
23
|
}>;
|
|
27
|
-
requestRecoveryChallenge(): Promise<{
|
|
24
|
+
requestRecoveryChallenge(_request: void, options?: RequestOptions): Promise<{
|
|
28
25
|
deviceKey: import("@dxos/keys").PublicKey;
|
|
29
26
|
controlFeedKey: import("@dxos/keys").PublicKey;
|
|
30
27
|
challenge: string;
|
|
31
28
|
}>;
|
|
32
|
-
recoverIdentity(request: RecoverIdentityRequest): Promise<IdentityProto>;
|
|
29
|
+
recoverIdentity(request: RecoverIdentityRequest, options?: RequestOptions): Promise<IdentityProto>;
|
|
33
30
|
signPresentation({ presentation, nonce }: SignPresentationRequest): Promise<Presentation>;
|
|
34
31
|
createAuthCredential(): Promise<import("@dxos/protocols/proto/dxos/halo/credentials").Credential>;
|
|
35
|
-
private _fixIdentityWithoutDefaultSpace;
|
|
36
32
|
}
|
|
37
33
|
//# sourceMappingURL=identity-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"identity-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGlD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,KAAK,QAAQ,IAAI,aAAa,EAC9B,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC7B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAEtG,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE/E,qBAAa,mBAAoB,SAAQ,QAAS,YAAW,eAAe;IAExE,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IALpC,YACmB,gBAAgB,EAAE,eAAe,EACjC,gBAAgB,EAAE,2BAA2B,EAC7C,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,EACpF,gBAAgB,CAAC,GAAE,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,aAAA,EAG5F;IAEK,cAAc,CAAC,OAAO,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAIrG;IAED,aAAa,IAAI,MAAM,CAAC,qBAAqB,CAAC,CAO7C;IAED,OAAO,CAAC,YAAY;IAad,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC,CAKpE;IAEK,wBAAwB,CAAC,OAAO,EAAE,+BAA+B;;OAEtE;IAEK,wBAAwB,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,cAAc;;;;OAEtE;IAEK,eAAe,CAAC,OAAO,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAavG;IAGK,gBAAgB,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,CAAC,CAU9F;IAEK,oBAAoB,8EAazB;CACF"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Event } from '@dxos/async';
|
|
2
|
-
import { type Context } from '@dxos/context';
|
|
2
|
+
import { type Context as DxosContext } from '@dxos/context';
|
|
3
3
|
import { type CredentialSigner } from '@dxos/credentials';
|
|
4
4
|
import { type Signer } from '@dxos/crypto';
|
|
5
5
|
import { type Space } from '@dxos/echo-pipeline';
|
|
6
6
|
import { type EdgeConnection } from '@dxos/edge-client';
|
|
7
|
-
import { type IdentityDid, PublicKey
|
|
7
|
+
import { type IdentityDid, PublicKey } from '@dxos/keys';
|
|
8
8
|
import { type Runtime } from '@dxos/protocols/proto/dxos/config';
|
|
9
|
-
import { type
|
|
9
|
+
import { type Credential, type DeviceProfileDocument, type ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
10
10
|
import { type DeviceAdmissionRequest } from '@dxos/protocols/proto/dxos/halo/invitations';
|
|
11
11
|
import { type Presence } from '@dxos/teleport-extension-gossip';
|
|
12
12
|
import { type ComplexMap } from '@dxos/util';
|
|
13
13
|
import { TrustedKeySetAuthVerifier } from './authenticator';
|
|
14
|
-
export type
|
|
14
|
+
export type IdentityProps = {
|
|
15
15
|
did: IdentityDid;
|
|
16
16
|
identityKey: PublicKey;
|
|
17
17
|
deviceKey: PublicKey;
|
|
@@ -30,26 +30,24 @@ export declare class Identity {
|
|
|
30
30
|
private readonly _presence?;
|
|
31
31
|
private readonly _deviceStateMachine;
|
|
32
32
|
private readonly _profileStateMachine;
|
|
33
|
-
private readonly _defaultSpaceStateMachine;
|
|
34
33
|
private readonly _edgeFeedReplicator?;
|
|
35
34
|
readonly authVerifier: TrustedKeySetAuthVerifier;
|
|
36
35
|
readonly did: IdentityDid;
|
|
37
36
|
readonly identityKey: PublicKey;
|
|
38
37
|
readonly deviceKey: PublicKey;
|
|
39
38
|
readonly stateUpdate: Event<void>;
|
|
40
|
-
constructor(params:
|
|
39
|
+
constructor(params: IdentityProps);
|
|
41
40
|
get authorizedDeviceKeys(): ComplexMap<PublicKey, DeviceProfileDocument>;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
close(ctx: Context): Promise<void>;
|
|
41
|
+
open(ctx: DxosContext): Promise<void>;
|
|
42
|
+
joinNetwork(ctx: DxosContext): Promise<void>;
|
|
43
|
+
close(ctx: DxosContext): Promise<void>;
|
|
46
44
|
ready(): Promise<void>;
|
|
47
45
|
get profileDocument(): ProfileDocument | undefined;
|
|
48
46
|
/**
|
|
49
47
|
* @test-only
|
|
50
48
|
*/
|
|
51
49
|
get controlPipeline(): import("@dxos/echo-pipeline").PipelineAccessor;
|
|
52
|
-
get haloSpaceId(): SpaceId;
|
|
50
|
+
get haloSpaceId(): import("@dxos/keys").SpaceId;
|
|
53
51
|
get haloSpaceKey(): PublicKey;
|
|
54
52
|
get haloGenesisFeedKey(): PublicKey;
|
|
55
53
|
get deviceCredentialChain(): import("@dxos/protocols/proto/dxos/halo/credentials").Chain | undefined;
|
|
@@ -64,7 +62,6 @@ export declare class Identity {
|
|
|
64
62
|
* Issues credentials as device.
|
|
65
63
|
*/
|
|
66
64
|
getDeviceCredentialSigner(): CredentialSigner;
|
|
67
|
-
updateDefaultSpace(spaceId: SpaceId): Promise<void>;
|
|
68
65
|
admitDevice({ deviceKey, controlFeedKey, dataFeedKey }: DeviceAdmissionRequest): Promise<Credential>;
|
|
69
66
|
private _onFeedAdded;
|
|
70
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,KAAK,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EACL,KAAK,gBAAgB,EAKtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,MAAM,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E,SAAgB,YAAY,EAAE,yBAAyB,CAAC;IAExD,SAAgB,GAAG,EAAE,WAAW,CAAC;IACjC,SAAgB,WAAW,EAAE,SAAS,CAAC;IACvC,SAAgB,SAAS,EAAE,SAAS,CAAC;IAErC,SAAgB,WAAW,cAAe;IAE1C,YAAY,MAAM,EAAE,aAAa,EA8BhC;IAGD,IAAI,oBAAoB,IAAI,UAAU,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAEvE;IAGK,IAAI,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ1C;IAEY,WAAW,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxD;IAGK,KAAK,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAa3C;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAI3B;IAED,IAAI,eAAe,IAAI,eAAe,GAAG,SAAS,CAEjD;IAED;;OAEG;IACH,IAAI,eAAe,mDAElB;IAED,IAAI,WAAW,iCAEd;IAED,IAAI,YAAY,cAEf;IAED,IAAI,kBAAkB,cAErB;IAED,IAAI,qBAAqB,4EAExB;IAED,IAAI,QAAQ,yBAEX;IAED,IAAI,MAAM,WAET;IAED;;;OAGG;IACH,2BAA2B,IAAI,gBAAgB,CAO9C;IAED;;OAEG;IACH,yBAAyB,IAAI,gBAAgB,CAE5C;IAEK,WAAW,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,CA6CzG;IAED,OAAO,CAAC,YAAY,CAElB;CACH"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { type Context } from '@dxos/context';
|
|
1
2
|
import { type Keyring } from '@dxos/keyring';
|
|
2
3
|
import { type PublicKey } from '@dxos/keys';
|
|
3
|
-
import { AlreadyJoinedError
|
|
4
|
+
import { AlreadyJoinedError } from '@dxos/protocols';
|
|
4
5
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
5
6
|
import type { DeviceProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
6
7
|
import { type AdmissionRequest, type AdmissionResponse, type IntroductionRequest } from '@dxos/protocols/proto/dxos/halo/invitations';
|
|
8
|
+
import { type Identity, type JoinIdentityProps } from '../identity';
|
|
7
9
|
import { type InvitationProtocol } from './invitation-protocol';
|
|
8
|
-
import { type Identity, type JoinIdentityParams } from '../identity';
|
|
9
10
|
export declare class DeviceInvitationProtocol implements InvitationProtocol {
|
|
10
11
|
private readonly _keyring;
|
|
11
12
|
private readonly _getIdentity;
|
|
12
13
|
private readonly _acceptIdentity;
|
|
13
|
-
constructor(_keyring: Keyring, _getIdentity: () => Identity, _acceptIdentity: (identity:
|
|
14
|
+
constructor(_keyring: Keyring, _getIdentity: () => Identity, _acceptIdentity: (identity: JoinIdentityProps) => Promise<Identity>);
|
|
14
15
|
toJSON(): object;
|
|
15
|
-
checkCanInviteNewMembers():
|
|
16
|
+
checkCanInviteNewMembers(): Error | undefined;
|
|
16
17
|
getInvitationContext(): Partial<Invitation> & Pick<Invitation, 'kind'>;
|
|
17
18
|
delegate(): Promise<PublicKey>;
|
|
18
19
|
cancelDelegation(): Promise<void>;
|
|
@@ -20,6 +21,6 @@ export declare class DeviceInvitationProtocol implements InvitationProtocol {
|
|
|
20
21
|
checkInvitation(invitation: Partial<Invitation>): AlreadyJoinedError | undefined;
|
|
21
22
|
createIntroduction(): IntroductionRequest;
|
|
22
23
|
createAdmissionRequest(deviceProfile?: DeviceProfileDocument): Promise<AdmissionRequest>;
|
|
23
|
-
accept(response: AdmissionResponse, request: AdmissionRequest): Promise<Partial<Invitation>>;
|
|
24
|
+
accept(_ctx: Context, response: AdmissionResponse, request: AdmissionRequest): Promise<Partial<Invitation>>;
|
|
24
25
|
}
|
|
25
26
|
//# sourceMappingURL=device-invitation-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-invitation-protocol.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/device-invitation-protocol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"device-invitation-protocol.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/device-invitation-protocol.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,qBAAa,wBAAyB,YAAW,kBAAkB;IAE/D,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAHlC,YACmB,QAAQ,EAAE,OAAO,EACjB,YAAY,EAAE,MAAM,QAAQ,EAC5B,eAAe,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,OAAO,CAAC,QAAQ,CAAC,EAClF;IAEJ,MAAM,IAAI,MAAM,CAIf;IAED,wBAAwB,IAAI,KAAK,GAAG,SAAS,CAE5C;IAED,oBAAoB,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAIrE;IAEK,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,CAEnC;IAEK,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtC;IAEK,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAehF;IAED,eAAe,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,kBAAkB,GAAG,SAAS,CAS/E;IAED,kBAAkB,IAAI,mBAAmB,CAExC;IAEK,sBAAsB,CAAC,aAAa,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAa7F;IAEK,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAuBhH;CACF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type Context } from '@dxos/context';
|
|
2
2
|
import { type EdgeHttpClient } from '@dxos/edge-client';
|
|
3
3
|
import { type DeviceProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
4
|
-
import { type
|
|
4
|
+
import { type AdmissionRequest, type AdmissionResponse } from '@dxos/protocols/proto/dxos/halo/invitations';
|
|
5
5
|
import { type InvitationProtocol } from './invitation-protocol';
|
|
6
6
|
import { type FlowLockHolder, type GuardedInvitationState } from './invitation-state';
|
|
7
7
|
export interface EdgeInvitationHandlerCallbacks {
|
|
8
|
-
onInvitationSuccess(response: AdmissionResponse, request: AdmissionRequest): Promise<void>;
|
|
8
|
+
onInvitationSuccess(ctx: Context, response: AdmissionResponse, request: AdmissionRequest): Promise<void>;
|
|
9
9
|
}
|
|
10
10
|
export declare const MAX_RETRIES_PER_INVITATION = 5;
|
|
11
11
|
export declare const DEFAULT_REQUEST_RETRY_INTERVAL_MS = 3000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge-invitation-handler.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/edge-invitation-handler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAYxD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"edge-invitation-handler.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/edge-invitation-handler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAYxD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAEvB,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGtF,MAAM,WAAW,8BAA8B;IAC7C,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1G;AAED,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,iCAAiC,OAAO,CAAC;AACtD,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,qBACa,qBAAsB,YAAW,cAAc;IAQxD,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAR7B,OAAO,CAAC,SAAS,CAAyB;IAE1C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC,YACE,MAAM,EAAE,oBAAoB,GAAG,SAAS,EACvB,OAAO,EAAE,cAAc,GAAG,SAAS,EACnC,UAAU,EAAE,8BAA8B,EAI5D;IAEM,MAAM,CACX,GAAG,EAAE,OAAO,EACZ,YAAY,EAAE,sBAAsB,EACpC,QAAQ,EAAE,kBAAkB,EAC5B,aAAa,CAAC,EAAE,qBAAqB,GACpC,IAAI,CAkDN;YAGa,0BAA0B;YA6B1B,uBAAuB;YAUvB,sBAAsB;IA2B7B,WAAW,IAAI,OAAO,CAE5B;IAED,OAAO,CAAC,qBAAqB;CAG9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation-guest-extenstion.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-guest-extenstion.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAA4B,MAAM,aAAa,CAAC;AACnE,OAAO,
|
|
1
|
+
{"version":3,"file":"invitation-guest-extenstion.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-guest-extenstion.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAA4B,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,OAAO,EAAqB,MAAM,eAAe,CAAC;AAK3D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,KAAK,qBAAqB,EAAqB,MAAM,6CAA6C,CAAC;AAC5G,OAAO,EAAE,KAAK,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKzD,KAAK,iCAAiC,GAAG;IAEvC,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/D,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEhC,aAAa,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF;;GAEG;AACH,qBAAa,wBACX,SAAQ,YAAY,CAClB;IAAE,qBAAqB,EAAE,qBAAqB,CAAA;CAAE,EAChD;IAAE,qBAAqB,EAAE,qBAAqB,CAAA;CAAE,CAElD,YAAW,cAAc;IAWvB,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAV7B,OAAO,CAAC,IAAI,CAAiB;IAC7B,OAAO,CAAC,cAAc,CAAC,CAAoB;IAC3C,OAAO,CAAC,qBAAqB,CAAiB;IAC9C;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAA2B;IAEtD,YACmB,oBAAoB,EAAE,KAAK,EAC3B,UAAU,EAAE,iCAAiC,EAU/D;IAEM,WAAW,IAAI,OAAO,CAE5B;IAED,UAAyB,WAAW,IAAI,OAAO,CAAC;QAAE,qBAAqB,EAAE,qBAAqB,CAAA;KAAE,CAAC,CAmBhG;IAEc,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiC9D;IAEc,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtC;IAEc,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtC;YAEa,QAAQ;CAQvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation-host-extension.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-host-extension.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAmB,OAAO,EAAgB,MAAM,aAAa,CAAC;AACjF,OAAO,
|
|
1
|
+
{"version":3,"file":"invitation-host-extension.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-host-extension.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAmB,OAAO,EAAgB,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,OAAO,EAAqB,MAAM,eAAe,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAEtB,KAAK,qBAAqB,EAE3B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMzD,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,KAAK,gCAAgC,GAAG;IACtC,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;IAGpC,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/D,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEhC,aAAa,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,KAAK,IAAI,CAAC;IAEpD,KAAK,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAClE,CAAC;AAEF;;GAEG;AACH,qBAAa,uBACX,SAAQ,YAAY,CAClB;IAAE,qBAAqB,EAAE,qBAAqB,CAAA;CAAE,EAChD;IAAE,qBAAqB,EAAE,qBAAqB,CAAA;CAAE,CAElD,YAAW,cAAc;IA+BvB,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU;IA1B7B,OAAO,CAAC,cAAc,CAAC,CAAoB;IAC3C,OAAO,CAAC,qBAAqB,CAAiB;IAE9C,OAAO,CAAC,UAAU,CAAC,CAAqB;IAEjC,YAAY,CAAC,EAAE,eAAe,CAAa;IAE3C,oBAAoB,UAAS;IAEpC;;OAEG;IACI,mBAAmB,SAAK;IAE/B;;OAEG;IACI,gBAAgB,qBAA4B;IAEnD;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAA2B;IAEtD,YACmB,oBAAoB,EAAE,KAAK,EAC3B,UAAU,EAAE,gCAAgC,EAU9D;IAEM,WAAW,IAAI,OAAO,CAE5B;IAED,UAAyB,WAAW,IAAI,OAAO,CAAC;QAAE,qBAAqB,EAAE,qBAAqB,CAAA;KAAE,CAAC,CAkIhG;IAEc,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B9D;IAED,OAAO,CAAC,wBAAwB;IAShC,OAAO,CAAC,sBAAsB;IAWf,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtC;IAEc,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtC;YAEa,QAAQ;CAQvB;AAED,eAAO,MAAM,wBAAwB,eAAgB,UAAU,YACT,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { type Context } from '@dxos/context';
|
|
1
2
|
import { type PublicKey } from '@dxos/keys';
|
|
2
|
-
import type { ApiError } from '@dxos/protocols';
|
|
3
3
|
import type { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
4
|
-
import type {
|
|
4
|
+
import type { DeviceProfileDocument, ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
5
5
|
import type { AdmissionRequest, AdmissionResponse, IntroductionRequest } from '@dxos/protocols/proto/dxos/halo/invitations';
|
|
6
6
|
export interface InvitationProtocol {
|
|
7
7
|
/**
|
|
8
8
|
* Protocol-specific debug info to include in logs.
|
|
9
9
|
*/
|
|
10
10
|
toJSON(): object;
|
|
11
|
-
checkCanInviteNewMembers():
|
|
11
|
+
checkCanInviteNewMembers(): Error | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* Protocol-specific information to include in the invitation.
|
|
14
14
|
*/
|
|
@@ -31,7 +31,7 @@ export interface InvitationProtocol {
|
|
|
31
31
|
*
|
|
32
32
|
* For example, the guest may already be a member of the space.
|
|
33
33
|
*/
|
|
34
|
-
checkInvitation(invitation: Partial<Invitation>):
|
|
34
|
+
checkInvitation(invitation: Partial<Invitation>): Error | undefined;
|
|
35
35
|
/**
|
|
36
36
|
* Get profile information to send to the host to identify the guest.
|
|
37
37
|
*/
|
|
@@ -42,7 +42,10 @@ export interface InvitationProtocol {
|
|
|
42
42
|
createAdmissionRequest(deviceProfile?: DeviceProfileDocument): Promise<AdmissionRequest>;
|
|
43
43
|
/**
|
|
44
44
|
* Redeem the admission credential.
|
|
45
|
+
* @param ctx - Caller context used for tracing and cancellation. Forwarded to downstream
|
|
46
|
+
* internal methods (e.g. `DataSpaceManager.acceptSpace`) so their spans become children of
|
|
47
|
+
* the invitation flow span.
|
|
45
48
|
*/
|
|
46
|
-
accept(response: AdmissionResponse, request: AdmissionRequest): Promise<Partial<Invitation>>;
|
|
49
|
+
accept(ctx: Context, response: AdmissionResponse, request: AdmissionRequest): Promise<Partial<Invitation>>;
|
|
47
50
|
}
|
|
48
51
|
//# sourceMappingURL=invitation-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation-protocol.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-protocol.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"invitation-protocol.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-protocol.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAA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|
|
|
1
|
-
{"version":3,"file":"invitation-state.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAIxE,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,UAAU,CAAC;IAEpB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;IAC9C,GAAG,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,CAAC;IAC5E,KAAK,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC;CAC/D;AAED,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"invitation-state.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAIxE,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,UAAU,CAAC;IAEpB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;IAC9C,GAAG,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,CAAC;IAC5E,KAAK,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC;CAC/D;AAED,eAAO,MAAM,4BAA4B,QAClC,OAAO,cACA,UAAU,UACd,UAAU,CAAC,UAAU,CAAC,KAC7B,sBA2CF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation-topology.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-topology.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAGhF;;;;;;;;;;;;;GAaG;AACH,qBAAa,kBAAmB,YAAW,QAAQ;IAarC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAZlC,OAAO,CAAC,WAAW,CAAC,CAAkB;IAEtC;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU,CAA6C;
|
|
1
|
+
{"version":3,"file":"invitation-topology.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitation-topology.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAGhF;;;;;;;;;;;;;GAaG;AACH,qBAAa,kBAAmB,YAAW,QAAQ;IAarC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAZlC,OAAO,CAAC,WAAW,CAAC,CAAkB;IAEtC;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU,CAA6C;IAE/D,YAA6B,KAAK,EAAE,iBAAiB,CAAC,IAAI,EAAI;IAE9D,IAAI,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAGtC;IAED,MAAM,IAAI,IAAI,CA2Bb;IAEK,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAG/C;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAE7B;IAED,QAAQ,IAAI,MAAM,CAEjB;CACF"}
|
|
@@ -2,11 +2,11 @@ import { type PushStream, type Trigger } from '@dxos/async';
|
|
|
2
2
|
import { type Context } from '@dxos/context';
|
|
3
3
|
import { type AdmissionKeypair, Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
4
4
|
import { type DeviceProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
5
|
-
import { type
|
|
5
|
+
import { type TeleportProps } from '@dxos/teleport';
|
|
6
6
|
import { type EdgeInvitationConfig } from './edge-invitation-handler';
|
|
7
7
|
import { type InvitationProtocol } from './invitation-protocol';
|
|
8
|
-
export type
|
|
9
|
-
teleport: Partial<
|
|
8
|
+
export type InvitationConnectionProps = {
|
|
9
|
+
teleport: Partial<TeleportProps>;
|
|
10
10
|
edgeInvitations?: EdgeInvitationConfig;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
@@ -40,7 +40,7 @@ export type InvitationConnectionParams = {
|
|
|
40
40
|
export declare class InvitationsHandler {
|
|
41
41
|
private readonly _networkManager;
|
|
42
42
|
private readonly _edgeClient?;
|
|
43
|
-
private readonly
|
|
43
|
+
private readonly _connectionProps?;
|
|
44
44
|
handleInvitationFlow(ctx: Context, stream: PushStream<Invitation>, protocol: InvitationProtocol, invitation: Invitation): void;
|
|
45
45
|
acceptInvitation(ctx: Context, stream: PushStream<Invitation>, protocol: InvitationProtocol, invitation: Invitation, otpEnteredTrigger: Trigger<string>, deviceProfile?: DeviceProfileDocument): void;
|
|
46
46
|
private _joinSwarm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-handler.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitations-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"invitations-handler.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitations-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAgB,KAAK,OAAO,EAAgB,MAAM,aAAa,CAAC;AAExF,OAAO,EAAE,KAAK,OAAO,EAAwB,MAAM,eAAe,CAAC;AAQnE,OAAO,EAAE,KAAK,gBAAgB,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAC/F,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGzF,OAAO,EAAiD,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAInG,OAAO,EAAE,KAAK,oBAAoB,EAAyB,MAAM,2BAA2B,CAAC;AAG7F,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAQhE,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACjC,eAAe,CAAC,EAAE,oBAAoB,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBACa,kBAAkB;IAK3B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAGpC,oBAAoB,CAClB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,EAC9B,QAAQ,EAAE,kBAAkB,EAC5B,UAAU,EAAE,UAAU,GACrB,IAAI,CAgKN;IAED,gBAAgB,CACd,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,EAC9B,QAAQ,EAAE,kBAAkB,EAC5B,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,EAClC,aAAa,CAAC,EAAE,qBAAqB,GACpC,IAAI,CA+NN;YAEa,UAAU;YA0BV,mBAAmB;YA6BnB,mBAAmB;CAqBlC;AAUD,eAAO,MAAM,sBAAsB,QAAO,gBAGzC,CAAC"}
|
|
@@ -23,11 +23,11 @@ export declare class InvitationsManager {
|
|
|
23
23
|
private readonly _persistentInvitationsLoadedEvent;
|
|
24
24
|
private _persistentInvitationsLoaded;
|
|
25
25
|
constructor(_invitationsHandler: InvitationsHandler, _getHandler: (invitation: Partial<Invitation> & Pick<Invitation, 'kind'>) => InvitationProtocol, _metadataStore: MetadataStore);
|
|
26
|
-
createInvitation(options: Partial<Invitation> & Pick<Invitation, 'kind'>): Promise<CancellableInvitation>;
|
|
27
|
-
loadPersistentInvitations(): Promise<{
|
|
26
|
+
createInvitation(ctx: Context, options: Partial<Invitation> & Pick<Invitation, 'kind'>): Promise<CancellableInvitation>;
|
|
27
|
+
loadPersistentInvitations(ctx: Context): Promise<{
|
|
28
28
|
invitations: Invitation[];
|
|
29
29
|
}>;
|
|
30
|
-
acceptInvitation(request: AcceptInvitationRequest): AuthenticatingInvitation;
|
|
30
|
+
acceptInvitation(ctx: Context, request: AcceptInvitationRequest): AuthenticatingInvitation;
|
|
31
31
|
authenticate({ invitationId, authCode }: AuthenticationRequest): Promise<void>;
|
|
32
32
|
cancelInvitation({ invitationId }: {
|
|
33
33
|
invitationId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-manager.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitations-manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAqC,MAAM,aAAa,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"invitations-manager.d.ts","sourceRoot":"","sources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AI,CAAC,UAAU,EAAE,MAAM,CAAC,GACtD,OAAO,CAAC,qBAAqB,CAAC,CA2ChC;IAEK,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,UAAU,EAAE,CAAA;KAAE,CAAC,CAwBpF;IAED,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,wBAAwB,CA+BzF;IAEK,YAAY,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CASnF;IAEK,gBAAgB,CAAC,EAAE,YAAY,EAAE,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBhF;IAED,qBAAqB,IAAI,UAAU,EAAE,CAEpC;IAED,sBAAsB,IAAI,UAAU,EAAE,CAErC;IAED,6BAA6B,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAMtE;IAED,OAAO,CAAC,iBAAiB;IAyCzB,OAAO,CAAC,2BAA2B;IA2BnC,OAAO,CAAC,oCAAoC;YA4C9B,kBAAkB;YAclB,qBAAqB;IAQnC,OAAO,CAAC,qBAAqB;CAO9B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Stream } from '@dxos/codec-protobuf
|
|
2
|
-
import { type
|
|
1
|
+
import { type RequestOptions, Stream } from '@dxos/codec-protobuf';
|
|
2
|
+
import { type AcceptInvitationRequest, type AuthenticationRequest, type Invitation, type InvitationsService, QueryInvitationsResponse } from '@dxos/protocols/proto/dxos/client/services';
|
|
3
3
|
import { type InvitationsManager } from './invitations-manager';
|
|
4
4
|
/**
|
|
5
5
|
* Adapts invitation service observable to client/service stream.
|
|
@@ -8,8 +8,8 @@ export declare class InvitationsServiceImpl implements InvitationsService {
|
|
|
8
8
|
private readonly _invitationsManager;
|
|
9
9
|
constructor(_invitationsManager: InvitationsManager);
|
|
10
10
|
getLoggingContext(): {};
|
|
11
|
-
createInvitation(
|
|
12
|
-
acceptInvitation(request: AcceptInvitationRequest): Stream<Invitation>;
|
|
11
|
+
createInvitation(request: Invitation, options?: RequestOptions): Stream<Invitation>;
|
|
12
|
+
acceptInvitation(request: AcceptInvitationRequest, options?: RequestOptions): Stream<Invitation>;
|
|
13
13
|
authenticate(request: AuthenticationRequest): Promise<void>;
|
|
14
14
|
cancelInvitation(request: {
|
|
15
15
|
invitationId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitations-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"invitations-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitations-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,wBAAwB,EACzB,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;GAEG;AACH,qBAAa,sBAAuB,YAAW,kBAAkB;IACnD,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAAhD,YAA6B,mBAAmB,EAAE,kBAAkB,EAAI;IAGxE,iBAAiB,OAIhB;IAED,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAUlF;IAED,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAK/F;IAEK,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhE;IAEK,gBAAgB,CAAC,OAAO,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvE;IAED,gBAAgB,IAAI,MAAM,CAAC,wBAAwB,CAAC,CAqEnD;CACF"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { type Context } from '@dxos/context';
|
|
1
2
|
import { type Keyring } from '@dxos/keyring';
|
|
2
3
|
import { type PublicKey } from '@dxos/keys';
|
|
3
|
-
import { AlreadyJoinedError,
|
|
4
|
+
import { AlreadyJoinedError, InvalidInvitationError } from '@dxos/protocols';
|
|
4
5
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
5
6
|
import { type ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
6
7
|
import { type AdmissionRequest, type AdmissionResponse, type IntroductionRequest } from '@dxos/protocols/proto/dxos/halo/invitations';
|
|
7
|
-
import { type InvitationProtocol } from './invitation-protocol';
|
|
8
8
|
import { type DataSpaceManager, type SigningContext } from '../spaces';
|
|
9
|
+
import { type InvitationProtocol } from './invitation-protocol';
|
|
9
10
|
export declare class SpaceInvitationProtocol implements InvitationProtocol {
|
|
10
11
|
private readonly _spaceManager;
|
|
11
12
|
private readonly _signingContext;
|
|
@@ -13,7 +14,7 @@ export declare class SpaceInvitationProtocol implements InvitationProtocol {
|
|
|
13
14
|
private readonly _spaceKey?;
|
|
14
15
|
constructor(_spaceManager: DataSpaceManager, _signingContext: SigningContext, _keyring: Keyring, _spaceKey?: PublicKey | undefined);
|
|
15
16
|
toJSON(): object;
|
|
16
|
-
checkCanInviteNewMembers():
|
|
17
|
+
checkCanInviteNewMembers(): Error | undefined;
|
|
17
18
|
getInvitationContext(): Partial<Invitation> & Pick<Invitation, 'kind'>;
|
|
18
19
|
admit(invitation: Invitation, request: AdmissionRequest, guestProfile?: ProfileDocument | undefined): Promise<AdmissionResponse>;
|
|
19
20
|
delegate(invitation: Invitation): Promise<PublicKey>;
|
|
@@ -21,6 +22,6 @@ export declare class SpaceInvitationProtocol implements InvitationProtocol {
|
|
|
21
22
|
checkInvitation(invitation: Partial<Invitation>): InvalidInvitationError | AlreadyJoinedError | undefined;
|
|
22
23
|
createIntroduction(): IntroductionRequest;
|
|
23
24
|
createAdmissionRequest(): Promise<AdmissionRequest>;
|
|
24
|
-
accept(response: AdmissionResponse): Promise<Partial<Invitation>>;
|
|
25
|
+
accept(ctx: Context, response: AdmissionResponse): Promise<Partial<Invitation>>;
|
|
25
26
|
}
|
|
26
27
|
//# sourceMappingURL=space-invitation-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space-invitation-protocol.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/space-invitation-protocol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"space-invitation-protocol.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/space-invitation-protocol.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAQ7C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAsB,sBAAsB,EAAsB,MAAM,iBAAiB,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,KAAK,eAAe,EAAe,MAAM,6CAA6C,CAAC;AAChG,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,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,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,KAAK,OAAO,EAA2C,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAExE,eAAO,MAAM,aAAa,UAAW,UAAU,CAAC,KAAK,KAAG,MAEvD,CAAC;AAEF,eAAO,MAAM,qBAAqB,eAAgB,OAAO,CAAC,UAAU,CAAC,KAAG,IAAI,GAAG,SAK9E,CAAC;AAEF,eAAO,MAAM,+BAA+B,QAAe,OAAO,SAAS,KAAK,KAAG,OAAO,CAAC,UAAU,CAcpG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/locks/browser.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAQ9E,qBAAa,IAAK,YAAW,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA+C;IACjF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,eAAe,CAAiB;
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/locks/browser.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAQ9E,qBAAa,IAAK,YAAW,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA+C;IACjF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,eAAe,CAAiB;IAExC,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,mBAAmB,EAKjE;IAED,IACI,OAAO,WAEV;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAc7B;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAE7B;IAED,OAAO,CAAC,UAAU;YAMJ,YAAY;CAqB3B;AAGD,eAAO,MAAM,QAAQ,aAAc,MAAM,UAExC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/locks/index.ts"],"names":[],"mappings":"AAIA,mBAAmB,iBAAiB,CAAC;AACrC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/locks/index.ts"],"names":[],"mappings":"AAIA,mBAAmB,iBAAiB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/locks/node.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG9E,qBAAa,IAAK,YAAW,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,WAAW,CAAC,CAAa;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/locks/node.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG9E,qBAAa,IAAK,YAAW,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,WAAW,CAAC,CAAa;IAEjC,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,mBAAmB,EAI3E;IAED,IACI,OAAO,WAEV;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAO7B;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAI7B;CACF;AAED,eAAO,MAAM,QAAQ,aAAc,MAAM,qBAAgC,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Stream } from '@dxos/codec-protobuf/stream';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ControlMetricsRequest, type ControlMetricsResponse, type LogEntry, type LoggingService, QueryLogsRequest, type QueryMetricsRequest, type QueryMetricsResponse } from '@dxos/protocols/proto/dxos/client/services';
|
|
3
3
|
/**
|
|
4
4
|
* Logging service used to spy on logs of the host.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated This was created so that logs from the shared worker (WorkerClientServices) could be
|
|
7
|
+
* seen in the main window console without opening the shared worker DevTools. Shared worker client
|
|
8
|
+
* services is deprecated; dedicated worker logs already show in the main window console.
|
|
5
9
|
*/
|
|
6
10
|
export declare class LoggingServiceImpl implements LoggingService {
|
|
7
11
|
private readonly _logs;
|