@powerhousedao/renown-package 1.0.1 → 1.1.0-staging.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.
@@ -2,8 +2,10 @@
2
2
  export declare const actions: {
3
3
  init: (input: import("./index.js").InitInput) => import("./index.js").InitAction;
4
4
  revoke: (input: import("./index.js").RevokeInput) => import("./index.js").RevokeAction;
5
- setName: (name: string) => import("document-model").SetNameAction;
6
- undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
5
+ setName: (name: string | {
6
+ name: string;
7
+ }) => import("document-model").SetNameAction;
8
+ undo: (count?: number, scope?: string) => import("document-model").UndoAction;
7
9
  redo: (count?: number, scope?: string) => import("document-model").RedoAction;
8
10
  prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
9
11
  loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/renown-credential/actions.ts"],"names":[],"mappings":"AAGA,sDAAsD;AAEtD,eAAO,MAAM,OAAO;WAC6B,qCAAgB;aAA8I,uCAAkB;;eAAqsN,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADt1O,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/renown-credential/actions.ts"],"names":[],"mappings":"AAGA,sDAAsD;AAEtD,eAAO,MAAM,OAAO;WAC6B,qCAAgB;aAA8I,uCAAkB;;;;gBAA8vN,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CAD/4O,CAAC"}
@@ -3,8 +3,10 @@ export declare const actions: {
3
3
  setUsername: (input: import("./index.js").SetUsernameInput) => import("./index.js").SetUsernameAction;
4
4
  setEthAddress: (input: import("./index.js").SetEthAddressInput) => import("./index.js").SetEthAddressAction;
5
5
  setUserImage: (input: import("./index.js").SetUserImageInput) => import("./index.js").SetUserImageAction;
6
- setName: (name: string) => import("document-model").SetNameAction;
7
- undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
6
+ setName: (name: string | {
7
+ name: string;
8
+ }) => import("document-model").SetNameAction;
9
+ undo: (count?: number, scope?: string) => import("document-model").UndoAction;
8
10
  redo: (count?: number, scope?: string) => import("document-model").RedoAction;
9
11
  prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
10
12
  loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/renown-user/actions.ts"],"names":[],"mappings":"AAGA,gDAAgD;AAEhD,eAAO,MAAM,OAAO;kBACyK,4CAAuB;oBAA2K,8CAAyB;mBAAiL,6CAAwB;;eAA20M,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CAD51O,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/renown-user/actions.ts"],"names":[],"mappings":"AAGA,gDAAgD;AAEhD,eAAO,MAAM,OAAO;kBACyK,4CAAuB;oBAA2K,8CAAyB;mBAAiL,6CAAwB;;;;gBAAo4M,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADr5O,CAAC"}
@@ -2,8 +2,8 @@
2
2
  * This file aggregates all processor factories
3
3
  * Auto-generated by codegen - DO NOT EDIT MANUALLY
4
4
  */
5
- import { type ProcessorRecord, type IProcessorHostModule } from "document-drive";
5
+ import { type ProcessorRecordLegacy, type IProcessorHostModuleLegacy } from "document-drive";
6
6
  import { type PHDocumentHeader } from "document-model";
7
7
  import { type IProcessorHostModuleWithReactor } from "./renown-credential/factory.js";
8
- export declare const processorFactory: (module: IProcessorHostModule | IProcessorHostModuleWithReactor) => (driveHeader: PHDocumentHeader) => Promise<ProcessorRecord[]>;
8
+ export declare const processorFactory: (module: IProcessorHostModuleLegacy | IProcessorHostModuleWithReactor) => (driveHeader: PHDocumentHeader) => Promise<ProcessorRecordLegacy[]>;
9
9
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../processors/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAE1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,oBAAoB,GAAG,+BAA+B,MAgBhD,aAAa,gBAAgB,KAAG,OAAO,CAAC,eAAe,EAAE,CAUxE,CAAC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../processors/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAEhC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,0BAA0B,GAAG,+BAA+B,MAgBtD,aAAa,gBAAgB,KAAG,OAAO,CAAC,qBAAqB,EAAE,CAU9E,CAAC"}
@@ -1,8 +1,8 @@
1
- import { type ProcessorRecord, type IProcessorHostModule } from "document-drive";
1
+ import { type ProcessorRecordLegacy, type IProcessorHostModuleLegacy } from "document-drive";
2
2
  import { type PHDocumentHeader } from "document-model";
3
3
  import { type IReactor } from "./index.js";
4
- export interface IProcessorHostModuleWithReactor extends IProcessorHostModule {
4
+ export interface IProcessorHostModuleWithReactor extends IProcessorHostModuleLegacy {
5
5
  reactor?: IReactor;
6
6
  }
7
- export declare const renownCredentialProcessorFactory: (module: IProcessorHostModuleWithReactor) => (driveHeader: PHDocumentHeader) => Promise<ProcessorRecord[]>;
7
+ export declare const renownCredentialProcessorFactory: (module: IProcessorHostModuleWithReactor) => (driveHeader: PHDocumentHeader) => Promise<ProcessorRecordLegacy[]>;
8
8
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../processors/renown-credential/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAA6B,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtE,MAAM,WAAW,+BAAgC,SAAQ,oBAAoB;IAC3E,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED,eAAO,MAAM,gCAAgC,GAC1C,QAAQ,+BAA+B,MACjC,aAAa,gBAAgB,KAAG,OAAO,CAAC,eAAe,EAAE,CAgC/D,CAAC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../processors/renown-credential/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAA6B,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtE,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IACjF,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED,eAAO,MAAM,gCAAgC,GAC1C,QAAQ,+BAA+B,MACjC,aAAa,gBAAgB,KAAG,OAAO,CAAC,qBAAqB,EAAE,CAgCrE,CAAC"}
@@ -1,12 +1,12 @@
1
- import { RelationalDbProcessor, type RelationalDbProcessorFilter, type IRelationalDb } from "document-drive";
1
+ import { RelationalDbProcessorLegacy, type RelationalDbProcessorFilterLegacy, type IRelationalDbLegacy } from "document-drive";
2
2
  import { type InternalTransmitterUpdate } from "document-drive";
3
3
  import { type DB } from "./schema.js";
4
4
  export interface IReactor {
5
5
  deleteDocument(documentId: string): Promise<boolean>;
6
6
  }
7
- export declare class RenownCredentialProcessor extends RelationalDbProcessor<DB> {
7
+ export declare class RenownCredentialProcessor extends RelationalDbProcessorLegacy<DB> {
8
8
  private reactor?;
9
- constructor(namespace: string, filter: RelationalDbProcessorFilter, relationalDb: IRelationalDb<DB>, reactor?: IReactor);
9
+ constructor(namespace: string, filter: RelationalDbProcessorFilterLegacy, relationalDb: IRelationalDbLegacy<DB>, reactor?: IReactor);
10
10
  static getNamespace(driveId: string): string;
11
11
  initAndUpgrade(): Promise<void>;
12
12
  onStrands(strands: InternalTransmitterUpdate[]): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../processors/renown-credential/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,2BAA2B,EAChC,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAMtC,MAAM,WAAW,QAAQ;IACvB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtD;AAED,qBAAa,yBAA0B,SAAQ,qBAAqB,CAAC,EAAE,CAAC;IACtE,OAAO,CAAC,OAAO,CAAC,CAAW;gBAGzB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,2BAA2B,EACnC,YAAY,EAAE,aAAa,CAAC,EAAE,CAAC,EAC/B,OAAO,CAAC,EAAE,QAAQ;WASJ,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAStC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ/B,SAAS,CACtB,OAAO,EAAE,yBAAyB,EAAE,GACnC,OAAO,CAAC,IAAI,CAAC;IA8KV,YAAY;CACnB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../processors/renown-credential/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAMtC,MAAM,WAAW,QAAQ;IACvB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtD;AAED,qBAAa,yBAA0B,SAAQ,2BAA2B,CAAC,EAAE,CAAC;IAC5E,OAAO,CAAC,OAAO,CAAC,CAAW;gBAGzB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,iCAAiC,EACzC,YAAY,EAAE,mBAAmB,CAAC,EAAE,CAAC,EACrC,OAAO,CAAC,EAAE,QAAQ;WASJ,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAStC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ/B,SAAS,CACtB,OAAO,EAAE,yBAAyB,EAAE,GACnC,OAAO,CAAC,IAAI,CAAC;IA8KV,YAAY;CACnB"}
@@ -1,8 +1,8 @@
1
- import { RelationalDbProcessor, } from "document-drive";
1
+ import { RelationalDbProcessorLegacy, } from "document-drive";
2
2
  import {} from "document-drive";
3
3
  import { up } from "./migrations.js";
4
4
  import {} from "./schema.js";
5
- export class RenownCredentialProcessor extends RelationalDbProcessor {
5
+ export class RenownCredentialProcessor extends RelationalDbProcessorLegacy {
6
6
  reactor;
7
7
  constructor(namespace, filter, relationalDb, reactor) {
8
8
  super(namespace, filter, relationalDb);
@@ -1,4 +1,4 @@
1
- import { type IRelationalDb } from "document-drive";
2
- export declare function up(db: IRelationalDb<any>): Promise<void>;
3
- export declare function down(db: IRelationalDb<any>): Promise<void>;
1
+ import { type IRelationalDbLegacy } from "document-drive";
2
+ export declare function up(db: IRelationalDbLegacy<any>): Promise<void>;
3
+ export declare function down(db: IRelationalDbLegacy<any>): Promise<void>;
4
4
  //# sourceMappingURL=migrations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../processors/renown-credential/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,wBAAsB,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAsF9D;AAED,wBAAsB,IAAI,CAAC,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA6BhE"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../processors/renown-credential/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,wBAAsB,EAAE,CAAC,EAAE,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAsFpE;AAED,wBAAsB,IAAI,CAAC,EAAE,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA6BtE"}
@@ -1,4 +1,4 @@
1
- import { type ProcessorRecord, type IProcessorHostModule } from "document-drive";
1
+ import { type ProcessorRecordLegacy, type IProcessorHostModuleLegacy } from "document-drive";
2
2
  import { type PHDocumentHeader } from "document-model";
3
- export declare const renownUserProcessorFactory: (module: IProcessorHostModule) => (driveHeader: PHDocumentHeader) => Promise<ProcessorRecord[]>;
3
+ export declare const renownUserProcessorFactory: (module: IProcessorHostModuleLegacy) => (driveHeader: PHDocumentHeader) => Promise<ProcessorRecordLegacy[]>;
4
4
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../processors/renown-user/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,eAAO,MAAM,0BAA0B,GACpC,QAAQ,oBAAoB,MACtB,aAAa,gBAAgB,KAAG,OAAO,CAAC,eAAe,EAAE,CAwB/D,CAAC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../processors/renown-user/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,eAAO,MAAM,0BAA0B,GACpC,QAAQ,0BAA0B,MAC5B,aAAa,gBAAgB,KAAG,OAAO,CAAC,qBAAqB,EAAE,CAwBrE,CAAC"}
@@ -1,7 +1,7 @@
1
- import { RelationalDbProcessor } from "document-drive";
1
+ import { RelationalDbProcessorLegacy } from "document-drive";
2
2
  import { type InternalTransmitterUpdate } from "document-drive";
3
3
  import { type DB } from "./schema.js";
4
- export declare class RenownUserProcessor extends RelationalDbProcessor<DB> {
4
+ export declare class RenownUserProcessor extends RelationalDbProcessorLegacy<DB> {
5
5
  static getNamespace(driveId: string): string;
6
6
  initAndUpgrade(): Promise<void>;
7
7
  onStrands(strands: InternalTransmitterUpdate[]): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../processors/renown-user/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAEtC,qBAAa,mBAAoB,SAAQ,qBAAqB,CAAC,EAAE,CAAC;WAChD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAKtC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B,SAAS,CACtB,OAAO,EAAE,yBAAyB,EAAE,GACnC,OAAO,CAAC,IAAI,CAAC;IAwFV,YAAY;CACnB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../processors/renown-user/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAEtC,qBAAa,mBAAoB,SAAQ,2BAA2B,CAAC,EAAE,CAAC;WACtD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAKtC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B,SAAS,CACtB,OAAO,EAAE,yBAAyB,EAAE,GACnC,OAAO,CAAC,IAAI,CAAC;IAwFV,YAAY;CACnB"}
@@ -1,8 +1,8 @@
1
- import { RelationalDbProcessor } from "document-drive";
1
+ import { RelationalDbProcessorLegacy } from "document-drive";
2
2
  import {} from "document-drive";
3
3
  import { up } from "./migrations.js";
4
4
  import {} from "./schema.js";
5
- export class RenownUserProcessor extends RelationalDbProcessor {
5
+ export class RenownUserProcessor extends RelationalDbProcessorLegacy {
6
6
  static getNamespace(driveId) {
7
7
  // Default namespace: `${this.name}_${driveId.replaceAll("-", "_")}`
8
8
  return super.getNamespace(driveId);
@@ -1,4 +1,4 @@
1
- import { type IRelationalDb } from "document-drive";
2
- export declare function up(db: IRelationalDb<any>): Promise<void>;
3
- export declare function down(db: IRelationalDb<any>): Promise<void>;
1
+ import { type IRelationalDbLegacy } from "document-drive";
2
+ export declare function up(db: IRelationalDbLegacy<any>): Promise<void>;
3
+ export declare function down(db: IRelationalDbLegacy<any>): Promise<void>;
4
4
  //# sourceMappingURL=migrations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../processors/renown-user/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,wBAAsB,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B9D;AAED,wBAAsB,IAAI,CAAC,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhE"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../processors/renown-user/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,wBAAsB,EAAE,CAAC,EAAE,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BpE;AAED,wBAAsB,IAAI,CAAC,EAAE,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAOtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/renown-user/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAW5D,eAAO,MAAM,YAAY,GAAI,UAAU,SAAS,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CA2JxE,CAAC"}
1
+ {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/renown-user/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAU5D,eAAO,MAAM,YAAY,GAAI,UAAU,SAAS,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAiIxE,CAAC"}
@@ -1,8 +1,7 @@
1
- import { addFile } from "document-drive";
2
1
  import { actions, } from "../../document-models/renown-user/index.js";
3
2
  import { setName } from "document-model";
4
3
  export const getResolvers = (subgraph) => {
5
- const reactor = subgraph.reactor;
4
+ const reactor = subgraph.reactorClient;
6
5
  return {
7
6
  Query: {
8
7
  RenownUser: async () => {
@@ -13,12 +12,13 @@ export const getResolvers = (subgraph) => {
13
12
  throw new Error("Document id is required");
14
13
  }
15
14
  if (driveId) {
16
- const docIds = await reactor.getDocuments(driveId);
17
- if (!docIds.includes(docId)) {
15
+ const { results: children } = await reactor.getChildren(driveId);
16
+ const childIds = children.map((c) => c.header.id);
17
+ if (!childIds.includes(docId)) {
18
18
  throw new Error(`Document with id ${docId} is not part of ${driveId}`);
19
19
  }
20
20
  }
21
- const doc = await reactor.getDocument(docId);
21
+ const doc = await reactor.get(docId);
22
22
  return {
23
23
  driveId: driveId,
24
24
  ...doc,
@@ -32,9 +32,9 @@ export const getResolvers = (subgraph) => {
32
32
  },
33
33
  getDocuments: async (args) => {
34
34
  const { driveId } = args;
35
- const docsIds = await reactor.getDocuments(driveId);
36
- const docs = await Promise.all(docsIds.map(async (docId) => {
37
- const doc = await reactor.getDocument(docId);
35
+ const { results: children } = await reactor.getChildren(driveId);
36
+ const docs = await Promise.all(children.map(async (child) => {
37
+ const doc = await reactor.get(child.header.id);
38
38
  return {
39
39
  driveId: driveId,
40
40
  ...doc,
@@ -54,53 +54,37 @@ export const getResolvers = (subgraph) => {
54
54
  Mutation: {
55
55
  RenownUser_createDocument: async (_, args) => {
56
56
  const { driveId, name } = args;
57
- const document = await reactor.addDocument("powerhouse/renown-user");
58
- if (driveId) {
59
- await reactor.addAction(driveId, addFile({
60
- name,
61
- id: document.header.id,
62
- documentType: "powerhouse/renown-user",
63
- }));
64
- }
57
+ const document = await reactor.createEmpty("powerhouse/renown-user", driveId ? { parentIdentifier: driveId } : undefined);
65
58
  if (name) {
66
- await reactor.addAction(document.header.id, setName(name));
59
+ await reactor.execute(document.header.id, "main", [setName(name)]);
67
60
  }
68
61
  return document.header.id;
69
62
  },
70
63
  RenownUser_setUsername: async (_, args) => {
71
64
  const { docId, input } = args;
72
- const doc = await reactor.getDocument(docId);
65
+ const doc = await reactor.get(docId);
73
66
  if (!doc) {
74
67
  throw new Error("Document not found");
75
68
  }
76
- const result = await reactor.addAction(docId, actions.setUsername(input));
77
- if (result.status !== "SUCCESS") {
78
- throw new Error(result.error?.message ?? "Failed to setUsername");
79
- }
69
+ await reactor.execute(docId, "main", [actions.setUsername(input)]);
80
70
  return true;
81
71
  },
82
72
  RenownUser_setEthAddress: async (_, args) => {
83
73
  const { docId, input } = args;
84
- const doc = await reactor.getDocument(docId);
74
+ const doc = await reactor.get(docId);
85
75
  if (!doc) {
86
76
  throw new Error("Document not found");
87
77
  }
88
- const result = await reactor.addAction(docId, actions.setEthAddress(input));
89
- if (result.status !== "SUCCESS") {
90
- throw new Error(result.error?.message ?? "Failed to setEthAddress");
91
- }
78
+ await reactor.execute(docId, "main", [actions.setEthAddress(input)]);
92
79
  return true;
93
80
  },
94
81
  RenownUser_setUserImage: async (_, args) => {
95
82
  const { docId, input } = args;
96
- const doc = await reactor.getDocument(docId);
83
+ const doc = await reactor.get(docId);
97
84
  if (!doc) {
98
85
  throw new Error("Document not found");
99
86
  }
100
- const result = await reactor.addAction(docId, actions.setUserImage(input));
101
- if (result.status !== "SUCCESS") {
102
- throw new Error(result.error?.message ?? "Failed to setUserImage");
103
- }
87
+ await reactor.execute(docId, "main", [actions.setUserImage(input)]);
104
88
  return true;
105
89
  },
106
90
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/renown-package",
3
3
  "description": "Renown document models, editors, and processors for the Powerhouse ecosystem",
4
- "version": "1.0.1",
4
+ "version": "1.1.0-staging.1",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
7
7
  "type": "git",
@@ -97,12 +97,12 @@
97
97
  "service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
98
98
  },
99
99
  "dependencies": {
100
- "@powerhousedao/builder-tools": "staging",
101
- "@powerhousedao/common": "staging",
102
- "@powerhousedao/design-system": "staging",
100
+ "@powerhousedao/builder-tools": "6.0.1-staging.0",
101
+ "@powerhousedao/common": "6.0.1-staging.0",
102
+ "@powerhousedao/design-system": "6.0.1-staging.0",
103
103
  "@powerhousedao/document-engineering": "^1.40.1",
104
- "@powerhousedao/vetra": "staging",
105
- "document-model": "staging",
104
+ "@powerhousedao/vetra": "6.0.1-staging.0",
105
+ "document-model": "6.0.1-staging.0",
106
106
  "graphql": "^16.10.0",
107
107
  "graphql-request": "^7.2.0",
108
108
  "graphql-tag": "^2.12.6",
@@ -110,21 +110,21 @@
110
110
  "luxon": "^3.7.2",
111
111
  "nanoid": "^5.1.6",
112
112
  "uuid": "^11.1.0",
113
- "zod": "^4.1.13"
113
+ "zod": "^4.3.6"
114
114
  },
115
115
  "devDependencies": {
116
116
  "@electric-sql/pglite": "^0.2.17",
117
117
  "@eslint/js": "^9.37.0",
118
118
  "@openfeature/core": "^1.9.1",
119
119
  "@powerhousedao/analytics-engine-core": "^0.5.0",
120
- "@powerhousedao/codegen": "staging",
121
- "@powerhousedao/connect": "staging",
122
- "@powerhousedao/ph-cli": "staging",
123
- "@powerhousedao/reactor-api": "staging",
124
- "@powerhousedao/reactor-browser": "staging",
125
- "@powerhousedao/reactor-local": "staging",
126
- "@powerhousedao/scalars": "latest",
127
- "@powerhousedao/switchboard": "staging",
120
+ "@powerhousedao/codegen": "6.0.1-staging.0",
121
+ "@powerhousedao/connect": "6.0.1-staging.0",
122
+ "@powerhousedao/ph-cli": "6.0.1-staging.0",
123
+ "@powerhousedao/reactor-api": "6.0.1-staging.0",
124
+ "@powerhousedao/reactor-browser": "6.0.1-staging.0",
125
+ "@powerhousedao/reactor-local": "6.0.1-staging.0",
126
+ "@powerhousedao/scalars": "^2.0.1",
127
+ "@powerhousedao/switchboard": "6.0.1-staging.0",
128
128
  "@semantic-release/changelog": "^6.0.3",
129
129
  "@semantic-release/git": "^10.0.1",
130
130
  "@tailwindcss/cli": "^4.1.14",
@@ -133,7 +133,7 @@
133
133
  "@types/react-dom": "^19.2.2",
134
134
  "@vitejs/plugin-react": "^5.0.4",
135
135
  "adm-zip": "^0.5.16",
136
- "document-drive": "staging",
136
+ "document-drive": "6.0.1-staging.0",
137
137
  "eslint": "^9.37.0",
138
138
  "eslint-plugin-react": "^7.37.4",
139
139
  "eslint-plugin-react-hooks": "^5.2.0",