@powerhousedao/renown-package 1.1.0 → 1.2.0
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/dist/document-models/renown-credential/actions.d.ts +4 -2
- package/dist/document-models/renown-credential/actions.d.ts.map +1 -1
- package/dist/document-models/renown-user/actions.d.ts +4 -2
- package/dist/document-models/renown-user/actions.d.ts.map +1 -1
- package/dist/processors/factory.d.ts +2 -2
- package/dist/processors/factory.d.ts.map +1 -1
- package/dist/processors/renown-credential/factory.d.ts +3 -3
- package/dist/processors/renown-credential/factory.d.ts.map +1 -1
- package/dist/processors/renown-credential/index.d.ts +3 -3
- package/dist/processors/renown-credential/index.d.ts.map +1 -1
- package/dist/processors/renown-credential/index.js +2 -2
- package/dist/processors/renown-credential/migrations.d.ts +3 -3
- package/dist/processors/renown-credential/migrations.d.ts.map +1 -1
- package/dist/processors/renown-user/factory.d.ts +2 -2
- package/dist/processors/renown-user/factory.d.ts.map +1 -1
- package/dist/processors/renown-user/index.d.ts +2 -2
- package/dist/processors/renown-user/index.d.ts.map +1 -1
- package/dist/processors/renown-user/index.js +2 -2
- package/dist/processors/renown-user/migrations.d.ts +3 -3
- package/dist/processors/renown-user/migrations.d.ts.map +1 -1
- package/dist/subgraphs/renown-user/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/renown-user/resolvers.js +16 -32
- package/package.json +19 -21
|
@@ -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
|
|
6
|
-
|
|
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
|
|
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
|
|
7
|
-
|
|
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
|
|
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
|
|
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:
|
|
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,
|
|
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
|
|
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
|
|
4
|
+
export interface IProcessorHostModuleWithReactor extends IProcessorHostModuleLegacy {
|
|
5
5
|
reactor?: IReactor;
|
|
6
6
|
}
|
|
7
|
-
export declare const renownCredentialProcessorFactory: (module: IProcessorHostModuleWithReactor) => (driveHeader: PHDocumentHeader) => Promise<
|
|
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,
|
|
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 {
|
|
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
|
|
7
|
+
export declare class RenownCredentialProcessor extends RelationalDbProcessorLegacy<DB> {
|
|
8
8
|
private reactor?;
|
|
9
|
-
constructor(namespace: string, filter:
|
|
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,
|
|
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 {
|
|
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
|
|
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
|
|
2
|
-
export declare function up(db:
|
|
3
|
-
export declare function down(db:
|
|
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,
|
|
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
|
|
1
|
+
import { type ProcessorRecordLegacy, type IProcessorHostModuleLegacy } from "document-drive";
|
|
2
2
|
import { type PHDocumentHeader } from "document-model";
|
|
3
|
-
export declare const renownUserProcessorFactory: (module:
|
|
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,
|
|
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 {
|
|
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
|
|
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,
|
|
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 {
|
|
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
|
|
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
|
|
2
|
-
export declare function up(db:
|
|
3
|
-
export declare function down(db:
|
|
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,
|
|
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;
|
|
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.
|
|
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
|
|
17
|
-
|
|
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.
|
|
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
|
|
36
|
-
const docs = await Promise.all(
|
|
37
|
-
const doc = await reactor.
|
|
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.
|
|
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.
|
|
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.
|
|
65
|
+
const doc = await reactor.get(docId);
|
|
73
66
|
if (!doc) {
|
|
74
67
|
throw new Error("Document not found");
|
|
75
68
|
}
|
|
76
|
-
|
|
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.
|
|
74
|
+
const doc = await reactor.get(docId);
|
|
85
75
|
if (!doc) {
|
|
86
76
|
throw new Error("Document not found");
|
|
87
77
|
}
|
|
88
|
-
|
|
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.
|
|
83
|
+
const doc = await reactor.get(docId);
|
|
97
84
|
if (!doc) {
|
|
98
85
|
throw new Error("Document not found");
|
|
99
86
|
}
|
|
100
|
-
|
|
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,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/renown-package",
|
|
3
3
|
"description": "Renown document models, editors, and processors for the Powerhouse ecosystem",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "
|
|
8
|
+
"url": "https://github.com/powerhouse-inc/renown-package.git"
|
|
9
9
|
},
|
|
10
10
|
"bugs": {
|
|
11
11
|
"url": "https://github.com/powerhouse-inc/renown-package/issues"
|
|
@@ -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": "
|
|
101
|
-
"@powerhousedao/common": "
|
|
102
|
-
"@powerhousedao/design-system": "
|
|
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": "
|
|
105
|
-
"document-model": "
|
|
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.
|
|
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
|
-
"@powerhousedao/analytics-engine-core": "
|
|
120
|
-
"@powerhousedao/codegen": "
|
|
121
|
-
"@powerhousedao/connect": "
|
|
122
|
-
"@powerhousedao/ph-cli": "
|
|
123
|
-
"@powerhousedao/reactor-api": "
|
|
124
|
-
"@powerhousedao/reactor-browser": "
|
|
125
|
-
"@powerhousedao/reactor-local": "
|
|
126
|
-
"@powerhousedao/scalars": "
|
|
127
|
-
"@powerhousedao/switchboard": "
|
|
119
|
+
"@powerhousedao/analytics-engine-core": "^0.5.0",
|
|
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": "
|
|
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",
|
|
@@ -158,7 +158,5 @@
|
|
|
158
158
|
"overrides": {
|
|
159
159
|
"react": "^19.2.0",
|
|
160
160
|
"react-dom": "^19.2.0"
|
|
161
|
-
}
|
|
162
|
-
"readme": "ERROR: No README data found!",
|
|
163
|
-
"homepage": "https://github.com/powerhouse-inc/renown-package#readme"
|
|
161
|
+
}
|
|
164
162
|
}
|