@perspect3vism/ad4m
Advanced tools
Comparing version 0.1.25 to 0.1.26
@@ -278,2 +278,6 @@ "use strict"; | ||
}); | ||
it('publishSnapshotByUUID() smoke test', async () => { | ||
const snapshotUrl = await ad4mClient.perspective.publishSnapshotByUUID('00004'); | ||
expect(snapshotUrl).toBe('perspective://Qm12345'); | ||
}); | ||
it('queryLinks() smoke test', async () => { | ||
@@ -280,0 +284,0 @@ const links = await ad4mClient.perspective.queryLinks('000001', { source: 'root' }); |
@@ -16,2 +16,3 @@ import { ApolloClient } from "@apollo/client"; | ||
snapshotByUUID(uuid: string): Promise<Perspective | null>; | ||
publishSnapshotByUUID(uuid: string): Promise<string | null>; | ||
queryLinks(uuid: string, query: LinkQuery): Promise<LinkExpression[]>; | ||
@@ -18,0 +19,0 @@ queryProlog(uuid: string, query: string): Promise<any>; |
@@ -129,2 +129,11 @@ "use strict"; | ||
} | ||
async publishSnapshotByUUID(uuid) { | ||
const { perspectivePublishSnapshot } = (0, unwrapApolloResult_1.default)(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({ | ||
mutation: (0, client_1.gql) `mutation perspectivePublishSnapshot($uuid: String!) { | ||
perspectivePublishSnapshot(uuid: $uuid) | ||
}`, | ||
variables: { uuid } | ||
})); | ||
return perspectivePublishSnapshot; | ||
} | ||
async queryLinks(uuid, query) { | ||
@@ -131,0 +140,0 @@ const { perspectiveQueryLinks } = (0, unwrapApolloResult_1.default)(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").query({ |
@@ -15,2 +15,3 @@ import { LinkExpression, LinkExpressionInput, LinkInput } from "../links/Links"; | ||
perspectiveSnapshot(uuid: string): Perspective | null; | ||
perspectivePublishSnapshot(uuid: string): String | null; | ||
perspectiveQueryLinks(uuid: string, query: LinkQuery): LinkExpression[]; | ||
@@ -17,0 +18,0 @@ perspectiveQueryProlog(uuid: string, query: String): string; |
@@ -57,2 +57,5 @@ "use strict"; | ||
} | ||
perspectivePublishSnapshot(uuid) { | ||
return 'perspective://Qm12345'; | ||
} | ||
perspectiveQueryLinks(uuid, query) { | ||
@@ -129,2 +132,9 @@ return [testLink]; | ||
__decorate([ | ||
(0, type_graphql_1.Mutation)(returns => String, { nullable: true }), | ||
__param(0, (0, type_graphql_1.Arg)('uuid')), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [String]), | ||
__metadata("design:returntype", String) | ||
], PerspectiveResolver.prototype, "perspectivePublishSnapshot", null); | ||
__decorate([ | ||
(0, type_graphql_1.Query)(returns => [Links_1.LinkExpression], { nullable: true }), | ||
@@ -131,0 +141,0 @@ __param(0, (0, type_graphql_1.Arg)('uuid')), |
@@ -16,2 +16,3 @@ import { ApolloClient } from "@apollo/client"; | ||
snapshotByUUID(uuid: string): Promise<Perspective | null>; | ||
publishSnapshotByUUID(uuid: string): Promise<string | null>; | ||
queryLinks(uuid: string, query: LinkQuery): Promise<LinkExpression[]>; | ||
@@ -18,0 +19,0 @@ queryProlog(uuid: string, query: string): Promise<any>; |
@@ -129,2 +129,11 @@ "use strict"; | ||
} | ||
async publishSnapshotByUUID(uuid) { | ||
const { perspectivePublishSnapshot } = (0, unwrapApolloResult_1.default)(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({ | ||
mutation: (0, client_1.gql) `mutation perspectivePublishSnapshot($uuid: String!) { | ||
perspectivePublishSnapshot(uuid: $uuid) | ||
}`, | ||
variables: { uuid } | ||
})); | ||
return perspectivePublishSnapshot; | ||
} | ||
async queryLinks(uuid, query) { | ||
@@ -131,0 +140,0 @@ const { perspectiveQueryLinks } = (0, unwrapApolloResult_1.default)(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").query({ |
@@ -15,2 +15,3 @@ import { LinkExpression, LinkExpressionInput, LinkInput } from "../links/Links"; | ||
perspectiveSnapshot(uuid: string): Perspective | null; | ||
perspectivePublishSnapshot(uuid: string): String | null; | ||
perspectiveQueryLinks(uuid: string, query: LinkQuery): LinkExpression[]; | ||
@@ -17,0 +18,0 @@ perspectiveQueryProlog(uuid: string, query: String): string; |
@@ -57,2 +57,5 @@ "use strict"; | ||
} | ||
perspectivePublishSnapshot(uuid) { | ||
return 'perspective://Qm12345'; | ||
} | ||
perspectiveQueryLinks(uuid, query) { | ||
@@ -129,2 +132,9 @@ return [testLink]; | ||
__decorate([ | ||
(0, type_graphql_1.Mutation)(returns => String, { nullable: true }), | ||
__param(0, (0, type_graphql_1.Arg)('uuid')), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [String]), | ||
__metadata("design:returntype", String) | ||
], PerspectiveResolver.prototype, "perspectivePublishSnapshot", null); | ||
__decorate([ | ||
(0, type_graphql_1.Query)(returns => [Links_1.LinkExpression], { nullable: true }), | ||
@@ -131,0 +141,0 @@ __param(0, (0, type_graphql_1.Arg)('uuid')), |
@@ -152,2 +152,3 @@ | ||
perspectiveAddLink(link: LinkInput!, uuid: String!): LinkExpression! | ||
perspectivePublishSnapshot(uuid: String!): String | ||
perspectiveRemove(uuid: String!): Boolean! | ||
@@ -154,0 +155,0 @@ perspectiveRemoveLink(link: LinkExpressionInput!, uuid: String!): Boolean! |
@@ -152,2 +152,3 @@ | ||
perspectiveAddLink(link: LinkInput!, uuid: String!): LinkExpression! | ||
perspectivePublishSnapshot(uuid: String!): String | ||
perspectiveRemove(uuid: String!): Boolean! | ||
@@ -154,0 +155,0 @@ perspectiveRemoveLink(link: LinkExpressionInput!, uuid: String!): Boolean! |
{ | ||
"name": "@perspect3vism/ad4m", | ||
"version": "0.1.25", | ||
"version": "0.1.26", | ||
"description": "*The Agent-Centric Distributed Application Meta-ontology* or just: *Agent-Centric DApp Meta-ontology* * A new meta-ontology for interoperable, decentralized application design * A spanning-layer to enable seamless integration between Holochain DNAs, blockchains, linked-data structures/ontologies and centralized back-ends * The basis for turning distinct, monolithic and siloed apps into a global, open and interoperable sense-making network", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -331,2 +331,8 @@ import { buildSchema } from "type-graphql" | ||
it('publishSnapshotByUUID() smoke test', async () => { | ||
const snapshotUrl = await ad4mClient.perspective.publishSnapshotByUUID('00004') | ||
expect(snapshotUrl).toBe('perspective://Qm12345') | ||
}) | ||
it('queryLinks() smoke test', async () => { | ||
@@ -333,0 +339,0 @@ const links = await ad4mClient.perspective.queryLinks('000001', {source: 'root'}) |
@@ -125,2 +125,11 @@ import { ApolloClient, gql } from "@apollo/client"; | ||
} | ||
async publishSnapshotByUUID(uuid: string): Promise<string|null> { | ||
const { perspectivePublishSnapshot } = unwrapApolloResult(await this.#apolloClient.mutate({ | ||
mutation: gql`mutation perspectivePublishSnapshot($uuid: String!) { | ||
perspectivePublishSnapshot(uuid: $uuid) | ||
}`, | ||
variables: { uuid } | ||
})) | ||
return perspectivePublishSnapshot | ||
} | ||
@@ -127,0 +136,0 @@ async queryLinks(uuid: string, query: LinkQuery): Promise<LinkExpression[]> { |
@@ -52,2 +52,7 @@ import { Arg, Mutation, Query, Resolver, Subscription } from "type-graphql"; | ||
@Mutation(returns => String, {nullable: true}) | ||
perspectivePublishSnapshot(@Arg('uuid') uuid: string): String|null { | ||
return 'perspective://Qm12345' | ||
} | ||
@Query(returns => [LinkExpression], {nullable: true}) | ||
@@ -54,0 +59,0 @@ perspectiveQueryLinks(@Arg('uuid') uuid: string, @Arg('query') query: LinkQuery): LinkExpression[] { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1196102
194
27593