@powerhousedao/reactor-api 1.7.0 → 1.8.1

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.
@@ -1,135 +0,0 @@
1
- type Query {
2
- system: System
3
- drive: DocumentDriveState
4
- document(id: ID!): IDocument
5
- documents: [String!]!
6
- }
7
-
8
- type Mutation {
9
- registerPullResponderListener(filter: InputListenerFilter!): Listener
10
- pushUpdates(strands: [InputStrandUpdate!]): [ListenerRevision!]!
11
- acknowledge(listenerId: String!, revisions: [ListenerRevisionInput]): Boolean
12
- }
13
-
14
- input InputOperationSignerUser {
15
- address: String!
16
- networkId: String!
17
- chainId: Int!
18
- }
19
-
20
- type OperationSignerUser {
21
- address: String!
22
- networkId: String!
23
- chainId: Int!
24
- }
25
-
26
- input InputOperationSignerApp {
27
- name: String!
28
- key: String!
29
- }
30
-
31
- type OperationSignerApp {
32
- name: String!
33
- key: String!
34
- }
35
-
36
- type OperationSigner {
37
- app: OperationSignerApp
38
- user: OperationSignerUser
39
- signatures: [[String!]]!
40
- }
41
-
42
- input InputOperationSigner {
43
- app: InputOperationSignerApp
44
- user: InputOperationSignerUser
45
- signatures: [[String!]]!
46
- }
47
-
48
- type OperationContext {
49
- signer: OperationSigner
50
- }
51
-
52
- input InputOperationContext {
53
- signer: InputOperationSigner
54
- }
55
-
56
- input InputOperationUpdate {
57
- index: Int!
58
- skip: Int
59
- type: String!
60
- id: String!
61
- input: String!
62
- hash: String!
63
- timestamp: String!
64
- error: String
65
- context: InputOperationContext
66
- }
67
-
68
- type OperationUpdate {
69
- index: Int!
70
- skip: Int
71
- type: String!
72
- id: String!
73
- input: String!
74
- hash: String!
75
- timestamp: String!
76
- error: String
77
- context: OperationContext
78
- }
79
-
80
- type StrandUpdate {
81
- driveId: String!
82
- documentId: String!
83
- scope: String!
84
- branch: String!
85
- operations: [OperationUpdate!]!
86
- }
87
-
88
- input InputStrandUpdate {
89
- driveId: String!
90
- documentId: String!
91
- scope: String!
92
- branch: String!
93
- operations: [InputOperationUpdate!]!
94
- }
95
-
96
- input InputListenerFilter {
97
- documentType: [String!]
98
- documentId: [String!]
99
- scope: [String!]
100
- branch: [String!]
101
- }
102
-
103
- enum UpdateStatus {
104
- SUCCESS
105
- MISSING
106
- CONFLICT
107
- ERROR
108
- }
109
-
110
- input ListenerRevisionInput {
111
- driveId: String!
112
- documentId: String!
113
- scope: String!
114
- branch: String!
115
- status: UpdateStatus!
116
- revision: Int!
117
- }
118
-
119
- type ListenerRevision {
120
- driveId: String!
121
- documentId: String!
122
- scope: String!
123
- branch: String!
124
- status: UpdateStatus!
125
- revision: Int!
126
- error: String
127
- }
128
-
129
- type System {
130
- sync: Sync
131
- }
132
-
133
- type Sync {
134
- strands(listenerId: ID!, since: String): [StrandUpdate!]!
135
- }
@@ -1,16 +0,0 @@
1
- import { GraphQLResolverMap } from "@apollo/subgraph/dist/schema-helper";
2
- import { IDocumentDriveServer } from "document-drive";
3
- import { readFileSync } from "node:fs";
4
- import { dirname, resolve } from "node:path";
5
- import { fileURLToPath } from "node:url";
6
- import { createSchema } from "src/utils/create-schema";
7
- import { resolvers } from "./resolvers";
8
- import schemaPath from "./schema.graphql";
9
-
10
- const __dirname =
11
- import.meta.dirname ?? dirname(fileURLToPath(import.meta.url));
12
-
13
- const typeDefs = readFileSync(resolve(__dirname, schemaPath), "utf8");
14
-
15
- export const getSchema = (driveServer: IDocumentDriveServer) =>
16
- createSchema(driveServer, resolvers as GraphQLResolverMap, typeDefs);
@@ -1,18 +0,0 @@
1
- type Query {
2
- drives: [String!]!
3
- driveIdBySlug(slug: String!): String
4
- }
5
-
6
- type Mutation {
7
- addDrive(global: DocumentDriveStateInput!): DocumentDriveState
8
- deleteDrive(id: ID!): Boolean
9
- setDriveIcon(id: String!, icon: String!): Boolean
10
- setDriveName(id: String!, name: String!): Boolean
11
- }
12
-
13
- input DocumentDriveStateInput {
14
- name: String
15
- id: String
16
- slug: String
17
- icon: String
18
- }
@@ -1,16 +0,0 @@
1
- import { GraphQLResolverMap } from "@apollo/subgraph/dist/schema-helper";
2
- import { IDocumentDriveServer } from "document-drive";
3
- import { readFileSync } from "fs";
4
- import { dirname, resolve } from "path";
5
- import { fileURLToPath } from "url";
6
- import { createSchema } from "src/utils/create-schema";
7
- import { resolvers } from "./resolvers";
8
- import schemaPath from "./schema.graphql";
9
-
10
- const __dirname =
11
- import.meta.dirname ?? dirname(fileURLToPath(import.meta.url));
12
-
13
- const typeDefs = readFileSync(resolve(__dirname, schemaPath), "utf8");
14
-
15
- export const getSchema = (driveServer: IDocumentDriveServer) =>
16
- createSchema(driveServer, resolvers as GraphQLResolverMap, typeDefs);