@powerhousedao/reactor-api 1.14.3 → 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,8 +1,8 @@
1
- ## 1.14.3 (2025-01-08)
1
+ ## 1.14.4 (2025-01-09)
2
2
 
3
3
  ### 🩹 Fixes
4
4
 
5
- - **reactor-api:** add missing ids ([8d246c14](https://github.com/powerhouse-inc/powerhouse/commit/8d246c14))
5
+ - **reactor-api:** missing graphql fields ([c067dc70](https://github.com/powerhouse-inc/powerhouse/commit/c067dc70))
6
6
 
7
7
  ### ❤️ Thank You
8
8
 
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,21 +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 {
15007
- id: ID!
15028
+ id: String!
15008
15029
  type: String!
15009
15030
  index: Int!
15010
15031
  timestamp: DateTime!
15011
15032
  hash: String!
15033
+ skip: Int
15034
+ inputText: String
15035
+ error: String
15036
+ context: PHOperationContext
15012
15037
  }
15013
15038
  interface IDocument {
15014
- id: ID!
15039
+ id: String!
15015
15040
  name: String!
15016
15041
  documentType: String!
15017
15042
  revision: Int!
15018
15043
  created: DateTime!
15019
15044
  lastModified: DateTime!
15020
- operations: [Operation!]!
15045
+ operations(first: Int, skip: Int): [Operation!]!
15021
15046
  }
15022
15047
  ${dmSchema.replaceAll(";", "")}
15023
15048
 
@@ -25989,6 +26014,13 @@ var DriveSubgraph = class extends Subgraph {
25989
26014
  return obj.documentType ? "FileNode" : "FolderNode";
25990
26015
  }
25991
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
+ },
25992
26024
  Query: {
25993
26025
  drive: async (_, args, ctx) => {
25994
26026
  if (!ctx.driveId) throw new Error("Drive ID is required");
@@ -26545,7 +26577,6 @@ var AuthSubgraph = class extends Subgraph {
26545
26577
  domain,
26546
26578
  version: "1",
26547
26579
  chainId: 1
26548
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
26549
26580
  }).prepareMessage();
26550
26581
  const textToHex = (textMessage) => `0x${Buffer.from(textMessage, "utf8").toString("hex")}`;
26551
26582
  if (!message || typeof message !== "string") {
@@ -26583,7 +26614,6 @@ var AuthSubgraph = class extends Subgraph {
26583
26614
  signature
26584
26615
  }).where("nonce", nonce);
26585
26616
  const user = await upsertUser(db, {
26586
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
26587
26617
  address: parsedMessage.address,
26588
26618
  networkId: "1",
26589
26619
  chainId: 1
@@ -26777,7 +26807,9 @@ var SubgraphManager = class {
26777
26807
  });
26778
26808
  await subgraphInstance.onSetup();
26779
26809
  this.subgraphs.unshift(subgraphInstance);
26780
- 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
+ );
26781
26813
  await this.updateRouter();
26782
26814
  }
26783
26815
  #getLocalSubgraphConfig(subgraphName) {