doover-js 0.5.3 → 0.6.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.md +146 -0
- package/dist/apis/_args.d.ts +16 -0
- package/dist/apis/_args.js +26 -0
- package/dist/apis/agents-api.d.ts +4 -1
- package/dist/apis/agents-api.js +139 -1
- package/dist/apis/aggregates-api.d.ts +23 -3
- package/dist/apis/aggregates-api.js +33 -4
- package/dist/apis/alarms-api.d.ts +30 -0
- package/dist/apis/alarms-api.js +51 -6
- package/dist/apis/channels-api.d.ts +40 -3
- package/dist/apis/channels-api.js +50 -5
- package/dist/apis/connections-api.d.ts +21 -5
- package/dist/apis/connections-api.js +26 -10
- package/dist/apis/messages-api.d.ts +54 -9
- package/dist/apis/messages-api.js +94 -12
- package/dist/apis/notifications-api.d.ts +52 -0
- package/dist/apis/notifications-api.js +99 -13
- package/dist/apis/permissions-api.d.ts +8 -0
- package/dist/apis/permissions-api.js +11 -2
- package/dist/apis/processors-api.d.ts +35 -0
- package/dist/apis/processors-api.js +64 -8
- package/dist/apis/users-api.d.ts +8 -0
- package/dist/apis/users-api.js +13 -0
- package/dist/client/capabilities.d.ts +10 -0
- package/dist/client/capabilities.js +43 -0
- package/dist/client/data-client.d.ts +104 -0
- package/dist/client/data-client.js +2 -0
- package/dist/client/doover-client.d.ts +31 -31
- package/dist/client/doover-client.js +58 -37
- package/dist/client/errors.d.ts +23 -0
- package/dist/client/errors.js +50 -0
- package/dist/client/local-agent-client.d.ts +65 -0
- package/dist/client/local-agent-client.js +222 -0
- package/dist/client/multiplex-client.d.ts +151 -0
- package/dist/client/multiplex-client.js +744 -0
- package/dist/client/multiplex-gateway.d.ts +49 -0
- package/dist/client/multiplex-gateway.js +114 -0
- package/dist/client/multiplex-merge.d.ts +12 -0
- package/dist/client/multiplex-merge.js +42 -0
- package/dist/client/provenance.d.ts +60 -0
- package/dist/client/provenance.js +113 -0
- package/dist/client/stats.d.ts +24 -0
- package/dist/client/stats.js +62 -0
- package/dist/client/status-tracker.d.ts +24 -0
- package/dist/client/status-tracker.js +90 -0
- package/dist/gateway/gateway-client.d.ts +23 -1
- package/dist/gateway/gateway-client.js +75 -6
- package/dist/http/rest-client.d.ts +5 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +22 -7
- package/dist/react/context.d.ts +9 -5
- package/dist/react/context.js +6 -2
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.js +3 -1
- package/dist/react/useChannelAggregate.d.ts +8 -1
- package/dist/react/useChannelAggregate.js +24 -6
- package/dist/react/useChannelMessage.d.ts +8 -1
- package/dist/react/useChannelMessage.js +17 -6
- package/dist/react/useChannelMessages.d.ts +8 -1
- package/dist/react/useChannelMessages.js +21 -7
- package/dist/react/useChannelSubscription.d.ts +6 -0
- package/dist/react/useChannelSubscription.js +8 -18
- package/dist/react/useClientStatus.d.ts +10 -0
- package/dist/react/useClientStatus.js +22 -0
- package/dist/react/useConnectionState.d.ts +5 -0
- package/dist/react/useConnectionState.js +5 -0
- package/dist/react/useMultiAgentAggregates.d.ts +8 -1
- package/dist/react/useMultiAgentAggregates.js +25 -21
- package/dist/react/useMultiAgentChannelMessages.d.ts +8 -1
- package/dist/react/useMultiAgentChannelMessages.js +23 -18
- package/dist/react/useSendMessage.d.ts +8 -1
- package/dist/react/useSendMessage.js +15 -2
- package/dist/react/useSendRpc.js +4 -1
- package/dist/react/useUpdateAggregate.d.ts +6 -0
- package/dist/react/useUpdateAggregate.js +20 -4
- package/dist/react/useUpdateMessage.d.ts +5 -0
- package/dist/react/useUpdateMessage.js +11 -2
- package/dist/rpc/errors.d.ts +10 -0
- package/dist/rpc/errors.js +23 -0
- package/dist/rpc/rpc-dispatcher.d.ts +28 -0
- package/dist/rpc/rpc-dispatcher.js +129 -0
- package/dist/test/api-args.test.d.ts +1 -0
- package/dist/test/api-args.test.js +48 -0
- package/dist/test/api-overloads.test.d.ts +9 -0
- package/dist/test/api-overloads.test.js +276 -0
- package/dist/test/capabilities.test.d.ts +1 -0
- package/dist/test/capabilities.test.js +27 -0
- package/dist/test/data-client-errors.test.d.ts +1 -0
- package/dist/test/data-client-errors.test.js +24 -0
- package/dist/test/data-client-shape.test.d.ts +1 -0
- package/dist/test/data-client-shape.test.js +28 -0
- package/dist/test/doover-client-dataclient.test.d.ts +1 -0
- package/dist/test/doover-client-dataclient.test.js +58 -0
- package/dist/test/doover-client-provenance.test.d.ts +1 -0
- package/dist/test/doover-client-provenance.test.js +32 -0
- package/dist/test/exports.test.d.ts +1 -0
- package/dist/test/exports.test.js +76 -0
- package/dist/test/gateway-provenance.test.d.ts +1 -0
- package/dist/test/gateway-provenance.test.js +29 -0
- package/dist/test/gateway-subscriptions.test.d.ts +1 -0
- package/dist/test/gateway-subscriptions.test.js +95 -0
- package/dist/test/local-agent-client.test.d.ts +1 -0
- package/dist/test/local-agent-client.test.js +202 -0
- package/dist/test/multiplex-capabilities.test.d.ts +1 -0
- package/dist/test/multiplex-capabilities.test.js +37 -0
- package/dist/test/multiplex-conflicts.test.d.ts +1 -0
- package/dist/test/multiplex-conflicts.test.js +35 -0
- package/dist/test/multiplex-gateway.test.d.ts +1 -0
- package/dist/test/multiplex-gateway.test.js +103 -0
- package/dist/test/multiplex-merge.test.d.ts +1 -0
- package/dist/test/multiplex-merge.test.js +19 -0
- package/dist/test/multiplex-noncore.test.d.ts +1 -0
- package/dist/test/multiplex-noncore.test.js +82 -0
- package/dist/test/multiplex-passthrough.test.d.ts +1 -0
- package/dist/test/multiplex-passthrough.test.js +35 -0
- package/dist/test/multiplex-reads.test.d.ts +1 -0
- package/dist/test/multiplex-reads.test.js +87 -0
- package/dist/test/multiplex-registry.test.d.ts +1 -0
- package/dist/test/multiplex-registry.test.js +81 -0
- package/dist/test/multiplex-routing.test.d.ts +1 -0
- package/dist/test/multiplex-routing.test.js +45 -0
- package/dist/test/multiplex-status.test.d.ts +1 -0
- package/dist/test/multiplex-status.test.js +63 -0
- package/dist/test/multiplex-writes.test.d.ts +1 -0
- package/dist/test/multiplex-writes.test.js +93 -0
- package/dist/test/provenance-regression.test.d.ts +1 -0
- package/dist/test/provenance-regression.test.js +45 -0
- package/dist/test/provenance-stamper.test.d.ts +1 -0
- package/dist/test/provenance-stamper.test.js +41 -0
- package/dist/test/provenance-type.test.d.ts +1 -0
- package/dist/test/provenance-type.test.js +15 -0
- package/dist/test/react-client-status.test.d.ts +1 -0
- package/dist/test/react-client-status.test.js +35 -0
- package/dist/test/react-dataclient.test.d.ts +1 -0
- package/dist/test/react-dataclient.test.js +28 -0
- package/dist/test/react-exports.test.d.ts +1 -0
- package/dist/test/react-exports.test.js +45 -0
- package/dist/test/react-sources-option.test.d.ts +1 -0
- package/dist/test/react-sources-option.test.js +41 -0
- package/dist/test/react.test.js +2 -2
- package/dist/test/rpc-dispatcher.test.d.ts +1 -0
- package/dist/test/rpc-dispatcher.test.js +190 -0
- package/dist/test/stats-rpc.test.d.ts +1 -0
- package/dist/test/stats-rpc.test.js +69 -0
- package/dist/test/status-tracker.test.d.ts +1 -0
- package/dist/test/status-tracker.test.js +85 -0
- package/dist/test/users-api.test.d.ts +1 -0
- package/dist/test/users-api.test.js +19 -0
- package/dist/types/common.d.ts +18 -1
- package/dist/types/openapi.d.ts +1 -0
- package/dist/types/provenance.d.ts +45 -0
- package/dist/types/provenance.js +2 -0
- package/dist/types/viewer.d.ts +3 -0
- package/dist/viewer/doover-data-provider.d.ts +30 -34
- package/dist/viewer/doover-data-provider.js +82 -316
- package/package.json +1 -1
|
@@ -4,18 +4,53 @@ export declare class ProcessorsApi {
|
|
|
4
4
|
private readonly rest;
|
|
5
5
|
constructor(rest: RestClient);
|
|
6
6
|
createProcessorSchedule(agentId: string, scheduleId: string, body: PutScheduleRequest): Promise<unknown>;
|
|
7
|
+
createProcessorSchedule(identifier: {
|
|
8
|
+
agentId: string;
|
|
9
|
+
}, scheduleId: string, body: PutScheduleRequest): Promise<unknown>;
|
|
10
|
+
private _createProcessorSchedule;
|
|
7
11
|
deleteProcessorSchedule(agentId: string, scheduleId: string): Promise<unknown>;
|
|
12
|
+
deleteProcessorSchedule(identifier: {
|
|
13
|
+
agentId: string;
|
|
14
|
+
}, scheduleId: string): Promise<unknown>;
|
|
15
|
+
private _deleteProcessorSchedule;
|
|
8
16
|
regenerateScheduleToken(agentId: string, scheduleId: string): Promise<unknown>;
|
|
17
|
+
regenerateScheduleToken(identifier: {
|
|
18
|
+
agentId: string;
|
|
19
|
+
}, scheduleId: string): Promise<unknown>;
|
|
20
|
+
private _regenerateScheduleToken;
|
|
9
21
|
getScheduleInfo(scheduleId: string): Promise<ScheduleInfo>;
|
|
10
22
|
getScheduleInfoAlias(scheduleId: string): Promise<ScheduleInfo>;
|
|
11
23
|
createProcessorSubscription(agentId: string, subscriptionId: string, body: PutSubscriptionRequest): Promise<unknown>;
|
|
24
|
+
createProcessorSubscription(identifier: {
|
|
25
|
+
agentId: string;
|
|
26
|
+
}, subscriptionId: string, body: PutSubscriptionRequest): Promise<unknown>;
|
|
27
|
+
private _createProcessorSubscription;
|
|
12
28
|
deleteProcessorSubscription(agentId: string, subscriptionId: string): Promise<unknown>;
|
|
29
|
+
deleteProcessorSubscription(identifier: {
|
|
30
|
+
agentId: string;
|
|
31
|
+
}, subscriptionId: string): Promise<unknown>;
|
|
32
|
+
private _deleteProcessorSubscription;
|
|
13
33
|
getProcessorSubscriptionInfo(subscriptionName: string): Promise<SubscriptionInfo>;
|
|
14
34
|
getProcessorSubscriptionInfoAlias(subscriptionArn: string): Promise<SubscriptionInfo>;
|
|
15
35
|
createIngestionEndpoint(agentId: string, ingestionId: string, body: CreateIngestionRequest): Promise<unknown>;
|
|
36
|
+
createIngestionEndpoint(identifier: {
|
|
37
|
+
agentId: string;
|
|
38
|
+
}, ingestionId: string, body: CreateIngestionRequest): Promise<unknown>;
|
|
39
|
+
private _createIngestionEndpoint;
|
|
16
40
|
deleteIngestionEndpoint(agentId: string, ingestionId: string): Promise<unknown>;
|
|
41
|
+
deleteIngestionEndpoint(identifier: {
|
|
42
|
+
agentId: string;
|
|
43
|
+
}, ingestionId: string): Promise<unknown>;
|
|
44
|
+
private _deleteIngestionEndpoint;
|
|
17
45
|
invokeIngestionEndpoint(agentId: string, ingestionId: string, body: unknown, params?: {
|
|
18
46
|
wait?: boolean;
|
|
19
47
|
json_response?: boolean;
|
|
20
48
|
}): Promise<unknown>;
|
|
49
|
+
invokeIngestionEndpoint(identifier: {
|
|
50
|
+
agentId: string;
|
|
51
|
+
}, ingestionId: string, body: unknown, params?: {
|
|
52
|
+
wait?: boolean;
|
|
53
|
+
json_response?: boolean;
|
|
54
|
+
}): Promise<unknown>;
|
|
55
|
+
private _invokeIngestionEndpoint;
|
|
21
56
|
}
|
|
@@ -5,13 +5,34 @@ class ProcessorsApi {
|
|
|
5
5
|
constructor(rest) {
|
|
6
6
|
this.rest = rest;
|
|
7
7
|
}
|
|
8
|
-
createProcessorSchedule(
|
|
8
|
+
createProcessorSchedule(...args) {
|
|
9
|
+
if (typeof args[0] === "string") {
|
|
10
|
+
return this._createProcessorSchedule(args[0], args[1], args[2]);
|
|
11
|
+
}
|
|
12
|
+
const id = args[0];
|
|
13
|
+
return this._createProcessorSchedule(id.agentId, args[1], args[2]);
|
|
14
|
+
}
|
|
15
|
+
_createProcessorSchedule(agentId, scheduleId, body) {
|
|
9
16
|
return this.rest.put(`/agents/${agentId}/processors/schedules/${scheduleId}`, body);
|
|
10
17
|
}
|
|
11
|
-
deleteProcessorSchedule(
|
|
18
|
+
deleteProcessorSchedule(...args) {
|
|
19
|
+
if (typeof args[0] === "string") {
|
|
20
|
+
return this._deleteProcessorSchedule(args[0], args[1]);
|
|
21
|
+
}
|
|
22
|
+
const id = args[0];
|
|
23
|
+
return this._deleteProcessorSchedule(id.agentId, args[1]);
|
|
24
|
+
}
|
|
25
|
+
_deleteProcessorSchedule(agentId, scheduleId) {
|
|
12
26
|
return this.rest.delete(`/agents/${agentId}/processors/schedules/${scheduleId}`);
|
|
13
27
|
}
|
|
14
|
-
regenerateScheduleToken(
|
|
28
|
+
regenerateScheduleToken(...args) {
|
|
29
|
+
if (typeof args[0] === "string") {
|
|
30
|
+
return this._regenerateScheduleToken(args[0], args[1]);
|
|
31
|
+
}
|
|
32
|
+
const id = args[0];
|
|
33
|
+
return this._regenerateScheduleToken(id.agentId, args[1]);
|
|
34
|
+
}
|
|
35
|
+
_regenerateScheduleToken(agentId, scheduleId) {
|
|
15
36
|
return this.rest.post(`/agents/${agentId}/processors/schedules/${scheduleId}/token`, {});
|
|
16
37
|
}
|
|
17
38
|
getScheduleInfo(scheduleId) {
|
|
@@ -20,10 +41,24 @@ class ProcessorsApi {
|
|
|
20
41
|
getScheduleInfoAlias(scheduleId) {
|
|
21
42
|
return this.rest.get(`/processors/schedules/${scheduleId}/info`);
|
|
22
43
|
}
|
|
23
|
-
createProcessorSubscription(
|
|
44
|
+
createProcessorSubscription(...args) {
|
|
45
|
+
if (typeof args[0] === "string") {
|
|
46
|
+
return this._createProcessorSubscription(args[0], args[1], args[2]);
|
|
47
|
+
}
|
|
48
|
+
const id = args[0];
|
|
49
|
+
return this._createProcessorSubscription(id.agentId, args[1], args[2]);
|
|
50
|
+
}
|
|
51
|
+
_createProcessorSubscription(agentId, subscriptionId, body) {
|
|
24
52
|
return this.rest.put(`/agents/${agentId}/processors/subscriptions/${subscriptionId}`, body);
|
|
25
53
|
}
|
|
26
|
-
deleteProcessorSubscription(
|
|
54
|
+
deleteProcessorSubscription(...args) {
|
|
55
|
+
if (typeof args[0] === "string") {
|
|
56
|
+
return this._deleteProcessorSubscription(args[0], args[1]);
|
|
57
|
+
}
|
|
58
|
+
const id = args[0];
|
|
59
|
+
return this._deleteProcessorSubscription(id.agentId, args[1]);
|
|
60
|
+
}
|
|
61
|
+
_deleteProcessorSubscription(agentId, subscriptionId) {
|
|
27
62
|
return this.rest.delete(`/agents/${agentId}/processors/subscriptions/${subscriptionId}`);
|
|
28
63
|
}
|
|
29
64
|
getProcessorSubscriptionInfo(subscriptionName) {
|
|
@@ -32,13 +67,34 @@ class ProcessorsApi {
|
|
|
32
67
|
getProcessorSubscriptionInfoAlias(subscriptionArn) {
|
|
33
68
|
return this.rest.get(`/processors/subscriptions/${subscriptionArn}/info`);
|
|
34
69
|
}
|
|
35
|
-
createIngestionEndpoint(
|
|
70
|
+
createIngestionEndpoint(...args) {
|
|
71
|
+
if (typeof args[0] === "string") {
|
|
72
|
+
return this._createIngestionEndpoint(args[0], args[1], args[2]);
|
|
73
|
+
}
|
|
74
|
+
const id = args[0];
|
|
75
|
+
return this._createIngestionEndpoint(id.agentId, args[1], args[2]);
|
|
76
|
+
}
|
|
77
|
+
_createIngestionEndpoint(agentId, ingestionId, body) {
|
|
36
78
|
return this.rest.put(`/agents/${agentId}/processors/ingestions/${ingestionId}`, body);
|
|
37
79
|
}
|
|
38
|
-
deleteIngestionEndpoint(
|
|
80
|
+
deleteIngestionEndpoint(...args) {
|
|
81
|
+
if (typeof args[0] === "string") {
|
|
82
|
+
return this._deleteIngestionEndpoint(args[0], args[1]);
|
|
83
|
+
}
|
|
84
|
+
const id = args[0];
|
|
85
|
+
return this._deleteIngestionEndpoint(id.agentId, args[1]);
|
|
86
|
+
}
|
|
87
|
+
_deleteIngestionEndpoint(agentId, ingestionId) {
|
|
39
88
|
return this.rest.delete(`/agents/${agentId}/processors/ingestions/${ingestionId}`);
|
|
40
89
|
}
|
|
41
|
-
invokeIngestionEndpoint(
|
|
90
|
+
invokeIngestionEndpoint(...args) {
|
|
91
|
+
if (typeof args[0] === "string") {
|
|
92
|
+
return this._invokeIngestionEndpoint(args[0], args[1], args[2], args[3]);
|
|
93
|
+
}
|
|
94
|
+
const id = args[0];
|
|
95
|
+
return this._invokeIngestionEndpoint(id.agentId, args[1], args[2], args[3]);
|
|
96
|
+
}
|
|
97
|
+
_invokeIngestionEndpoint(agentId, ingestionId, body, params) {
|
|
42
98
|
return this.rest.post(`/agents/${agentId}/processors/ingestions/${ingestionId}/invoke`, body, params);
|
|
43
99
|
}
|
|
44
100
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RestClient } from "../http/rest-client";
|
|
2
|
+
import type { User } from "../types/viewer";
|
|
3
|
+
export declare class UsersApi {
|
|
4
|
+
private readonly rest;
|
|
5
|
+
private readonly controlApiUrl?;
|
|
6
|
+
constructor(rest: RestClient, controlApiUrl?: string | undefined);
|
|
7
|
+
getMe(): Promise<User>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UsersApi = void 0;
|
|
4
|
+
class UsersApi {
|
|
5
|
+
constructor(rest, controlApiUrl) {
|
|
6
|
+
this.rest = rest;
|
|
7
|
+
this.controlApiUrl = controlApiUrl;
|
|
8
|
+
}
|
|
9
|
+
getMe() {
|
|
10
|
+
return this.rest.get("/users/me", undefined, this.controlApiUrl);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.UsersApi = UsersApi;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One capability per distinct endpoint-or-ability across the full `DataClient`
|
|
3
|
+
* surface. A backend advertises exactly what it can do; callers gate calls on
|
|
4
|
+
* these and an unsupported call throws `UnsupportedCapabilityError`.
|
|
5
|
+
*
|
|
6
|
+
* String-literal union (not a TS enum) so values serialise cleanly and can
|
|
7
|
+
* appear in error messages / debug UIs verbatim.
|
|
8
|
+
*/
|
|
9
|
+
export type Capability = "agents.list" | "agents.multiAgentMessages" | "agents.multiAgentAggregates" | "channels.list" | "channels.get" | "channels.create" | "channels.archive" | "channels.dataSeries" | "aggregates.get" | "aggregates.put" | "aggregates.patch" | "aggregates.attachment" | "messages.list" | "messages.listHistorical" | "messages.get" | "messages.post" | "messages.put" | "messages.delete" | "messages.attachment" | "messages.timeseries" | "messages.invocationLogs" | "gateway.subscribe" | "gateway.realtime" | "gateway.oneShot" | "rpc.send" | "alarms.read" | "alarms.write" | "connections.read" | "connections.write" | "notifications.read" | "notifications.write" | "permissions.read" | "permissions.write" | "processors.read" | "processors.write" | "turn.credentials" | "users.me";
|
|
10
|
+
export declare const ALL_CAPABILITIES: readonly Capability[];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ALL_CAPABILITIES = void 0;
|
|
4
|
+
exports.ALL_CAPABILITIES = [
|
|
5
|
+
"agents.list",
|
|
6
|
+
"agents.multiAgentMessages",
|
|
7
|
+
"agents.multiAgentAggregates",
|
|
8
|
+
"channels.list",
|
|
9
|
+
"channels.get",
|
|
10
|
+
"channels.create",
|
|
11
|
+
"channels.archive",
|
|
12
|
+
"channels.dataSeries",
|
|
13
|
+
"aggregates.get",
|
|
14
|
+
"aggregates.put",
|
|
15
|
+
"aggregates.patch",
|
|
16
|
+
"aggregates.attachment",
|
|
17
|
+
"messages.list",
|
|
18
|
+
"messages.listHistorical",
|
|
19
|
+
"messages.get",
|
|
20
|
+
"messages.post",
|
|
21
|
+
"messages.put",
|
|
22
|
+
"messages.delete",
|
|
23
|
+
"messages.attachment",
|
|
24
|
+
"messages.timeseries",
|
|
25
|
+
"messages.invocationLogs",
|
|
26
|
+
"gateway.subscribe",
|
|
27
|
+
"gateway.realtime",
|
|
28
|
+
"gateway.oneShot",
|
|
29
|
+
"rpc.send",
|
|
30
|
+
"alarms.read",
|
|
31
|
+
"alarms.write",
|
|
32
|
+
"connections.read",
|
|
33
|
+
"connections.write",
|
|
34
|
+
"notifications.read",
|
|
35
|
+
"notifications.write",
|
|
36
|
+
"permissions.read",
|
|
37
|
+
"permissions.write",
|
|
38
|
+
"processors.read",
|
|
39
|
+
"processors.write",
|
|
40
|
+
"turn.credentials",
|
|
41
|
+
"users.me",
|
|
42
|
+
];
|
|
43
|
+
void true;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { AgentsApi } from "../apis/agents-api";
|
|
2
|
+
import type { AggregatesApi } from "../apis/aggregates-api";
|
|
3
|
+
import type { AlarmsApi } from "../apis/alarms-api";
|
|
4
|
+
import type { ChannelsApi } from "../apis/channels-api";
|
|
5
|
+
import type { ConnectionsApi } from "../apis/connections-api";
|
|
6
|
+
import type { MessagesApi } from "../apis/messages-api";
|
|
7
|
+
import type { NotificationsApi } from "../apis/notifications-api";
|
|
8
|
+
import type { PermissionsApi } from "../apis/permissions-api";
|
|
9
|
+
import type { ProcessorsApi } from "../apis/processors-api";
|
|
10
|
+
import type { TurnApi } from "../apis/turn-api";
|
|
11
|
+
import type { UsersApi } from "../apis/users-api";
|
|
12
|
+
import type { GatewayClient } from "../gateway/gateway-client";
|
|
13
|
+
import type { RpcDispatcher } from "../rpc/rpc-dispatcher";
|
|
14
|
+
import type { Capability } from "./capabilities";
|
|
15
|
+
/**
|
|
16
|
+
* Public structural shape of each concrete subclient — `Pick<Class, keyof Class>`
|
|
17
|
+
* yields just the public members as a plain object type (no nominal/private-member
|
|
18
|
+
* coupling), so a non-`DooverClient` implementation can satisfy it structurally.
|
|
19
|
+
*/
|
|
20
|
+
export type AgentsApiLike = Pick<AgentsApi, keyof AgentsApi>;
|
|
21
|
+
export type AggregatesApiLike = Pick<AggregatesApi, keyof AggregatesApi>;
|
|
22
|
+
export type AlarmsApiLike = Pick<AlarmsApi, keyof AlarmsApi>;
|
|
23
|
+
export type ChannelsApiLike = Pick<ChannelsApi, keyof ChannelsApi>;
|
|
24
|
+
export type ConnectionsApiLike = Pick<ConnectionsApi, keyof ConnectionsApi>;
|
|
25
|
+
export type MessagesApiLike = Pick<MessagesApi, keyof MessagesApi>;
|
|
26
|
+
export type NotificationsApiLike = Pick<NotificationsApi, keyof NotificationsApi>;
|
|
27
|
+
export type PermissionsApiLike = Pick<PermissionsApi, keyof PermissionsApi>;
|
|
28
|
+
export type ProcessorsApiLike = Pick<ProcessorsApi, keyof ProcessorsApi>;
|
|
29
|
+
export type TurnApiLike = Pick<TurnApi, keyof TurnApi>;
|
|
30
|
+
export type UsersApiLike = Pick<UsersApi, keyof UsersApi>;
|
|
31
|
+
export type GatewayClientLike = Pick<GatewayClient, keyof GatewayClient>;
|
|
32
|
+
export type RpcDispatcherLike = Pick<RpcDispatcher, keyof RpcDispatcher>;
|
|
33
|
+
/** Which agents a `DataClient` can serve. */
|
|
34
|
+
export type AgentScope =
|
|
35
|
+
/** Serves every agent (the cloud). Routing treats this as a wildcard. */
|
|
36
|
+
{
|
|
37
|
+
mode: "all";
|
|
38
|
+
}
|
|
39
|
+
/** Serves exactly these agent ids (a local device agent → typically one id). */
|
|
40
|
+
| {
|
|
41
|
+
mode: "list";
|
|
42
|
+
agentIds: string[];
|
|
43
|
+
};
|
|
44
|
+
export type DataClientConnectionState = "connected" | "connecting" | "disconnected" | "degraded" | "error";
|
|
45
|
+
export interface DataClientStatus {
|
|
46
|
+
/** This client's id ("cloud", "local:…", "multiplex", …). */
|
|
47
|
+
clientId: string;
|
|
48
|
+
/** True when the realtime link is up. Mirrors `isConnected()`. */
|
|
49
|
+
connected: boolean;
|
|
50
|
+
state: DataClientConnectionState;
|
|
51
|
+
/** Gateway session, when applicable. */
|
|
52
|
+
session?: {
|
|
53
|
+
id: string;
|
|
54
|
+
} | null;
|
|
55
|
+
/** Last lifecycle event seen ("init" | "open" | "ready" | "close" | "error" | …). */
|
|
56
|
+
lastEvent?: string;
|
|
57
|
+
/** Round-trip latency estimate in ms, if measured. */
|
|
58
|
+
latencyMs?: number | null;
|
|
59
|
+
/** Last error message, if the last event was an error. */
|
|
60
|
+
lastError?: string;
|
|
61
|
+
/** Best-effort agent scope at snapshot time ("unknown" before first resolution). */
|
|
62
|
+
agentScope: AgentScope | "unknown";
|
|
63
|
+
/** When this snapshot was taken (epoch ms). */
|
|
64
|
+
at: number;
|
|
65
|
+
/** Per-member statuses — present only for `MultiplexClient`. */
|
|
66
|
+
members?: Array<{
|
|
67
|
+
sourceId: string;
|
|
68
|
+
label?: string;
|
|
69
|
+
status: DataClientStatus;
|
|
70
|
+
}>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The capability-aware data-access contract. `DooverClient`, `LocalAgentClient`
|
|
74
|
+
* and `MultiplexClient` all implement it. Deliberately excludes `DooverClient`'s
|
|
75
|
+
* `auth`/`rest`/`stats`/`viewer` (construction/internals/legacy). May be widened
|
|
76
|
+
* later; the invariant is that `DooverClient` always satisfies it.
|
|
77
|
+
*/
|
|
78
|
+
export interface DataClient {
|
|
79
|
+
readonly agents: AgentsApiLike;
|
|
80
|
+
readonly channels: ChannelsApiLike;
|
|
81
|
+
readonly messages: MessagesApiLike;
|
|
82
|
+
readonly aggregates: AggregatesApiLike;
|
|
83
|
+
readonly alarms: AlarmsApiLike;
|
|
84
|
+
readonly connections: ConnectionsApiLike;
|
|
85
|
+
readonly notifications: NotificationsApiLike;
|
|
86
|
+
readonly permissions: PermissionsApiLike;
|
|
87
|
+
readonly processors: ProcessorsApiLike;
|
|
88
|
+
readonly turn: TurnApiLike;
|
|
89
|
+
readonly users: UsersApiLike;
|
|
90
|
+
readonly gateway: GatewayClientLike;
|
|
91
|
+
readonly rpc: RpcDispatcherLike;
|
|
92
|
+
getCapabilities(): ReadonlySet<Capability>;
|
|
93
|
+
/** Convenience: `getCapabilities().has(cap)`. */
|
|
94
|
+
supports(cap: Capability): boolean;
|
|
95
|
+
/** True when the client's realtime link is up (multiplex: all members with `gateway.subscribe`). */
|
|
96
|
+
isConnected(): boolean;
|
|
97
|
+
getStatus(): DataClientStatus;
|
|
98
|
+
/** Subscribe to status changes; returns an idempotent unsubscribe fn. */
|
|
99
|
+
onStatusChange(listener: (status: DataClientStatus) => void): () => void;
|
|
100
|
+
/** Which agents this client can serve. Cloud → `{ mode: "all" }` with no round-trip. */
|
|
101
|
+
getAgentScope(): Promise<AgentScope>;
|
|
102
|
+
/** Synchronous best-effort snapshot; `"unknown"` until the first resolution. */
|
|
103
|
+
getKnownAgentScope(): AgentScope | "unknown";
|
|
104
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { AgentsApi } from "../apis/agents-api";
|
|
2
|
-
import { AggregatesApi } from "../apis/aggregates-api";
|
|
3
|
-
import { AlarmsApi } from "../apis/alarms-api";
|
|
4
|
-
import { ChannelsApi } from "../apis/channels-api";
|
|
5
|
-
import { ConnectionsApi } from "../apis/connections-api";
|
|
6
|
-
import { MessagesApi } from "../apis/messages-api";
|
|
7
|
-
import { NotificationsApi } from "../apis/notifications-api";
|
|
8
|
-
import { PermissionsApi } from "../apis/permissions-api";
|
|
9
|
-
import { ProcessorsApi } from "../apis/processors-api";
|
|
10
|
-
import { TurnApi } from "../apis/turn-api";
|
|
11
1
|
import type { DooverAuth } from "../auth/doover-auth";
|
|
12
|
-
import { GatewayClient } from "../gateway/gateway-client";
|
|
13
2
|
import { RestClient, type DooverClientConfig } from "../http/rest-client";
|
|
14
3
|
import { DooverDataProvider } from "../viewer/doover-data-provider";
|
|
4
|
+
import { type Capability } from "./capabilities";
|
|
5
|
+
import type { AgentsApiLike, AggregatesApiLike, AlarmsApiLike, ChannelsApiLike, ConnectionsApiLike, DataClient, DataClientStatus, AgentScope, GatewayClientLike, MessagesApiLike, NotificationsApiLike, PermissionsApiLike, ProcessorsApiLike, RpcDispatcherLike, TurnApiLike, UsersApiLike } from "./data-client";
|
|
15
6
|
import { DooverStatsCollector, type DooverStatsSnapshot } from "./stats";
|
|
16
|
-
export declare class DooverClient {
|
|
7
|
+
export declare class DooverClient implements DataClient {
|
|
17
8
|
readonly auth: DooverAuth;
|
|
18
9
|
readonly rest: RestClient;
|
|
19
10
|
readonly viewer: DooverDataProvider;
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
|
|
11
|
+
readonly users: UsersApiLike;
|
|
12
|
+
readonly channels: ChannelsApiLike;
|
|
13
|
+
readonly messages: MessagesApiLike;
|
|
14
|
+
readonly aggregates: AggregatesApiLike;
|
|
15
|
+
readonly alarms: AlarmsApiLike;
|
|
16
|
+
readonly connections: ConnectionsApiLike;
|
|
17
|
+
readonly notifications: NotificationsApiLike;
|
|
18
|
+
readonly permissions: PermissionsApiLike;
|
|
19
|
+
readonly processors: ProcessorsApiLike;
|
|
20
|
+
readonly turn: TurnApiLike;
|
|
21
|
+
readonly agents: AgentsApiLike;
|
|
22
|
+
readonly gateway: GatewayClientLike;
|
|
23
|
+
readonly rpc: RpcDispatcherLike;
|
|
32
24
|
readonly stats: DooverStatsCollector;
|
|
25
|
+
private readonly identity;
|
|
26
|
+
private readonly statusTracker;
|
|
27
|
+
/** Underlying concrete gateway (the public `gateway` is the same object,
|
|
28
|
+
* typed as the structural `GatewayClientLike`). */
|
|
29
|
+
private readonly gatewayImpl;
|
|
30
|
+
/** Underlying concrete RPC dispatcher (the public `rpc` is the same object,
|
|
31
|
+
* typed as the structural `RpcDispatcherLike`). */
|
|
32
|
+
private readonly rpcImpl;
|
|
33
33
|
constructor(config: DooverClientConfig);
|
|
34
|
-
/** Start capturing request/message stats. Off by default. */
|
|
35
34
|
enableStats(): void;
|
|
36
|
-
/** Stop capturing stats. Existing counters are retained; call `stats.reset()` to clear. */
|
|
37
35
|
disableStats(): void;
|
|
38
|
-
/**
|
|
39
|
-
* Snapshot the current stats. Returns zeroed counters if stats were
|
|
40
|
-
* never enabled. Combine with {@link GatewayClient.getSubscriptionCount}
|
|
41
|
-
* and {@link GatewayClient.getSession} for a full debug view.
|
|
42
|
-
*/
|
|
43
36
|
getStats(): DooverStatsSnapshot;
|
|
37
|
+
getCapabilities(): ReadonlySet<Capability>;
|
|
38
|
+
supports(cap: Capability): boolean;
|
|
39
|
+
getAgentScope(): Promise<AgentScope>;
|
|
40
|
+
getKnownAgentScope(): AgentScope | "unknown";
|
|
41
|
+
isConnected(): boolean;
|
|
42
|
+
getStatus(): DataClientStatus;
|
|
43
|
+
onStatusChange(listener: (status: DataClientStatus) => void): () => void;
|
|
44
44
|
}
|
|
@@ -11,10 +11,17 @@ const notifications_api_1 = require("../apis/notifications-api");
|
|
|
11
11
|
const permissions_api_1 = require("../apis/permissions-api");
|
|
12
12
|
const processors_api_1 = require("../apis/processors-api");
|
|
13
13
|
const turn_api_1 = require("../apis/turn-api");
|
|
14
|
+
const users_api_1 = require("../apis/users-api");
|
|
14
15
|
const build_auth_1 = require("../auth/build-auth");
|
|
16
|
+
const gateway_client_1 = require("../gateway/gateway-client");
|
|
15
17
|
const rest_client_1 = require("../http/rest-client");
|
|
18
|
+
const rpc_dispatcher_1 = require("../rpc/rpc-dispatcher");
|
|
16
19
|
const doover_data_provider_1 = require("../viewer/doover-data-provider");
|
|
20
|
+
const capabilities_1 = require("./capabilities");
|
|
21
|
+
const provenance_1 = require("./provenance");
|
|
22
|
+
const status_tracker_1 = require("./status-tracker");
|
|
17
23
|
const stats_1 = require("./stats");
|
|
24
|
+
const ALL_CAPS_SET = new Set(capabilities_1.ALL_CAPABILITIES);
|
|
18
25
|
class DooverClient {
|
|
19
26
|
constructor(config) {
|
|
20
27
|
this.auth = (0, build_auth_1.buildAuth)({
|
|
@@ -29,47 +36,61 @@ class DooverClient {
|
|
|
29
36
|
authServerClientId: config.authServerClientId,
|
|
30
37
|
fetchImpl: config.fetchImpl,
|
|
31
38
|
});
|
|
39
|
+
this.identity = {
|
|
40
|
+
id: config.sourceId ?? "cloud",
|
|
41
|
+
kind: "cloud",
|
|
42
|
+
...(config.sourceLabel ? { label: config.sourceLabel } : {}),
|
|
43
|
+
meta: {
|
|
44
|
+
dataRestUrl: config.dataRestUrl,
|
|
45
|
+
controlApiUrl: config.controlApiUrl,
|
|
46
|
+
...(config.organisationId ? { organisationId: config.organisationId } : {}),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
const stamper = new provenance_1.ProvenanceStamper(this.identity);
|
|
32
50
|
this.rest = new rest_client_1.RestClient(config, this.auth);
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
this.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
//
|
|
51
|
+
this.gatewayImpl = new gateway_client_1.GatewayClient(config, this.auth);
|
|
52
|
+
this.gatewayImpl.setProvenanceHook((value, ctx) => stamper.stampGatewayEvent(value, ctx));
|
|
53
|
+
this.gateway = this.gatewayImpl;
|
|
54
|
+
this.viewer = new doover_data_provider_1.DooverDataProvider({
|
|
55
|
+
rest: this.rest,
|
|
56
|
+
gateway: this.gatewayImpl,
|
|
57
|
+
controlApiUrl: config.controlApiUrl,
|
|
58
|
+
});
|
|
59
|
+
this.users = (0, provenance_1.wrapSubclient)(new users_api_1.UsersApi(this.rest, config.controlApiUrl), "users", stamper);
|
|
60
|
+
this.channels = (0, provenance_1.wrapSubclient)(new channels_api_1.ChannelsApi(this.rest), "channels", stamper);
|
|
61
|
+
this.messages = (0, provenance_1.wrapSubclient)(new messages_api_1.MessagesApi(this.rest), "messages", stamper);
|
|
62
|
+
this.aggregates = (0, provenance_1.wrapSubclient)(new aggregates_api_1.AggregatesApi(this.rest), "aggregates", stamper);
|
|
63
|
+
this.alarms = (0, provenance_1.wrapSubclient)(new alarms_api_1.AlarmsApi(this.rest), "alarms", stamper);
|
|
64
|
+
this.connections = (0, provenance_1.wrapSubclient)(new connections_api_1.ConnectionsApi(this.rest), "connections", stamper);
|
|
65
|
+
this.notifications = (0, provenance_1.wrapSubclient)(new notifications_api_1.NotificationsApi(this.rest), "notifications", stamper);
|
|
66
|
+
this.permissions = (0, provenance_1.wrapSubclient)(new permissions_api_1.PermissionsApi(this.rest), "permissions", stamper);
|
|
67
|
+
this.processors = (0, provenance_1.wrapSubclient)(new processors_api_1.ProcessorsApi(this.rest), "processors", stamper);
|
|
68
|
+
this.turn = (0, provenance_1.wrapSubclient)(new turn_api_1.TurnApi(this.rest), "turn", stamper);
|
|
69
|
+
this.agents = (0, provenance_1.wrapSubclient)(new agents_api_1.AgentsApi(this.rest, config.controlApiUrl), "agents", stamper);
|
|
70
|
+
// RpcDispatcher needs the concrete MessagesApi (it calls postMessage internally);
|
|
71
|
+
// give it an *unwrapped* one so stamping happens once at the public boundary.
|
|
72
|
+
this.rpcImpl = new rpc_dispatcher_1.RpcDispatcher(this.gatewayImpl, new messages_api_1.MessagesApi(this.rest));
|
|
73
|
+
this.rpc = this.rpcImpl;
|
|
53
74
|
this.stats = new stats_1.DooverStatsCollector();
|
|
54
75
|
this.rest.setStats(this.stats);
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
/** Start capturing request/message stats. Off by default. */
|
|
59
|
-
enableStats() {
|
|
60
|
-
this.stats.setEnabled(true);
|
|
61
|
-
}
|
|
62
|
-
/** Stop capturing stats. Existing counters are retained; call `stats.reset()` to clear. */
|
|
63
|
-
disableStats() {
|
|
64
|
-
this.stats.setEnabled(false);
|
|
76
|
+
this.gatewayImpl.setStats(this.stats);
|
|
77
|
+
this.rpcImpl.setStats(this.stats);
|
|
78
|
+
this.statusTracker = new status_tracker_1.ClientStatusTracker(this.identity.id, this.gateway, () => this.getKnownAgentScope());
|
|
65
79
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
enableStats() { this.stats.setEnabled(true); }
|
|
81
|
+
disableStats() { this.stats.setEnabled(false); }
|
|
82
|
+
getStats() { return this.stats.snapshot(); }
|
|
83
|
+
// --- DataClient: capabilities ---
|
|
84
|
+
getCapabilities() { return ALL_CAPS_SET; }
|
|
85
|
+
supports(cap) { return ALL_CAPS_SET.has(cap); }
|
|
86
|
+
// --- DataClient: agent scope (cloud serves every agent) ---
|
|
87
|
+
getAgentScope() { return Promise.resolve({ mode: "all" }); }
|
|
88
|
+
getKnownAgentScope() { return { mode: "all" }; }
|
|
89
|
+
// --- DataClient: status ---
|
|
90
|
+
isConnected() { return this.gateway.isConnected(); }
|
|
91
|
+
getStatus() { return this.statusTracker.getStatus(); }
|
|
92
|
+
onStatusChange(listener) {
|
|
93
|
+
return this.statusTracker.onChange(listener);
|
|
73
94
|
}
|
|
74
95
|
}
|
|
75
96
|
exports.DooverClient = DooverClient;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Capability } from "./capabilities";
|
|
2
|
+
import { DooverApiError } from "../http/errors";
|
|
3
|
+
/**
|
|
4
|
+
* Thrown when a `DataClient` method is called whose backing capability the
|
|
5
|
+
* client does not advertise. Extends `DooverApiError` so existing
|
|
6
|
+
* `instanceof DooverApiError` error handling catches it; the HTTP-ish fields
|
|
7
|
+
* are placeholders since no request was made.
|
|
8
|
+
*/
|
|
9
|
+
export declare class UnsupportedCapabilityError extends DooverApiError {
|
|
10
|
+
readonly capability: Capability;
|
|
11
|
+
readonly clientId?: string;
|
|
12
|
+
constructor(capability: Capability, clientId?: string);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Thrown by `MultiplexClient` when a write cannot be routed to a single
|
|
16
|
+
* member — more than one enabled member owns the targeted agent and has the
|
|
17
|
+
* write capability, and the call was not `sources`-scoped to one of them.
|
|
18
|
+
*/
|
|
19
|
+
export declare class AmbiguousWriteError extends DooverApiError {
|
|
20
|
+
readonly capability: Capability;
|
|
21
|
+
readonly candidateSourceIds: string[];
|
|
22
|
+
constructor(capability: Capability, candidateSourceIds: string[]);
|
|
23
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AmbiguousWriteError = exports.UnsupportedCapabilityError = void 0;
|
|
4
|
+
const errors_1 = require("../http/errors");
|
|
5
|
+
/**
|
|
6
|
+
* Thrown when a `DataClient` method is called whose backing capability the
|
|
7
|
+
* client does not advertise. Extends `DooverApiError` so existing
|
|
8
|
+
* `instanceof DooverApiError` error handling catches it; the HTTP-ish fields
|
|
9
|
+
* are placeholders since no request was made.
|
|
10
|
+
*/
|
|
11
|
+
class UnsupportedCapabilityError extends errors_1.DooverApiError {
|
|
12
|
+
constructor(capability, clientId) {
|
|
13
|
+
super({
|
|
14
|
+
status: 0,
|
|
15
|
+
body: { capability, clientId },
|
|
16
|
+
url: "",
|
|
17
|
+
method: "",
|
|
18
|
+
message: `Capability "${capability}" is not supported` +
|
|
19
|
+
(clientId ? ` by client "${clientId}"` : "") + ".",
|
|
20
|
+
});
|
|
21
|
+
this.name = "UnsupportedCapabilityError";
|
|
22
|
+
this.capability = capability;
|
|
23
|
+
this.clientId = clientId;
|
|
24
|
+
Object.setPrototypeOf(this, UnsupportedCapabilityError.prototype);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.UnsupportedCapabilityError = UnsupportedCapabilityError;
|
|
28
|
+
/**
|
|
29
|
+
* Thrown by `MultiplexClient` when a write cannot be routed to a single
|
|
30
|
+
* member — more than one enabled member owns the targeted agent and has the
|
|
31
|
+
* write capability, and the call was not `sources`-scoped to one of them.
|
|
32
|
+
*/
|
|
33
|
+
class AmbiguousWriteError extends errors_1.DooverApiError {
|
|
34
|
+
constructor(capability, candidateSourceIds) {
|
|
35
|
+
super({
|
|
36
|
+
status: 0,
|
|
37
|
+
body: { capability, candidateSourceIds },
|
|
38
|
+
url: "",
|
|
39
|
+
method: "",
|
|
40
|
+
message: `Ambiguous write for "${capability}": ${candidateSourceIds.length} ` +
|
|
41
|
+
`members are eligible (${candidateSourceIds.join(", ")}). ` +
|
|
42
|
+
`Scope the call with { sources: [<one-id>] }.`,
|
|
43
|
+
});
|
|
44
|
+
this.name = "AmbiguousWriteError";
|
|
45
|
+
this.capability = capability;
|
|
46
|
+
this.candidateSourceIds = candidateSourceIds;
|
|
47
|
+
Object.setPrototypeOf(this, AmbiguousWriteError.prototype);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.AmbiguousWriteError = AmbiguousWriteError;
|