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