@powerhousedao/network-admin 0.0.60 → 0.0.62
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/builders/actions.d.ts.map +1 -1
- package/dist/document-models/builders/gen/builders/actions.d.ts +1 -1
- package/dist/document-models/builders/gen/builders/actions.d.ts.map +1 -1
- package/dist/document-models/builders/gen/builders/actions.js +1 -1
- package/dist/document-models/builders/gen/builders/operations.d.ts +2 -2
- package/dist/document-models/builders/gen/builders/operations.d.ts.map +1 -1
- package/dist/document-models/builders/gen/builders/operations.js +0 -2
- package/dist/document-models/builders/gen/document-model.js +17 -17
- package/dist/document-models/builders/gen/document-schema.d.ts +15 -113
- package/dist/document-models/builders/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/builders/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/builders/gen/reducer.js +4 -2
- package/dist/document-models/builders/gen/schema/types.d.ts +13 -1
- package/dist/document-models/builders/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/builders/gen/schema/zod.d.ts +3 -3
- package/dist/document-models/builders/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/builders/gen/schema/zod.js +1 -1
- package/dist/document-models/builders/gen/types.d.ts.map +1 -1
- package/dist/document-models/builders/hooks.d.ts +5 -2
- package/dist/document-models/builders/hooks.d.ts.map +1 -1
- package/dist/document-models/builders/hooks.js +3 -4
- package/dist/document-models/builders/index.d.ts +0 -4
- package/dist/document-models/builders/index.d.ts.map +1 -1
- package/dist/document-models/builders/index.js +0 -4
- package/dist/document-models/builders/module.d.ts.map +1 -1
- package/dist/document-models/builders/module.js +1 -0
- package/dist/document-models/builders/tests/builders.test.d.ts +2 -0
- package/dist/document-models/builders/tests/builders.test.d.ts.map +1 -0
- package/dist/document-models/builders/tests/builders.test.js +25 -0
- package/dist/document-models/builders/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/builders/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/builders/tests/document-model.test.js +104 -0
- package/dist/document-models/index.d.ts +0 -4
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +0 -4
- package/dist/document-models/network-profile/actions.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/document-model.js +84 -84
- package/dist/document-models/network-profile/gen/document-schema.d.ts +51 -341
- package/dist/document-models/network-profile/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/network-profile-management/actions.d.ts +1 -1
- package/dist/document-models/network-profile/gen/network-profile-management/actions.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/network-profile-management/actions.js +1 -1
- package/dist/document-models/network-profile/gen/network-profile-management/operations.d.ts +2 -2
- package/dist/document-models/network-profile/gen/network-profile-management/operations.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/network-profile-management/operations.js +0 -2
- package/dist/document-models/network-profile/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/reducer.js +22 -11
- package/dist/document-models/network-profile/gen/schema/types.d.ts +13 -1
- package/dist/document-models/network-profile/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/schema/zod.d.ts +10 -4
- package/dist/document-models/network-profile/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/schema/zod.js +6 -6
- package/dist/document-models/network-profile/gen/types.d.ts.map +1 -1
- package/dist/document-models/network-profile/hooks.d.ts +5 -2
- package/dist/document-models/network-profile/hooks.d.ts.map +1 -1
- package/dist/document-models/network-profile/hooks.js +3 -4
- package/dist/document-models/network-profile/index.d.ts +0 -4
- package/dist/document-models/network-profile/index.d.ts.map +1 -1
- package/dist/document-models/network-profile/index.js +0 -4
- package/dist/document-models/network-profile/module.d.ts.map +1 -1
- package/dist/document-models/network-profile/module.js +1 -0
- package/dist/document-models/network-profile/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/network-profile/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/network-profile/tests/document-model.test.js +104 -0
- package/dist/document-models/network-profile/tests/network-profile-management.test.d.ts +2 -0
- package/dist/document-models/network-profile/tests/network-profile-management.test.d.ts.map +1 -0
- package/dist/document-models/network-profile/tests/network-profile-management.test.js +115 -0
- package/dist/document-models/payment-terms/actions.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/clauses/actions.d.ts +1 -1
- package/dist/document-models/payment-terms/gen/clauses/actions.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/clauses/actions.js +1 -1
- package/dist/document-models/payment-terms/gen/clauses/error.d.ts +1 -40
- package/dist/document-models/payment-terms/gen/clauses/error.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/clauses/error.js +1 -44
- package/dist/document-models/payment-terms/gen/clauses/operations.d.ts +2 -2
- package/dist/document-models/payment-terms/gen/clauses/operations.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/clauses/operations.js +0 -2
- package/dist/document-models/payment-terms/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/document-model.js +117 -197
- package/dist/document-models/payment-terms/gen/document-schema.d.ts +51 -325
- package/dist/document-models/payment-terms/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/milestones/actions.d.ts +1 -1
- package/dist/document-models/payment-terms/gen/milestones/actions.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/milestones/actions.js +1 -1
- package/dist/document-models/payment-terms/gen/milestones/error.d.ts +1 -26
- package/dist/document-models/payment-terms/gen/milestones/error.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/milestones/error.js +1 -26
- package/dist/document-models/payment-terms/gen/milestones/operations.d.ts +2 -2
- package/dist/document-models/payment-terms/gen/milestones/operations.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/milestones/operations.js +0 -2
- package/dist/document-models/payment-terms/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/reducer.js +32 -16
- package/dist/document-models/payment-terms/gen/schema/types.d.ts +13 -1
- package/dist/document-models/payment-terms/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/schema/zod.d.ts +35 -9
- package/dist/document-models/payment-terms/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/schema/zod.js +16 -16
- package/dist/document-models/payment-terms/gen/terms/actions.d.ts +1 -1
- package/dist/document-models/payment-terms/gen/terms/actions.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/terms/actions.js +1 -1
- package/dist/document-models/payment-terms/gen/terms/operations.d.ts +2 -2
- package/dist/document-models/payment-terms/gen/terms/operations.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/terms/operations.js +0 -2
- package/dist/document-models/payment-terms/gen/types.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/utils.js +1 -1
- package/dist/document-models/payment-terms/hooks.d.ts +5 -2
- package/dist/document-models/payment-terms/hooks.d.ts.map +1 -1
- package/dist/document-models/payment-terms/hooks.js +3 -4
- package/dist/document-models/payment-terms/index.d.ts +0 -4
- package/dist/document-models/payment-terms/index.d.ts.map +1 -1
- package/dist/document-models/payment-terms/index.js +0 -4
- package/dist/document-models/payment-terms/module.d.ts.map +1 -1
- package/dist/document-models/payment-terms/module.js +1 -0
- package/dist/document-models/payment-terms/src/reducers/clauses.d.ts.map +1 -1
- package/dist/document-models/payment-terms/src/reducers/clauses.js +6 -7
- package/dist/document-models/payment-terms/src/reducers/milestones.d.ts.map +1 -1
- package/dist/document-models/payment-terms/src/reducers/milestones.js +4 -5
- package/dist/document-models/payment-terms/tests/clauses.test.d.ts +2 -0
- package/dist/document-models/payment-terms/tests/clauses.test.d.ts.map +1 -0
- package/dist/document-models/payment-terms/tests/clauses.test.js +65 -0
- package/dist/document-models/payment-terms/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/payment-terms/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/payment-terms/tests/document-model.test.js +104 -0
- package/dist/document-models/payment-terms/tests/milestones.test.d.ts +2 -0
- package/dist/document-models/payment-terms/tests/milestones.test.d.ts.map +1 -0
- package/dist/document-models/payment-terms/tests/milestones.test.js +55 -0
- package/dist/document-models/payment-terms/tests/terms.test.d.ts +2 -0
- package/dist/document-models/payment-terms/tests/terms.test.d.ts.map +1 -0
- package/dist/document-models/payment-terms/tests/terms.test.js +55 -0
- package/dist/document-models/request-for-proposals/actions.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/contex-document/actions.d.ts +1 -1
- package/dist/document-models/request-for-proposals/gen/contex-document/actions.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/contex-document/actions.js +1 -1
- package/dist/document-models/request-for-proposals/gen/contex-document/operations.d.ts +2 -2
- package/dist/document-models/request-for-proposals/gen/contex-document/operations.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/contex-document/operations.js +0 -2
- package/dist/document-models/request-for-proposals/gen/document-model.js +50 -50
- package/dist/document-models/request-for-proposals/gen/document-schema.d.ts +54 -360
- package/dist/document-models/request-for-proposals/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/ph-factories.js +2 -2
- package/dist/document-models/request-for-proposals/gen/proposals/actions.d.ts +1 -1
- package/dist/document-models/request-for-proposals/gen/proposals/actions.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/proposals/actions.js +1 -1
- package/dist/document-models/request-for-proposals/gen/proposals/operations.d.ts +2 -2
- package/dist/document-models/request-for-proposals/gen/proposals/operations.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/proposals/operations.js +0 -2
- package/dist/document-models/request-for-proposals/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/reducer.js +12 -6
- package/dist/document-models/request-for-proposals/gen/rfp-state/actions.d.ts +1 -1
- package/dist/document-models/request-for-proposals/gen/rfp-state/actions.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/rfp-state/actions.js +1 -1
- package/dist/document-models/request-for-proposals/gen/rfp-state/operations.d.ts +2 -2
- package/dist/document-models/request-for-proposals/gen/rfp-state/operations.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/rfp-state/operations.js +0 -2
- package/dist/document-models/request-for-proposals/gen/schema/types.d.ts +13 -1
- package/dist/document-models/request-for-proposals/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/schema/zod.d.ts +66 -11
- package/dist/document-models/request-for-proposals/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/schema/zod.js +17 -17
- package/dist/document-models/request-for-proposals/gen/types.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/utils.js +2 -2
- package/dist/document-models/request-for-proposals/hooks.d.ts +5 -2
- package/dist/document-models/request-for-proposals/hooks.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/hooks.js +3 -4
- package/dist/document-models/request-for-proposals/index.d.ts +0 -4
- package/dist/document-models/request-for-proposals/index.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/index.js +0 -4
- package/dist/document-models/request-for-proposals/module.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/module.js +1 -0
- package/dist/document-models/request-for-proposals/tests/contex-document.test.d.ts +2 -0
- package/dist/document-models/request-for-proposals/tests/contex-document.test.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/tests/contex-document.test.js +25 -0
- package/dist/document-models/request-for-proposals/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/request-for-proposals/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/tests/document-model.test.js +104 -0
- package/dist/document-models/request-for-proposals/tests/proposals.test.d.ts +2 -0
- package/dist/document-models/request-for-proposals/tests/proposals.test.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/tests/proposals.test.js +35 -0
- package/dist/document-models/request-for-proposals/tests/rfp-state.test.d.ts +2 -0
- package/dist/document-models/request-for-proposals/tests/rfp-state.test.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/tests/rfp-state.test.js +15 -0
- package/dist/document-models/workstream/actions.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/document-model.js +68 -68
- package/dist/document-models/workstream/gen/document-schema.d.ts +42 -284
- package/dist/document-models/workstream/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/proposals/actions.d.ts +1 -1
- package/dist/document-models/workstream/gen/proposals/actions.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/proposals/actions.js +1 -1
- package/dist/document-models/workstream/gen/proposals/operations.d.ts +2 -2
- package/dist/document-models/workstream/gen/proposals/operations.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/proposals/operations.js +0 -2
- package/dist/document-models/workstream/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/reducer.js +18 -9
- package/dist/document-models/workstream/gen/schema/types.d.ts +13 -1
- package/dist/document-models/workstream/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/schema/zod.d.ts +37 -7
- package/dist/document-models/workstream/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/schema/zod.js +18 -18
- package/dist/document-models/workstream/gen/types.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/workstream/actions.d.ts +1 -1
- package/dist/document-models/workstream/gen/workstream/actions.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/workstream/actions.js +1 -1
- package/dist/document-models/workstream/gen/workstream/operations.d.ts +2 -2
- package/dist/document-models/workstream/gen/workstream/operations.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/workstream/operations.js +0 -2
- package/dist/document-models/workstream/hooks.d.ts +5 -2
- package/dist/document-models/workstream/hooks.d.ts.map +1 -1
- package/dist/document-models/workstream/hooks.js +3 -4
- package/dist/document-models/workstream/index.d.ts +0 -4
- package/dist/document-models/workstream/index.d.ts.map +1 -1
- package/dist/document-models/workstream/index.js +0 -4
- package/dist/document-models/workstream/module.d.ts.map +1 -1
- package/dist/document-models/workstream/module.js +1 -0
- package/dist/document-models/workstream/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/workstream/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/workstream/tests/document-model.test.js +104 -0
- package/dist/document-models/workstream/tests/proposals.test.d.ts +2 -0
- package/dist/document-models/workstream/tests/proposals.test.d.ts.map +1 -0
- package/dist/document-models/workstream/tests/proposals.test.js +45 -0
- package/dist/document-models/workstream/tests/workstream.test.d.ts +2 -0
- package/dist/document-models/workstream/tests/workstream.test.d.ts.map +1 -0
- package/dist/document-models/workstream/tests/workstream.test.js +55 -0
- package/dist/editors/builders/editor.js +2 -2
- package/dist/editors/builders/module.d.ts +1 -1
- package/dist/editors/builders/module.d.ts.map +1 -1
- package/dist/editors/builders/module.js +1 -1
- package/dist/editors/editors.js +2 -2
- package/dist/editors/index.d.ts +1 -5
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +1 -5
- package/dist/editors/network-admin/components/CreateDocument.d.ts +6 -0
- package/dist/editors/network-admin/components/CreateDocument.d.ts.map +1 -0
- package/dist/editors/network-admin/components/CreateDocument.js +18 -0
- package/dist/editors/network-admin/components/DriveContents.d.ts +3 -0
- package/dist/editors/network-admin/components/DriveContents.d.ts.map +1 -0
- package/dist/editors/network-admin/components/DriveContents.js +10 -0
- package/dist/editors/network-admin/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/network-admin/components/DriveExplorer.js +9 -212
- package/dist/editors/network-admin/components/EmptyState.d.ts +3 -0
- package/dist/editors/network-admin/components/EmptyState.d.ts.map +1 -0
- package/dist/editors/network-admin/components/EmptyState.js +10 -0
- package/dist/editors/network-admin/components/Files.d.ts +3 -0
- package/dist/editors/network-admin/components/Files.d.ts.map +1 -0
- package/dist/editors/network-admin/components/Files.js +12 -0
- package/dist/editors/network-admin/components/FolderTree.d.ts +14 -0
- package/dist/editors/network-admin/components/FolderTree.d.ts.map +1 -0
- package/dist/editors/network-admin/components/FolderTree.js +226 -0
- package/dist/editors/network-admin/components/Folders.d.ts +3 -0
- package/dist/editors/network-admin/components/Folders.d.ts.map +1 -0
- package/dist/editors/network-admin/components/Folders.js +12 -0
- package/dist/editors/network-admin/components/NavigationBreadcrumbs.d.ts +3 -0
- package/dist/editors/network-admin/components/NavigationBreadcrumbs.d.ts.map +1 -0
- package/dist/editors/network-admin/components/NavigationBreadcrumbs.js +6 -0
- package/dist/editors/network-admin/config.d.ts +1 -1
- package/dist/editors/network-admin/config.d.ts.map +1 -1
- package/dist/editors/network-admin/config.js +1 -2
- package/dist/editors/network-admin/module.d.ts +2 -1
- package/dist/editors/network-admin/module.d.ts.map +1 -1
- package/dist/editors/network-admin/module.js +1 -1
- package/dist/editors/network-profile/editor.d.ts.map +1 -1
- package/dist/editors/network-profile/editor.js +1 -1
- package/dist/editors/network-profile/module.d.ts +1 -1
- package/dist/editors/network-profile/module.d.ts.map +1 -1
- package/dist/editors/network-profile/module.js +1 -1
- package/dist/editors/payment-terms/components/clauses-section.js +2 -2
- package/dist/editors/payment-terms/components/milestones-section.d.ts.map +1 -1
- package/dist/editors/payment-terms/components/milestones-section.js +6 -38
- package/dist/editors/payment-terms/module.d.ts +1 -1
- package/dist/editors/payment-terms/module.d.ts.map +1 -1
- package/dist/editors/payment-terms/module.js +1 -1
- package/dist/editors/request-for-proposals/module.d.ts +1 -1
- package/dist/editors/request-for-proposals/module.d.ts.map +1 -1
- package/dist/editors/request-for-proposals/module.js +1 -1
- package/dist/editors/workstream/editor.d.ts.map +1 -1
- package/dist/editors/workstream/editor.js +2 -2
- package/dist/editors/workstream/module.d.ts +1 -1
- package/dist/editors/workstream/module.d.ts.map +1 -1
- package/dist/editors/workstream/module.js +1 -1
- package/dist/powerhouse.manifest.json +22 -1
- package/dist/processors/index.d.ts +1 -1
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/workstreams/factory.d.ts.map +1 -1
- package/dist/processors/workstreams/factory.js +3 -0
- package/dist/processors/workstreams/migrations.d.ts.map +1 -1
- package/dist/processors/workstreams/migrations.js +3 -5
- package/dist/scripts/sow-mirror/mirror_sow_state.js +0 -1
- package/dist/style.css +3380 -676
- package/dist/subgraphs/index.d.ts +0 -5
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/subgraphs/index.js +0 -5
- package/dist/subgraphs/workstreams/index.d.ts +4 -1
- package/dist/subgraphs/workstreams/index.d.ts.map +1 -1
- package/dist/subgraphs/workstreams/index.js +6 -0
- package/dist/subgraphs/workstreams/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/workstreams/resolvers.js +22 -6
- package/dist/subgraphs/workstreams/schema.d.ts.map +1 -1
- package/dist/subgraphs/workstreams/schema.js +1 -3
- package/package.json +21 -20
- package/dist/subgraphs/builders/index.d.ts +0 -11
- package/dist/subgraphs/builders/index.d.ts.map +0 -1
- package/dist/subgraphs/builders/index.js +0 -11
- package/dist/subgraphs/builders/resolvers.d.ts +0 -3
- package/dist/subgraphs/builders/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/builders/resolvers.js +0 -96
- package/dist/subgraphs/builders/schema.d.ts +0 -3
- package/dist/subgraphs/builders/schema.d.ts.map +0 -1
- package/dist/subgraphs/builders/schema.js +0 -42
- package/dist/subgraphs/network-profile/index.d.ts +0 -11
- package/dist/subgraphs/network-profile/index.d.ts.map +0 -1
- package/dist/subgraphs/network-profile/index.js +0 -11
- package/dist/subgraphs/network-profile/resolvers.d.ts +0 -3
- package/dist/subgraphs/network-profile/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/network-profile/resolvers.js +0 -204
- package/dist/subgraphs/network-profile/schema.d.ts +0 -3
- package/dist/subgraphs/network-profile/schema.d.ts.map +0 -1
- package/dist/subgraphs/network-profile/schema.js +0 -116
- package/dist/subgraphs/payment-terms/index.d.ts +0 -11
- package/dist/subgraphs/payment-terms/index.d.ts.map +0 -1
- package/dist/subgraphs/payment-terms/index.js +0 -11
- package/dist/subgraphs/payment-terms/resolvers.d.ts +0 -3
- package/dist/subgraphs/payment-terms/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/payment-terms/resolvers.js +0 -264
- package/dist/subgraphs/payment-terms/schema.d.ts +0 -3
- package/dist/subgraphs/payment-terms/schema.d.ts.map +0 -1
- package/dist/subgraphs/payment-terms/schema.js +0 -199
- package/dist/subgraphs/request-for-proposals/index.d.ts +0 -11
- package/dist/subgraphs/request-for-proposals/index.d.ts.map +0 -1
- package/dist/subgraphs/request-for-proposals/index.js +0 -11
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts +0 -3
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/request-for-proposals/resolvers.js +0 -144
- package/dist/subgraphs/request-for-proposals/schema.d.ts +0 -3
- package/dist/subgraphs/request-for-proposals/schema.d.ts.map +0 -1
- package/dist/subgraphs/request-for-proposals/schema.js +0 -141
- package/dist/subgraphs/workstream/index.d.ts +0 -11
- package/dist/subgraphs/workstream/index.d.ts.map +0 -1
- package/dist/subgraphs/workstream/index.js +0 -11
- package/dist/subgraphs/workstream/resolvers.d.ts +0 -3
- package/dist/subgraphs/workstream/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/workstream/resolvers.js +0 -180
- package/dist/subgraphs/workstream/schema.d.ts +0 -3
- package/dist/subgraphs/workstream/schema.d.ts.map +0 -1
- package/dist/subgraphs/workstream/schema.js +0 -146
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.d.ts.map +0 -1
- package/dist/vitest.config.js +0 -8
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
export * as NetworkProfileSubgraph from "./network-profile/index.js";
|
|
2
|
-
export * as PaymentTermsSubgraph from "./payment-terms/index.js";
|
|
3
|
-
export * as RequestForProposalsSubgraph from "./request-for-proposals/index.js";
|
|
4
|
-
export * as WorkstreamSubgraph from "./workstream/index.js";
|
|
5
1
|
export * as WorkstreamsSubgraph from "./workstreams/index.js";
|
|
6
2
|
export * as NetworksSubgraph from "./networks/index.js";
|
|
7
|
-
export * as BuildersSubgraph from "./builders/index.js";
|
|
8
3
|
export * as BuildersAddonSubgraph from "./builders-addon/index.js";
|
|
9
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../subgraphs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../subgraphs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,gBAAgB,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,qBAAqB,MAAM,2BAA2B,CAAC"}
|
package/dist/subgraphs/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export * as NetworkProfileSubgraph from "./network-profile/index.js";
|
|
2
|
-
export * as PaymentTermsSubgraph from "./payment-terms/index.js";
|
|
3
|
-
export * as RequestForProposalsSubgraph from "./request-for-proposals/index.js";
|
|
4
|
-
export * as WorkstreamSubgraph from "./workstream/index.js";
|
|
5
1
|
export * as WorkstreamsSubgraph from "./workstreams/index.js";
|
|
6
2
|
export * as NetworksSubgraph from "./networks/index.js";
|
|
7
|
-
export * as BuildersSubgraph from "./builders/index.js";
|
|
8
3
|
export * as BuildersAddonSubgraph from "./builders-addon/index.js";
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
1
|
+
import { BaseSubgraph, type SubgraphArgs } from "@powerhousedao/reactor-api";
|
|
2
|
+
import { type IAnalyticsStore } from "@powerhousedao/analytics-engine-core";
|
|
2
3
|
import type { DocumentNode } from "graphql";
|
|
3
4
|
export declare class WorkstreamsSubgraph extends BaseSubgraph {
|
|
4
5
|
name: string;
|
|
5
6
|
typeDefs: DocumentNode;
|
|
6
7
|
resolvers: Record<string, unknown>;
|
|
7
8
|
additionalContextFields: {};
|
|
9
|
+
analyticsStore: IAnalyticsStore;
|
|
10
|
+
constructor(args: SubgraphArgs);
|
|
8
11
|
onSetup(): Promise<void>;
|
|
9
12
|
onDisconnect(): Promise<void>;
|
|
10
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../subgraphs/workstreams/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../subgraphs/workstreams/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,qBAAa,mBAAoB,SAAQ,YAAY;IACnD,IAAI,SAAiB;IACrB,QAAQ,EAAE,YAAY,CAAU;IAChC,SAAS,0BAAsB;IAC/B,uBAAuB,KAAM;IAE7B,cAAc,EAAE,eAAe,CAAC;gBAEpB,IAAI,EAAE,YAAY;IAKxB,OAAO;IACP,YAAY;CACnB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
2
|
+
import {} from "@powerhousedao/analytics-engine-core";
|
|
2
3
|
import { schema } from "./schema.js";
|
|
3
4
|
import { getResolvers } from "./resolvers.js";
|
|
4
5
|
export class WorkstreamsSubgraph extends BaseSubgraph {
|
|
@@ -6,6 +7,11 @@ export class WorkstreamsSubgraph extends BaseSubgraph {
|
|
|
6
7
|
typeDefs = schema;
|
|
7
8
|
resolvers = getResolvers(this);
|
|
8
9
|
additionalContextFields = {};
|
|
10
|
+
analyticsStore;
|
|
11
|
+
constructor(args) {
|
|
12
|
+
super(args);
|
|
13
|
+
this.analyticsStore = args.analyticsStore;
|
|
14
|
+
}
|
|
9
15
|
async onSetup() { }
|
|
10
16
|
async onDisconnect() { }
|
|
11
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/workstreams/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAuC5D,eAAO,MAAM,YAAY,GAAI,UAAU,SAAS,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/workstreams/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAuC5D,eAAO,MAAM,YAAY,GAAI,UAAU,SAAS,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAi9BxE,CAAC"}
|
|
@@ -24,11 +24,19 @@ export const getResolvers = (subgraph) => {
|
|
|
24
24
|
}
|
|
25
25
|
return null;
|
|
26
26
|
};
|
|
27
|
+
// Normalize drive IDs to match the format used by the processor factory
|
|
28
|
+
// reactor.getDrives() returns base64-like IDs (with + and =)
|
|
29
|
+
// but driveHeader.id in the factory uses - instead of +
|
|
30
|
+
// TODO: Report this inconsistency to @powerhousedao packages
|
|
31
|
+
const normalizeDriveId = (driveId) => {
|
|
32
|
+
return driveId.replace(/\+/g, "-").replace(/=+$/, "");
|
|
33
|
+
};
|
|
27
34
|
const getCandidateDrives = async () => {
|
|
28
35
|
try {
|
|
29
36
|
const drives = await reactor.getDrives?.();
|
|
30
|
-
if (Array.isArray(drives) && drives.length > 0)
|
|
31
|
-
return drives;
|
|
37
|
+
if (Array.isArray(drives) && drives.length > 0) {
|
|
38
|
+
return drives.map(normalizeDriveId);
|
|
39
|
+
}
|
|
32
40
|
}
|
|
33
41
|
catch { }
|
|
34
42
|
return [];
|
|
@@ -327,10 +335,18 @@ export const getResolvers = (subgraph) => {
|
|
|
327
335
|
processorWorkstreams: async () => {
|
|
328
336
|
const drives = await getCandidateDrives();
|
|
329
337
|
const allProcessorWorkstreams = await Promise.all(drives.map(async (driveId) => {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
.
|
|
338
|
+
const namespace = WorkstreamsProcessor.getNamespace(driveId);
|
|
339
|
+
console.log(`[WorkstreamsProcessor] Resolver querying drive: ${driveId}, namespace: ${namespace}`);
|
|
340
|
+
try {
|
|
341
|
+
return await WorkstreamsProcessor.query(driveId, db)
|
|
342
|
+
.selectFrom("workstreams")
|
|
343
|
+
.selectAll()
|
|
344
|
+
.execute();
|
|
345
|
+
}
|
|
346
|
+
catch (error) {
|
|
347
|
+
console.warn(`[WorkstreamsProcessor] Failed to query namespace ${namespace}:`, error);
|
|
348
|
+
return []; // Return empty array if table doesn't exist for this drive
|
|
349
|
+
}
|
|
334
350
|
}));
|
|
335
351
|
// Flatten the array of arrays into a single array
|
|
336
352
|
const flattenedWorkstreams = allProcessorWorkstreams.flat();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../subgraphs/workstreams/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../subgraphs/workstreams/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,YAogBpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/network-admin",
|
|
3
3
|
"description": "Network Admin package for Powerhouse",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.62",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"test": "vitest run",
|
|
47
47
|
"test:watch": "vitest",
|
|
48
48
|
"lint": "eslint --config eslint.config.js --cache --cache-strategy content",
|
|
49
|
-
"lint:fix": "npm run lint --fix",
|
|
49
|
+
"lint:fix": "npm run lint -- --fix",
|
|
50
50
|
"tsc": "tsc",
|
|
51
51
|
"tsc:watch": "tsc --watch",
|
|
52
52
|
"tailwind": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
|
|
@@ -62,14 +62,15 @@
|
|
|
62
62
|
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@powerhousedao/builder-profile": "0.0.
|
|
66
|
-
"@powerhousedao/builder-tools": "
|
|
67
|
-
"@powerhousedao/common": "
|
|
68
|
-
"@powerhousedao/design-system": "
|
|
69
|
-
"@powerhousedao/document-engineering": "^1.
|
|
70
|
-
"@powerhousedao/project-management": "0.0.
|
|
65
|
+
"@powerhousedao/builder-profile": "^0.0.15",
|
|
66
|
+
"@powerhousedao/builder-tools": "5.3.0-staging.13",
|
|
67
|
+
"@powerhousedao/common": "5.3.0-staging.13",
|
|
68
|
+
"@powerhousedao/design-system": "5.3.0-staging.13",
|
|
69
|
+
"@powerhousedao/document-engineering": "^1.40.1",
|
|
70
|
+
"@powerhousedao/project-management": "0.0.67",
|
|
71
|
+
"@powerhousedao/vetra": "^5.3.0-staging.13",
|
|
71
72
|
"@uiw/react-md-editor": "^4.0.8",
|
|
72
|
-
"document-model": "
|
|
73
|
+
"document-model": "5.3.0-staging.13",
|
|
73
74
|
"error": "^10.4.0",
|
|
74
75
|
"graphql": "^16.10.0",
|
|
75
76
|
"graphql-tag": "^2.12.6",
|
|
@@ -77,27 +78,27 @@
|
|
|
77
78
|
"luxon": "^3.7.2",
|
|
78
79
|
"rehype-slug": "^6.0.0",
|
|
79
80
|
"remark-gfm": "^4.0.1",
|
|
80
|
-
"zod": "^3.
|
|
81
|
+
"zod": "^v4.3.6"
|
|
81
82
|
},
|
|
82
83
|
"devDependencies": {
|
|
83
84
|
"@electric-sql/pglite": "^0.2.12",
|
|
84
85
|
"@eslint/js": "^9.38.0",
|
|
85
86
|
"@powerhousedao/analytics-engine-core": "^0.5.0",
|
|
86
|
-
"@powerhousedao/codegen": "
|
|
87
|
-
"@powerhousedao/config": "
|
|
88
|
-
"@powerhousedao/connect": "
|
|
89
|
-
"@powerhousedao/ph-cli": "
|
|
90
|
-
"@powerhousedao/reactor-api": "
|
|
91
|
-
"@powerhousedao/reactor-browser": "
|
|
92
|
-
"@powerhousedao/reactor-local": "
|
|
87
|
+
"@powerhousedao/codegen": "5.3.0-staging.13",
|
|
88
|
+
"@powerhousedao/config": "5.3.0-staging.13",
|
|
89
|
+
"@powerhousedao/connect": "5.3.0-staging.13",
|
|
90
|
+
"@powerhousedao/ph-cli": "5.3.0-staging.13",
|
|
91
|
+
"@powerhousedao/reactor-api": "5.3.0-staging.13",
|
|
92
|
+
"@powerhousedao/reactor-browser": "5.3.0-staging.13",
|
|
93
|
+
"@powerhousedao/reactor-local": "5.3.0-staging.13",
|
|
93
94
|
"@powerhousedao/scalars": "staging",
|
|
94
|
-
"@powerhousedao/switchboard": "
|
|
95
|
+
"@powerhousedao/switchboard": "5.3.0-staging.13",
|
|
95
96
|
"@tailwindcss/cli": "^4.1.4",
|
|
96
97
|
"@testing-library/react": "^16.3.0",
|
|
97
98
|
"@types/node": "^24.9.2",
|
|
98
99
|
"@types/react": "^19.2.2",
|
|
99
100
|
"@vitejs/plugin-react": "^5.1.0",
|
|
100
|
-
"document-drive": "
|
|
101
|
+
"document-drive": "5.3.0-staging.13",
|
|
101
102
|
"eslint": "^9.38.0",
|
|
102
103
|
"eslint-config-prettier": "^10.1.8",
|
|
103
104
|
"eslint-plugin-prettier": "^5.5.4",
|
|
@@ -120,5 +121,5 @@
|
|
|
120
121
|
"react-dom": "^19.2.0"
|
|
121
122
|
},
|
|
122
123
|
"readme": "ERROR: No README data found!",
|
|
123
|
-
"_id": "@powerhousedao/network-admin@0.0.
|
|
124
|
+
"_id": "@powerhousedao/network-admin@0.0.60"
|
|
124
125
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import type { DocumentNode } from "graphql";
|
|
3
|
-
export declare class BuildersSubgraph extends BaseSubgraph {
|
|
4
|
-
name: string;
|
|
5
|
-
typeDefs: DocumentNode;
|
|
6
|
-
resolvers: Record<string, unknown>;
|
|
7
|
-
additionalContextFields: {};
|
|
8
|
-
onSetup(): Promise<void>;
|
|
9
|
-
onDisconnect(): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../subgraphs/builders/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,IAAI,SAAc;IAClB,QAAQ,EAAE,YAAY,CAAU;IAChC,SAAS,0BAAsB;IAC/B,uBAAuB,KAAM;IACvB,OAAO;IACP,YAAY;CACnB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import { schema } from "./schema.js";
|
|
3
|
-
import { getResolvers } from "./resolvers.js";
|
|
4
|
-
export class BuildersSubgraph extends BaseSubgraph {
|
|
5
|
-
name = "builders";
|
|
6
|
-
typeDefs = schema;
|
|
7
|
-
resolvers = getResolvers(this);
|
|
8
|
-
additionalContextFields = {};
|
|
9
|
-
async onSetup() { }
|
|
10
|
-
async onDisconnect() { }
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/builders/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAc/D,eAAO,MAAM,YAAY,GACvB,UAAU,YAAY,KACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CAoIxB,CAAC"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { addFile } from "document-drive";
|
|
2
|
-
import { setName } from "document-model";
|
|
3
|
-
import { actions, buildersDocumentType, } from "@powerhousedao/network-admin/document-models/builders";
|
|
4
|
-
export const getResolvers = (subgraph) => {
|
|
5
|
-
const reactor = subgraph.reactor;
|
|
6
|
-
return {
|
|
7
|
-
Query: {
|
|
8
|
-
Builders: async () => {
|
|
9
|
-
return {
|
|
10
|
-
getDocument: async (args) => {
|
|
11
|
-
const { docId, driveId } = args;
|
|
12
|
-
if (!docId) {
|
|
13
|
-
throw new Error("Document id is required");
|
|
14
|
-
}
|
|
15
|
-
if (driveId) {
|
|
16
|
-
const docIds = await reactor.getDocuments(driveId);
|
|
17
|
-
if (!docIds.includes(docId)) {
|
|
18
|
-
throw new Error(`Document with id ${docId} is not part of ${driveId}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const doc = await reactor.getDocument(docId);
|
|
22
|
-
return {
|
|
23
|
-
driveId: driveId,
|
|
24
|
-
...doc,
|
|
25
|
-
...doc.header,
|
|
26
|
-
created: doc.header.createdAtUtcIso,
|
|
27
|
-
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
28
|
-
state: doc.state.global,
|
|
29
|
-
stateJSON: doc.state.global,
|
|
30
|
-
revision: doc.header?.revision?.global ?? 0,
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
getDocuments: async (args) => {
|
|
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);
|
|
38
|
-
return {
|
|
39
|
-
driveId: driveId,
|
|
40
|
-
...doc,
|
|
41
|
-
...doc.header,
|
|
42
|
-
created: doc.header.createdAtUtcIso,
|
|
43
|
-
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
44
|
-
state: doc.state.global,
|
|
45
|
-
stateJSON: doc.state.global,
|
|
46
|
-
revision: doc.header?.revision?.global ?? 0,
|
|
47
|
-
};
|
|
48
|
-
}));
|
|
49
|
-
return docs.filter((doc) => doc.header.documentType === buildersDocumentType);
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
Mutation: {
|
|
55
|
-
Builders_createDocument: async (_, args) => {
|
|
56
|
-
const { driveId, name } = args;
|
|
57
|
-
const document = await reactor.addDocument(buildersDocumentType);
|
|
58
|
-
if (driveId) {
|
|
59
|
-
await reactor.addAction(driveId, addFile({
|
|
60
|
-
name,
|
|
61
|
-
id: document.header.id,
|
|
62
|
-
documentType: buildersDocumentType,
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
if (name) {
|
|
66
|
-
await reactor.addAction(document.header.id, setName(name));
|
|
67
|
-
}
|
|
68
|
-
return document.header.id;
|
|
69
|
-
},
|
|
70
|
-
Builders_addBuilder: async (_, args) => {
|
|
71
|
-
const { docId, input } = args;
|
|
72
|
-
const doc = await reactor.getDocument(docId);
|
|
73
|
-
if (!doc) {
|
|
74
|
-
throw new Error("Document not found");
|
|
75
|
-
}
|
|
76
|
-
const result = await reactor.addAction(docId, actions.addBuilder(input));
|
|
77
|
-
if (result.status !== "SUCCESS") {
|
|
78
|
-
throw new Error(result.error?.message ?? "Failed to addBuilder");
|
|
79
|
-
}
|
|
80
|
-
return true;
|
|
81
|
-
},
|
|
82
|
-
Builders_removeBuilder: async (_, args) => {
|
|
83
|
-
const { docId, input } = args;
|
|
84
|
-
const doc = await reactor.getDocument(docId);
|
|
85
|
-
if (!doc) {
|
|
86
|
-
throw new Error("Document not found");
|
|
87
|
-
}
|
|
88
|
-
const result = await reactor.addAction(docId, actions.removeBuilder(input));
|
|
89
|
-
if (result.status !== "SUCCESS") {
|
|
90
|
-
throw new Error(result.error?.message ?? "Failed to removeBuilder");
|
|
91
|
-
}
|
|
92
|
-
return true;
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../subgraphs/builders/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,YAwCpB,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { gql } from "graphql-tag";
|
|
2
|
-
export const schema = gql `
|
|
3
|
-
"""
|
|
4
|
-
Queries: Builders Document
|
|
5
|
-
"""
|
|
6
|
-
type BuildersQueries {
|
|
7
|
-
getDocument(docId: PHID!, driveId: PHID): Builders
|
|
8
|
-
getDocuments(driveId: String!): [Builders!]
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
type Query {
|
|
12
|
-
Builders: BuildersQueries
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
"""
|
|
16
|
-
Mutations: Builders
|
|
17
|
-
"""
|
|
18
|
-
type Mutation {
|
|
19
|
-
Builders_createDocument(name: String!, driveId: String): String
|
|
20
|
-
|
|
21
|
-
Builders_addBuilder(
|
|
22
|
-
driveId: String
|
|
23
|
-
docId: PHID
|
|
24
|
-
input: Builders_AddBuilderInput
|
|
25
|
-
): Int
|
|
26
|
-
Builders_removeBuilder(
|
|
27
|
-
driveId: String
|
|
28
|
-
docId: PHID
|
|
29
|
-
input: Builders_RemoveBuilderInput
|
|
30
|
-
): Int
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
"""
|
|
34
|
-
Module: Builders
|
|
35
|
-
"""
|
|
36
|
-
input Builders_AddBuilderInput {
|
|
37
|
-
builderPhid: PHID!
|
|
38
|
-
}
|
|
39
|
-
input Builders_RemoveBuilderInput {
|
|
40
|
-
builderPhid: PHID!
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import type { DocumentNode } from "graphql";
|
|
3
|
-
export declare class NetworkProfileSubgraph extends BaseSubgraph {
|
|
4
|
-
name: string;
|
|
5
|
-
typeDefs: DocumentNode;
|
|
6
|
-
resolvers: Record<string, unknown>;
|
|
7
|
-
additionalContextFields: {};
|
|
8
|
-
onSetup(): Promise<void>;
|
|
9
|
-
onDisconnect(): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../subgraphs/network-profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,qBAAa,sBAAuB,SAAQ,YAAY;IACtD,IAAI,SAAqB;IACzB,QAAQ,EAAE,YAAY,CAAU;IAChC,SAAS,0BAAsB;IAC/B,uBAAuB,KAAM;IACvB,OAAO;IACP,YAAY;CACnB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import { schema } from "./schema.js";
|
|
3
|
-
import { getResolvers } from "./resolvers.js";
|
|
4
|
-
export class NetworkProfileSubgraph extends BaseSubgraph {
|
|
5
|
-
name = "network-profile";
|
|
6
|
-
typeDefs = schema;
|
|
7
|
-
resolvers = getResolvers(this);
|
|
8
|
-
additionalContextFields = {};
|
|
9
|
-
async onSetup() { }
|
|
10
|
-
async onDisconnect() { }
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/network-profile/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAuB/D,eAAO,MAAM,YAAY,GACvB,UAAU,YAAY,KACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CAgUxB,CAAC"}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { addFile } from "document-drive";
|
|
2
|
-
import { setName } from "document-model";
|
|
3
|
-
import { actions, networkProfileDocumentType, } from "@powerhousedao/network-admin/document-models/network-profile";
|
|
4
|
-
export const getResolvers = (subgraph) => {
|
|
5
|
-
const reactor = subgraph.reactor;
|
|
6
|
-
return {
|
|
7
|
-
Query: {
|
|
8
|
-
NetworkProfile: async () => {
|
|
9
|
-
return {
|
|
10
|
-
getDocument: async (args) => {
|
|
11
|
-
const { docId, driveId } = args;
|
|
12
|
-
if (!docId) {
|
|
13
|
-
throw new Error("Document id is required");
|
|
14
|
-
}
|
|
15
|
-
if (driveId) {
|
|
16
|
-
const docIds = await reactor.getDocuments(driveId);
|
|
17
|
-
if (!docIds.includes(docId)) {
|
|
18
|
-
throw new Error(`Document with id ${docId} is not part of ${driveId}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const doc = await reactor.getDocument(docId);
|
|
22
|
-
return {
|
|
23
|
-
driveId: driveId,
|
|
24
|
-
...doc,
|
|
25
|
-
...doc.header,
|
|
26
|
-
created: doc.header.createdAtUtcIso,
|
|
27
|
-
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
28
|
-
state: doc.state.global,
|
|
29
|
-
stateJSON: doc.state.global,
|
|
30
|
-
revision: doc.header?.revision?.global ?? 0,
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
getDocuments: async (args) => {
|
|
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);
|
|
38
|
-
return {
|
|
39
|
-
driveId: driveId,
|
|
40
|
-
...doc,
|
|
41
|
-
...doc.header,
|
|
42
|
-
created: doc.header.createdAtUtcIso,
|
|
43
|
-
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
44
|
-
state: doc.state.global,
|
|
45
|
-
stateJSON: doc.state.global,
|
|
46
|
-
revision: doc.header?.revision?.global ?? 0,
|
|
47
|
-
};
|
|
48
|
-
}));
|
|
49
|
-
return docs.filter((doc) => doc.header.documentType === networkProfileDocumentType);
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
Mutation: {
|
|
55
|
-
NetworkProfile_createDocument: async (_, args) => {
|
|
56
|
-
const { driveId, name } = args;
|
|
57
|
-
const document = await reactor.addDocument(networkProfileDocumentType);
|
|
58
|
-
if (driveId) {
|
|
59
|
-
await reactor.addAction(driveId, addFile({
|
|
60
|
-
name,
|
|
61
|
-
id: document.header.id,
|
|
62
|
-
documentType: networkProfileDocumentType,
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
if (name) {
|
|
66
|
-
await reactor.addAction(document.header.id, setName(name));
|
|
67
|
-
}
|
|
68
|
-
return document.header.id;
|
|
69
|
-
},
|
|
70
|
-
NetworkProfile_setIcon: async (_, args) => {
|
|
71
|
-
const { docId, input } = args;
|
|
72
|
-
const doc = await reactor.getDocument(docId);
|
|
73
|
-
if (!doc) {
|
|
74
|
-
throw new Error("Document not found");
|
|
75
|
-
}
|
|
76
|
-
const result = await reactor.addAction(docId, actions.setIcon(input));
|
|
77
|
-
if (result.status !== "SUCCESS") {
|
|
78
|
-
throw new Error(result.error?.message ?? "Failed to setIcon");
|
|
79
|
-
}
|
|
80
|
-
return true;
|
|
81
|
-
},
|
|
82
|
-
NetworkProfile_setLogo: async (_, args) => {
|
|
83
|
-
const { docId, input } = args;
|
|
84
|
-
const doc = await reactor.getDocument(docId);
|
|
85
|
-
if (!doc) {
|
|
86
|
-
throw new Error("Document not found");
|
|
87
|
-
}
|
|
88
|
-
const result = await reactor.addAction(docId, actions.setLogo(input));
|
|
89
|
-
if (result.status !== "SUCCESS") {
|
|
90
|
-
throw new Error(result.error?.message ?? "Failed to setLogo");
|
|
91
|
-
}
|
|
92
|
-
return true;
|
|
93
|
-
},
|
|
94
|
-
NetworkProfile_setLogoBig: async (_, args) => {
|
|
95
|
-
const { docId, input } = args;
|
|
96
|
-
const doc = await reactor.getDocument(docId);
|
|
97
|
-
if (!doc) {
|
|
98
|
-
throw new Error("Document not found");
|
|
99
|
-
}
|
|
100
|
-
const result = await reactor.addAction(docId, actions.setLogoBig(input));
|
|
101
|
-
if (result.status !== "SUCCESS") {
|
|
102
|
-
throw new Error(result.error?.message ?? "Failed to setLogoBig");
|
|
103
|
-
}
|
|
104
|
-
return true;
|
|
105
|
-
},
|
|
106
|
-
NetworkProfile_setWebsite: async (_, args) => {
|
|
107
|
-
const { docId, input } = args;
|
|
108
|
-
const doc = await reactor.getDocument(docId);
|
|
109
|
-
if (!doc) {
|
|
110
|
-
throw new Error("Document not found");
|
|
111
|
-
}
|
|
112
|
-
const result = await reactor.addAction(docId, actions.setWebsite(input));
|
|
113
|
-
if (result.status !== "SUCCESS") {
|
|
114
|
-
throw new Error(result.error?.message ?? "Failed to setWebsite");
|
|
115
|
-
}
|
|
116
|
-
return true;
|
|
117
|
-
},
|
|
118
|
-
NetworkProfile_setDescription: async (_, args) => {
|
|
119
|
-
const { docId, input } = args;
|
|
120
|
-
const doc = await reactor.getDocument(docId);
|
|
121
|
-
if (!doc) {
|
|
122
|
-
throw new Error("Document not found");
|
|
123
|
-
}
|
|
124
|
-
const result = await reactor.addAction(docId, actions.setDescription(input));
|
|
125
|
-
if (result.status !== "SUCCESS") {
|
|
126
|
-
throw new Error(result.error?.message ?? "Failed to setDescription");
|
|
127
|
-
}
|
|
128
|
-
return true;
|
|
129
|
-
},
|
|
130
|
-
NetworkProfile_setCategory: async (_, args) => {
|
|
131
|
-
const { docId, input } = args;
|
|
132
|
-
const doc = await reactor.getDocument(docId);
|
|
133
|
-
if (!doc) {
|
|
134
|
-
throw new Error("Document not found");
|
|
135
|
-
}
|
|
136
|
-
const result = await reactor.addAction(docId, actions.setCategory(input));
|
|
137
|
-
if (result.status !== "SUCCESS") {
|
|
138
|
-
throw new Error(result.error?.message ?? "Failed to setCategory");
|
|
139
|
-
}
|
|
140
|
-
return true;
|
|
141
|
-
},
|
|
142
|
-
NetworkProfile_setX: async (_, args) => {
|
|
143
|
-
const { docId, input } = args;
|
|
144
|
-
const doc = await reactor.getDocument(docId);
|
|
145
|
-
if (!doc) {
|
|
146
|
-
throw new Error("Document not found");
|
|
147
|
-
}
|
|
148
|
-
const result = await reactor.addAction(docId, actions.setX(input));
|
|
149
|
-
if (result.status !== "SUCCESS") {
|
|
150
|
-
throw new Error(result.error?.message ?? "Failed to setX");
|
|
151
|
-
}
|
|
152
|
-
return true;
|
|
153
|
-
},
|
|
154
|
-
NetworkProfile_setGithub: async (_, args) => {
|
|
155
|
-
const { docId, input } = args;
|
|
156
|
-
const doc = await reactor.getDocument(docId);
|
|
157
|
-
if (!doc) {
|
|
158
|
-
throw new Error("Document not found");
|
|
159
|
-
}
|
|
160
|
-
const result = await reactor.addAction(docId, actions.setGithub(input));
|
|
161
|
-
if (result.status !== "SUCCESS") {
|
|
162
|
-
throw new Error(result.error?.message ?? "Failed to setGithub");
|
|
163
|
-
}
|
|
164
|
-
return true;
|
|
165
|
-
},
|
|
166
|
-
NetworkProfile_setDiscord: async (_, args) => {
|
|
167
|
-
const { docId, input } = args;
|
|
168
|
-
const doc = await reactor.getDocument(docId);
|
|
169
|
-
if (!doc) {
|
|
170
|
-
throw new Error("Document not found");
|
|
171
|
-
}
|
|
172
|
-
const result = await reactor.addAction(docId, actions.setDiscord(input));
|
|
173
|
-
if (result.status !== "SUCCESS") {
|
|
174
|
-
throw new Error(result.error?.message ?? "Failed to setDiscord");
|
|
175
|
-
}
|
|
176
|
-
return true;
|
|
177
|
-
},
|
|
178
|
-
NetworkProfile_setYoutube: async (_, args) => {
|
|
179
|
-
const { docId, input } = args;
|
|
180
|
-
const doc = await reactor.getDocument(docId);
|
|
181
|
-
if (!doc) {
|
|
182
|
-
throw new Error("Document not found");
|
|
183
|
-
}
|
|
184
|
-
const result = await reactor.addAction(docId, actions.setYoutube(input));
|
|
185
|
-
if (result.status !== "SUCCESS") {
|
|
186
|
-
throw new Error(result.error?.message ?? "Failed to setYoutube");
|
|
187
|
-
}
|
|
188
|
-
return true;
|
|
189
|
-
},
|
|
190
|
-
NetworkProfile_setProfileName: async (_, args) => {
|
|
191
|
-
const { docId, input } = args;
|
|
192
|
-
const doc = await reactor.getDocument(docId);
|
|
193
|
-
if (!doc) {
|
|
194
|
-
throw new Error("Document not found");
|
|
195
|
-
}
|
|
196
|
-
const result = await reactor.addAction(docId, actions.setProfileName(input));
|
|
197
|
-
if (result.status !== "SUCCESS") {
|
|
198
|
-
throw new Error(result.error?.message ?? "Failed to setProfileName");
|
|
199
|
-
}
|
|
200
|
-
return true;
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
};
|
|
204
|
-
};
|