@powerhousedao/reactor-api 1.14.2 → 1.14.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/CHANGELOG.md CHANGED
@@ -1,9 +1,12 @@
1
- ## 1.14.2 (2025-01-08)
1
+ ## 1.14.4 (2025-01-09)
2
2
 
3
- ### 🧱 Updated Dependencies
3
+ ### 🩹 Fixes
4
4
 
5
- - Updated document-model-libs to 1.125.2
6
- - Updated document-drive to 1.13.2
5
+ - **reactor-api:** missing graphql fields ([c067dc70](https://github.com/powerhouse-inc/powerhouse/commit/c067dc70))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Frank
7
10
 
8
11
  ## 1.2.0 (2024-10-29)
9
12
 
package/dist/index.js CHANGED
@@ -14989,10 +14989,10 @@ var getDocumentModelTypeDefs = (documentDriveServer, typeDefs2) => {
14989
14989
  ).join("\n")};
14990
14990
 
14991
14991
  type ${documentModel2.name} implements IDocument {
14992
- id: 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!
@@ -15003,19 +15003,46 @@ var getDocumentModelTypeDefs = (documentDriveServer, typeDefs2) => {
15003
15003
  const schema13 = lib_default`
15004
15004
  ${typeDefs.join("\n").replaceAll(";", "")}
15005
15005
 
15006
+ type PHOperationContext {
15007
+ signer: Signer
15008
+ }
15009
+
15010
+ type Signer {
15011
+ user: SignerUser
15012
+ app: SignerApp
15013
+ signatures: [String!]!
15014
+ }
15015
+
15016
+ type SignerUser {
15017
+ address: String!
15018
+ networkId: String!
15019
+ chainId: Int!
15020
+ }
15021
+
15022
+ type SignerApp {
15023
+ name: String!
15024
+ key: String!
15025
+ }
15026
+
15006
15027
  type Operation {
15028
+ id: String!
15007
15029
  type: String!
15008
15030
  index: Int!
15009
15031
  timestamp: DateTime!
15010
15032
  hash: String!
15033
+ skip: Int
15034
+ inputText: String
15035
+ error: String
15036
+ context: PHOperationContext
15011
15037
  }
15012
15038
  interface IDocument {
15039
+ id: String!
15013
15040
  name: String!
15014
15041
  documentType: String!
15015
15042
  revision: Int!
15016
15043
  created: DateTime!
15017
15044
  lastModified: DateTime!
15018
- operations: [Operation!]!
15045
+ operations(first: Int, skip: Int): [Operation!]!
15019
15046
  }
15020
15047
  ${dmSchema.replaceAll(";", "")}
15021
15048
 
@@ -25987,6 +26014,13 @@ var DriveSubgraph = class extends Subgraph {
25987
26014
  return obj.documentType ? "FileNode" : "FolderNode";
25988
26015
  }
25989
26016
  },
26017
+ Document: {
26018
+ operations: async (obj, { first, skip }, ctx) => {
26019
+ const limit = first ?? 0;
26020
+ const start = skip ?? 0;
26021
+ return obj.operations.global.slice(start, start + limit);
26022
+ }
26023
+ },
25990
26024
  Query: {
25991
26025
  drive: async (_, args, ctx) => {
25992
26026
  if (!ctx.driveId) throw new Error("Drive ID is required");
@@ -26543,7 +26577,6 @@ var AuthSubgraph = class extends Subgraph {
26543
26577
  domain,
26544
26578
  version: "1",
26545
26579
  chainId: 1
26546
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
26547
26580
  }).prepareMessage();
26548
26581
  const textToHex = (textMessage) => `0x${Buffer.from(textMessage, "utf8").toString("hex")}`;
26549
26582
  if (!message || typeof message !== "string") {
@@ -26581,7 +26614,6 @@ var AuthSubgraph = class extends Subgraph {
26581
26614
  signature
26582
26615
  }).where("nonce", nonce);
26583
26616
  const user = await upsertUser(db, {
26584
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
26585
26617
  address: parsedMessage.address,
26586
26618
  networkId: "1",
26587
26619
  chainId: 1
@@ -26775,7 +26807,9 @@ var SubgraphManager = class {
26775
26807
  });
26776
26808
  await subgraphInstance.onSetup();
26777
26809
  this.subgraphs.unshift(subgraphInstance);
26778
- console.log(`> Registered ${this.path.slice(-1) === "/" ? this.path : this.path + "/"}${subgraphInstance.name} subgraph.`);
26810
+ console.log(
26811
+ `> Registered ${this.path.endsWith("/") ? this.path : this.path + "/"}${subgraphInstance.name} subgraph.`
26812
+ );
26779
26813
  await this.updateRouter();
26780
26814
  }
26781
26815
  #getLocalSubgraphConfig(subgraphName) {