@celljs/ta-host 4.13.1 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -0
- package/README.md +1 -0
- package/esm/node/host-protocol.d.ts +17 -1
- package/esm/node/host-protocol.js +1 -0
- package/esm/node/index.d.ts +2 -0
- package/esm/node/index.js +2 -0
- package/esm/node/package-hosts.d.ts +2 -1
- package/esm/node/package-hosts.js +6 -2
- package/esm/node/presence-book.d.ts +38 -0
- package/esm/node/presence-book.js +159 -0
- package/esm/node/presence-server-impl.d.ts +13 -0
- package/esm/node/presence-server-impl.js +45 -0
- package/esm/node/rooms-bridge.d.ts +6 -1
- package/esm/node/rooms-bridge.js +21 -3
- package/esm/node/session-list-feed.js +2 -1
- package/esm/node/sign-in/access-server-impl.d.ts +5 -1
- package/esm/node/sign-in/access-server-impl.js +22 -1
- package/esm/node/sign-in/sign-in-flow.d.ts +14 -1
- package/esm/node/sign-in/sign-in-flow.js +24 -7
- package/esm/node/sign-in/sign-in-provider.d.ts +40 -1
- package/esm/node/sign-in/sign-in-provider.js +120 -0
- package/esm/node/sign-in/ta-sign-in.d.ts +9 -3
- package/esm/node/sign-in/ta-sign-in.js +32 -4
- package/esm/node/ta-server-impl.d.ts +7 -0
- package/esm/node/ta-server-impl.js +44 -7
- package/esm/node/ta-session-registry.d.ts +10 -3
- package/esm/node/ta-session-registry.js +29 -3
- package/esm/node/ta-session.d.ts +2 -0
- package/esm/node/ta-session.js +6 -0
- package/esm/node/team/host-team.d.ts +2 -1
- package/esm/node/team/host-team.js +10 -1
- package/esm/node/team/index.d.ts +1 -0
- package/esm/node/team/index.js +1 -0
- package/esm/node/team/member-accounts.d.ts +13 -0
- package/esm/node/team/member-accounts.js +37 -0
- package/esm/node/team/team-calls.d.ts +2 -1
- package/esm/node/team/team-calls.js +7 -0
- package/esm/node/team/team-gate.js +1 -1
- package/esm/node/team/team-protocol.d.ts +5 -1
- package/esm/node/team/team-protocol.js +2 -0
- package/lib/node/host-protocol.d.ts +17 -1
- package/lib/node/host-protocol.js +2 -1
- package/lib/node/index.d.ts +2 -0
- package/lib/node/index.js +2 -0
- package/lib/node/package-hosts.d.ts +2 -1
- package/lib/node/package-hosts.js +5 -1
- package/lib/node/presence-book.d.ts +39 -0
- package/lib/node/presence-book.js +162 -0
- package/lib/node/presence-server-impl.d.ts +14 -0
- package/lib/node/presence-server-impl.js +48 -0
- package/lib/node/rooms-bridge.d.ts +6 -1
- package/lib/node/rooms-bridge.js +20 -2
- package/lib/node/session-list-feed.js +2 -1
- package/lib/node/sign-in/access-server-impl.d.ts +5 -1
- package/lib/node/sign-in/access-server-impl.js +21 -0
- package/lib/node/sign-in/sign-in-flow.d.ts +14 -1
- package/lib/node/sign-in/sign-in-flow.js +24 -7
- package/lib/node/sign-in/sign-in-provider.d.ts +40 -1
- package/lib/node/sign-in/sign-in-provider.js +120 -0
- package/lib/node/sign-in/ta-sign-in.d.ts +9 -3
- package/lib/node/sign-in/ta-sign-in.js +32 -4
- package/lib/node/ta-server-impl.d.ts +7 -0
- package/lib/node/ta-server-impl.js +43 -6
- package/lib/node/ta-session-registry.d.ts +10 -3
- package/lib/node/ta-session-registry.js +27 -1
- package/lib/node/ta-session.d.ts +2 -0
- package/lib/node/ta-session.js +6 -0
- package/lib/node/team/host-team.d.ts +2 -1
- package/lib/node/team/host-team.js +9 -0
- package/lib/node/team/index.d.ts +1 -0
- package/lib/node/team/index.js +1 -0
- package/lib/node/team/member-accounts.d.ts +14 -0
- package/lib/node/team/member-accounts.js +40 -0
- package/lib/node/team/team-calls.d.ts +2 -1
- package/lib/node/team/team-calls.js +7 -0
- package/lib/node/team/team-gate.js +1 -1
- package/lib/node/team/team-protocol.d.ts +5 -1
- package/lib/node/team/team-protocol.js +3 -1
- package/package.json +12 -12
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Autowired, Component } from '@celljs/core';
|
|
11
|
+
import { TA_SIGN_IN } from '../sign-in/ta-sign-in.js';
|
|
12
|
+
import { TaMemberAccounts } from './team-protocol.js';
|
|
13
|
+
/** Who one asking to come in is, by an account of the providers ta serve signs in with (TaSignIn): nothing let in by it. */
|
|
14
|
+
let DefaultTaMemberAccounts = class DefaultTaMemberAccounts {
|
|
15
|
+
providers() {
|
|
16
|
+
return this.flow.providers.map(({ id, name }) => ({ id, name }));
|
|
17
|
+
}
|
|
18
|
+
start(provider, redirectUri) {
|
|
19
|
+
if (!/^https?:\/\/[^/?#]+\/[^?#]*$/.test(redirectUri)) {
|
|
20
|
+
throw new Error(`Not an address to come back to: ${redirectUri}`);
|
|
21
|
+
}
|
|
22
|
+
return this.flow.startVerify(provider, redirectUri);
|
|
23
|
+
}
|
|
24
|
+
async verify(state, code) {
|
|
25
|
+
const { id, name, avatar } = await this.flow.verify(state, code);
|
|
26
|
+
return { id, ...(name ? { name } : {}), ...(avatar ? { avatar } : {}) };
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
__decorate([
|
|
30
|
+
Autowired(TA_SIGN_IN),
|
|
31
|
+
__metadata("design:type", Function)
|
|
32
|
+
], DefaultTaMemberAccounts.prototype, "flow", void 0);
|
|
33
|
+
DefaultTaMemberAccounts = __decorate([
|
|
34
|
+
Component(TaMemberAccounts)
|
|
35
|
+
], DefaultTaMemberAccounts);
|
|
36
|
+
export { DefaultTaMemberAccounts };
|
|
37
|
+
//# sourceMappingURL=member-accounts.js.map
|
|
@@ -9,7 +9,8 @@ export interface TaCallNeedOne {
|
|
|
9
9
|
* directory it opens), nothing (`anyone`: any principal let in), or nothing either and open to one holding a link of
|
|
10
10
|
* invitation too (`invite`: asking to come in).
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
/** `owner`: the owner alone, whatever a role gives (secrets of the owner's, such as those of providers to sign in with). */
|
|
13
|
+
export type TaCallNeed = TaCallNeedOne | TaCallNeedOne[] | 'anyone' | 'invite' | 'owner';
|
|
13
14
|
/** What finding the resource of a call needs: where a session is, the default directory, what packages declare. */
|
|
14
15
|
export interface TaCallLookup {
|
|
15
16
|
session(sessionId: string): {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isAbsolute } from 'node:path';
|
|
2
2
|
const anyone = () => 'anyone';
|
|
3
|
+
const owner = () => 'owner';
|
|
3
4
|
const fixed = (action) => () => ({ action });
|
|
4
5
|
/** The conversation of the session of the first parameter. */
|
|
5
6
|
const session = (action) => (params, lookup) => {
|
|
@@ -213,6 +214,10 @@ const RULES = {
|
|
|
213
214
|
'watch',
|
|
214
215
|
'unwatch',
|
|
215
216
|
].map(method => [method, fixed('settings.manage')])),
|
|
217
|
+
// What a page is at: each page's own, and only of conversations it may see (TaPresenceServerImpl).
|
|
218
|
+
TaPresenceServer: {
|
|
219
|
+
report: anyone,
|
|
220
|
+
},
|
|
216
221
|
TaSettingsServer: {
|
|
217
222
|
getSettings: fixed('settings.view'),
|
|
218
223
|
updateSettings: fixed('settings.manage'),
|
|
@@ -226,6 +231,8 @@ const RULES = {
|
|
|
226
231
|
logout: fixed('models.manage'),
|
|
227
232
|
},
|
|
228
233
|
TaAccessServer: {
|
|
234
|
+
getSignInConfig: owner,
|
|
235
|
+
setSignInProvider: owner,
|
|
229
236
|
getAccess: fixed('members.view'),
|
|
230
237
|
bindUrl: fixed('members.roles'),
|
|
231
238
|
allow: fixed('members.roles'),
|
|
@@ -68,7 +68,7 @@ let TaTeamGate = class TaTeamGate {
|
|
|
68
68
|
packageAction: (pkg, method, kind) => this.permissions.host(pkg, method, kind),
|
|
69
69
|
});
|
|
70
70
|
// A call of no rule is the owner's; one holding a link of invitation only asks to come in.
|
|
71
|
-
if (!need || (principal.startsWith(TA_INVITE_PREFIX) && need !== 'invite')) {
|
|
71
|
+
if (!need || need === 'owner' || (principal.startsWith(TA_INVITE_PREFIX) && need !== 'invite')) {
|
|
72
72
|
refused({ action: name, askable: false });
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcConnection } from '@celljs/rpc/lib/node';
|
|
2
|
-
import type { TaAuditEvent, TaAuthorizer, TaDenial, TaHostTeam, TaMemberInfo, TaResource, TaSessionInfo, TaSharedData, TaSharedRef, TaTeamDevice, TaTeamPairing } from '@celljs/ta-protocol';
|
|
2
|
+
import type { TaAuditEvent, TaAuthorizer, TaDenial, TaHostAccounts, TaHostTeam, TaMemberInfo, TaResource, TaSessionInfo, TaSharedData, TaSharedRef, TaTeamDevice, TaTeamPairing } from '@celljs/ta-protocol';
|
|
3
3
|
/**
|
|
4
4
|
* The parts by which ta serve lets people in besides its user (docs/design/ta-team.md 4, 14). Each has one concern, and
|
|
5
5
|
* the rest of ta serve depends on these interfaces only: the sessions, the data of packages and the terminals ask
|
|
@@ -61,6 +61,10 @@ export interface TaMemberDevices {
|
|
|
61
61
|
unpair(deviceId: string): void;
|
|
62
62
|
list(): TaTeamDevice[];
|
|
63
63
|
}
|
|
64
|
+
/** Who one asking to come in is, by an account (TaHostAccounts). */
|
|
65
|
+
export declare const TaMemberAccounts: unique symbol;
|
|
66
|
+
export interface TaMemberAccounts extends TaHostAccounts {
|
|
67
|
+
}
|
|
64
68
|
/** The connections open, by principal. */
|
|
65
69
|
export declare const TaConnections: unique symbol;
|
|
66
70
|
export interface TaConnections {
|
|
@@ -15,6 +15,8 @@ export const TaSharedDataRegistry = Symbol('TaSharedDataRegistry');
|
|
|
15
15
|
export const TaPackagePermissions = Symbol('TaPackagePermissions');
|
|
16
16
|
/** The devices of those let in, through the relay. */
|
|
17
17
|
export const TaMemberDevices = Symbol('TaMemberDevices');
|
|
18
|
+
/** Who one asking to come in is, by an account (TaHostAccounts). */
|
|
19
|
+
export const TaMemberAccounts = Symbol('TaMemberAccounts');
|
|
18
20
|
/** The connections open, by principal. */
|
|
19
21
|
export const TaConnections = Symbol('TaConnections');
|
|
20
22
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcConnection } from '@celljs/rpc/lib/node';
|
|
2
|
-
import type { TaEvent, TaOpenSessionOptions, TaPackageInfo, TaSavedSessionInfo, TaSavedSessionQuery, TaSessionInfo, TaSettingsScope, TaSlashCommand, TaTemporaryFrom, TaWebExtensionInfo, TaWebExtensionSource } from '@celljs/ta-protocol';
|
|
2
|
+
import type { TaEvent, TaOpenSessionOptions, TaPackageInfo, TaPresencePerson, TaPresenceReport, TaSavedSessionInfo, TaSavedSessionQuery, TaSessionInfo, TaSessionPerson, TaSettingsScope, TaSlashCommand, TaTemporaryFrom, TaWebExtensionInfo, TaWebExtensionSource } from '@celljs/ta-protocol';
|
|
3
3
|
import type { ClientChannel } from './client-channel';
|
|
4
4
|
import type { TaSession } from './ta-session';
|
|
5
5
|
export declare const TaSessionFactory: unique symbol;
|
|
@@ -7,6 +7,7 @@ export declare const TaSessionRegistry: unique symbol;
|
|
|
7
7
|
export declare const TaSessionCatalog: unique symbol;
|
|
8
8
|
export declare const WebExtensionCatalog: unique symbol;
|
|
9
9
|
export declare const KeepAwake: unique symbol;
|
|
10
|
+
export declare const TaPresenceBook: unique symbol;
|
|
10
11
|
export declare const TA_HOST_OPTIONS = "ta.host";
|
|
11
12
|
export declare const TA_EXEC_OPTIONS = "ta.exec";
|
|
12
13
|
/** `ta.host`. */
|
|
@@ -44,6 +45,8 @@ export interface TaSessionRegistry {
|
|
|
44
45
|
*/
|
|
45
46
|
resolve(sessionId: string): Promise<TaSession>;
|
|
46
47
|
list(): TaSession[];
|
|
48
|
+
/** The infos of the open sessions a connection may see, with who else is at each (TaSessionInfo.people). */
|
|
49
|
+
infos(connection: RpcConnection | undefined): TaSessionInfo[];
|
|
47
50
|
/** The infos of the open sessions; the connection is told of each change from now on (TaServer.watchSessions). */
|
|
48
51
|
watch(connection: RpcConnection): TaSessionInfo[];
|
|
49
52
|
/** `idle`: closed to save its memory (idle, or the service stops), it keeps its id and opens again when called; otherwise for good. */
|
|
@@ -107,4 +110,17 @@ export interface KeepAwake {
|
|
|
107
110
|
/** Holds or lets go as things are now: at once after the setting changed. */
|
|
108
111
|
check(): void;
|
|
109
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* What each page is at (TaPresenceServer.report), in memory only: who looks at which conversation and types in it. A page
|
|
115
|
+
* leaves it as its connection closes, or once it said nothing for TA_PRESENCE_EXPIRY_MS.
|
|
116
|
+
*/
|
|
117
|
+
export interface TaPresenceBook {
|
|
118
|
+
report(connection: RpcConnection, state: TaPresenceReport): void;
|
|
119
|
+
/** The others at a session, as `principal` is told: those who look at it or type in it, and who asked its run while `streaming`. */
|
|
120
|
+
people(sessionId: string, principal: string, streaming: boolean): TaSessionPerson[] | undefined;
|
|
121
|
+
/** Each one with pages that report, and where the latest of them is. */
|
|
122
|
+
everyone(): TaPresencePerson[];
|
|
123
|
+
/** What `people` gives may have changed. */
|
|
124
|
+
onChange(listener: () => void): () => void;
|
|
125
|
+
}
|
|
110
126
|
//# sourceMappingURL=host-protocol.d.ts.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TA_EXEC_OPTIONS = exports.TA_HOST_OPTIONS = exports.KeepAwake = exports.WebExtensionCatalog = exports.TaSessionCatalog = exports.TaSessionRegistry = exports.TaSessionFactory = void 0;
|
|
3
|
+
exports.TA_EXEC_OPTIONS = exports.TA_HOST_OPTIONS = exports.TaPresenceBook = exports.KeepAwake = exports.WebExtensionCatalog = exports.TaSessionCatalog = exports.TaSessionRegistry = exports.TaSessionFactory = void 0;
|
|
4
4
|
exports.TaSessionFactory = Symbol('TaSessionFactory');
|
|
5
5
|
exports.TaSessionRegistry = Symbol('TaSessionRegistry');
|
|
6
6
|
exports.TaSessionCatalog = Symbol('TaSessionCatalog');
|
|
7
7
|
exports.WebExtensionCatalog = Symbol('WebExtensionCatalog');
|
|
8
8
|
exports.KeepAwake = Symbol('KeepAwake');
|
|
9
|
+
exports.TaPresenceBook = Symbol('TaPresenceBook');
|
|
9
10
|
exports.TA_HOST_OPTIONS = 'ta.host';
|
|
10
11
|
exports.TA_EXEC_OPTIONS = 'ta.exec';
|
|
11
12
|
//# sourceMappingURL=host-protocol.js.map
|
package/lib/node/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export * from './keep-awake';
|
|
|
11
11
|
export * from './package-host-extension';
|
|
12
12
|
export * from './package-hosts';
|
|
13
13
|
export * from './package-server-impl';
|
|
14
|
+
export * from './presence-book';
|
|
15
|
+
export * from './presence-server-impl';
|
|
14
16
|
export * from './receipt-book';
|
|
15
17
|
export * from './relay-bridge';
|
|
16
18
|
export * from './remote';
|
package/lib/node/index.js
CHANGED
|
@@ -27,6 +27,8 @@ __exportStar(require("./keep-awake"), exports);
|
|
|
27
27
|
__exportStar(require("./package-host-extension"), exports);
|
|
28
28
|
__exportStar(require("./package-hosts"), exports);
|
|
29
29
|
__exportStar(require("./package-server-impl"), exports);
|
|
30
|
+
__exportStar(require("./presence-book"), exports);
|
|
31
|
+
__exportStar(require("./presence-server-impl"), exports);
|
|
30
32
|
__exportStar(require("./receipt-book"), exports);
|
|
31
33
|
__exportStar(require("./relay-bridge"), exports);
|
|
32
34
|
__exportStar(require("./remote"), exports);
|
|
@@ -2,7 +2,7 @@ import { type CodingAgentOptions } from '@celljs/ai-coding-agent';
|
|
|
2
2
|
import { type Application, ApplicationLifecycle } from '@celljs/core';
|
|
3
3
|
import { type TaExtensionHost, type TaHostAnswer, type TaHostSessionEvent, TaPackageServer, type TaPackageService, TaServer } from '@celljs/ta-protocol';
|
|
4
4
|
import { ExtensionDataStore } from './extension-data';
|
|
5
|
-
import { TaSessionRegistry } from './host-protocol';
|
|
5
|
+
import { TaPresenceBook, TaSessionRegistry } from './host-protocol';
|
|
6
6
|
import { type RelayBridge } from './relay-bridge';
|
|
7
7
|
import { PiDirectories } from './remote/remote-protocol';
|
|
8
8
|
import { type RoomsBridge } from './rooms-bridge';
|
|
@@ -56,6 +56,7 @@ export declare class PackageHostsImpl implements PackageHosts, ApplicationLifecy
|
|
|
56
56
|
protected readonly roomsBridge: RoomsBridge;
|
|
57
57
|
protected readonly settings: TaSettingsStore;
|
|
58
58
|
protected readonly sessions: TaSessionRegistry;
|
|
59
|
+
protected readonly presenceBook: TaPresenceBook;
|
|
59
60
|
protected readonly teamProvider: TaHostTeamProvider;
|
|
60
61
|
protected readonly running: Map<string, Running>;
|
|
61
62
|
protected extensionHost?: TaExtensionHost;
|
|
@@ -212,7 +212,7 @@ let PackageHostsImpl = class PackageHostsImpl {
|
|
|
212
212
|
listener(turn);
|
|
213
213
|
}
|
|
214
214
|
}),
|
|
215
|
-
presence: () => ({ pages: this.sessions.watching, seenAt: this.sessions.watchedAt }),
|
|
215
|
+
presence: () => ({ pages: this.sessions.watching, seenAt: this.sessions.watchedAt, people: this.presenceBook.everyone() }),
|
|
216
216
|
team: this.teamProvider.team,
|
|
217
217
|
installPackage: (source, scope, cwd) => packages.installPackage(source, scope, cwd),
|
|
218
218
|
removePackage: (id, cwd) => packages.removePackage(id, cwd),
|
|
@@ -285,6 +285,10 @@ __decorate([
|
|
|
285
285
|
(0, core_1.Autowired)({ id: host_protocol_1.TaSessionRegistry, detached: true }),
|
|
286
286
|
__metadata("design:type", Object)
|
|
287
287
|
], PackageHostsImpl.prototype, "sessions", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
(0, core_1.Autowired)({ id: host_protocol_1.TaPresenceBook, detached: true }),
|
|
290
|
+
__metadata("design:type", Object)
|
|
291
|
+
], PackageHostsImpl.prototype, "presenceBook", void 0);
|
|
288
292
|
__decorate([
|
|
289
293
|
(0, core_1.Autowired)({ id: team_protocol_1.TaHostTeamProvider, detached: true }),
|
|
290
294
|
__metadata("design:type", Object)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RpcConnection } from '@celljs/rpc/lib/node';
|
|
2
|
+
import { type TaPresencePerson, type TaPresenceReport, type TaSessionPerson } from '@celljs/ta-protocol';
|
|
3
|
+
import { TaPresenceBook } from './host-protocol';
|
|
4
|
+
import { TaAuthority, TaPrincipals, TaRunActors } from './team/team-protocol';
|
|
5
|
+
interface Entry {
|
|
6
|
+
principal: string;
|
|
7
|
+
sessionId?: string;
|
|
8
|
+
typing: boolean;
|
|
9
|
+
/** `Date.now()` time of its last report. */
|
|
10
|
+
at: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* What each page is at, by connection (docs/design/ta-team.md 7.1): who looks at which conversation and types in it,
|
|
14
|
+
* named as the page of members names them. Nothing of it is written anywhere; a connection closed, or silent for
|
|
15
|
+
* TA_PRESENCE_EXPIRY_MS, is out of it.
|
|
16
|
+
*/
|
|
17
|
+
export declare class DefaultTaPresenceBook implements TaPresenceBook {
|
|
18
|
+
protected readonly principals: TaPrincipals;
|
|
19
|
+
protected readonly authority: TaAuthority;
|
|
20
|
+
protected readonly runs: TaRunActors;
|
|
21
|
+
protected readonly entries: Map<RpcConnection, Entry>;
|
|
22
|
+
protected readonly watched: WeakSet<RpcConnection>;
|
|
23
|
+
protected readonly listeners: Set<() => void>;
|
|
24
|
+
protected sweeper?: ReturnType<typeof setInterval>;
|
|
25
|
+
protected ownerName?: string;
|
|
26
|
+
/** How long a page may say nothing; less in specs. */
|
|
27
|
+
protected expiryMs: number;
|
|
28
|
+
report(connection: RpcConnection, state: TaPresenceReport): void;
|
|
29
|
+
people(sessionId: string, principal: string, streaming: boolean): TaSessionPerson[] | undefined;
|
|
30
|
+
everyone(): TaPresencePerson[];
|
|
31
|
+
onChange(listener: () => void): () => void;
|
|
32
|
+
protected nameOf(principal: string): string;
|
|
33
|
+
protected leave(connection: RpcConnection): void;
|
|
34
|
+
/** Pages silent too long are gone; looked for only while there are pages. */
|
|
35
|
+
protected sweep(): void;
|
|
36
|
+
protected changed(): void;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=presence-book.d.ts.map
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DefaultTaPresenceBook = void 0;
|
|
13
|
+
const node_os_1 = require("node:os");
|
|
14
|
+
const core_1 = require("@celljs/core");
|
|
15
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
16
|
+
const host_protocol_1 = require("./host-protocol");
|
|
17
|
+
const team_protocol_1 = require("./team/team-protocol");
|
|
18
|
+
/**
|
|
19
|
+
* What each page is at, by connection (docs/design/ta-team.md 7.1): who looks at which conversation and types in it,
|
|
20
|
+
* named as the page of members names them. Nothing of it is written anywhere; a connection closed, or silent for
|
|
21
|
+
* TA_PRESENCE_EXPIRY_MS, is out of it.
|
|
22
|
+
*/
|
|
23
|
+
let DefaultTaPresenceBook = class DefaultTaPresenceBook {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.entries = new Map();
|
|
26
|
+
this.watched = new WeakSet();
|
|
27
|
+
this.listeners = new Set();
|
|
28
|
+
/** How long a page may say nothing; less in specs. */
|
|
29
|
+
this.expiryMs = ta_protocol_1.TA_PRESENCE_EXPIRY_MS;
|
|
30
|
+
}
|
|
31
|
+
report(connection, state) {
|
|
32
|
+
if (connection.closed) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const sessionId = typeof (state === null || state === void 0 ? void 0 : state.sessionId) === 'string' && state.sessionId ? state.sessionId : undefined;
|
|
36
|
+
const entry = { principal: this.principals.of(connection), sessionId, typing: !!sessionId && (state === null || state === void 0 ? void 0 : state.typing) === true, at: Date.now() };
|
|
37
|
+
const before = this.entries.get(connection);
|
|
38
|
+
this.entries.set(connection, entry);
|
|
39
|
+
if (!this.watched.has(connection)) {
|
|
40
|
+
this.watched.add(connection);
|
|
41
|
+
connection.onClose(() => this.leave(connection));
|
|
42
|
+
}
|
|
43
|
+
this.sweep();
|
|
44
|
+
if (!before || before.sessionId !== entry.sessionId || before.typing !== entry.typing) {
|
|
45
|
+
this.changed();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
people(sessionId, principal, streaming) {
|
|
49
|
+
var _a;
|
|
50
|
+
const found = new Map();
|
|
51
|
+
const person = (id) => {
|
|
52
|
+
let one = found.get(id);
|
|
53
|
+
if (!one) {
|
|
54
|
+
one = { id, name: this.nameOf(id) };
|
|
55
|
+
found.set(id, one);
|
|
56
|
+
}
|
|
57
|
+
return one;
|
|
58
|
+
};
|
|
59
|
+
for (const entry of this.entries.values()) {
|
|
60
|
+
if (entry.sessionId === sessionId && entry.principal !== principal) {
|
|
61
|
+
const one = person(entry.principal);
|
|
62
|
+
one.viewing = true;
|
|
63
|
+
if (entry.typing) {
|
|
64
|
+
one.typing = true;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (streaming) {
|
|
69
|
+
for (const actor of (_a = this.runs.actorsOfSession(sessionId)) !== null && _a !== void 0 ? _a : []) {
|
|
70
|
+
if (actor !== principal) {
|
|
71
|
+
person(actor).asked = true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// The same order each time: a list told again only when it differs.
|
|
76
|
+
return found.size ? [...found.values()].sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0)) : undefined;
|
|
77
|
+
}
|
|
78
|
+
everyone() {
|
|
79
|
+
var _a;
|
|
80
|
+
const people = new Map();
|
|
81
|
+
for (const entry of this.entries.values()) {
|
|
82
|
+
const one = (_a = people.get(entry.principal)) !== null && _a !== void 0 ? _a : { id: entry.principal, name: this.nameOf(entry.principal), pages: 0, at: 0 };
|
|
83
|
+
one.pages++;
|
|
84
|
+
if (entry.at >= one.at) {
|
|
85
|
+
one.at = entry.at;
|
|
86
|
+
one.sessionId = entry.sessionId;
|
|
87
|
+
one.typing = entry.typing || undefined;
|
|
88
|
+
}
|
|
89
|
+
people.set(entry.principal, one);
|
|
90
|
+
}
|
|
91
|
+
return [...people.values()].map(({ at: _at, sessionId, typing, ...one }) => ({
|
|
92
|
+
...one,
|
|
93
|
+
...(sessionId ? { sessionId } : {}),
|
|
94
|
+
...(typing ? { typing } : {}),
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
onChange(listener) {
|
|
98
|
+
this.listeners.add(listener);
|
|
99
|
+
return () => this.listeners.delete(listener);
|
|
100
|
+
}
|
|
101
|
+
nameOf(principal) {
|
|
102
|
+
var _a;
|
|
103
|
+
var _b, _c;
|
|
104
|
+
if (principal === ta_protocol_1.TA_OWNER) {
|
|
105
|
+
(_b = this.ownerName) !== null && _b !== void 0 ? _b : (this.ownerName = (0, node_os_1.userInfo)().username);
|
|
106
|
+
return this.ownerName;
|
|
107
|
+
}
|
|
108
|
+
return (_c = (_a = this.authority.describe(principal)) === null || _a === void 0 ? void 0 : _a.name) !== null && _c !== void 0 ? _c : principal;
|
|
109
|
+
}
|
|
110
|
+
leave(connection) {
|
|
111
|
+
if (this.entries.delete(connection)) {
|
|
112
|
+
this.changed();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/** Pages silent too long are gone; looked for only while there are pages. */
|
|
116
|
+
sweep() {
|
|
117
|
+
var _a, _b;
|
|
118
|
+
if (this.sweeper || !this.entries.size) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
this.sweeper = setInterval(() => {
|
|
122
|
+
const before = Date.now() - this.expiryMs;
|
|
123
|
+
let gone = false;
|
|
124
|
+
for (const [connection, entry] of this.entries) {
|
|
125
|
+
if (entry.at < before) {
|
|
126
|
+
this.entries.delete(connection);
|
|
127
|
+
gone = true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (!this.entries.size) {
|
|
131
|
+
clearInterval(this.sweeper);
|
|
132
|
+
this.sweeper = undefined;
|
|
133
|
+
}
|
|
134
|
+
if (gone) {
|
|
135
|
+
this.changed();
|
|
136
|
+
}
|
|
137
|
+
}, Math.max(1, Math.floor(this.expiryMs / 3)));
|
|
138
|
+
(_b = (_a = this.sweeper).unref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
139
|
+
}
|
|
140
|
+
changed() {
|
|
141
|
+
for (const listener of this.listeners) {
|
|
142
|
+
listener();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
exports.DefaultTaPresenceBook = DefaultTaPresenceBook;
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, core_1.Autowired)(team_protocol_1.TaPrincipals),
|
|
149
|
+
__metadata("design:type", Object)
|
|
150
|
+
], DefaultTaPresenceBook.prototype, "principals", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, core_1.Autowired)(team_protocol_1.TaAuthority),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], DefaultTaPresenceBook.prototype, "authority", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, core_1.Autowired)(team_protocol_1.TaRunActors),
|
|
157
|
+
__metadata("design:type", Object)
|
|
158
|
+
], DefaultTaPresenceBook.prototype, "runs", void 0);
|
|
159
|
+
exports.DefaultTaPresenceBook = DefaultTaPresenceBook = __decorate([
|
|
160
|
+
(0, core_1.Component)(host_protocol_1.TaPresenceBook)
|
|
161
|
+
], DefaultTaPresenceBook);
|
|
162
|
+
//# sourceMappingURL=presence-book.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type TaPresenceReport, TaPresenceServer } from '@celljs/ta-protocol';
|
|
2
|
+
import { TaPresenceBook, TaSessionRegistry } from './host-protocol';
|
|
3
|
+
import { TaVisibility } from './team/team-protocol';
|
|
4
|
+
/**
|
|
5
|
+
* What each page says it is at (TaPresenceServer). A page is at a conversation only when it is open and the page may
|
|
6
|
+
* see it: no one shows at one they may not see, nor at one made up.
|
|
7
|
+
*/
|
|
8
|
+
export declare class TaPresenceServerImpl implements TaPresenceServer {
|
|
9
|
+
protected readonly book: TaPresenceBook;
|
|
10
|
+
protected readonly sessions: TaSessionRegistry;
|
|
11
|
+
protected readonly visibility: TaVisibility;
|
|
12
|
+
report(state: TaPresenceReport): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=presence-server-impl.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TaPresenceServerImpl = void 0;
|
|
13
|
+
const core_1 = require("@celljs/core");
|
|
14
|
+
const rpc_1 = require("@celljs/rpc");
|
|
15
|
+
const node_1 = require("@celljs/rpc/lib/node");
|
|
16
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
17
|
+
const host_protocol_1 = require("./host-protocol");
|
|
18
|
+
const team_protocol_1 = require("./team/team-protocol");
|
|
19
|
+
/**
|
|
20
|
+
* What each page says it is at (TaPresenceServer). A page is at a conversation only when it is open and the page may
|
|
21
|
+
* see it: no one shows at one they may not see, nor at one made up.
|
|
22
|
+
*/
|
|
23
|
+
let TaPresenceServerImpl = class TaPresenceServerImpl {
|
|
24
|
+
async report(state) {
|
|
25
|
+
const connection = node_1.RpcContext.requireConnection();
|
|
26
|
+
const sessionId = typeof (state === null || state === void 0 ? void 0 : state.sessionId) === 'string' ? state.sessionId : undefined;
|
|
27
|
+
const session = sessionId ? this.sessions.list().find(one => one.id === sessionId) : undefined;
|
|
28
|
+
const seen = !!session && this.visibility.sessions(connection, [{ cwd: session.cwd, sessionFile: session.pi.sessionFile }]).length > 0;
|
|
29
|
+
this.book.report(connection, seen ? { sessionId, typing: (state === null || state === void 0 ? void 0 : state.typing) === true } : {});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.TaPresenceServerImpl = TaPresenceServerImpl;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, core_1.Autowired)(host_protocol_1.TaPresenceBook),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], TaPresenceServerImpl.prototype, "book", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, core_1.Autowired)(host_protocol_1.TaSessionRegistry),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], TaPresenceServerImpl.prototype, "sessions", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, core_1.Autowired)(team_protocol_1.TaVisibility),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], TaPresenceServerImpl.prototype, "visibility", void 0);
|
|
45
|
+
exports.TaPresenceServerImpl = TaPresenceServerImpl = __decorate([
|
|
46
|
+
(0, rpc_1.Rpc)(ta_protocol_1.TaPresenceServer)
|
|
47
|
+
], TaPresenceServerImpl);
|
|
48
|
+
//# sourceMappingURL=presence-server-impl.js.map
|
|
@@ -2,6 +2,7 @@ import { type Application, ApplicationLifecycle } from '@celljs/core';
|
|
|
2
2
|
import { type RpcConnection } from '@celljs/rpc/lib/node';
|
|
3
3
|
import { type TaFriend, type TaFriendRequest, type TaIdentity, type TaRoomEvent, type TaRoomInfo, type TaRoomRequest, TaRoomServer, type TaRooms, type TaRoomValue, type TaRoomWatch } from '@celljs/ta-protocol';
|
|
4
4
|
import type { RelayHubs } from '@celljs/ta-relay/lib/node';
|
|
5
|
+
import { ExtensionDataStore } from './extension-data';
|
|
5
6
|
import { type RelayBridge } from './relay-bridge';
|
|
6
7
|
/** The id of {@link RoomsBridge}. */
|
|
7
8
|
export declare const ROOMS_BRIDGE: unique symbol;
|
|
@@ -12,16 +13,20 @@ export declare const ROOMS_BRIDGE: unique symbol;
|
|
|
12
13
|
*/
|
|
13
14
|
export declare class RoomsBridge implements ApplicationLifecycle<Application> {
|
|
14
15
|
protected readonly relay: RelayBridge;
|
|
16
|
+
protected readonly data: ExtensionDataStore;
|
|
17
|
+
protected stopLook?: () => void;
|
|
15
18
|
/** The connections that watch, and what they hear: messages and the state too, or the state of some keys. */
|
|
16
19
|
protected readonly watchers: Map<RpcConnection, TaRoomWatch>;
|
|
17
20
|
get hubs(): RelayHubs;
|
|
18
21
|
readonly rooms: TaRooms;
|
|
19
22
|
onStart(): void;
|
|
20
23
|
onStop(): void;
|
|
24
|
+
/** The look of this Ta others see is the double's, as the user picked it on a page (TA_DOUBLE_LOOK). */
|
|
25
|
+
protected keepLook(): Promise<void>;
|
|
21
26
|
/** `watch` undefined: no more. */
|
|
22
27
|
watch(connection: RpcConnection, watch: TaRoomWatch | undefined): void;
|
|
23
28
|
protected broadcast(event: TaRoomEvent): void;
|
|
24
|
-
protected static identity({ id, name, shared }: TaIdentity): TaIdentity;
|
|
29
|
+
protected static identity({ id, name, look, shared }: TaIdentity): TaIdentity;
|
|
25
30
|
}
|
|
26
31
|
/** The rooms for clients (TaRoomServer): those of RoomsBridge, what goes wrong said as the errors of Ta. */
|
|
27
32
|
export declare class TaRoomServerImpl implements TaRoomServer {
|
package/lib/node/rooms-bridge.js
CHANGED
|
@@ -15,6 +15,7 @@ const core_1 = require("@celljs/core");
|
|
|
15
15
|
const rpc_1 = require("@celljs/rpc");
|
|
16
16
|
const node_1 = require("@celljs/rpc/lib/node");
|
|
17
17
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
18
|
+
const extension_data_1 = require("./extension-data");
|
|
18
19
|
const relay_bridge_1 = require("./relay-bridge");
|
|
19
20
|
const ta_errors_1 = require("./ta-errors");
|
|
20
21
|
/** The id of {@link RoomsBridge}. */
|
|
@@ -65,10 +66,23 @@ let RoomsBridge = RoomsBridge_1 = class RoomsBridge {
|
|
|
65
66
|
onStart() {
|
|
66
67
|
this.hubs.onEvent(event => this.broadcast(event));
|
|
67
68
|
this.hubs.start();
|
|
69
|
+
void this.keepLook();
|
|
70
|
+
this.stopLook = this.data.onChange((name, key, cwd) => {
|
|
71
|
+
if (name === ta_protocol_1.TA_DOUBLE_LOOK.name && key === ta_protocol_1.TA_DOUBLE_LOOK.key && cwd === undefined) {
|
|
72
|
+
void this.keepLook();
|
|
73
|
+
}
|
|
74
|
+
});
|
|
68
75
|
}
|
|
69
76
|
onStop() {
|
|
77
|
+
var _a;
|
|
78
|
+
(_a = this.stopLook) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
70
79
|
this.hubs.stop();
|
|
71
80
|
}
|
|
81
|
+
/** The look of this Ta others see is the double's, as the user picked it on a page (TA_DOUBLE_LOOK). */
|
|
82
|
+
async keepLook() {
|
|
83
|
+
const look = await this.data.get(ta_protocol_1.TA_DOUBLE_LOOK.name, ta_protocol_1.TA_DOUBLE_LOOK.key).catch(() => undefined);
|
|
84
|
+
await this.hubs.setLook(typeof look === 'string' && look ? look : ta_protocol_1.TA_DOUBLE_LOOK.initial).catch(() => undefined);
|
|
85
|
+
}
|
|
72
86
|
/** `watch` undefined: no more. */
|
|
73
87
|
watch(connection, watch) {
|
|
74
88
|
if (watch === undefined) {
|
|
@@ -90,8 +104,8 @@ let RoomsBridge = RoomsBridge_1 = class RoomsBridge {
|
|
|
90
104
|
}
|
|
91
105
|
}
|
|
92
106
|
}
|
|
93
|
-
static identity({ id, name, shared }) {
|
|
94
|
-
return { id, name, ...(shared ? { shared } : {}) };
|
|
107
|
+
static identity({ id, name, look, shared }) {
|
|
108
|
+
return { id, name, ...(look ? { look } : {}), ...(shared ? { shared } : {}) };
|
|
95
109
|
}
|
|
96
110
|
};
|
|
97
111
|
exports.RoomsBridge = RoomsBridge;
|
|
@@ -99,6 +113,10 @@ __decorate([
|
|
|
99
113
|
(0, core_1.Autowired)({ id: relay_bridge_1.RELAY_BRIDGE, detached: true }),
|
|
100
114
|
__metadata("design:type", Function)
|
|
101
115
|
], RoomsBridge.prototype, "relay", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, core_1.Autowired)(extension_data_1.ExtensionDataStore),
|
|
118
|
+
__metadata("design:type", Object)
|
|
119
|
+
], RoomsBridge.prototype, "data", void 0);
|
|
102
120
|
exports.RoomsBridge = RoomsBridge = RoomsBridge_1 = __decorate([
|
|
103
121
|
(0, core_1.Component)([exports.ROOMS_BRIDGE, core_1.ApplicationLifecycle])
|
|
104
122
|
], RoomsBridge);
|
|
@@ -59,7 +59,6 @@ class SessionListFeed {
|
|
|
59
59
|
const wait = Math.max(0, watcher.lastAt + this.intervalMs - performance.now());
|
|
60
60
|
watcher.timer = setTimeout(() => {
|
|
61
61
|
watcher.timer = undefined;
|
|
62
|
-
watcher.lastAt = performance.now();
|
|
63
62
|
if (connection.closed) {
|
|
64
63
|
return;
|
|
65
64
|
}
|
|
@@ -68,6 +67,8 @@ class SessionListFeed {
|
|
|
68
67
|
if (json === watcher.sent) {
|
|
69
68
|
return;
|
|
70
69
|
}
|
|
70
|
+
// Only a list sent counts against the interval: what did not change this one does not hold back the next.
|
|
71
|
+
watcher.lastAt = performance.now();
|
|
71
72
|
watcher.sent = json;
|
|
72
73
|
connection
|
|
73
74
|
.client(ta_protocol_1.TaClient)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RpcConnectionManager } from '@celljs/rpc/lib/node';
|
|
2
|
-
import { type TaAccessInfo, TaAccessServer } from '@celljs/ta-protocol';
|
|
2
|
+
import { type TaAccessInfo, TaAccessServer, type TaSignInConfig, type TaSignInKind } from '@celljs/ta-protocol';
|
|
3
|
+
import { type RelayBridge } from '../relay-bridge';
|
|
3
4
|
import { type TaAccess } from '../ta-access';
|
|
4
5
|
import { type TaSignIn } from './ta-sign-in';
|
|
5
6
|
/** Who may sign in with an account, for anyone in; a browser that loses its sign-in is cut off at once. */
|
|
@@ -7,6 +8,9 @@ export declare class TaAccessServerImpl implements TaAccessServer {
|
|
|
7
8
|
protected readonly signIn: TaSignIn;
|
|
8
9
|
protected readonly access: TaAccess;
|
|
9
10
|
protected readonly connections: RpcConnectionManager;
|
|
11
|
+
protected readonly relay: RelayBridge;
|
|
12
|
+
getSignInConfig(): Promise<TaSignInConfig>;
|
|
13
|
+
setSignInProvider(id: TaSignInKind, fields: Record<string, string> | null): Promise<void>;
|
|
10
14
|
getAccess(): Promise<TaAccessInfo>;
|
|
11
15
|
bindUrl(provider: string): Promise<string>;
|
|
12
16
|
allow(account: string, name?: string): Promise<void>;
|