@powerhousedao/reactor-api 1.14.3 → 1.14.5
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/CHANGELOG.md +2 -2
- package/dist/index.js +42 -9
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/subgraphs/auth/index.ts +2 -4
- package/src/subgraphs/auth/utils/helpers.ts +0 -4
- package/src/subgraphs/auth/utils/session.ts +0 -5
- package/src/subgraphs/drive/index.ts +13 -2
- package/src/subgraphs/manager.ts +3 -1
- package/src/utils/create-schema.ts +31 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
## 1.14.
|
|
1
|
+
## 1.14.5 (2025-01-09)
|
|
2
2
|
|
|
3
3
|
### 🩹 Fixes
|
|
4
4
|
|
|
5
|
-
- **reactor-api:**
|
|
5
|
+
- **reactor-api:** graphql query fields ([01f52aab](https://github.com/powerhouse-inc/powerhouse/commit/01f52aab))
|
|
6
6
|
|
|
7
7
|
### ❤️ Thank You
|
|
8
8
|
|
package/dist/index.js
CHANGED
|
@@ -14989,13 +14989,14 @@ var getDocumentModelTypeDefs = (documentDriveServer, typeDefs2) => {
|
|
|
14989
14989
|
).join("\n")};
|
|
14990
14990
|
|
|
14991
14991
|
type ${documentModel2.name} implements IDocument {
|
|
14992
|
-
id:
|
|
14992
|
+
id: String!
|
|
14993
14993
|
name: String!
|
|
14994
14994
|
documentType: String!
|
|
14995
|
-
operations: [Operation!]!
|
|
14995
|
+
operations(skip: Int, first: Int): [Operation!]!
|
|
14996
14996
|
revision: Int!
|
|
14997
14997
|
created: DateTime!
|
|
14998
14998
|
lastModified: DateTime!
|
|
14999
|
+
${documentModel2.name !== "DocumentModel" ? `initialState: ${documentModel2.name}State!` : ""}
|
|
14999
15000
|
${documentModel2.name !== "DocumentModel" ? `state: ${documentModel2.name}State!` : ""}
|
|
15000
15001
|
}
|
|
15001
15002
|
`;
|
|
@@ -15003,21 +15004,46 @@ var getDocumentModelTypeDefs = (documentDriveServer, typeDefs2) => {
|
|
|
15003
15004
|
const schema13 = lib_default`
|
|
15004
15005
|
${typeDefs.join("\n").replaceAll(";", "")}
|
|
15005
15006
|
|
|
15007
|
+
type PHOperationContext {
|
|
15008
|
+
signer: Signer
|
|
15009
|
+
}
|
|
15010
|
+
|
|
15011
|
+
type Signer {
|
|
15012
|
+
user: SignerUser
|
|
15013
|
+
app: SignerApp
|
|
15014
|
+
signatures: [String!]!
|
|
15015
|
+
}
|
|
15016
|
+
|
|
15017
|
+
type SignerUser {
|
|
15018
|
+
address: String!
|
|
15019
|
+
networkId: String!
|
|
15020
|
+
chainId: Int!
|
|
15021
|
+
}
|
|
15022
|
+
|
|
15023
|
+
type SignerApp {
|
|
15024
|
+
name: String!
|
|
15025
|
+
key: String!
|
|
15026
|
+
}
|
|
15027
|
+
|
|
15006
15028
|
type Operation {
|
|
15007
|
-
id:
|
|
15029
|
+
id: String!
|
|
15008
15030
|
type: String!
|
|
15009
15031
|
index: Int!
|
|
15010
15032
|
timestamp: DateTime!
|
|
15011
15033
|
hash: String!
|
|
15034
|
+
skip: Int
|
|
15035
|
+
inputText: String
|
|
15036
|
+
error: String
|
|
15037
|
+
context: PHOperationContext
|
|
15012
15038
|
}
|
|
15013
15039
|
interface IDocument {
|
|
15014
|
-
id:
|
|
15040
|
+
id: String!
|
|
15015
15041
|
name: String!
|
|
15016
15042
|
documentType: String!
|
|
15017
15043
|
revision: Int!
|
|
15018
15044
|
created: DateTime!
|
|
15019
15045
|
lastModified: DateTime!
|
|
15020
|
-
operations: [Operation!]!
|
|
15046
|
+
operations(first: Int, skip: Int): [Operation!]!
|
|
15021
15047
|
}
|
|
15022
15048
|
${dmSchema.replaceAll(";", "")}
|
|
15023
15049
|
|
|
@@ -25842,7 +25868,7 @@ var DriveSubgraph = class extends Subgraph {
|
|
|
25842
25868
|
type Query {
|
|
25843
25869
|
system: System
|
|
25844
25870
|
drive: DocumentDriveState
|
|
25845
|
-
document(id:
|
|
25871
|
+
document(id: String!): IDocument
|
|
25846
25872
|
documents: [String!]!
|
|
25847
25873
|
}
|
|
25848
25874
|
|
|
@@ -25989,6 +26015,13 @@ var DriveSubgraph = class extends Subgraph {
|
|
|
25989
26015
|
return obj.documentType ? "FileNode" : "FolderNode";
|
|
25990
26016
|
}
|
|
25991
26017
|
},
|
|
26018
|
+
Document: {
|
|
26019
|
+
operations: async (obj, { first, skip }, ctx) => {
|
|
26020
|
+
const limit = first ?? 0;
|
|
26021
|
+
const start = skip ?? 0;
|
|
26022
|
+
return obj.operations.global.slice(start, start + limit);
|
|
26023
|
+
}
|
|
26024
|
+
},
|
|
25992
26025
|
Query: {
|
|
25993
26026
|
drive: async (_, args, ctx) => {
|
|
25994
26027
|
if (!ctx.driveId) throw new Error("Drive ID is required");
|
|
@@ -26545,7 +26578,6 @@ var AuthSubgraph = class extends Subgraph {
|
|
|
26545
26578
|
domain,
|
|
26546
26579
|
version: "1",
|
|
26547
26580
|
chainId: 1
|
|
26548
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
26549
26581
|
}).prepareMessage();
|
|
26550
26582
|
const textToHex = (textMessage) => `0x${Buffer.from(textMessage, "utf8").toString("hex")}`;
|
|
26551
26583
|
if (!message || typeof message !== "string") {
|
|
@@ -26583,7 +26615,6 @@ var AuthSubgraph = class extends Subgraph {
|
|
|
26583
26615
|
signature
|
|
26584
26616
|
}).where("nonce", nonce);
|
|
26585
26617
|
const user = await upsertUser(db, {
|
|
26586
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
26587
26618
|
address: parsedMessage.address,
|
|
26588
26619
|
networkId: "1",
|
|
26589
26620
|
chainId: 1
|
|
@@ -26777,7 +26808,9 @@ var SubgraphManager = class {
|
|
|
26777
26808
|
});
|
|
26778
26809
|
await subgraphInstance.onSetup();
|
|
26779
26810
|
this.subgraphs.unshift(subgraphInstance);
|
|
26780
|
-
console.log(
|
|
26811
|
+
console.log(
|
|
26812
|
+
`> Registered ${this.path.endsWith("/") ? this.path : this.path + "/"}${subgraphInstance.name} subgraph.`
|
|
26813
|
+
);
|
|
26781
26814
|
await this.updateRouter();
|
|
26782
26815
|
}
|
|
26783
26816
|
#getLocalSubgraphConfig(subgraphName) {
|