@coasys/ad4m 0.12.0-rc1-dev → 0.12.0-rc1-dev.2
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/jest.config.js +4 -4
- package/lib/index.cjs +5999 -6044
- package/lib/index.js +5977 -6038
- package/lib/src/Ad4mClient.d.ts +16 -9
- package/lib/src/Ad4mClient.js +25 -46
- package/lib/src/Ad4mClient.test.d.ts +1 -0
- package/lib/src/Ad4mClient.test.js +1204 -0
- package/lib/src/Literal.d.ts +2 -1
- package/lib/src/Literal.js +35 -38
- package/lib/src/Literal.test.d.ts +1 -0
- package/lib/src/Literal.test.js +41 -0
- package/lib/src/SmartLiteral.d.ts +2 -1
- package/lib/src/SmartLiteral.js +15 -30
- package/lib/src/agent/AgentClient.d.ts +4 -1
- package/lib/src/agent/AgentClient.js +99 -79
- package/lib/src/ai/AIClient.d.ts +2 -1
- package/lib/src/ai/AIClient.js +220 -224
- package/lib/src/expression/ExpressionClient.d.ts +1 -1
- package/lib/src/expression/ExpressionClient.js +86 -73
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/language/LanguageClient.d.ts +1 -1
- package/lib/src/language/LanguageClient.js +52 -52
- package/lib/src/model/Ad4mModel.d.ts +157 -937
- package/lib/src/model/Ad4mModel.js +212 -2797
- package/lib/src/model/Ad4mModel.test.js +1002 -561
- package/lib/src/model/decorators.d.ts +94 -426
- package/lib/src/model/decorators.js +333 -741
- package/lib/src/model/mutation.d.ts +81 -0
- package/lib/src/model/mutation.js +317 -0
- package/lib/src/model/parentUtils.d.ts +32 -0
- package/lib/src/model/parentUtils.js +64 -0
- package/lib/src/model/prolog/generatePrologFacts.d.ts +36 -0
- package/lib/src/model/prolog/generatePrologFacts.js +139 -0
- package/lib/src/model/prolog/index.d.ts +1 -0
- package/lib/src/model/prolog/index.js +1 -0
- package/lib/src/model/query/ModelQueryBuilder.d.ts +82 -0
- package/lib/src/model/query/ModelQueryBuilder.js +115 -0
- package/lib/src/model/query/QueryBuilder.d.ts +101 -0
- package/lib/src/model/query/QueryBuilder.js +193 -0
- package/lib/src/model/query/SurrealQueryBuilder.d.ts +48 -0
- package/lib/src/model/query/SurrealQueryBuilder.js +371 -0
- package/lib/src/model/query/fetchInstance.d.ts +24 -0
- package/lib/src/model/query/fetchInstance.js +144 -0
- package/lib/src/model/query/hydration.d.ts +54 -0
- package/lib/src/model/query/hydration.js +214 -0
- package/lib/src/model/query/operations.d.ts +59 -0
- package/lib/src/model/query/operations.js +384 -0
- package/lib/src/model/query/snapshot.d.ts +59 -0
- package/lib/src/model/query/snapshot.js +106 -0
- package/lib/src/model/query/surrealCompiler.d.ts +42 -0
- package/lib/src/model/query/surrealCompiler.js +304 -0
- package/lib/src/model/schema/fromJSONSchema.d.ts +67 -0
- package/lib/src/model/schema/fromJSONSchema.js +264 -0
- package/lib/src/model/schema/metadata.d.ts +15 -0
- package/lib/src/model/schema/metadata.js +112 -0
- package/lib/src/model/subscription.d.ts +47 -0
- package/lib/src/model/subscription.js +231 -0
- package/lib/src/model/transaction.d.ts +27 -0
- package/lib/src/model/transaction.js +32 -0
- package/lib/src/model/types.d.ts +195 -0
- package/lib/src/model/types.js +8 -0
- package/lib/src/model/util.js +7 -7
- package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +5 -1
- package/lib/src/neighbourhood/NeighbourhoodClient.js +263 -181
- package/lib/src/neighbourhood/NeighbourhoodProxy.d.ts +2 -1
- package/lib/src/neighbourhood/NeighbourhoodProxy.js +13 -28
- package/lib/src/neighbourhood/NeighbourhoodProxy.test.js +1 -5
- package/lib/src/perspectives/PerspectiveClient.d.ts +9 -9
- package/lib/src/perspectives/PerspectiveClient.js +316 -240
- package/lib/src/perspectives/PerspectiveProxy.d.ts +54 -92
- package/lib/src/perspectives/PerspectiveProxy.js +803 -444
- package/lib/src/runtime/RuntimeClient.d.ts +5 -1
- package/lib/src/runtime/RuntimeClient.js +412 -238
- package/lib/src/shacl/SHACLFlow.test.js +164 -105
- package/lib/src/shacl/SHACLShape.d.ts +17 -3
- package/lib/src/shacl/SHACLShape.js +127 -90
- package/lib/src/shacl/SHACLShape.test.js +244 -176
- package/lib/src/utils.d.ts +8 -0
- package/lib/src/utils.js +21 -7
- package/package.json +8 -13
- package/src/Ad4mClient.test.ts +1564 -1315
- package/src/Ad4mClient.ts +55 -54
- package/src/Literal.test.ts +45 -26
- package/src/Literal.ts +82 -66
- package/src/SmartLiteral.ts +74 -58
- package/src/agent/AgentClient.ts +144 -99
- package/src/ai/AIClient.ts +409 -359
- package/src/expression/ExpressionClient.ts +142 -96
- package/src/index.ts +1 -1
- package/src/language/LanguageClient.ts +137 -113
- package/src/model/Ad4mModel.test.ts +1128 -647
- package/src/model/Ad4mModel.ts +485 -3247
- package/src/model/IMPROVEMENTS.md +482 -0
- package/src/model/PREDICATE_COLLISION_FIX.md +651 -0
- package/src/model/README.md +317 -0
- package/src/model/SHACL_MUTATION_DECOUPLING.md +356 -0
- package/src/model/SUBSCRIPTION_STRATEGY.md +317 -0
- package/src/model/TC39_STAGE_3_DECORATORS.md +609 -0
- package/src/model/decorators.ts +689 -1046
- package/src/model/mutation.ts +461 -0
- package/src/model/parentUtils.ts +91 -0
- package/src/model/prolog/generatePrologFacts.ts +176 -0
- package/src/model/prolog/index.ts +1 -0
- package/src/model/query/ModelQueryBuilder.ts +173 -0
- package/src/model/query/fetchInstance.ts +181 -0
- package/src/model/query/hydration.ts +273 -0
- package/src/model/query/operations.ts +510 -0
- package/src/model/query/snapshot.ts +126 -0
- package/src/model/query/surrealCompiler.ts +376 -0
- package/src/model/schema/fromJSONSchema.ts +411 -0
- package/src/model/schema/metadata.ts +148 -0
- package/src/model/subscription.ts +307 -0
- package/src/model/transaction.ts +60 -0
- package/src/model/types.ts +207 -0
- package/src/model/util.ts +47 -48
- package/src/neighbourhood/NeighbourhoodClient.ts +393 -251
- package/src/neighbourhood/NeighbourhoodProxy.test.ts +3 -7
- package/src/neighbourhood/NeighbourhoodProxy.ts +58 -40
- package/src/perspectives/PerspectiveClient.ts +779 -540
- package/src/perspectives/PerspectiveProxy.ts +2860 -2053
- package/src/runtime/RuntimeClient.ts +775 -476
- package/src/shacl/SHACLFlow.test.ts +196 -129
- package/src/shacl/SHACLShape.test.ts +284 -190
- package/src/shacl/SHACLShape.ts +225 -172
- package/src/utils.ts +31 -17
- package/tsconfig.json +9 -10
- package/src/model/Subject.ts +0 -159
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
-
};
|
|
7
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
-
};
|
|
12
|
-
var _RuntimeClient_apolloClient, _RuntimeClient_messageReceivedCallbacks, _RuntimeClient_exceptionOccurredCallbacks, _RuntimeClient_notificationTriggeredCallbacks, _RuntimeClient_notificationRequestedCallbacks;
|
|
13
1
|
import { gql } from "@apollo/client/core";
|
|
14
2
|
import unwrapApolloResult from "../unwrapApolloResult";
|
|
3
|
+
import { isSocketCloseError } from "../utils";
|
|
15
4
|
const PERSPECTIVE_EXPRESSION_FIELDS = `
|
|
16
5
|
author
|
|
17
6
|
timestamp
|
|
@@ -47,15 +36,10 @@ triggerMatch
|
|
|
47
36
|
`;
|
|
48
37
|
export class RuntimeClient {
|
|
49
38
|
constructor(client, subscribe = true) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
_RuntimeClient_notificationRequestedCallbacks.set(this, void 0);
|
|
55
|
-
__classPrivateFieldSet(this, _RuntimeClient_apolloClient, client, "f");
|
|
56
|
-
__classPrivateFieldSet(this, _RuntimeClient_messageReceivedCallbacks, [], "f");
|
|
57
|
-
__classPrivateFieldSet(this, _RuntimeClient_exceptionOccurredCallbacks, [], "f");
|
|
58
|
-
__classPrivateFieldSet(this, _RuntimeClient_notificationTriggeredCallbacks, [], "f");
|
|
39
|
+
this._apolloClient = client;
|
|
40
|
+
this._messageReceivedCallbacks = [];
|
|
41
|
+
this._exceptionOccurredCallbacks = [];
|
|
42
|
+
this._notificationTriggeredCallbacks = [];
|
|
59
43
|
if (subscribe) {
|
|
60
44
|
this.subscribeMessageReceived();
|
|
61
45
|
this.subscribeExceptionOccurred();
|
|
@@ -63,190 +47,247 @@ export class RuntimeClient {
|
|
|
63
47
|
}
|
|
64
48
|
}
|
|
65
49
|
async info() {
|
|
66
|
-
const { runtimeInfo } = unwrapApolloResult(await
|
|
67
|
-
query: gql `
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
50
|
+
const { runtimeInfo } = unwrapApolloResult(await this._apolloClient.query({
|
|
51
|
+
query: gql `
|
|
52
|
+
query runtimeInfo {
|
|
53
|
+
runtimeInfo {
|
|
54
|
+
ad4mExecutorVersion
|
|
55
|
+
isInitialized
|
|
56
|
+
isUnlocked
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`,
|
|
74
60
|
}));
|
|
75
61
|
return runtimeInfo;
|
|
76
62
|
}
|
|
77
63
|
async quit() {
|
|
78
|
-
const result = unwrapApolloResult(await
|
|
79
|
-
mutation: gql `
|
|
64
|
+
const result = unwrapApolloResult(await this._apolloClient.mutate({
|
|
65
|
+
mutation: gql `
|
|
66
|
+
mutation runtimeQuit {
|
|
67
|
+
runtimeQuit
|
|
68
|
+
}
|
|
69
|
+
`,
|
|
80
70
|
}));
|
|
81
71
|
return result.runtimeQuit;
|
|
82
72
|
}
|
|
83
73
|
async openLink(url) {
|
|
84
|
-
const { runtimeOpenLink } = unwrapApolloResult(await
|
|
85
|
-
mutation: gql `
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
74
|
+
const { runtimeOpenLink } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
75
|
+
mutation: gql `
|
|
76
|
+
mutation runtimeOpenLink($url: String!) {
|
|
77
|
+
runtimeOpenLink(url: $url)
|
|
78
|
+
}
|
|
79
|
+
`,
|
|
80
|
+
variables: { url },
|
|
89
81
|
}));
|
|
90
82
|
return runtimeOpenLink;
|
|
91
83
|
}
|
|
92
84
|
async addTrustedAgents(agents) {
|
|
93
|
-
const { addTrustedAgents } = unwrapApolloResult(await
|
|
94
|
-
mutation: gql `
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
85
|
+
const { addTrustedAgents } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
86
|
+
mutation: gql `
|
|
87
|
+
mutation addTrustedAgents($agents: [String!]!) {
|
|
88
|
+
addTrustedAgents(agents: $agents)
|
|
89
|
+
}
|
|
90
|
+
`,
|
|
91
|
+
variables: { agents },
|
|
98
92
|
}));
|
|
99
93
|
return addTrustedAgents;
|
|
100
94
|
}
|
|
101
95
|
async deleteTrustedAgents(agents) {
|
|
102
|
-
const { deleteTrustedAgents } = unwrapApolloResult(await
|
|
103
|
-
mutation: gql `
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
96
|
+
const { deleteTrustedAgents } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
97
|
+
mutation: gql `
|
|
98
|
+
mutation deleteTrustedAgents($agents: [String!]!) {
|
|
99
|
+
deleteTrustedAgents(agents: $agents)
|
|
100
|
+
}
|
|
101
|
+
`,
|
|
102
|
+
variables: { agents },
|
|
107
103
|
}));
|
|
108
104
|
return deleteTrustedAgents;
|
|
109
105
|
}
|
|
110
106
|
async getTrustedAgents() {
|
|
111
|
-
const { getTrustedAgents } = unwrapApolloResult(await
|
|
112
|
-
query: gql `
|
|
113
|
-
|
|
114
|
-
|
|
107
|
+
const { getTrustedAgents } = unwrapApolloResult(await this._apolloClient.query({
|
|
108
|
+
query: gql `
|
|
109
|
+
query getTrustedAgents {
|
|
110
|
+
getTrustedAgents
|
|
111
|
+
}
|
|
112
|
+
`,
|
|
115
113
|
}));
|
|
116
114
|
return getTrustedAgents;
|
|
117
115
|
}
|
|
118
116
|
async addKnownLinkLanguageTemplates(addresses) {
|
|
119
|
-
const { runtimeAddKnownLinkLanguageTemplates } = unwrapApolloResult(await
|
|
120
|
-
mutation: gql `
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
const { runtimeAddKnownLinkLanguageTemplates } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
118
|
+
mutation: gql `
|
|
119
|
+
mutation runtimeAddKnownLinkLanguageTemplates(
|
|
120
|
+
$addresses: [String!]!
|
|
121
|
+
) {
|
|
122
|
+
runtimeAddKnownLinkLanguageTemplates(addresses: $addresses)
|
|
123
|
+
}
|
|
124
|
+
`,
|
|
125
|
+
variables: { addresses },
|
|
124
126
|
}));
|
|
125
127
|
return runtimeAddKnownLinkLanguageTemplates;
|
|
126
128
|
}
|
|
127
129
|
async removeKnownLinkLanguageTemplates(addresses) {
|
|
128
|
-
const { runtimeRemoveKnownLinkLanguageTemplates } = unwrapApolloResult(await
|
|
129
|
-
mutation: gql `
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
const { runtimeRemoveKnownLinkLanguageTemplates } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
131
|
+
mutation: gql `
|
|
132
|
+
mutation runtimeRemoveKnownLinkLanguageTemplates(
|
|
133
|
+
$addresses: [String!]!
|
|
134
|
+
) {
|
|
135
|
+
runtimeRemoveKnownLinkLanguageTemplates(addresses: $addresses)
|
|
136
|
+
}
|
|
137
|
+
`,
|
|
138
|
+
variables: { addresses },
|
|
133
139
|
}));
|
|
134
140
|
return runtimeRemoveKnownLinkLanguageTemplates;
|
|
135
141
|
}
|
|
136
142
|
async knownLinkLanguageTemplates() {
|
|
137
|
-
const { runtimeKnownLinkLanguageTemplates } = unwrapApolloResult(await
|
|
138
|
-
query: gql `
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
const { runtimeKnownLinkLanguageTemplates } = unwrapApolloResult(await this._apolloClient.query({
|
|
144
|
+
query: gql `
|
|
145
|
+
query runtimeKnownLinkLanguageTemplates {
|
|
146
|
+
runtimeKnownLinkLanguageTemplates
|
|
147
|
+
}
|
|
148
|
+
`,
|
|
141
149
|
}));
|
|
142
150
|
return runtimeKnownLinkLanguageTemplates;
|
|
143
151
|
}
|
|
144
152
|
async addFriends(dids) {
|
|
145
|
-
const { runtimeAddFriends } = unwrapApolloResult(await
|
|
146
|
-
mutation: gql `
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
153
|
+
const { runtimeAddFriends } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
154
|
+
mutation: gql `
|
|
155
|
+
mutation runtimeAddFriends($dids: [String!]!) {
|
|
156
|
+
runtimeAddFriends(dids: $dids)
|
|
157
|
+
}
|
|
158
|
+
`,
|
|
159
|
+
variables: { dids },
|
|
150
160
|
}));
|
|
151
161
|
return runtimeAddFriends;
|
|
152
162
|
}
|
|
153
163
|
async removeFriends(dids) {
|
|
154
|
-
const { runtimeRemoveFriends } = unwrapApolloResult(await
|
|
155
|
-
mutation: gql `
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
164
|
+
const { runtimeRemoveFriends } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
165
|
+
mutation: gql `
|
|
166
|
+
mutation runtimeRemoveFriends($dids: [String!]!) {
|
|
167
|
+
runtimeRemoveFriends(dids: $dids)
|
|
168
|
+
}
|
|
169
|
+
`,
|
|
170
|
+
variables: { dids },
|
|
159
171
|
}));
|
|
160
172
|
return runtimeRemoveFriends;
|
|
161
173
|
}
|
|
162
174
|
async friends() {
|
|
163
|
-
const { runtimeFriends } = unwrapApolloResult(await
|
|
164
|
-
query: gql `
|
|
165
|
-
|
|
166
|
-
|
|
175
|
+
const { runtimeFriends } = unwrapApolloResult(await this._apolloClient.query({
|
|
176
|
+
query: gql `
|
|
177
|
+
query runtimeFriends {
|
|
178
|
+
runtimeFriends
|
|
179
|
+
}
|
|
180
|
+
`,
|
|
167
181
|
}));
|
|
168
182
|
return runtimeFriends;
|
|
169
183
|
}
|
|
170
184
|
async hcAgentInfos() {
|
|
171
|
-
const { runtimeHcAgentInfos } = unwrapApolloResult(await
|
|
172
|
-
query: gql `
|
|
173
|
-
|
|
174
|
-
|
|
185
|
+
const { runtimeHcAgentInfos } = unwrapApolloResult(await this._apolloClient.query({
|
|
186
|
+
query: gql `
|
|
187
|
+
query runtimeHcAgentInfos {
|
|
188
|
+
runtimeHcAgentInfos
|
|
189
|
+
}
|
|
190
|
+
`,
|
|
175
191
|
}));
|
|
176
192
|
return runtimeHcAgentInfos;
|
|
177
193
|
}
|
|
178
194
|
async getNetworkMetrics() {
|
|
179
|
-
const { runtimeGetNetworkMetrics } = unwrapApolloResult(await
|
|
180
|
-
query: gql `
|
|
181
|
-
|
|
182
|
-
|
|
195
|
+
const { runtimeGetNetworkMetrics } = unwrapApolloResult(await this._apolloClient.query({
|
|
196
|
+
query: gql `
|
|
197
|
+
query runtimeGetNetworkMetrics {
|
|
198
|
+
runtimeGetNetworkMetrics
|
|
199
|
+
}
|
|
200
|
+
`,
|
|
183
201
|
}));
|
|
184
202
|
return runtimeGetNetworkMetrics;
|
|
185
203
|
}
|
|
186
204
|
async restartHolochain() {
|
|
187
|
-
const { runtimeRestartHolochain } = unwrapApolloResult(await
|
|
188
|
-
mutation: gql `
|
|
189
|
-
|
|
190
|
-
|
|
205
|
+
const { runtimeRestartHolochain } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
206
|
+
mutation: gql `
|
|
207
|
+
mutation runtimeRestartHolochain {
|
|
208
|
+
runtimeRestartHolochain
|
|
209
|
+
}
|
|
210
|
+
`,
|
|
191
211
|
}));
|
|
192
212
|
return runtimeRestartHolochain;
|
|
193
213
|
}
|
|
194
214
|
async hcAddAgentInfos(agentInfos) {
|
|
195
|
-
const { runtimeHcAddAgentInfos } = unwrapApolloResult(await
|
|
196
|
-
mutation: gql `
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
215
|
+
const { runtimeHcAddAgentInfos } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
216
|
+
mutation: gql `
|
|
217
|
+
mutation runtimeHcAddAgentInfos($agentInfos: String!) {
|
|
218
|
+
runtimeHcAddAgentInfos(agentInfos: $agentInfos)
|
|
219
|
+
}
|
|
220
|
+
`,
|
|
221
|
+
variables: { agentInfos },
|
|
200
222
|
}));
|
|
201
223
|
return runtimeHcAddAgentInfos;
|
|
202
224
|
}
|
|
203
225
|
async verifyStringSignedByDid(did, didSigningKeyId, data, signedData) {
|
|
204
|
-
const { runtimeVerifyStringSignedByDid } = unwrapApolloResult(await
|
|
205
|
-
mutation: gql `
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
226
|
+
const { runtimeVerifyStringSignedByDid } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
227
|
+
mutation: gql `
|
|
228
|
+
query runtimeVerifyStringSignedByDid(
|
|
229
|
+
$did: String!
|
|
230
|
+
$didSigningKeyId: String!
|
|
231
|
+
$data: String!
|
|
232
|
+
$signedData: String!
|
|
233
|
+
) {
|
|
234
|
+
runtimeVerifyStringSignedByDid(
|
|
235
|
+
did: $did
|
|
236
|
+
didSigningKeyId: $didSigningKeyId
|
|
237
|
+
data: $data
|
|
238
|
+
signedData: $signedData
|
|
239
|
+
)
|
|
240
|
+
}
|
|
241
|
+
`,
|
|
242
|
+
variables: { did, didSigningKeyId, data, signedData },
|
|
209
243
|
}));
|
|
210
244
|
return runtimeVerifyStringSignedByDid;
|
|
211
245
|
}
|
|
212
246
|
async setStatus(perspective) {
|
|
213
|
-
const { runtimeSetStatus } = unwrapApolloResult(await
|
|
214
|
-
mutation: gql `
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
247
|
+
const { runtimeSetStatus } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
248
|
+
mutation: gql `
|
|
249
|
+
mutation runtimeSetStatus($status: PerspectiveInput!) {
|
|
250
|
+
runtimeSetStatus(status: $status)
|
|
251
|
+
}
|
|
252
|
+
`,
|
|
253
|
+
variables: { status: perspective },
|
|
218
254
|
}));
|
|
219
255
|
return runtimeSetStatus;
|
|
220
256
|
}
|
|
221
257
|
async friendStatus(did) {
|
|
222
|
-
const { runtimeFriendStatus } = unwrapApolloResult(await
|
|
258
|
+
const { runtimeFriendStatus } = unwrapApolloResult(await this._apolloClient.query({
|
|
223
259
|
query: gql `query runtimeFriendStatus($did: String!) {
|
|
224
260
|
runtimeFriendStatus(did: $did) { ${PERSPECTIVE_EXPRESSION_FIELDS} }
|
|
225
261
|
}`,
|
|
226
|
-
variables: { did }
|
|
262
|
+
variables: { did },
|
|
227
263
|
}));
|
|
228
264
|
return runtimeFriendStatus;
|
|
229
265
|
}
|
|
230
266
|
async friendSendMessage(did, message) {
|
|
231
|
-
const { runtimeFriendSendMessage } = unwrapApolloResult(await
|
|
232
|
-
mutation: gql `
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
267
|
+
const { runtimeFriendSendMessage } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
268
|
+
mutation: gql `
|
|
269
|
+
mutation runtimeFriendSendMessage(
|
|
270
|
+
$did: String!
|
|
271
|
+
$message: PerspectiveInput!
|
|
272
|
+
) {
|
|
273
|
+
runtimeFriendSendMessage(did: $did, message: $message)
|
|
274
|
+
}
|
|
275
|
+
`,
|
|
276
|
+
variables: { did, message },
|
|
236
277
|
}));
|
|
237
278
|
return runtimeFriendSendMessage;
|
|
238
279
|
}
|
|
239
280
|
async messageInbox(filter) {
|
|
240
|
-
const { runtimeMessageInbox } = unwrapApolloResult(await
|
|
281
|
+
const { runtimeMessageInbox } = unwrapApolloResult(await this._apolloClient.query({
|
|
241
282
|
query: gql `query runtimeMessageInbox($filter: String) {
|
|
242
283
|
runtimeMessageInbox(filter: $filter) { ${PERSPECTIVE_EXPRESSION_FIELDS} }
|
|
243
284
|
}`,
|
|
244
|
-
variables: { filter }
|
|
285
|
+
variables: { filter },
|
|
245
286
|
}));
|
|
246
287
|
return runtimeMessageInbox;
|
|
247
288
|
}
|
|
248
289
|
async messageOutbox(filter) {
|
|
249
|
-
const { runtimeMessageOutbox } = unwrapApolloResult(await
|
|
290
|
+
const { runtimeMessageOutbox } = unwrapApolloResult(await this._apolloClient.query({
|
|
250
291
|
query: gql `query runtimeMessageOutbox($filter: String) {
|
|
251
292
|
runtimeMessageOutbox(filter: $filter) {
|
|
252
293
|
recipient,
|
|
@@ -255,60 +296,136 @@ export class RuntimeClient {
|
|
|
255
296
|
}
|
|
256
297
|
}
|
|
257
298
|
}`,
|
|
258
|
-
variables: { filter }
|
|
299
|
+
variables: { filter },
|
|
259
300
|
}));
|
|
260
301
|
return runtimeMessageOutbox;
|
|
261
302
|
}
|
|
262
303
|
async requestInstallNotification(notification) {
|
|
263
|
-
const { runtimeRequestInstallNotification } = unwrapApolloResult(await
|
|
264
|
-
mutation: gql `
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
304
|
+
const { runtimeRequestInstallNotification } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
305
|
+
mutation: gql `
|
|
306
|
+
mutation runtimeRequestInstallNotification(
|
|
307
|
+
$notification: NotificationInput!
|
|
308
|
+
) {
|
|
309
|
+
runtimeRequestInstallNotification(notification: $notification)
|
|
310
|
+
}
|
|
311
|
+
`,
|
|
312
|
+
variables: { notification },
|
|
268
313
|
}));
|
|
269
314
|
return runtimeRequestInstallNotification;
|
|
270
315
|
}
|
|
271
316
|
async grantNotification(id) {
|
|
272
|
-
const { runtimeGrantNotification } = unwrapApolloResult(await
|
|
273
|
-
mutation: gql `
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
317
|
+
const { runtimeGrantNotification } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
318
|
+
mutation: gql `
|
|
319
|
+
mutation runtimeGrantNotification($id: String!) {
|
|
320
|
+
runtimeGrantNotification(id: $id)
|
|
321
|
+
}
|
|
322
|
+
`,
|
|
323
|
+
variables: { id },
|
|
277
324
|
}));
|
|
278
325
|
return runtimeGrantNotification;
|
|
279
326
|
}
|
|
280
327
|
async exportDb(filePath) {
|
|
281
|
-
const { runtimeExportDb } = unwrapApolloResult(await
|
|
282
|
-
mutation: gql `
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
328
|
+
const { runtimeExportDb } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
329
|
+
mutation: gql `
|
|
330
|
+
mutation runtimeExportDb($filePath: String!) {
|
|
331
|
+
runtimeExportDb(filePath: $filePath)
|
|
332
|
+
}
|
|
333
|
+
`,
|
|
334
|
+
variables: { filePath },
|
|
286
335
|
}));
|
|
287
336
|
return runtimeExportDb;
|
|
288
337
|
}
|
|
289
338
|
async importDb(filePath) {
|
|
290
|
-
const { runtimeImportDb } = unwrapApolloResult(await
|
|
291
|
-
mutation: gql `
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
339
|
+
const { runtimeImportDb } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
340
|
+
mutation: gql `
|
|
341
|
+
mutation runtimeImportDb($filePath: String!) {
|
|
342
|
+
runtimeImportDb(filePath: $filePath) {
|
|
343
|
+
perspectives {
|
|
344
|
+
total
|
|
345
|
+
imported
|
|
346
|
+
failed
|
|
347
|
+
omitted
|
|
348
|
+
errors
|
|
349
|
+
}
|
|
350
|
+
links {
|
|
351
|
+
total
|
|
352
|
+
imported
|
|
353
|
+
failed
|
|
354
|
+
omitted
|
|
355
|
+
errors
|
|
356
|
+
}
|
|
357
|
+
expressions {
|
|
358
|
+
total
|
|
359
|
+
imported
|
|
360
|
+
failed
|
|
361
|
+
omitted
|
|
362
|
+
errors
|
|
363
|
+
}
|
|
364
|
+
perspectiveDiffs {
|
|
365
|
+
total
|
|
366
|
+
imported
|
|
367
|
+
failed
|
|
368
|
+
omitted
|
|
369
|
+
errors
|
|
370
|
+
}
|
|
371
|
+
notifications {
|
|
372
|
+
total
|
|
373
|
+
imported
|
|
374
|
+
failed
|
|
375
|
+
omitted
|
|
376
|
+
errors
|
|
377
|
+
}
|
|
378
|
+
models {
|
|
379
|
+
total
|
|
380
|
+
imported
|
|
381
|
+
failed
|
|
382
|
+
omitted
|
|
383
|
+
errors
|
|
384
|
+
}
|
|
385
|
+
defaultModels {
|
|
386
|
+
total
|
|
387
|
+
imported
|
|
388
|
+
failed
|
|
389
|
+
omitted
|
|
390
|
+
errors
|
|
391
|
+
}
|
|
392
|
+
tasks {
|
|
393
|
+
total
|
|
394
|
+
imported
|
|
395
|
+
failed
|
|
396
|
+
omitted
|
|
397
|
+
errors
|
|
398
|
+
}
|
|
399
|
+
friends {
|
|
400
|
+
total
|
|
401
|
+
imported
|
|
402
|
+
failed
|
|
403
|
+
omitted
|
|
404
|
+
errors
|
|
405
|
+
}
|
|
406
|
+
trustedAgents {
|
|
407
|
+
total
|
|
408
|
+
imported
|
|
409
|
+
failed
|
|
410
|
+
omitted
|
|
411
|
+
errors
|
|
412
|
+
}
|
|
413
|
+
knownLinkLanguages {
|
|
414
|
+
total
|
|
415
|
+
imported
|
|
416
|
+
failed
|
|
417
|
+
omitted
|
|
418
|
+
errors
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
`,
|
|
423
|
+
variables: { filePath },
|
|
307
424
|
}));
|
|
308
425
|
return runtimeImportDb;
|
|
309
426
|
}
|
|
310
427
|
async notifications() {
|
|
311
|
-
const { runtimeNotifications } = unwrapApolloResult(await
|
|
428
|
+
const { runtimeNotifications } = unwrapApolloResult(await this._apolloClient.query({
|
|
312
429
|
query: gql `query runtimeNotifications {
|
|
313
430
|
runtimeNotifications { ${NOTIFICATION_FIELDS} }
|
|
314
431
|
}`,
|
|
@@ -316,170 +433,227 @@ export class RuntimeClient {
|
|
|
316
433
|
return runtimeNotifications;
|
|
317
434
|
}
|
|
318
435
|
async updateNotification(id, notification) {
|
|
319
|
-
const { runtimeUpdateNotification } = unwrapApolloResult(await
|
|
320
|
-
mutation: gql `
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
436
|
+
const { runtimeUpdateNotification } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
437
|
+
mutation: gql `
|
|
438
|
+
mutation runtimeUpdateNotification(
|
|
439
|
+
$id: String!
|
|
440
|
+
$notification: NotificationInput!
|
|
441
|
+
) {
|
|
442
|
+
runtimeUpdateNotification(id: $id, notification: $notification)
|
|
443
|
+
}
|
|
444
|
+
`,
|
|
445
|
+
variables: { id, notification },
|
|
324
446
|
}));
|
|
325
447
|
return runtimeUpdateNotification;
|
|
326
448
|
}
|
|
327
449
|
async removeNotification(id) {
|
|
328
|
-
const { runtimeRemoveNotification } = unwrapApolloResult(await
|
|
329
|
-
mutation: gql `
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
450
|
+
const { runtimeRemoveNotification } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
451
|
+
mutation: gql `
|
|
452
|
+
mutation runtimeRemoveNotification($id: String!) {
|
|
453
|
+
runtimeRemoveNotification(id: $id)
|
|
454
|
+
}
|
|
455
|
+
`,
|
|
456
|
+
variables: { id },
|
|
333
457
|
}));
|
|
334
458
|
return runtimeRemoveNotification;
|
|
335
459
|
}
|
|
336
460
|
async exportPerspective(uuid, filePath) {
|
|
337
|
-
const { runtimeExportPerspective } = unwrapApolloResult(await
|
|
338
|
-
mutation: gql `
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
461
|
+
const { runtimeExportPerspective } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
462
|
+
mutation: gql `
|
|
463
|
+
mutation runtimeExportPerspective(
|
|
464
|
+
$perspectiveUuid: String!
|
|
465
|
+
$filePath: String!
|
|
466
|
+
) {
|
|
467
|
+
runtimeExportPerspective(
|
|
468
|
+
perspectiveUuid: $perspectiveUuid
|
|
469
|
+
filePath: $filePath
|
|
470
|
+
)
|
|
471
|
+
}
|
|
472
|
+
`,
|
|
473
|
+
variables: { perspectiveUuid: uuid, filePath },
|
|
342
474
|
}));
|
|
343
475
|
return runtimeExportPerspective;
|
|
344
476
|
}
|
|
345
477
|
async importPerspective(filePath) {
|
|
346
|
-
const { runtimeImportPerspective } = unwrapApolloResult(await
|
|
347
|
-
mutation: gql `
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
478
|
+
const { runtimeImportPerspective } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
479
|
+
mutation: gql `
|
|
480
|
+
mutation runtimeImportPerspective($filePath: String!) {
|
|
481
|
+
runtimeImportPerspective(filePath: $filePath)
|
|
482
|
+
}
|
|
483
|
+
`,
|
|
484
|
+
variables: { filePath },
|
|
351
485
|
}));
|
|
352
486
|
return runtimeImportPerspective;
|
|
353
487
|
}
|
|
354
488
|
async multiUserEnabled() {
|
|
355
|
-
const { runtimeMultiUserEnabled } = unwrapApolloResult(await
|
|
356
|
-
query: gql `
|
|
357
|
-
|
|
358
|
-
|
|
489
|
+
const { runtimeMultiUserEnabled } = unwrapApolloResult(await this._apolloClient.query({
|
|
490
|
+
query: gql `
|
|
491
|
+
query runtimeMultiUserEnabled {
|
|
492
|
+
runtimeMultiUserEnabled
|
|
493
|
+
}
|
|
494
|
+
`,
|
|
359
495
|
}));
|
|
360
496
|
return runtimeMultiUserEnabled;
|
|
361
497
|
}
|
|
362
498
|
async setMultiUserEnabled(enabled) {
|
|
363
|
-
const { runtimeSetMultiUserEnabled } = unwrapApolloResult(await
|
|
364
|
-
mutation: gql `
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
499
|
+
const { runtimeSetMultiUserEnabled } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
500
|
+
mutation: gql `
|
|
501
|
+
mutation runtimeSetMultiUserEnabled($enabled: Boolean!) {
|
|
502
|
+
runtimeSetMultiUserEnabled(enabled: $enabled)
|
|
503
|
+
}
|
|
504
|
+
`,
|
|
505
|
+
variables: { enabled },
|
|
368
506
|
}));
|
|
369
507
|
return runtimeSetMultiUserEnabled;
|
|
370
508
|
}
|
|
371
509
|
async listUsers() {
|
|
372
|
-
const { runtimeListUsers } = unwrapApolloResult(await
|
|
373
|
-
query: gql `
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
510
|
+
const { runtimeListUsers } = unwrapApolloResult(await this._apolloClient.query({
|
|
511
|
+
query: gql `
|
|
512
|
+
query runtimeListUsers {
|
|
513
|
+
runtimeListUsers {
|
|
514
|
+
email
|
|
515
|
+
did
|
|
516
|
+
lastSeen
|
|
517
|
+
perspectiveCount
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
`,
|
|
381
521
|
}));
|
|
382
522
|
return runtimeListUsers;
|
|
383
523
|
}
|
|
384
524
|
async emailTestModeEnable() {
|
|
385
|
-
const { runtimeEmailTestModeEnable } = unwrapApolloResult(await
|
|
386
|
-
mutation: gql `
|
|
387
|
-
|
|
388
|
-
|
|
525
|
+
const { runtimeEmailTestModeEnable } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
526
|
+
mutation: gql `
|
|
527
|
+
mutation runtimeEmailTestModeEnable {
|
|
528
|
+
runtimeEmailTestModeEnable
|
|
529
|
+
}
|
|
530
|
+
`,
|
|
389
531
|
}));
|
|
390
532
|
return runtimeEmailTestModeEnable;
|
|
391
533
|
}
|
|
392
534
|
async emailTestModeDisable() {
|
|
393
|
-
const { runtimeEmailTestModeDisable } = unwrapApolloResult(await
|
|
394
|
-
mutation: gql `
|
|
395
|
-
|
|
396
|
-
|
|
535
|
+
const { runtimeEmailTestModeDisable } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
536
|
+
mutation: gql `
|
|
537
|
+
mutation runtimeEmailTestModeDisable {
|
|
538
|
+
runtimeEmailTestModeDisable
|
|
539
|
+
}
|
|
540
|
+
`,
|
|
397
541
|
}));
|
|
398
542
|
return runtimeEmailTestModeDisable;
|
|
399
543
|
}
|
|
400
544
|
async emailTestGetCode(email) {
|
|
401
|
-
const { runtimeEmailTestGetCode } = unwrapApolloResult(await
|
|
402
|
-
mutation: gql `
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
545
|
+
const { runtimeEmailTestGetCode } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
546
|
+
mutation: gql `
|
|
547
|
+
mutation runtimeEmailTestGetCode($email: String!) {
|
|
548
|
+
runtimeEmailTestGetCode(email: $email)
|
|
549
|
+
}
|
|
550
|
+
`,
|
|
551
|
+
variables: { email },
|
|
406
552
|
}));
|
|
407
553
|
return runtimeEmailTestGetCode;
|
|
408
554
|
}
|
|
409
555
|
async emailTestClearCodes() {
|
|
410
|
-
const { runtimeEmailTestClearCodes } = unwrapApolloResult(await
|
|
411
|
-
mutation: gql `
|
|
412
|
-
|
|
413
|
-
|
|
556
|
+
const { runtimeEmailTestClearCodes } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
557
|
+
mutation: gql `
|
|
558
|
+
mutation runtimeEmailTestClearCodes {
|
|
559
|
+
runtimeEmailTestClearCodes
|
|
560
|
+
}
|
|
561
|
+
`,
|
|
414
562
|
}));
|
|
415
563
|
return runtimeEmailTestClearCodes;
|
|
416
564
|
}
|
|
417
565
|
async emailTestSetExpiry(email, verificationType, expiresAt) {
|
|
418
|
-
const { runtimeEmailTestSetExpiry } = unwrapApolloResult(await
|
|
419
|
-
mutation: gql `
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
566
|
+
const { runtimeEmailTestSetExpiry } = unwrapApolloResult(await this._apolloClient.mutate({
|
|
567
|
+
mutation: gql `
|
|
568
|
+
mutation runtimeEmailTestSetExpiry(
|
|
569
|
+
$email: String!
|
|
570
|
+
$verificationType: String!
|
|
571
|
+
$expiresAt: Int!
|
|
572
|
+
) {
|
|
573
|
+
runtimeEmailTestSetExpiry(
|
|
574
|
+
email: $email
|
|
575
|
+
verificationType: $verificationType
|
|
576
|
+
expiresAt: $expiresAt
|
|
577
|
+
)
|
|
578
|
+
}
|
|
579
|
+
`,
|
|
580
|
+
variables: { email, verificationType, expiresAt },
|
|
423
581
|
}));
|
|
424
582
|
return runtimeEmailTestSetExpiry;
|
|
425
583
|
}
|
|
426
584
|
addNotificationTriggeredCallback(cb) {
|
|
427
|
-
|
|
585
|
+
this._notificationTriggeredCallbacks.push(cb);
|
|
428
586
|
}
|
|
429
587
|
subscribeNotificationTriggered() {
|
|
430
|
-
|
|
588
|
+
this._apolloClient
|
|
589
|
+
.subscribe({
|
|
431
590
|
query: gql ` subscription {
|
|
432
591
|
runtimeNotificationTriggered { ${TRIGGERED_NOTIFICATION_FIELDS} }
|
|
433
592
|
}
|
|
434
|
-
|
|
435
|
-
})
|
|
436
|
-
|
|
437
|
-
|
|
593
|
+
`,
|
|
594
|
+
})
|
|
595
|
+
.subscribe({
|
|
596
|
+
next: (result) => {
|
|
597
|
+
this._notificationTriggeredCallbacks.forEach((cb) => {
|
|
438
598
|
cb(result.data.runtimeNotificationTriggered);
|
|
439
599
|
});
|
|
440
600
|
},
|
|
441
|
-
error: (e) =>
|
|
601
|
+
error: (e) => {
|
|
602
|
+
if (!isSocketCloseError(e))
|
|
603
|
+
console.error(e);
|
|
604
|
+
},
|
|
442
605
|
});
|
|
443
606
|
}
|
|
444
607
|
addMessageCallback(cb) {
|
|
445
|
-
|
|
608
|
+
this._messageReceivedCallbacks.push(cb);
|
|
446
609
|
}
|
|
447
610
|
subscribeMessageReceived() {
|
|
448
|
-
|
|
611
|
+
this._apolloClient
|
|
612
|
+
.subscribe({
|
|
449
613
|
query: gql ` subscription {
|
|
450
614
|
runtimeMessageReceived { ${PERSPECTIVE_EXPRESSION_FIELDS} }
|
|
451
615
|
}
|
|
452
|
-
|
|
453
|
-
})
|
|
454
|
-
|
|
455
|
-
|
|
616
|
+
`,
|
|
617
|
+
})
|
|
618
|
+
.subscribe({
|
|
619
|
+
next: (result) => {
|
|
620
|
+
this._messageReceivedCallbacks.forEach((cb) => {
|
|
456
621
|
cb(result.data.runtimeMessageReceived);
|
|
457
622
|
});
|
|
458
623
|
},
|
|
459
|
-
error: (e) =>
|
|
624
|
+
error: (e) => {
|
|
625
|
+
if (!isSocketCloseError(e))
|
|
626
|
+
console.error(e);
|
|
627
|
+
},
|
|
460
628
|
});
|
|
461
629
|
}
|
|
462
630
|
addExceptionCallback(cb) {
|
|
463
|
-
|
|
631
|
+
this._exceptionOccurredCallbacks.push(cb);
|
|
464
632
|
}
|
|
465
633
|
subscribeExceptionOccurred() {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
634
|
+
this._apolloClient
|
|
635
|
+
.subscribe({
|
|
636
|
+
query: gql `
|
|
637
|
+
subscription {
|
|
638
|
+
exceptionOccurred {
|
|
639
|
+
title
|
|
640
|
+
message
|
|
641
|
+
type
|
|
642
|
+
addon
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
`,
|
|
646
|
+
})
|
|
647
|
+
.subscribe({
|
|
648
|
+
next: (result) => {
|
|
649
|
+
this._exceptionOccurredCallbacks.forEach((cb) => {
|
|
478
650
|
cb(result.data.exceptionOccurred);
|
|
479
651
|
});
|
|
480
652
|
},
|
|
481
|
-
error: (e) =>
|
|
653
|
+
error: (e) => {
|
|
654
|
+
if (!isSocketCloseError(e))
|
|
655
|
+
console.error(e);
|
|
656
|
+
},
|
|
482
657
|
});
|
|
483
658
|
}
|
|
484
659
|
}
|
|
485
|
-
_RuntimeClient_apolloClient = new WeakMap(), _RuntimeClient_messageReceivedCallbacks = new WeakMap(), _RuntimeClient_exceptionOccurredCallbacks = new WeakMap(), _RuntimeClient_notificationTriggeredCallbacks = new WeakMap(), _RuntimeClient_notificationRequestedCallbacks = new WeakMap();
|