@perspect3vism/ad4m
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "@perspect3vism/ad4m", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"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", | ||
"main": "lib/index.js", | ||
"types": "*.d.ts", | ||
"types": "lib/index.d.ts", | ||
"scripts": { | ||
@@ -8,0 +8,0 @@ "build": "tsc && npm run buildSchema", |
@@ -21,9 +21,9 @@ import { Field, ObjectType } from "type-graphql"; | ||
@Field() | ||
did: String; | ||
did: string; | ||
@Field(type => Perspective, {nullable: true}) | ||
perspective: Perspective; | ||
perspective?: Perspective; | ||
@Field({nullable: true}) | ||
directMessageLanguage?: String; | ||
directMessageLanguage?: string; | ||
@@ -30,0 +30,0 @@ constructor(did: string, perspective?: Perspective) { |
@@ -36,3 +36,3 @@ import { ApolloClient, gql } from "@apollo/client"; | ||
export type AgentUpdatedCallback = (agent: Agent) => void | ||
export type AgentUpdatedCallback = (agent: Agent) => null | ||
/** | ||
@@ -39,0 +39,0 @@ * Provides access to all functions regarding the local agent, |
@@ -12,9 +12,9 @@ import { Field, ObjectType } from "type-graphql"; | ||
@Field({nullable: true}) | ||
did: String | ||
did?: string | ||
@Field({nullable: true}) | ||
didDocument: String | ||
didDocument?: string | ||
@Field({nullable: true}) | ||
error: String | ||
error?: string | ||
@@ -21,0 +21,0 @@ constructor(obj?: object) { |
@@ -33,3 +33,3 @@ import { ApolloClient, gql } from "@apollo/client"; | ||
async getRaw(url: string): Promise<String> { | ||
async getRaw(url: string): Promise<string> { | ||
const { expressionRaw } = unwrapApolloResult(await this.#apolloClient.query({ | ||
@@ -44,3 +44,3 @@ query: gql`query expressionRaw($url: String!) { | ||
async create(content: any, languageAddress: string): Promise<String> { | ||
async create(content: any, languageAddress: string): Promise<string> { | ||
content = JSON.stringify(content) | ||
@@ -47,0 +47,0 @@ const { expressionCreate } = unwrapApolloResult(await this.#apolloClient.mutate({ |
@@ -25,3 +25,3 @@ import { Arg, Mutation, Query, Resolver } from "type-graphql"; | ||
@Query(returns => String, {nullable: true}) | ||
expressionRaw(@Arg('url') url: string): String { | ||
expressionRaw(@Arg('url') url: string): string { | ||
if(url === 'neighbourhood://Qm123') { | ||
@@ -38,5 +38,5 @@ return JSON.stringify(testExpression) | ||
@Arg('languageAddress') languageAddress: string | ||
): String { | ||
return new String("Qm1234") | ||
): string { | ||
return "Qm1234" | ||
} | ||
} |
@@ -14,4 +14,5 @@ import "reflect-metadata"; | ||
export * from "./perspectives/Perspective"; | ||
export * from "./perspectives/PerspectiveHandle"; | ||
export * from "./perspectives/LinkQuery"; | ||
export * from "./neighbourhood/Neighbourhood"; | ||
export * from "./typeDefs"; |
@@ -8,3 +8,3 @@ import type { Address } from '../Address' | ||
export default interface Language { | ||
export interface Language { | ||
readonly name: string; | ||
@@ -50,3 +50,3 @@ | ||
// with that given address | ||
get(address: Address): Promise<void | Expression>; | ||
get(address: Address): Promise<Expression | null>; | ||
@@ -92,3 +92,3 @@ // Strategy for putting an expression with needs to be different | ||
/// Get expressions authored by a given Agent/Identity | ||
getByAuthor(author: DID, count: number, page: number): Promise<void | Expression[]>; | ||
getByAuthor(author: DID, count: number, page: number): Promise<Expression[] | null>; | ||
} | ||
@@ -102,3 +102,3 @@ | ||
/// Get expressions authored by a given Agent/Identity | ||
getAll(filter: any, count: number, page: number): Promise<void | Expression[]>; | ||
getAll(filter: any, count: number, page: number): Promise<Expression[] | null>; | ||
} | ||
@@ -131,3 +131,3 @@ | ||
/// Get private expressions sent to you | ||
inbox(filterFrom: void | DID[]): Promise<Expression[]>; | ||
inbox(filterFrom?: DID[]): Promise<Expression[]>; | ||
} | ||
@@ -134,0 +134,0 @@ |
@@ -19,3 +19,3 @@ import type { AppSignalCb } from '@holochain/conductor-api' | ||
customSettings: object; | ||
Holochain: HolochainLanguageDelegate | void; | ||
Holochain: HolochainLanguageDelegate | undefined; | ||
ad4mSignal: Ad4mSignalCB; | ||
@@ -22,0 +22,0 @@ } |
@@ -13,12 +13,12 @@ import { Field, ObjectType } from "type-graphql"; | ||
@Field({nullable: true}) | ||
settings: string; | ||
settings?: string; | ||
@Field({nullable: true}) | ||
icon: Icon; | ||
icon?: Icon; | ||
@Field({nullable: true}) | ||
constructorIcon: Icon; | ||
constructorIcon?: Icon; | ||
@Field({nullable: true}) | ||
settingsIcon: Icon; | ||
settingsIcon?: Icon; | ||
} |
@@ -10,3 +10,3 @@ import { Field, ObjectType } from "type-graphql"; | ||
@Field() | ||
linkLanguage: String | ||
linkLanguage: string | ||
@@ -13,0 +13,0 @@ @Field() |
@@ -20,3 +20,3 @@ import { ApolloClient, ApolloQueryResult, gql } from "@apollo/client" | ||
meta: Perspective | ||
): Promise<String> { | ||
): Promise<string> { | ||
const { neighbourhoodPublishFromPerspective } = unwrapApolloResult(await this.#apolloClient.mutate({ | ||
@@ -23,0 +23,0 @@ mutation: gql`mutation neighbourhoodPublishFromPerspective( |
@@ -20,3 +20,3 @@ import { Arg, Mutation, Resolver } from "type-graphql"; | ||
@Arg('meta') meta: PerspectiveInput | ||
): String { | ||
): string { | ||
return "neighbourhood://neighbourhoodAddress" | ||
@@ -23,0 +23,0 @@ } |
@@ -21,5 +21,5 @@ import { ApolloClient, gql } from "@apollo/client"; | ||
export type PerspectiveHandleCallback = (perspective: PerspectiveHandle) => void | ||
export type UuidCallback = (uuid: String) => void | ||
export type LinkCallback = (link: LinkExpression) => void | ||
export type PerspectiveHandleCallback = (perspective: PerspectiveHandle) => null | ||
export type UuidCallback = (uuid: string) => null | ||
export type LinkCallback = (link: LinkExpression) => null | ||
export default class PerspectiveClient { | ||
@@ -91,3 +91,3 @@ #apolloClient: ApolloClient<any> | ||
async byUUID(uuid: string): Promise<PerspectiveHandle|void> { | ||
async byUUID(uuid: string): Promise<PerspectiveHandle|null> { | ||
const { perspective } = unwrapApolloResult(await this.#apolloClient.query({ | ||
@@ -106,3 +106,3 @@ query: gql`query perspective($uuid: String!) { | ||
async snapshotByUUID(uuid: string): Promise<Perspective|void> { | ||
async snapshotByUUID(uuid: string): Promise<Perspective|null> { | ||
const { perspectiveSnapshot } = unwrapApolloResult(await this.#apolloClient.query({ | ||
@@ -155,3 +155,3 @@ query: gql`query perspectiveSnapshot($uuid: String!) { | ||
async remove(uuid: string): Promise<boolean> { | ||
async remove(uuid: string): Promise<{perspectiveRemove: boolean}> { | ||
return unwrapApolloResult(await this.#apolloClient.mutate({ | ||
@@ -197,3 +197,3 @@ mutation: gql`mutation perspectiveRemove($uuid: String!) { | ||
async removeLink(uuid: string, link: LinkExpressionInput): Promise<Boolean> { | ||
async removeLink(uuid: string, link: LinkExpressionInput): Promise<{perspectiveRemoveLink: boolean}> { | ||
return unwrapApolloResult(await this.#apolloClient.mutate({ | ||
@@ -234,3 +234,3 @@ mutation: gql`mutation perspectiveRemoveLink($link: LinkExpressionInput!, $uuid: String!) { | ||
await new Promise<void>(resolve => setTimeout(resolve, 500)) | ||
await new Promise<null>(resolve => setTimeout(resolve, 500)) | ||
} | ||
@@ -251,4 +251,4 @@ | ||
await new Promise<void>(resolve => setTimeout(resolve, 500)) | ||
await new Promise<null>(resolve => setTimeout(resolve, 500)) | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Field, ObjectType, InputType } from "type-graphql"; | ||
import { Field, ObjectType } from "type-graphql"; | ||
@@ -9,10 +9,10 @@ // This type is used in the GraphQL interface to reference a mutable | ||
@Field() | ||
uuid: String | ||
uuid: string | ||
@Field() | ||
name: String | ||
name: string | ||
@Field(type => String, {nullable: true}) | ||
sharedUrl: String|void | ||
sharedUrl?: string | ||
constructor(uuid?: String, name?: String) { | ||
constructor(uuid?: string, name?: string) { | ||
this.uuid = uuid | ||
@@ -19,0 +19,0 @@ this.name = name |
@@ -41,3 +41,3 @@ import { Arg, Mutation, Query, Resolver, Subscription } from "type-graphql"; | ||
@Query(returns => PerspectiveHandle, {nullable: true}) | ||
perspective(@Arg('uuid') uuid: string): PerspectiveHandle|void { | ||
perspective(@Arg('uuid') uuid: string): PerspectiveHandle|null { | ||
return new PerspectiveHandle(uuid, 'test-perspective-1') | ||
@@ -47,3 +47,3 @@ } | ||
@Query(returns => Perspective, {nullable: true}) | ||
perspectiveSnapshot(@Arg('uuid') uuid: string): Perspective|void { | ||
perspectiveSnapshot(@Arg('uuid') uuid: string): Perspective|null { | ||
return new Perspective([testLink]) | ||
@@ -108,8 +108,8 @@ } | ||
@Subscription({topics: "", nullable: true}) | ||
perspectiveRemoved(): String { | ||
return new String('00006') | ||
perspectiveRemoved(): string { | ||
return '00006' | ||
} | ||
@Subscription({topics: "", nullable: true}) | ||
perspectiveLinkAdded(@Arg('uuid') uuid: String): LinkExpression { | ||
perspectiveLinkAdded(@Arg('uuid') uuid: string): LinkExpression { | ||
return new LinkExpression() | ||
@@ -119,5 +119,5 @@ } | ||
@Subscription({topics: "", nullable: true}) | ||
perspectiveLinkRemoved(@Arg('uuid') uuid: String): LinkExpression { | ||
perspectiveLinkRemoved(@Arg('uuid') uuid: string): LinkExpression { | ||
return new LinkExpression() | ||
} | ||
} |
@@ -6,2 +6,2 @@ // This is just a placeholder for the TS version of the index file. | ||
export const typeDefs = "" | ||
export const typeDefsString = "" |
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
227106
5184