@powerhousedao/shared 6.2.3-dev.3 → 6.2.3-dev.31
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/analytics/index.d.ts +4 -4
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +25 -24
- package/dist/analytics/index.js.map +1 -1
- package/dist/clis/args/{access-token-To5LaIfL.mjs → access-token-3Hqv_U8I.mjs} +2 -2
- package/dist/clis/args/{access-token-To5LaIfL.mjs.map → access-token-3Hqv_U8I.mjs.map} +1 -1
- package/dist/clis/args/access-token-C5sKsH2O.d.mts +16 -0
- package/dist/clis/args/access-token-C5sKsH2O.d.mts.map +1 -0
- package/dist/clis/args/access-token.d.mts +3 -2
- package/dist/clis/args/access-token.mjs +1 -1
- package/dist/clis/args/{common-CcYbXrBx.mjs → common-BXabdhiO.mjs} +30 -7
- package/dist/clis/args/common-BXabdhiO.mjs.map +1 -0
- package/dist/clis/args/common-Bnm859xU.d.mts +186 -0
- package/dist/clis/args/common-Bnm859xU.d.mts.map +1 -0
- package/dist/clis/args/common.d.mts +3 -2
- package/dist/clis/args/common.mjs +1 -1
- package/dist/clis/args/{connect-BVVvCmL9.mjs → connect-BG3HkYBk.mjs} +8 -3
- package/dist/clis/args/connect-BG3HkYBk.mjs.map +1 -0
- package/dist/clis/args/connect-DjeiqXus.d.mts +450 -0
- package/dist/clis/args/connect-DjeiqXus.d.mts.map +1 -0
- package/dist/clis/args/connect.d.mts +3 -2
- package/dist/clis/args/connect.mjs +1 -1
- package/dist/clis/args/{generate-CA916Fvj.mjs → generate-BOItUNvP.mjs} +40 -2
- package/dist/clis/args/generate-BOItUNvP.mjs.map +1 -0
- package/dist/clis/args/generate-BPBBLeUD.d.mts +103 -0
- package/dist/clis/args/generate-BPBBLeUD.d.mts.map +1 -0
- package/dist/clis/args/generate.d.mts +3 -2
- package/dist/clis/args/generate.mjs +1 -1
- package/dist/clis/args/{help-Bqbgbalu.mjs → help-DS1NlcJQ.mjs} +15 -15
- package/dist/clis/args/{help-Bqbgbalu.mjs.map → help-DS1NlcJQ.mjs.map} +1 -1
- package/dist/clis/args/help-DVPTARGn.d.mts +190 -0
- package/dist/clis/args/help-DVPTARGn.d.mts.map +1 -0
- package/dist/clis/args/help.d.mts +3 -2
- package/dist/clis/args/help.mjs +1 -1
- package/dist/clis/args/index.d.mts +20 -19
- package/dist/clis/args/index.mjs +18 -18
- package/dist/clis/args/init-CFeTq4Cq.d.mts +52 -0
- package/dist/clis/args/init-CFeTq4Cq.d.mts.map +1 -0
- package/dist/clis/args/{init-rz9Ei7nq.mjs → init-Dvb42Y87.mjs} +2 -2
- package/dist/clis/args/{init-rz9Ei7nq.mjs.map → init-Dvb42Y87.mjs.map} +1 -1
- package/dist/clis/args/init.d.mts +3 -2
- package/dist/clis/args/init.mjs +1 -1
- package/dist/clis/args/inspect-BjRmtB86.d.mts +13 -0
- package/dist/clis/args/inspect-BjRmtB86.d.mts.map +1 -0
- package/dist/clis/args/{inspect-tckH8mSw.mjs → inspect-UNQgtuR0.mjs} +2 -2
- package/dist/clis/args/{inspect-tckH8mSw.mjs.map → inspect-UNQgtuR0.mjs.map} +1 -1
- package/dist/clis/args/inspect.d.mts +3 -2
- package/dist/clis/args/inspect.mjs +1 -1
- package/dist/clis/args/install-B0tMyUMw.d.mts +37 -0
- package/dist/clis/args/install-B0tMyUMw.d.mts.map +1 -0
- package/dist/clis/args/{install-Sz2DlCHh.mjs → install-F-27kF6m.mjs} +2 -2
- package/dist/clis/args/{install-Sz2DlCHh.mjs.map → install-F-27kF6m.mjs.map} +1 -1
- package/dist/clis/args/install.d.mts +3 -2
- package/dist/clis/args/install.mjs +1 -1
- package/dist/clis/args/{list-DM2d6f1m.mjs → list-Bkfn8Yuo.mjs} +2 -2
- package/dist/clis/args/{list-DM2d6f1m.mjs.map → list-Bkfn8Yuo.mjs.map} +1 -1
- package/dist/clis/args/list-DrbxA7JJ.d.mts +10 -0
- package/dist/clis/args/list-DrbxA7JJ.d.mts.map +1 -0
- package/dist/clis/args/list.d.mts +3 -2
- package/dist/clis/args/list.mjs +1 -1
- package/dist/clis/args/{login-DiKT5Jfu.mjs → login-CIFkQExi.mjs} +2 -2
- package/dist/clis/args/{login-DiKT5Jfu.mjs.map → login-CIFkQExi.mjs.map} +1 -1
- package/dist/clis/args/login-CXRJXg71.d.mts +25 -0
- package/dist/clis/args/login-CXRJXg71.d.mts.map +1 -0
- package/dist/clis/args/login.d.mts +3 -2
- package/dist/clis/args/login.mjs +1 -1
- package/dist/clis/args/{magic-string.es-h_0HDQBQ.mjs → magic-string.es-BWtG0AyA.mjs} +33 -27
- package/dist/clis/args/magic-string.es-BWtG0AyA.mjs.map +1 -0
- package/dist/clis/args/migrate-DkCQRL2D.d.mts +19 -0
- package/dist/clis/args/migrate-DkCQRL2D.d.mts.map +1 -0
- package/dist/clis/args/{migrate-CG_gWc4k.mjs → migrate-DwJGhc2d.mjs} +2 -2
- package/dist/clis/args/{migrate-CG_gWc4k.mjs.map → migrate-DwJGhc2d.mjs.map} +1 -1
- package/dist/clis/args/migrate.d.mts +3 -2
- package/dist/clis/args/migrate.mjs +1 -1
- package/dist/clis/args/publish-CeW4bOrl.d.mts +16 -0
- package/dist/clis/args/publish-CeW4bOrl.d.mts.map +1 -0
- package/dist/clis/args/{publish-DDZYsUfV.mjs → publish-DHqlGWmL.mjs} +2 -2
- package/dist/clis/args/{publish-DDZYsUfV.mjs.map → publish-DHqlGWmL.mjs.map} +1 -1
- package/dist/clis/args/publish.d.mts +3 -2
- package/dist/clis/args/publish.mjs +1 -1
- package/dist/clis/args/{registry-C_OVFQmI.mjs → registry-DIwES3l2.mjs} +2 -2
- package/dist/clis/args/{registry-C_OVFQmI.mjs.map → registry-DIwES3l2.mjs.map} +1 -1
- package/dist/clis/args/registry-DNH8xuaE.d.mts +17 -0
- package/dist/clis/args/registry-DNH8xuaE.d.mts.map +1 -0
- package/dist/clis/args/registry.d.mts +3 -2
- package/dist/clis/args/registry.mjs +1 -1
- package/dist/clis/args/service-BBx5GDTc.d.mts +27 -0
- package/dist/clis/args/service-BBx5GDTc.d.mts.map +1 -0
- package/dist/clis/args/{service-CHOOr0Gg.mjs → service-Cpjlyeu5.mjs} +2 -2
- package/dist/clis/args/{service-CHOOr0Gg.mjs.map → service-Cpjlyeu5.mjs.map} +1 -1
- package/dist/clis/args/service.d.mts +3 -2
- package/dist/clis/args/service.mjs +1 -1
- package/dist/clis/args/{switchboard-Dsp7nosi.mjs → switchboard-CCaAtU56.mjs} +2 -2
- package/dist/clis/args/{switchboard-Dsp7nosi.mjs.map → switchboard-CCaAtU56.mjs.map} +1 -1
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts +70 -0
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts.map +1 -0
- package/dist/clis/args/switchboard.d.mts +3 -2
- package/dist/clis/args/switchboard.mjs +1 -1
- package/dist/clis/args/{uninstall-CTwTX0u_.mjs → uninstall-3U0B8g5c.mjs} +2 -2
- package/dist/clis/args/{uninstall-CTwTX0u_.mjs.map → uninstall-3U0B8g5c.mjs.map} +1 -1
- package/dist/clis/args/uninstall-CDx7lwxn.d.mts +28 -0
- package/dist/clis/args/uninstall-CDx7lwxn.d.mts.map +1 -0
- package/dist/clis/args/uninstall.d.mts +3 -2
- package/dist/clis/args/uninstall.mjs +1 -1
- package/dist/clis/args/unpublish-CEDsk6uv.d.mts +22 -0
- package/dist/clis/args/unpublish-CEDsk6uv.d.mts.map +1 -0
- package/dist/clis/args/{unpublish-BPMkGEg5.mjs → unpublish-s9zUh6Gw.mjs} +2 -2
- package/dist/clis/args/{unpublish-BPMkGEg5.mjs.map → unpublish-s9zUh6Gw.mjs.map} +1 -1
- package/dist/clis/args/unpublish.d.mts +3 -2
- package/dist/clis/args/unpublish.mjs +1 -1
- package/dist/clis/args/{vetra-b4KUu1Ax.mjs → vetra-BUNlAAPp.mjs} +2 -2
- package/dist/clis/args/{vetra-b4KUu1Ax.mjs.map → vetra-BUNlAAPp.mjs.map} +1 -1
- package/dist/clis/args/vetra-DkDaWFPi.d.mts +111 -0
- package/dist/clis/args/vetra-DkDaWFPi.d.mts.map +1 -0
- package/dist/clis/args/vetra-ports.test.d.mts +2 -1
- package/dist/clis/args/vetra-ports.test.mjs +285 -180
- package/dist/clis/args/vetra-ports.test.mjs.map +1 -1
- package/dist/clis/args/vetra.d.mts +3 -2
- package/dist/clis/args/vetra.mjs +1 -1
- package/dist/clis/build-config-CmdMi_wu.mjs +230 -0
- package/dist/clis/build-config-CmdMi_wu.mjs.map +1 -0
- package/dist/clis/build-config.d.mts +44 -10614
- package/dist/clis/build-config.d.mts.map +1 -1
- package/dist/clis/build-config.mjs +2 -88
- package/dist/clis/build-pieces.d.mts +100 -0
- package/dist/clis/build-pieces.d.mts.map +1 -0
- package/dist/clis/build-pieces.mjs +371 -0
- package/dist/clis/build-pieces.mjs.map +1 -0
- package/dist/clis/command-names.d.mts +2 -2
- package/dist/clis/command-names.d.mts.map +1 -1
- package/dist/clis/command-names.mjs.map +1 -1
- package/dist/clis/constants.d.mts +3 -462
- package/dist/clis/constants.mjs +25 -8
- package/dist/clis/constants.mjs.map +1 -1
- package/dist/clis/index-6CZwrmQi.d.mts +11154 -0
- package/dist/clis/index-6CZwrmQi.d.mts.map +1 -0
- package/dist/clis/index.d.mts +1335 -1221
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +181 -64
- package/dist/clis/index.mjs.map +1 -1
- package/dist/clis/project-env.d.mts +4 -4
- package/dist/clis/project-env.d.mts.map +1 -1
- package/dist/clis/project-env.mjs.map +1 -1
- package/dist/clis/project-ports.d.mts +5 -5
- package/dist/clis/project-ports.d.mts.map +1 -1
- package/dist/clis/project-ports.mjs +1 -1
- package/dist/clis/project-ports.mjs.map +1 -1
- package/dist/clis/services/telemetry.d.mts +7 -7
- package/dist/clis/services/telemetry.d.mts.map +1 -1
- package/dist/clis/services/telemetry.mjs.map +1 -1
- package/dist/clis/types-CMFHKrgv.d.mts +528 -0
- package/dist/clis/types-CMFHKrgv.d.mts.map +1 -0
- package/dist/clis/utils.d.mts +4 -4
- package/dist/clis/utils.d.mts.map +1 -1
- package/dist/clis/utils.mjs.map +1 -1
- package/dist/{config-loader-B845Hidf.js → config-loader-CWQxMERh.js} +22 -8
- package/dist/config-loader-CWQxMERh.js.map +1 -0
- package/dist/connect/config-loader.d.ts +14 -8
- package/dist/connect/config-loader.d.ts.map +1 -1
- package/dist/connect/config-loader.js +2 -2
- package/dist/connect/index.d.ts +158 -56
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +271 -30
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/json-adapter.d.ts +3 -4
- package/dist/connect/json-adapter.d.ts.map +1 -1
- package/dist/connect/json-adapter.js.map +1 -1
- package/dist/{constants-BP_gjn8g.d.ts → constants-DO4IYxuR.d.ts} +2 -1
- package/dist/constants-DO4IYxuR.d.ts.map +1 -0
- package/dist/constants.d.ts +3 -2
- package/dist/constants.js.map +1 -1
- package/dist/document-drive/index.d.ts +134 -100
- package/dist/document-drive/index.d.ts.map +1 -1
- package/dist/document-drive/index.js +120 -52
- package/dist/document-drive/index.js.map +1 -1
- package/dist/document-model/index.d.ts +5 -4
- package/dist/document-model/index.js +449 -227
- package/dist/document-model/index.js.map +1 -1
- package/dist/document-model/mock.d.ts +2 -3
- package/dist/document-model/mock.d.ts.map +1 -1
- package/dist/document-model/mock.js +2 -1
- package/dist/document-model/mock.js.map +1 -1
- package/dist/document-model/utils.d.ts +3 -2
- package/dist/document-model/utils.js +1 -1
- package/dist/{index-DyYIJtVy.d.ts → index-CDDyUSHE.d.ts} +40 -28
- package/dist/index-CDDyUSHE.d.ts.map +1 -0
- package/dist/index-D0JljlgO.d.ts +36 -0
- package/dist/index-D0JljlgO.d.ts.map +1 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.js.map +1 -1
- package/dist/processors/index.d.ts +3 -2
- package/dist/processors/index.js +5 -1
- package/dist/processors/index.js.map +1 -1
- package/dist/registry/index.d.ts +15 -15
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +14 -5
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest-slim.d.ts +4 -3
- package/dist/registry/manifest-slim.d.ts.map +1 -1
- package/dist/registry/manifest-slim.js +21 -0
- package/dist/registry/manifest-slim.js.map +1 -1
- package/dist/registry/updates.d.ts +3 -3
- package/dist/registry/updates.d.ts.map +1 -1
- package/dist/registry/updates.js.map +1 -1
- package/dist/registry/urls.d.ts +2 -2
- package/dist/registry/urls.d.ts.map +1 -1
- package/dist/registry/urls.js.map +1 -1
- package/dist/{types-C1in4fl3.d.ts → types-Bsp8VL2y.d.ts} +2 -2
- package/dist/types-Bsp8VL2y.d.ts.map +1 -0
- package/dist/{types-YqLqb0Zb.d.ts → types-VDHUeQnm.d.ts} +23 -35
- package/dist/types-VDHUeQnm.d.ts.map +1 -0
- package/dist/{types-CpnWmiFY.d.ts → types-xLPOHE23.d.ts} +593 -437
- package/dist/types-xLPOHE23.d.ts.map +1 -0
- package/dist/{utils-DP122OSS.d.ts → utils-BrKxCmKx.d.ts} +2 -2
- package/dist/utils-BrKxCmKx.d.ts.map +1 -0
- package/dist/{utils-aaTmfxFW.js → utils-XotexSsQ.js} +3 -2
- package/dist/{utils-aaTmfxFW.js.map → utils-XotexSsQ.js.map} +1 -1
- package/package.json +10 -5
- package/dist/clis/args/access-token--9H57y8J.d.mts +0 -18
- package/dist/clis/args/access-token--9H57y8J.d.mts.map +0 -1
- package/dist/clis/args/common-CcYbXrBx.mjs.map +0 -1
- package/dist/clis/args/common-Dsf1vpHV.d.mts +0 -183
- package/dist/clis/args/common-Dsf1vpHV.d.mts.map +0 -1
- package/dist/clis/args/connect-BVVvCmL9.mjs.map +0 -1
- package/dist/clis/args/connect-DetTnI8g.d.mts +0 -443
- package/dist/clis/args/connect-DetTnI8g.d.mts.map +0 -1
- package/dist/clis/args/generate-CA916Fvj.mjs.map +0 -1
- package/dist/clis/args/generate-DnV-bfXt.d.mts +0 -87
- package/dist/clis/args/generate-DnV-bfXt.d.mts.map +0 -1
- package/dist/clis/args/help-CjAsudUn.d.mts +0 -193
- package/dist/clis/args/help-CjAsudUn.d.mts.map +0 -1
- package/dist/clis/args/init-CUXyfquF.d.mts +0 -55
- package/dist/clis/args/init-CUXyfquF.d.mts.map +0 -1
- package/dist/clis/args/inspect-DtZeoA5c.d.mts +0 -15
- package/dist/clis/args/inspect-DtZeoA5c.d.mts.map +0 -1
- package/dist/clis/args/install-CkP8zcHb.d.mts +0 -40
- package/dist/clis/args/install-CkP8zcHb.d.mts.map +0 -1
- package/dist/clis/args/list-BGf8s_gj.d.mts +0 -12
- package/dist/clis/args/list-BGf8s_gj.d.mts.map +0 -1
- package/dist/clis/args/login-DNsHwvqk.d.mts +0 -27
- package/dist/clis/args/login-DNsHwvqk.d.mts.map +0 -1
- package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs.map +0 -1
- package/dist/clis/args/migrate-sixkWhxm.d.mts +0 -21
- package/dist/clis/args/migrate-sixkWhxm.d.mts.map +0 -1
- package/dist/clis/args/publish-Dqe5DUst.d.mts +0 -18
- package/dist/clis/args/publish-Dqe5DUst.d.mts.map +0 -1
- package/dist/clis/args/registry-C_RfTsKB.d.mts +0 -19
- package/dist/clis/args/registry-C_RfTsKB.d.mts.map +0 -1
- package/dist/clis/args/service-DhIkf8-O.d.mts +0 -22
- package/dist/clis/args/service-DhIkf8-O.d.mts.map +0 -1
- package/dist/clis/args/switchboard-BlPaq2at.d.mts +0 -72
- package/dist/clis/args/switchboard-BlPaq2at.d.mts.map +0 -1
- package/dist/clis/args/uninstall-BpA3YYbw.d.mts +0 -31
- package/dist/clis/args/uninstall-BpA3YYbw.d.mts.map +0 -1
- package/dist/clis/args/unpublish-CvwaIimG.d.mts +0 -24
- package/dist/clis/args/unpublish-CvwaIimG.d.mts.map +0 -1
- package/dist/clis/args/vetra-DLQ6lhLl.d.mts +0 -113
- package/dist/clis/args/vetra-DLQ6lhLl.d.mts.map +0 -1
- package/dist/clis/build-config.mjs.map +0 -1
- package/dist/clis/constants.d.mts.map +0 -1
- package/dist/config-loader-B845Hidf.js.map +0 -1
- package/dist/constants-BP_gjn8g.d.ts.map +0 -1
- package/dist/index-C_iVZe7f.d.ts +0 -7
- package/dist/index-C_iVZe7f.d.ts.map +0 -1
- package/dist/index-DyYIJtVy.d.ts.map +0 -1
- package/dist/types-C1in4fl3.d.ts.map +0 -1
- package/dist/types-CpnWmiFY.d.ts.map +0 -1
- package/dist/types-YqLqb0Zb.d.ts.map +0 -1
- package/dist/utils-DP122OSS.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["createState"],"sources":["../../document-drive/constants.ts","../../document-drive/gen/schema/zod.ts","../../document-drive/gen/node/creators.ts","../../document-drive/gen/drive/creators.ts","../../document-drive/gen/creators.ts","../../document-drive/gen/document-model.ts","../../document-drive/gen/document-type.ts","../../document-drive/gen/document-schema.ts","../../document-drive/gen/ph-factories.ts","../../document-drive/src/reducers/drive.ts","../../document-drive/src/utils.ts","../../document-drive/src/reducers/node.ts","../../document-drive/gen/reducer.ts","../../document-drive/gen/utils.ts","../../document-drive/module.ts"],"sourcesContent":["export const driveDocumentFileExtension = \"phdd\";\n","import type {\n AddFileInput,\n AddFolderInput,\n AddListenerInput,\n AddTriggerInput,\n CopyNodeInput,\n DeleteNodeInput,\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n FileNode,\n FolderNode,\n Listener,\n ListenerCallInfo,\n ListenerCallInfoInput,\n ListenerFilter,\n ListenerFilterInput,\n ListenerInput,\n MoveNodeInput,\n PullResponderTriggerData,\n PullResponderTriggerDataInput,\n RemoveListenerInput,\n RemoveTriggerInput,\n SetAvailableOfflineInput,\n SetDriveIconInput,\n SetDriveNameInput,\n SetSharingTypeInput,\n Trigger,\n TriggerInput,\n UpdateFileInput,\n UpdateNodeInput,\n} from \"./types.js\";\nimport { z } from \"zod\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K], T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport const TransmitterTypeSchema = z.enum([\n \"Internal\",\n \"MatrixConnect\",\n \"PullResponder\",\n \"RESTWebhook\",\n \"SecureConnect\",\n \"SwitchboardPush\",\n]);\n\nexport const TriggerTypeSchema = z.enum([\"PullResponder\"]);\n\nexport function AddFileInputSchema(): z.ZodObject<Properties<AddFileInput>> {\n return z.object({\n documentType: z.string(),\n id: z.string(),\n name: z.string(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function AddFolderInputSchema(): z.ZodObject<\n Properties<AddFolderInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function AddListenerInputSchema(): z.ZodObject<\n Properties<AddListenerInput>\n> {\n return z.object({\n listener: ListenerInputSchema(),\n });\n}\n\nexport function AddTriggerInputSchema(): z.ZodObject<\n Properties<AddTriggerInput>\n> {\n return z.object({\n trigger: TriggerInputSchema(),\n });\n}\n\nexport function CopyNodeInputSchema(): z.ZodObject<Properties<CopyNodeInput>> {\n return z.object({\n srcId: z.string(),\n targetId: z.string(),\n targetName: z.string().nullish(),\n targetParentFolder: z.string().nullish(),\n });\n}\n\nexport function DeleteNodeInputSchema(): z.ZodObject<\n Properties<DeleteNodeInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DocumentDriveLocalStateSchema(): z.ZodObject<\n Properties<DocumentDriveLocalState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentDriveLocalState\").optional(),\n availableOffline: z.boolean(),\n listeners: z.array(ListenerSchema()),\n sharingType: z.string().nullable(),\n triggers: z.array(TriggerSchema()),\n });\n}\n\nexport function DocumentDriveStateSchema(): z.ZodObject<\n Properties<DocumentDriveGlobalState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentDriveState\").optional(),\n icon: z.string().nullable(),\n name: z.string(),\n nodes: z.array(NodeSchema()),\n });\n}\n\nexport function FileNodeSchema(): z.ZodObject<Properties<FileNode>> {\n return z.object({\n __typename: z.literal(\"FileNode\").optional(),\n documentType: z.string(),\n id: z.string(),\n kind: z.string(),\n name: z.string(),\n parentFolder: z.string().nullable(),\n });\n}\n\nexport function FolderNodeSchema(): z.ZodObject<Properties<FolderNode>> {\n return z.object({\n __typename: z.literal(\"FolderNode\").optional(),\n id: z.string(),\n kind: z.string(),\n name: z.string(),\n parentFolder: z.string().nullable(),\n });\n}\n\nexport function ListenerSchema(): z.ZodObject<Properties<Listener>> {\n return z.object({\n __typename: z.literal(\"Listener\").optional(),\n block: z.boolean(),\n callInfo: ListenerCallInfoSchema().nullable(),\n filter: ListenerFilterSchema(),\n label: z.string().nullable(),\n listenerId: z.string(),\n system: z.boolean(),\n });\n}\n\nexport function ListenerInputSchema(): z.ZodObject<Properties<ListenerInput>> {\n return z.object({\n block: z.boolean(),\n callInfo: ListenerCallInfoInputSchema().nullish(),\n filter: ListenerFilterInputSchema(),\n label: z.string().nullish(),\n listenerId: z.string(),\n system: z.boolean(),\n });\n}\n\nexport function ListenerCallInfoSchema(): z.ZodObject<\n Properties<ListenerCallInfo>\n> {\n return z.object({\n __typename: z.literal(\"ListenerCallInfo\").optional(),\n data: z.string().nullable(),\n name: z.string().nullable(),\n transmitterType: TransmitterTypeSchema.nullable(),\n });\n}\n\nexport function ListenerCallInfoInputSchema(): z.ZodObject<\n Properties<ListenerCallInfoInput>\n> {\n return z.object({\n data: z.string().nullish(),\n name: z.string().nullish(),\n transmitterType: TransmitterTypeSchema.nullish(),\n });\n}\n\nexport function ListenerFilterSchema(): z.ZodObject<\n Properties<ListenerFilter>\n> {\n return z.object({\n __typename: z.literal(\"ListenerFilter\").optional(),\n branch: z.array(z.string()).nullable(),\n documentId: z.array(z.string()).nullable(),\n documentType: z.array(z.string()),\n scope: z.array(z.string()).nullable(),\n });\n}\n\nexport function ListenerFilterInputSchema(): z.ZodObject<\n Properties<ListenerFilterInput>\n> {\n return z.object({\n branch: z.array(z.string()).nullish(),\n documentId: z.array(z.string()).nullish(),\n documentType: z.array(z.string()).nullish(),\n scope: z.array(z.string()).nullish(),\n });\n}\n\nexport function MoveNodeInputSchema(): z.ZodObject<Properties<MoveNodeInput>> {\n return z.object({\n srcFolder: z.string(),\n targetParentFolder: z.string().nullish(),\n });\n}\n\nexport function NodeSchema() {\n return z.union([FileNodeSchema(), FolderNodeSchema()]);\n}\n\nexport function PullResponderTriggerDataSchema(): z.ZodObject<\n Properties<PullResponderTriggerData>\n> {\n return z.object({\n __typename: z.literal(\"PullResponderTriggerData\").optional(),\n interval: z.string(),\n listenerId: z.string(),\n url: z.string(),\n });\n}\n\nexport function PullResponderTriggerDataInputSchema(): z.ZodObject<\n Properties<PullResponderTriggerDataInput>\n> {\n return z.object({\n interval: z.string(),\n listenerId: z.string(),\n url: z.string(),\n });\n}\n\nexport function RemoveListenerInputSchema(): z.ZodObject<\n Properties<RemoveListenerInput>\n> {\n return z.object({\n listenerId: z.string(),\n });\n}\n\nexport function RemoveTriggerInputSchema(): z.ZodObject<\n Properties<RemoveTriggerInput>\n> {\n return z.object({\n triggerId: z.string(),\n });\n}\n\nexport function SetAvailableOfflineInputSchema(): z.ZodObject<\n Properties<SetAvailableOfflineInput>\n> {\n return z.object({\n availableOffline: z.boolean(),\n });\n}\n\nexport function SetDriveIconInputSchema(): z.ZodObject<\n Properties<SetDriveIconInput>\n> {\n return z.object({\n icon: z.string().nullish(),\n });\n}\n\nexport function SetDriveNameInputSchema(): z.ZodObject<\n Properties<SetDriveNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetSharingTypeInputSchema(): z.ZodObject<\n Properties<SetSharingTypeInput>\n> {\n return z.object({\n type: z.string(),\n });\n}\n\nexport function TriggerSchema(): z.ZodObject<Properties<Trigger>> {\n return z.object({\n __typename: z.literal(\"Trigger\").optional(),\n data: TriggerDataSchema().nullable(),\n id: z.string(),\n type: TriggerTypeSchema,\n });\n}\n\nexport function TriggerInputSchema(): z.ZodObject<Properties<TriggerInput>> {\n return z.object({\n data: PullResponderTriggerDataInputSchema().nullish(),\n id: z.string(),\n type: TriggerTypeSchema,\n });\n}\n\nexport function TriggerDataSchema() {\n return PullResponderTriggerDataSchema();\n}\n\nexport function UpdateFileInputSchema(): z.ZodObject<\n Properties<UpdateFileInput>\n> {\n return z.object({\n documentType: z.string().nullish(),\n id: z.string(),\n name: z.string().nullish(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function UpdateNodeInputSchema(): z.ZodObject<\n Properties<UpdateNodeInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n parentFolder: z.string().nullish(),\n });\n}\n","import type {\n AddFileInput,\n AddFolderInput,\n CopyNodeInput,\n DeleteNodeInput,\n MoveNodeInput,\n UpdateFileInput,\n UpdateNodeInput,\n} from \"../schema/types.js\";\nimport type { LegacyAddFileAction, LegacyAddFileInput } from \"../types.js\";\nimport type {\n AddFileAction,\n AddFolderAction,\n CopyNodeAction,\n DeleteNodeAction,\n MoveNodeAction,\n UpdateFileAction,\n UpdateNodeAction,\n} from \"./actions.js\";\nimport { createAction } from \"document-model\";\nimport {\n AddFileInputSchema,\n AddFolderInputSchema,\n CopyNodeInputSchema,\n DeleteNodeInputSchema,\n MoveNodeInputSchema,\n UpdateFileInputSchema,\n UpdateNodeInputSchema,\n} from \"../schema/zod.js\";\n\n/**\n * @deprecated Use addFile with {@link AddFileInput} instead. This overload will be removed in the future.\n */\nexport function addFile(input: LegacyAddFileInput): LegacyAddFileAction;\nexport function addFile(input: AddFileInput): AddFileAction;\nexport function addFile(\n input: LegacyAddFileInput | AddFileInput,\n): typeof input extends LegacyAddFileInput\n ? LegacyAddFileAction\n : AddFileAction {\n if (input && typeof input === \"object\" && \"synchronizationUnits\" in input) {\n // Legacy overload\n return createAction<AddFileAction>(\n \"ADD_FILE\",\n { ...input },\n undefined,\n undefined,\n \"global\",\n );\n }\n // Standard overload\n return createAction<AddFileAction>(\n \"ADD_FILE\",\n { ...input },\n undefined,\n AddFileInputSchema,\n \"global\",\n );\n}\n\nexport const addFolder = (input: AddFolderInput) =>\n createAction<AddFolderAction>(\n \"ADD_FOLDER\",\n { ...input },\n undefined,\n AddFolderInputSchema,\n \"global\",\n );\n\nexport const deleteNode = (input: DeleteNodeInput) =>\n createAction<DeleteNodeAction>(\n \"DELETE_NODE\",\n { ...input },\n undefined,\n DeleteNodeInputSchema,\n \"global\",\n );\n\nexport const updateFile = (input: UpdateFileInput) =>\n createAction<UpdateFileAction>(\n \"UPDATE_FILE\",\n { ...input },\n undefined,\n UpdateFileInputSchema,\n \"global\",\n );\n\nexport const updateNode = (input: UpdateNodeInput) =>\n createAction<UpdateNodeAction>(\n \"UPDATE_NODE\",\n { ...input },\n undefined,\n UpdateNodeInputSchema,\n \"global\",\n );\n\nexport const copyNode = (input: CopyNodeInput) =>\n createAction<CopyNodeAction>(\n \"COPY_NODE\",\n { ...input },\n undefined,\n CopyNodeInputSchema,\n \"global\",\n );\n\nexport const moveNode = (input: MoveNodeInput) =>\n createAction<MoveNodeAction>(\n \"MOVE_NODE\",\n { ...input },\n undefined,\n MoveNodeInputSchema,\n \"global\",\n );\n","import type {\n AddListenerInput,\n AddTriggerInput,\n RemoveListenerInput,\n RemoveTriggerInput,\n SetAvailableOfflineInput,\n SetDriveIconInput,\n SetDriveNameInput,\n SetSharingTypeInput,\n} from \"../schema/types.js\";\nimport type {\n AddListenerAction,\n AddTriggerAction,\n RemoveListenerAction,\n RemoveTriggerAction,\n SetAvailableOfflineAction,\n SetDriveIconAction,\n SetDriveNameAction,\n SetSharingTypeAction,\n} from \"./actions.js\";\nimport { createAction } from \"document-model\";\nimport {\n AddListenerInputSchema,\n AddTriggerInputSchema,\n RemoveListenerInputSchema,\n RemoveTriggerInputSchema,\n SetAvailableOfflineInputSchema,\n SetDriveIconInputSchema,\n SetDriveNameInputSchema,\n SetSharingTypeInputSchema,\n} from \"../schema/zod.js\";\n\nexport const setDriveName = (input: SetDriveNameInput) =>\n createAction<SetDriveNameAction>(\n \"SET_DRIVE_NAME\",\n { ...input },\n undefined,\n SetDriveNameInputSchema,\n \"global\",\n );\n\nexport const setDriveIcon = (input: SetDriveIconInput) =>\n createAction<SetDriveIconAction>(\n \"SET_DRIVE_ICON\",\n { ...input },\n undefined,\n SetDriveIconInputSchema,\n \"global\",\n );\n\nexport const setSharingType = (input: SetSharingTypeInput) =>\n createAction<SetSharingTypeAction>(\n \"SET_SHARING_TYPE\",\n { ...input },\n undefined,\n SetSharingTypeInputSchema,\n \"local\",\n );\n\nexport const setAvailableOffline = (input: SetAvailableOfflineInput) =>\n createAction<SetAvailableOfflineAction>(\n \"SET_AVAILABLE_OFFLINE\",\n { ...input },\n undefined,\n SetAvailableOfflineInputSchema,\n \"local\",\n );\n\nexport const addListener = (input: AddListenerInput) =>\n createAction<AddListenerAction>(\n \"ADD_LISTENER\",\n { ...input },\n undefined,\n AddListenerInputSchema,\n \"local\",\n );\n\nexport const removeListener = (input: RemoveListenerInput) =>\n createAction<RemoveListenerAction>(\n \"REMOVE_LISTENER\",\n { ...input },\n undefined,\n RemoveListenerInputSchema,\n \"local\",\n );\n\nexport const addTrigger = (input: AddTriggerInput) =>\n createAction<AddTriggerAction>(\n \"ADD_TRIGGER\",\n { ...input },\n undefined,\n AddTriggerInputSchema,\n \"local\",\n );\n\nexport const removeTrigger = (input: RemoveTriggerInput) =>\n createAction<RemoveTriggerAction>(\n \"REMOVE_TRIGGER\",\n { ...input },\n undefined,\n RemoveTriggerInputSchema,\n \"local\",\n );\n","export * from \"./node/creators.js\";\nexport * from \"./drive/creators.js\";\n","import type { DocumentModelGlobalState } from \"../../document-model/types.js\";\n\nexport const driveDocumentModel: DocumentModelGlobalState = {\n id: \"powerhouse/document-drive\",\n name: \"DocumentDrive\",\n extension: \"phdd\",\n description: \"\",\n author: {\n name: \"Powerhouse Inc\",\n website: \"https://www.powerhouse.inc/\",\n },\n specifications: [\n {\n version: 1,\n changeLog: [],\n state: {\n global: {\n schema:\n \"type FolderNode {\\n id: String!\\n name: String!\\n kind: String!\\n parentFolder: String\\n}\\n\\ntype FileNode {\\n id: String!\\n name: String!\\n kind: String!\\n documentType: String!\\n parentFolder: String\\n}\\n\\nunion Node = FolderNode | FileNode\\n\\ntype DocumentDriveState {\\n name: String!\\n nodes: [Node!]!\\n icon: String\\n}\",\n initialValue: '\"{\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"nodes\\\\\":[],\\\\\"icon\\\\\":null}\"',\n examples: [],\n },\n local: {\n schema:\n \"type ListenerFilter {\\n documentType: [String!]!\\n documentId: [ID!]\\n scope: [String!]\\n branch: [String!]\\n}\\n\\nenum TransmitterType {\\n Internal,\\n SwitchboardPush,\\n PullResponder,\\n SecureConnect, \\n MatrixConnect,\\n RESTWebhook\\n}\\n\\ntype ListenerCallInfo {\\n transmitterType: TransmitterType\\n name: String\\n data: String\\n}\\n\\ntype Listener {\\n listenerId: ID!\\n label: String\\n block: Boolean!\\n system: Boolean!\\n filter: ListenerFilter!\\n callInfo: ListenerCallInfo\\n}\\n\\nenum TriggerType {\\n PullResponder\\n}\\n\\ntype PullResponderTriggerData {\\n listenerId: ID!\\n url: String!\\n interval: String!\\n}\\n\\nunion TriggerData = PullResponderTriggerData\\n\\ntype Trigger {\\n id: ID!\\n type: TriggerType!\\n data: TriggerData\\n}\\n\\ntype DocumentDriveLocalState{\\n sharingType: String\\n listeners: [Listener!]!\\n triggers: [Trigger!]!\\n availableOffline: Boolean!\\n}\",\n initialValue:\n '\"{ \\\\\"listeners\\\\\": [], \\\\\"triggers\\\\\": [], \\\\\"sharingType\\\\\": \\\\\"private\\\\\", \\\\\"availableOffline\\\\\": false}\"',\n examples: [],\n },\n },\n modules: [\n {\n id: \"GRzuvv78tBvmB6ciitokLfonNHA=\",\n name: \"Node\",\n description: \"\",\n operations: [\n {\n id: \"7xiTdxonc9yEASR8sfV/KnbSV10=\",\n name: \"ADD_FILE\",\n description: \"\",\n schema:\n \"input AddFileInput {\\n id: ID!\\n name: String!\\n documentType: String!\\n parentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"4lzNMMKKdIAtEU6i12xLgi9hp+U=\",\n name: \"ADD_FOLDER\",\n description: \"\",\n schema:\n \"input AddFolderInput {\\n id: ID!\\n name: String!\\n parentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"53jH2/3TWTTcgCJiv2C+BmuC6i0=\",\n name: \"DELETE_NODE\",\n description: \"\",\n schema: \"input DeleteNodeInput {\\n id: ID!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"pNn+Y1/HVq/GNMk7t0u3g3gtMLE=\",\n name: \"UPDATE_FILE\",\n description: \"\",\n schema:\n \"input UpdateFileInput {\\n id: ID!\\n parentFolder: ID\\n name: String\\n documentType: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"P0x1M8Mnt+Q/+9nggkwgVbfybsc=\",\n name: \"UPDATE_NODE\",\n description: \"\",\n schema:\n \"input UpdateNodeInput {\\n id: ID!\\n parentFolder: ID\\n name: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"vnQ7OB5b3wGLgjhbgJqAIpA+JLE=\",\n name: \"COPY_NODE\",\n description: \"\",\n schema:\n \"input CopyNodeInput {\\n srcId: ID!\\n targetId: ID!\\n targetName: String\\n targetParentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"VNyiD/sNGzk6k9A1Qe7s8dmrJxA=\",\n name: \"MOVE_NODE\",\n description: \"\",\n schema:\n \"input MoveNodeInput {\\n srcFolder: ID!\\n targetParentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"0dHwHlxOM9x0vMZ+gLnKxf2qTEo=\",\n name: \"Drive\",\n description: \"\",\n operations: [\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z1dsU=\",\n name: \"SET_DRIVE_NAME\",\n description: \"\",\n schema: \"input SetDriveNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z30dsU=\",\n name: \"SET_DRIVE_ICON\",\n description: \"\",\n schema: \"input SetDriveIconInput {\\n icon: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z2dsU=\",\n name: \"SET_SHARING_TYPE\",\n description: \"\",\n schema: \"input SetSharingTypeInput {\\n type: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z3dsU=\",\n name: \"SET_AVAILABLE_OFFLINE\",\n description: \"\",\n schema:\n \"input SetAvailableOfflineInput {\\n availableOffline: Boolean!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z9dsU=\",\n name: \"ADD_LISTENER\",\n description: \"\",\n schema:\n \"input ListenerFilterInput {\\n documentType: [String!]\\n documentId: [ID!]\\n scope: [String!]\\n branch: [String!]\\n}\\n\\ninput ListenerCallInfoInput {\\n transmitterType: TransmitterType\\n name: String\\n data: String\\n}\\n\\ninput ListenerInput {\\n listenerId: ID!\\n label: String\\n block: Boolean!\\n system: Boolean!\\n filter: ListenerFilterInput!\\n callInfo: ListenerCallInfoInput\\n}\\n\\ninput AddListenerInput {\\n listener: ListenerInput!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z10dsU=\",\n name: \"REMOVE_LISTENER\",\n description: \"\",\n schema: \"input RemoveListenerInput {\\n listenerId: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z20dsU=\",\n name: \"ADD_TRIGGER\",\n description: \"\",\n schema:\n \"input PullResponderTriggerDataInput {\\n listenerId: ID!\\n url: String!\\n interval: String!\\n}\\n\\ninput TriggerInput {\\n id: ID!\\n type: TriggerType!\\n data: PullResponderTriggerDataInput\\n}\\n\\ninput AddTriggerInput {\\n trigger: TriggerInput!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z30dsU=\",\n name: \"REMOVE_TRIGGER\",\n description: \"\",\n schema: \"input RemoveTriggerInput {\\n triggerId: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n ],\n },\n ],\n },\n ],\n};\n","export const driveDocumentType = \"powerhouse/document-drive\";\n","import { z } from \"zod\";\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"../../document-model/document-schema.js\";\nimport { driveDocumentType } from \"./document-type.js\";\nimport {\n DocumentDriveLocalStateSchema,\n DocumentDriveStateSchema,\n} from \"./schema/zod.js\";\nimport type { DocumentDriveDocument, DocumentDrivePHState } from \"./types.js\";\n\n/** Schema for validating the header object of a Drive document */\nexport const DriveDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({\n documentType: z.literal(driveDocumentType),\n});\n\n/** Schema for validating the state object of a Drive document */\nexport const DrivePHStateSchema = BaseDocumentStateSchema.extend({\n global: DocumentDriveStateSchema(),\n local: DocumentDriveLocalStateSchema(),\n});\n\nexport const DriveDocumentSchema = z.object({\n header: DriveDocumentHeaderSchema,\n state: DrivePHStateSchema,\n initialState: DrivePHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a Drive document state object */\nexport function isDriveState(state: unknown): state is DocumentDrivePHState {\n return DrivePHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a Drive document state object */\nexport function assertIsDriveState(\n state: unknown,\n): asserts state is DocumentDrivePHState {\n DrivePHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a Drive document */\nexport function isDriveDocument(\n document: unknown,\n): document is DocumentDriveDocument {\n return DriveDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a Drive document */\nexport function assertIsDriveDocument(\n document: unknown,\n): asserts document is DocumentDriveDocument {\n DriveDocumentSchema.parse(document);\n}\n","/**\n * Factory methods for creating DocumentDriveDocument instances\n */\n\nimport {\n createBaseState,\n defaultBaseState,\n type PHBaseState,\n} from \"../../document-model/state.js\";\nimport type {\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n DocumentDrivePHState,\n} from \"./types.js\";\n\nexport function defaultGlobalState(): DocumentDriveGlobalState {\n return {\n icon: null,\n name: \"\",\n nodes: [],\n };\n}\n\nexport function defaultLocalState(): DocumentDriveLocalState {\n return {\n availableOffline: false,\n listeners: [],\n sharingType: null,\n triggers: [],\n };\n}\n\nexport function defaultPHState(): DocumentDrivePHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(\n state?: Partial<DocumentDriveGlobalState>,\n): DocumentDriveGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n } as DocumentDriveGlobalState;\n}\n\nexport function createLocalState(\n state?: Partial<DocumentDriveLocalState>,\n): DocumentDriveLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as DocumentDriveLocalState;\n}\n\nexport function createState(\n baseState?: Partial<PHBaseState>,\n globalState?: Partial<DocumentDriveGlobalState>,\n localState?: Partial<DocumentDriveLocalState>,\n): DocumentDrivePHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport type { Listener, Trigger } from \"../../gen/schema/types.js\";\nimport type { DocumentDriveDriveOperations } from \"../../gen/drive/actions.js\";\n\nexport const driveReducer: DocumentDriveDriveOperations = {\n setDriveNameOperation(state, action, dispatch) {\n state.name = action.input.name;\n },\n setDriveIconOperation(state, action, dispatch) {\n state.icon = action.input.icon ?? null;\n },\n setSharingTypeOperation(state, action, dispatch) {\n state.sharingType = action.input.type;\n },\n setAvailableOfflineOperation(state, action, dispatch) {\n state.availableOffline = action.input.availableOffline;\n },\n addListenerOperation(state, action, dispatch) {\n const { listener: input } = action.input;\n if (state.listeners.find((l) => l.listenerId === input.listenerId)) {\n throw new Error(`A listener with Id: ${input.listenerId} already exists`);\n }\n // Convert InputMaybe (undefined | null | T) to Maybe (null | T)\n const listener: Listener = {\n listenerId: input.listenerId,\n label: input.label ?? null,\n block: input.block,\n system: input.system,\n filter: {\n documentType: input.filter.documentType ?? null,\n documentId: input.filter.documentId ?? null,\n scope: input.filter.scope ?? null,\n branch: input.filter.branch ?? null,\n },\n callInfo: input.callInfo\n ? {\n transmitterType: input.callInfo.transmitterType ?? null,\n name: input.callInfo.name ?? null,\n data: input.callInfo.data ?? null,\n }\n : null,\n };\n state.listeners.push(listener);\n },\n removeListenerOperation(state, action, dispatch) {\n state.listeners = state.listeners.filter(\n (listener) => listener.listenerId !== action.input.listenerId,\n );\n },\n addTriggerOperation(state, action, dispatch) {\n const { trigger: input } = action.input;\n if (state.triggers.find((t) => t.id === input.id)) {\n throw new Error(`A trigger with Id: ${input.id} already exists`);\n }\n // Convert InputMaybe to Maybe - PullResponderTriggerData has all required fields so spread works\n const trigger: Trigger = {\n id: input.id,\n type: input.type,\n data: input.data ? { ...input.data } : null,\n };\n state.triggers.push(trigger);\n },\n removeTriggerOperation(state, action, dispatch) {\n state.triggers = state.triggers.filter(\n (trigger) => trigger.id !== action.input.triggerId,\n );\n },\n};\n","import type {\n CopyNodeInput,\n FileNode,\n FolderNode,\n Node,\n} from \"../gen/schema/types.js\";\nimport type {\n GenerateNodesCopyIdGenerator,\n GenerateNodesCopySrc,\n} from \"./types.js\";\nimport { isDraft, original } from \"mutative\";\n\nexport function isFileNode(node: Node): node is FileNode {\n return node.kind === \"file\";\n}\n\nexport function isFolderNode(node: Node): node is FolderNode {\n return node.kind === \"folder\";\n}\n\nexport function getAncestors(node: Node, allNodes: Node[]): Node[] {\n if (!node.parentFolder) {\n return [];\n } else {\n const parentNode = allNodes.find((_node) => _node.id === node.parentFolder);\n if (!parentNode) {\n throw new Error(`Parent node with id ${node.parentFolder} not found`);\n }\n return [parentNode, ...getAncestors(parentNode, allNodes)];\n }\n}\n\nexport function getDescendants(node: Node, allNodes: Node[]): Node[] {\n const children = allNodes.filter((_node) => _node.parentFolder === node.id);\n const descendants = children.map((child) => getDescendants(child, allNodes));\n return [...children, ...descendants.flat()];\n}\n\n/**\n * Generates a copy of nodes based on the provided source and target information.\n * @param src - The source information for generating the copy.\n * @param idGenerator - The function used to generate new IDs for the copied nodes.\n * @param nodes - The array of nodes to copy from.\n * @returns An array of copied nodes with updated IDs and parent folders.\n * @throws Error if the root node with the specified ID is not found.\n */\nexport function generateNodesCopy(\n src: GenerateNodesCopySrc,\n idGenerator: GenerateNodesCopyIdGenerator,\n nodes: Node[],\n): CopyNodeInput[] {\n const rootNode = nodes.find((node) => node.id === src.srcId);\n\n if (!rootNode) {\n throw new Error(`Node with id ${src.srcId} not found`);\n }\n\n const nodesToCopy = [\n {\n ...rootNode,\n name: src.targetName || rootNode.name,\n parentFolder: src.targetParentFolder || null,\n },\n ...getDescendants(rootNode, nodes),\n ];\n\n const ids: Record<string, string | undefined> = {};\n\n // Add targetParentFolder to ids so that is not replaced by a new id\n if (src.targetParentFolder) {\n ids[src.targetParentFolder] = src.targetParentFolder;\n }\n\n const getNewNodeId = (node: Node): string => {\n let newId = ids[node.id];\n\n if (!newId) {\n const oldId = node.id;\n newId = idGenerator(node);\n ids[oldId] = newId;\n }\n\n return newId;\n };\n\n const copyNodesInput = nodesToCopy.map<CopyNodeInput>((node) => ({\n srcId: node.id,\n targetId: getNewNodeId(node),\n targetName: node.name,\n targetParentFolder: node.parentFolder ? ids[node.parentFolder] : null,\n }));\n\n return copyNodesInput;\n}\n\nexport function getNextCopyNumber(\n files: string[],\n baseFilename: string,\n): number {\n let maxNumber = 0; // Start by assuming no copies exist\n\n // Regex to find files that match the base filename followed by \" (copy)\" and possibly a number\n const regex = new RegExp(\n `^${escapeRegExp(baseFilename)} \\\\(copy\\\\)(?: (\\\\d+))?$`,\n );\n\n for (const file of files) {\n const match = file.match(regex);\n if (match) {\n const number = match[1] ? parseInt(match[1], 10) : 1;\n if (number > maxNumber) {\n maxNumber = number;\n }\n }\n }\n\n return maxNumber + 1;\n}\n\nexport function escapeRegExp(string: string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n\n/**\n * The node list as plain objects for read-only scans. Inside a mutative draft\n * this returns the untouched base list, so a find or filter over it does not\n * create a child draft per element it visits. Callers must read before they\n * write: the base list does not see mutations made earlier in the same action.\n */\nexport function readNodes(state: { nodes: Node[] }): Node[] {\n return isDraft(state) ? original(state).nodes : state.nodes;\n}\n\nexport function handleTargetNameCollisions(params: {\n nodes: Node[];\n targetParentFolder: string | null;\n srcName: string;\n srcKind: \"file\" | \"folder\";\n}) {\n const { nodes, targetParentFolder, srcName, srcKind } = params;\n\n const targetNodeChildrenNames = nodes\n .filter((node) =>\n targetParentFolder === \"\"\n ? node.parentFolder === null\n : node.parentFolder === targetParentFolder,\n )\n .filter((node) => node.kind === srcKind)\n .map((node) => node.name);\n\n const targetHasNodesWithSameName = targetNodeChildrenNames.includes(srcName);\n\n const targetName = targetHasNodesWithSameName\n ? `${srcName} (copy) ${getNextCopyNumber(targetNodeChildrenNames, srcName)}`\n : srcName;\n\n return targetName;\n}\n\nexport const isValidName = (name: string) => {\n // Names are display labels (URLs use a slugified id), so allow any unicode;\n // reject only empty/whitespace-only names and control characters.\n // eslint-disable-next-line no-control-regex\n return name.trim().length > 0 && !/[\\u0000-\\u001F\\u007F]/.test(name);\n};\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport type { FileNode } from \"../../gen/schema/types.js\";\nimport type { DocumentDriveNodeOperations } from \"../../gen/node/actions.js\";\nimport {\n getDescendants,\n handleTargetNameCollisions,\n isFileNode,\n isFolderNode,\n isValidName,\n readNodes,\n} from \"../utils.js\";\n\nexport const nodeReducer: DocumentDriveNodeOperations = {\n addFileOperation(state, action, dispatch) {\n const nodes = readNodes(state);\n if (nodes.find((node) => node.id === action.input.id)) {\n throw new Error(`Node with id ${action.input.id} already exists!`);\n }\n\n if (!isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: action.input.name,\n srcKind: \"file\",\n targetParentFolder: action.input.parentFolder || null,\n });\n\n const fileNode: FileNode = {\n id: action.input.id,\n name,\n kind: \"file\",\n parentFolder: action.input.parentFolder ?? null,\n documentType: action.input.documentType,\n };\n state.nodes.push(fileNode);\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n\n dispatch?.({\n type: \"CREATE_CHILD_DOCUMENT\",\n input: {\n id: action.input.id,\n documentType: action.input.documentType,\n },\n });\n },\n addFolderOperation(state, action) {\n const nodes = readNodes(state);\n if (nodes.find((node) => node.id === action.input.id)) {\n throw new Error(`Node with id ${action.input.id} already exists!`);\n }\n\n if (!isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: action.input.name,\n srcKind: \"folder\",\n targetParentFolder: action.input.parentFolder || null,\n });\n\n state.nodes.push({\n ...action.input,\n name,\n kind: \"folder\",\n parentFolder: action.input.parentFolder ?? null,\n });\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n deleteNodeOperation(state, action, dispatch) {\n const node = state.nodes.find((node) => node.id === action.input.id);\n if (!node) {\n throw new Error(`Node with id ${action.input.id} not found`);\n }\n const descendants = getDescendants(node, state.nodes);\n state.nodes = state.nodes.filter(\n (node) =>\n node.id !== action.input.id &&\n !descendants.find((descendant) => descendant.id === node.id),\n );\n\n [node, ...descendants]\n .filter((node) => isFileNode(node))\n .forEach((node) => {\n dispatch?.({\n type: \"DELETE_CHILD_DOCUMENT\",\n input: {\n id: node.id,\n },\n });\n });\n },\n updateFileOperation(state, action) {\n if (action.input.name && !isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n state.nodes = state.nodes.map((node) =>\n node.id === action.input.id\n ? {\n ...node,\n ...{\n name: handleTargetNameCollisions({\n nodes: state.nodes.filter((n) => n.id !== action.input.id),\n srcName: action.input.name ?? node.name,\n srcKind: \"file\",\n targetParentFolder:\n action.input.parentFolder ?? node.parentFolder,\n }),\n documentType:\n action.input.documentType ?? (node as FileNode).documentType,\n },\n }\n : node,\n );\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n updateNodeOperation(state, action) {\n if (action.input.name && !isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n state.nodes = state.nodes.map((node) =>\n node.id === action.input.id\n ? {\n ...node,\n ...{\n name: handleTargetNameCollisions({\n nodes: state.nodes.filter((n) => n.id !== action.input.id),\n srcName: action.input.name ?? node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder:\n action.input.parentFolder ?? node.parentFolder,\n }),\n parentFolder:\n action.input.parentFolder === null ? null : node.parentFolder,\n },\n }\n : node,\n );\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n copyNodeOperation(state, action, dispatch) {\n const node = state.nodes.find((node) => node.id === action.input.srcId);\n\n if (!node) {\n throw new Error(`Node with id ${action.input.srcId} not found`);\n }\n\n const duplicatedNode = state.nodes.find(\n (node) => node.id === action.input.targetId,\n );\n\n if (duplicatedNode) {\n throw new Error(`Node with id ${action.input.targetId} already exists`);\n }\n\n const name = handleTargetNameCollisions({\n nodes: state.nodes,\n srcName: action.input.targetName || node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder: action.input.targetParentFolder || null,\n });\n\n const newNode = {\n ...node,\n id: action.input.targetId,\n slug: action.input.targetId,\n name,\n parentFolder: action.input.targetParentFolder || null,\n };\n\n state.nodes.push(newNode);\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n\n const isFile = isFileNode(newNode);\n if (isFile) {\n dispatch?.({\n type: \"COPY_CHILD_DOCUMENT\",\n input: {\n id: action.input.srcId,\n newId: action.input.targetId,\n },\n });\n }\n },\n moveNodeOperation(state, action) {\n if (action.input.srcFolder === action.input.targetParentFolder) {\n throw new Error(\n \"Circular Reference Error: Attempting to move a node to its current parent folder\",\n );\n }\n\n const node = state.nodes.find((node) => node.id === action.input.srcFolder);\n\n if (!node) {\n throw new Error(`Node with id ${action.input.srcFolder} not found`);\n }\n\n const name = handleTargetNameCollisions({\n nodes: state.nodes,\n srcName: node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder: action.input.targetParentFolder || null,\n });\n\n if (isFolderNode(node)) {\n const descendants = getDescendants(node, state.nodes);\n // throw error if moving a folder to one of its descendants\n if (\n descendants.find(\n (descendant) => descendant.id === action.input.targetParentFolder,\n )\n ) {\n throw new Error(\n \"Circular Reference Error: Cannot move a folder to one of its descendants\",\n );\n }\n }\n\n state.nodes = state.nodes.map((node) => {\n if (node.id === action.input.srcFolder) {\n return {\n ...node,\n name,\n parentFolder: action.input.targetParentFolder || null,\n };\n }\n\n return node;\n });\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n};\n","import { isDocumentAction } from \"../../document-model/documents.js\";\nimport { createReducer } from \"../../document-model/reducer.js\";\nimport type { Reducer, StateReducer } from \"../../document-model/types.js\";\nimport { driveReducer } from \"../src/reducers/drive.js\";\nimport { nodeReducer } from \"../src/reducers/node.js\";\nimport {\n AddFileInputSchema,\n AddFolderInputSchema,\n AddListenerInputSchema,\n AddTriggerInputSchema,\n CopyNodeInputSchema,\n DeleteNodeInputSchema,\n MoveNodeInputSchema,\n RemoveListenerInputSchema,\n RemoveTriggerInputSchema,\n SetAvailableOfflineInputSchema,\n SetDriveIconInputSchema,\n SetDriveNameInputSchema,\n SetSharingTypeInputSchema,\n UpdateFileInputSchema,\n UpdateNodeInputSchema,\n} from \"./schema/zod.js\";\nimport type { DocumentDrivePHState } from \"./types.js\";\n\nconst driveStateReducer: StateReducer<DocumentDrivePHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n\n const typedAction = action as any;\n switch (typedAction.type) {\n case \"ADD_FILE\":\n AddFileInputSchema().parse(typedAction.input);\n nodeReducer.addFileOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_FOLDER\":\n AddFolderInputSchema().parse(typedAction.input);\n nodeReducer.addFolderOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"DELETE_NODE\":\n DeleteNodeInputSchema().parse(typedAction.input);\n nodeReducer.deleteNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"UPDATE_FILE\":\n UpdateFileInputSchema().parse(typedAction.input);\n nodeReducer.updateFileOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"UPDATE_NODE\":\n UpdateNodeInputSchema().parse(typedAction.input);\n nodeReducer.updateNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"COPY_NODE\":\n CopyNodeInputSchema().parse(typedAction.input);\n nodeReducer.copyNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"MOVE_NODE\":\n MoveNodeInputSchema().parse(typedAction.input);\n nodeReducer.moveNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_DRIVE_NAME\":\n SetDriveNameInputSchema().parse(typedAction.input);\n driveReducer.setDriveNameOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_DRIVE_ICON\":\n SetDriveIconInputSchema().parse(typedAction.input);\n driveReducer.setDriveIconOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_SHARING_TYPE\":\n SetSharingTypeInputSchema().parse(typedAction.input);\n driveReducer.setSharingTypeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_AVAILABLE_OFFLINE\":\n SetAvailableOfflineInputSchema().parse(typedAction.input);\n driveReducer.setAvailableOfflineOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_LISTENER\":\n AddListenerInputSchema().parse(typedAction.input);\n driveReducer.addListenerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"REMOVE_LISTENER\":\n RemoveListenerInputSchema().parse(typedAction.input);\n driveReducer.removeListenerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_TRIGGER\":\n AddTriggerInputSchema().parse(typedAction.input);\n driveReducer.addTriggerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"REMOVE_TRIGGER\":\n RemoveTriggerInputSchema().parse(typedAction.input);\n driveReducer.removeTriggerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n default:\n return state;\n }\n};\n\nexport const driveDocumentReducer: Reducer<DocumentDrivePHState> =\n createReducer<DocumentDrivePHState>(driveStateReducer);\n","import type {\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n} from \"./schema/types.js\";\nimport type { DocumentDrivePHState } from \"./types.js\";\nimport type {\n AssertIsDocumentOfType,\n AssertIsStateOfType,\n CreateDocument,\n CreateState,\n IsDocumentOfType,\n IsStateOfType,\n LoadFromInput,\n SaveToFileHandle,\n} from \"document-model\";\nimport {\n baseCreateDocument,\n baseLoadFromInput,\n baseSaveToFileHandle,\n defaultBaseState,\n} from \"document-model\";\nimport {\n assertIsDriveDocument,\n assertIsDriveState,\n isDriveDocument,\n isDriveState,\n} from \"./document-schema.js\";\nimport { driveDocumentType } from \"./document-type.js\";\nimport { driveDocumentReducer } from \"./reducer.js\";\n\nexport const initialGlobalState: DocumentDriveGlobalState = {\n name: \"\",\n nodes: [],\n icon: null,\n};\nexport const initialLocalState: DocumentDriveLocalState = {\n listeners: [],\n triggers: [],\n sharingType: \"private\",\n availableOffline: false,\n};\n\nexport const driveCreateState: CreateState<DocumentDrivePHState> = (\n state: Partial<DocumentDrivePHState> | undefined,\n) => {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n};\n\nexport const driveCreateDocument: CreateDocument<DocumentDrivePHState> = (\n state,\n) => {\n return baseCreateDocument(driveCreateState, state, driveDocumentType);\n};\n\nexport const driveSaveToFileHandle: SaveToFileHandle = (document, input) => {\n return baseSaveToFileHandle(document, input);\n};\n\nexport const driveLoadFromInput: LoadFromInput<DocumentDrivePHState> = (\n input,\n) => {\n return baseLoadFromInput(input, driveDocumentReducer);\n};\n\nexport const isStateOfType: IsStateOfType<DocumentDrivePHState> = (state) => {\n return isDriveState(state);\n};\n\nexport const assertIsStateOfType: AssertIsStateOfType<DocumentDrivePHState> = (\n state,\n) => {\n assertIsDriveState(state);\n};\n\nexport const isDocumentOfType: IsDocumentOfType<DocumentDrivePHState> = (\n document,\n) => {\n return isDriveDocument(document);\n};\n\nexport const assertIsDocumentOfType: AssertIsDocumentOfType<\n DocumentDrivePHState\n> = (document) => {\n assertIsDriveDocument(document);\n};\n","import { createState, defaultBaseState } from \"../document-model/state.js\";\nimport { driveDocumentFileExtension } from \"./constants.js\";\nimport * as actions from \"./gen/creators.js\";\nimport { driveDocumentModel } from \"./gen/document-model.js\";\nimport { driveDocumentReducer } from \"./gen/reducer.js\";\nimport {\n assertIsDocumentOfType,\n assertIsStateOfType,\n driveCreateDocument,\n driveCreateState,\n driveLoadFromInput,\n driveSaveToFileHandle,\n isDocumentOfType,\n isStateOfType,\n} from \"./gen/utils.js\";\nimport type { DriveDocumentModelModule } from \"./types.js\";\nexport const driveDocumentModelModule: DriveDocumentModelModule = {\n actions,\n reducer: driveDocumentReducer,\n documentModel: createState(defaultBaseState(), driveDocumentModel),\n utils: {\n fileExtension: driveDocumentFileExtension,\n createState: driveCreateState,\n createDocument: driveCreateDocument,\n loadFromInput: driveLoadFromInput,\n saveToFileHandle: driveSaveToFileHandle,\n isStateOfType,\n assertIsStateOfType,\n isDocumentOfType,\n assertIsDocumentOfType,\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAa,6BAA6B;;;ACuC1C,MAAa,uBAAuB,MAClC,MAAM,KAAA,KAAa,MAAM;AAE3B,MAAa,0BAA0B,EACpC,KAAK,CACL,QAAQ,MAAM,oBAAoB,EAAE,CAAC;AAExC,MAAa,wBAAwB,EAAE,KAAK;CAC1C;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAa,oBAAoB,EAAE,KAAK,CA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,UACG;AACH,QAAO;EACL,GAAG,kBAAkB;EACrB,QAAQ;GAAE,GAAG;GAAoB,GAAG,OAAO;GAAQ;EACnD,OAAO;GAAE,GAAG;GAAmB,GAAG,OAAO;GAAO;EACjD;;AAGH,MAAa,uBACX,UACG;AACH,QAAO,mBAAmB,kBAAkB,OAAO,kBAAkB;;AAGvE,MAAa,yBAA2C,UAAU,UAAU;AAC1E,QAAO,qBAAqB,UAAU,MAAM;;AAG9C,MAAa,sBACX,UACG;AACH,QAAO,kBAAkB,OAAO,qBAAqB;;AAGvD,MAAa,iBAAsD,UAAU;AAC3E,QAAO,aAAa,MAAM;;AAG5B,MAAa,uBACX,UACG;AACH,oBAAmB,MAAM;;AAG3B,MAAa,oBACX,aACG;AACH,QAAO,gBAAgB,SAAS;;AAGlC,MAAa,0BAER,aAAa;AAChB,uBAAsB,SAAS;;;;ACvEjC,MAAa,2BAAqD;CAChE,SAAA;CACA,SAAS;CACT,eAAeA,cAAY,kBAAkB,EAAE,mBAAmB;CAClE,OAAO;EACL,eAAe;EACf,aAAa;EACb,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB;EACA;EACA;EACA;EACD;CACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["createState"],"sources":["../../document-drive/constants.ts","../../document-drive/gen/schema/zod.ts","../../document-drive/gen/node/creators.ts","../../document-drive/gen/drive/creators.ts","../../document-drive/gen/creators.ts","../../document-drive/gen/document-model.ts","../../document-drive/gen/document-type.ts","../../document-drive/gen/document-schema.ts","../../document-drive/gen/ph-factories.ts","../../document-drive/src/reducers/drive.ts","../../document-drive/src/utils.ts","../../document-drive/src/reducers/node.ts","../../document-drive/gen/reducer.ts","../../document-drive/gen/utils.ts","../../document-drive/module.ts"],"sourcesContent":["export const driveDocumentFileExtension = \"phdd\";\n","import type {\n AddFileInput,\n AddFolderInput,\n AddListenerInput,\n AddTriggerInput,\n CopyNodeInput,\n DeleteNodeInput,\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n FileNode,\n FolderNode,\n Listener,\n ListenerCallInfo,\n ListenerCallInfoInput,\n ListenerFilter,\n ListenerFilterInput,\n ListenerInput,\n MoveNodeInput,\n PullResponderTriggerData,\n PullResponderTriggerDataInput,\n RemoveListenerInput,\n RemoveTriggerInput,\n SetAvailableOfflineInput,\n SetDriveIconInput,\n SetDriveNameInput,\n SetSharingTypeInput,\n Trigger,\n TriggerInput,\n UpdateFileInput,\n UpdateNodeInput,\n} from \"./types.js\";\nimport { z } from \"zod\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K], T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport const TransmitterTypeSchema = z.enum([\n \"Internal\",\n \"MatrixConnect\",\n \"PullResponder\",\n \"RESTWebhook\",\n \"SecureConnect\",\n \"SwitchboardPush\",\n]);\n\nexport const TriggerTypeSchema = z.enum([\"PullResponder\"]);\n\nexport function AddFileInputSchema(): z.ZodObject<Properties<AddFileInput>> {\n return z.object({\n documentType: z.string(),\n id: z.string(),\n name: z.string(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function AddFolderInputSchema(): z.ZodObject<\n Properties<AddFolderInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function AddListenerInputSchema(): z.ZodObject<\n Properties<AddListenerInput>\n> {\n return z.object({\n listener: ListenerInputSchema(),\n });\n}\n\nexport function AddTriggerInputSchema(): z.ZodObject<\n Properties<AddTriggerInput>\n> {\n return z.object({\n trigger: TriggerInputSchema(),\n });\n}\n\nexport function CopyNodeInputSchema(): z.ZodObject<Properties<CopyNodeInput>> {\n return z.object({\n srcId: z.string(),\n targetId: z.string(),\n targetName: z.string().nullish(),\n targetParentFolder: z.string().nullish(),\n });\n}\n\nexport function DeleteNodeInputSchema(): z.ZodObject<\n Properties<DeleteNodeInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DocumentDriveLocalStateSchema(): z.ZodObject<\n Properties<DocumentDriveLocalState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentDriveLocalState\").optional(),\n availableOffline: z.boolean(),\n listeners: z.array(ListenerSchema()),\n sharingType: z.string().nullable(),\n triggers: z.array(TriggerSchema()),\n });\n}\n\nexport function DocumentDriveStateSchema(): z.ZodObject<\n Properties<DocumentDriveGlobalState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentDriveState\").optional(),\n icon: z.string().nullable(),\n name: z.string(),\n nodes: z.array(NodeSchema()),\n });\n}\n\nexport function FileNodeSchema(): z.ZodObject<Properties<FileNode>> {\n return z.object({\n __typename: z.literal(\"FileNode\").optional(),\n documentType: z.string(),\n id: z.string(),\n kind: z.string(),\n name: z.string(),\n parentFolder: z.string().nullable(),\n });\n}\n\nexport function FolderNodeSchema(): z.ZodObject<Properties<FolderNode>> {\n return z.object({\n __typename: z.literal(\"FolderNode\").optional(),\n id: z.string(),\n kind: z.string(),\n name: z.string(),\n parentFolder: z.string().nullable(),\n });\n}\n\nexport function ListenerSchema(): z.ZodObject<Properties<Listener>> {\n return z.object({\n __typename: z.literal(\"Listener\").optional(),\n block: z.boolean(),\n callInfo: ListenerCallInfoSchema().nullable(),\n filter: ListenerFilterSchema(),\n label: z.string().nullable(),\n listenerId: z.string(),\n system: z.boolean(),\n });\n}\n\nexport function ListenerInputSchema(): z.ZodObject<Properties<ListenerInput>> {\n return z.object({\n block: z.boolean(),\n callInfo: ListenerCallInfoInputSchema().nullish(),\n filter: ListenerFilterInputSchema(),\n label: z.string().nullish(),\n listenerId: z.string(),\n system: z.boolean(),\n });\n}\n\nexport function ListenerCallInfoSchema(): z.ZodObject<\n Properties<ListenerCallInfo>\n> {\n return z.object({\n __typename: z.literal(\"ListenerCallInfo\").optional(),\n data: z.string().nullable(),\n name: z.string().nullable(),\n transmitterType: TransmitterTypeSchema.nullable(),\n });\n}\n\nexport function ListenerCallInfoInputSchema(): z.ZodObject<\n Properties<ListenerCallInfoInput>\n> {\n return z.object({\n data: z.string().nullish(),\n name: z.string().nullish(),\n transmitterType: TransmitterTypeSchema.nullish(),\n });\n}\n\nexport function ListenerFilterSchema(): z.ZodObject<\n Properties<ListenerFilter>\n> {\n return z.object({\n __typename: z.literal(\"ListenerFilter\").optional(),\n branch: z.array(z.string()).nullable(),\n documentId: z.array(z.string()).nullable(),\n documentType: z.array(z.string()),\n scope: z.array(z.string()).nullable(),\n });\n}\n\nexport function ListenerFilterInputSchema(): z.ZodObject<\n Properties<ListenerFilterInput>\n> {\n return z.object({\n branch: z.array(z.string()).nullish(),\n documentId: z.array(z.string()).nullish(),\n documentType: z.array(z.string()).nullish(),\n scope: z.array(z.string()).nullish(),\n });\n}\n\nexport function MoveNodeInputSchema(): z.ZodObject<Properties<MoveNodeInput>> {\n return z.object({\n srcFolder: z.string(),\n targetParentFolder: z.string().nullish(),\n });\n}\n\nexport function NodeSchema() {\n return z.union([FileNodeSchema(), FolderNodeSchema()]);\n}\n\nexport function PullResponderTriggerDataSchema(): z.ZodObject<\n Properties<PullResponderTriggerData>\n> {\n return z.object({\n __typename: z.literal(\"PullResponderTriggerData\").optional(),\n interval: z.string(),\n listenerId: z.string(),\n url: z.string(),\n });\n}\n\nexport function PullResponderTriggerDataInputSchema(): z.ZodObject<\n Properties<PullResponderTriggerDataInput>\n> {\n return z.object({\n interval: z.string(),\n listenerId: z.string(),\n url: z.string(),\n });\n}\n\nexport function RemoveListenerInputSchema(): z.ZodObject<\n Properties<RemoveListenerInput>\n> {\n return z.object({\n listenerId: z.string(),\n });\n}\n\nexport function RemoveTriggerInputSchema(): z.ZodObject<\n Properties<RemoveTriggerInput>\n> {\n return z.object({\n triggerId: z.string(),\n });\n}\n\nexport function SetAvailableOfflineInputSchema(): z.ZodObject<\n Properties<SetAvailableOfflineInput>\n> {\n return z.object({\n availableOffline: z.boolean(),\n });\n}\n\nexport function SetDriveIconInputSchema(): z.ZodObject<\n Properties<SetDriveIconInput>\n> {\n return z.object({\n icon: z.string().nullish(),\n });\n}\n\nexport function SetDriveNameInputSchema(): z.ZodObject<\n Properties<SetDriveNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetSharingTypeInputSchema(): z.ZodObject<\n Properties<SetSharingTypeInput>\n> {\n return z.object({\n type: z.string(),\n });\n}\n\nexport function TriggerSchema(): z.ZodObject<Properties<Trigger>> {\n return z.object({\n __typename: z.literal(\"Trigger\").optional(),\n data: TriggerDataSchema().nullable(),\n id: z.string(),\n type: TriggerTypeSchema,\n });\n}\n\nexport function TriggerInputSchema(): z.ZodObject<Properties<TriggerInput>> {\n return z.object({\n data: PullResponderTriggerDataInputSchema().nullish(),\n id: z.string(),\n type: TriggerTypeSchema,\n });\n}\n\nexport function TriggerDataSchema() {\n return PullResponderTriggerDataSchema();\n}\n\nexport function UpdateFileInputSchema(): z.ZodObject<\n Properties<UpdateFileInput>\n> {\n return z.object({\n documentType: z.string().nullish(),\n id: z.string(),\n name: z.string().nullish(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function UpdateNodeInputSchema(): z.ZodObject<\n Properties<UpdateNodeInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n parentFolder: z.string().nullish(),\n });\n}\n","import type {\n AddFileInput,\n AddFolderInput,\n CopyNodeInput,\n DeleteNodeInput,\n MoveNodeInput,\n UpdateFileInput,\n UpdateNodeInput,\n} from \"../schema/types.js\";\nimport type { LegacyAddFileAction, LegacyAddFileInput } from \"../types.js\";\nimport type {\n AddFileAction,\n AddFolderAction,\n CopyNodeAction,\n DeleteNodeAction,\n MoveNodeAction,\n UpdateFileAction,\n UpdateNodeAction,\n} from \"./actions.js\";\nimport { createAction } from \"document-model\";\nimport {\n AddFileInputSchema,\n AddFolderInputSchema,\n CopyNodeInputSchema,\n DeleteNodeInputSchema,\n MoveNodeInputSchema,\n UpdateFileInputSchema,\n UpdateNodeInputSchema,\n} from \"../schema/zod.js\";\n\n/**\n * @deprecated Use addFile with {@link AddFileInput} instead. This overload will be removed in the future.\n */\nexport function addFile(input: LegacyAddFileInput): LegacyAddFileAction;\nexport function addFile(input: AddFileInput): AddFileAction;\nexport function addFile(\n input: LegacyAddFileInput | AddFileInput,\n): typeof input extends LegacyAddFileInput\n ? LegacyAddFileAction\n : AddFileAction {\n if (input && typeof input === \"object\" && \"synchronizationUnits\" in input) {\n // Legacy overload\n return createAction<AddFileAction>(\n \"ADD_FILE\",\n { ...input },\n undefined,\n undefined,\n \"global\",\n );\n }\n // Standard overload\n return createAction<AddFileAction>(\n \"ADD_FILE\",\n { ...input },\n undefined,\n AddFileInputSchema,\n \"global\",\n );\n}\n\nexport const addFolder = (input: AddFolderInput) =>\n createAction<AddFolderAction>(\n \"ADD_FOLDER\",\n { ...input },\n undefined,\n AddFolderInputSchema,\n \"global\",\n );\n\nexport const deleteNode = (input: DeleteNodeInput) =>\n createAction<DeleteNodeAction>(\n \"DELETE_NODE\",\n { ...input },\n undefined,\n DeleteNodeInputSchema,\n \"global\",\n );\n\nexport const updateFile = (input: UpdateFileInput) =>\n createAction<UpdateFileAction>(\n \"UPDATE_FILE\",\n { ...input },\n undefined,\n UpdateFileInputSchema,\n \"global\",\n );\n\nexport const updateNode = (input: UpdateNodeInput) =>\n createAction<UpdateNodeAction>(\n \"UPDATE_NODE\",\n { ...input },\n undefined,\n UpdateNodeInputSchema,\n \"global\",\n );\n\nexport const copyNode = (input: CopyNodeInput) =>\n createAction<CopyNodeAction>(\n \"COPY_NODE\",\n { ...input },\n undefined,\n CopyNodeInputSchema,\n \"global\",\n );\n\nexport const moveNode = (input: MoveNodeInput) =>\n createAction<MoveNodeAction>(\n \"MOVE_NODE\",\n { ...input },\n undefined,\n MoveNodeInputSchema,\n \"global\",\n );\n","import type {\n AddListenerInput,\n AddTriggerInput,\n RemoveListenerInput,\n RemoveTriggerInput,\n SetAvailableOfflineInput,\n SetDriveIconInput,\n SetDriveNameInput,\n SetSharingTypeInput,\n} from \"../schema/types.js\";\nimport type {\n AddListenerAction,\n AddTriggerAction,\n RemoveListenerAction,\n RemoveTriggerAction,\n SetAvailableOfflineAction,\n SetDriveIconAction,\n SetDriveNameAction,\n SetSharingTypeAction,\n} from \"./actions.js\";\nimport { createAction } from \"document-model\";\nimport {\n AddListenerInputSchema,\n AddTriggerInputSchema,\n RemoveListenerInputSchema,\n RemoveTriggerInputSchema,\n SetAvailableOfflineInputSchema,\n SetDriveIconInputSchema,\n SetDriveNameInputSchema,\n SetSharingTypeInputSchema,\n} from \"../schema/zod.js\";\n\nexport const setDriveName = (input: SetDriveNameInput) =>\n createAction<SetDriveNameAction>(\n \"SET_DRIVE_NAME\",\n { ...input },\n undefined,\n SetDriveNameInputSchema,\n \"global\",\n );\n\nexport const setDriveIcon = (input: SetDriveIconInput) =>\n createAction<SetDriveIconAction>(\n \"SET_DRIVE_ICON\",\n { ...input },\n undefined,\n SetDriveIconInputSchema,\n \"global\",\n );\n\nexport const setSharingType = (input: SetSharingTypeInput) =>\n createAction<SetSharingTypeAction>(\n \"SET_SHARING_TYPE\",\n { ...input },\n undefined,\n SetSharingTypeInputSchema,\n \"local\",\n );\n\nexport const setAvailableOffline = (input: SetAvailableOfflineInput) =>\n createAction<SetAvailableOfflineAction>(\n \"SET_AVAILABLE_OFFLINE\",\n { ...input },\n undefined,\n SetAvailableOfflineInputSchema,\n \"local\",\n );\n\nexport const addListener = (input: AddListenerInput) =>\n createAction<AddListenerAction>(\n \"ADD_LISTENER\",\n { ...input },\n undefined,\n AddListenerInputSchema,\n \"local\",\n );\n\nexport const removeListener = (input: RemoveListenerInput) =>\n createAction<RemoveListenerAction>(\n \"REMOVE_LISTENER\",\n { ...input },\n undefined,\n RemoveListenerInputSchema,\n \"local\",\n );\n\nexport const addTrigger = (input: AddTriggerInput) =>\n createAction<AddTriggerAction>(\n \"ADD_TRIGGER\",\n { ...input },\n undefined,\n AddTriggerInputSchema,\n \"local\",\n );\n\nexport const removeTrigger = (input: RemoveTriggerInput) =>\n createAction<RemoveTriggerAction>(\n \"REMOVE_TRIGGER\",\n { ...input },\n undefined,\n RemoveTriggerInputSchema,\n \"local\",\n );\n","export * from \"./node/creators.js\";\nexport * from \"./drive/creators.js\";\n","import type { DocumentModelGlobalState } from \"../../document-model/types.js\";\n\nexport const driveDocumentModel: DocumentModelGlobalState = {\n id: \"powerhouse/document-drive\",\n name: \"DocumentDrive\",\n extension: \"phdd\",\n description: \"\",\n author: {\n name: \"Powerhouse Inc\",\n website: \"https://www.powerhouse.inc/\",\n },\n specifications: [\n {\n version: 1,\n changeLog: [],\n state: {\n global: {\n schema:\n \"type FolderNode {\\n id: String!\\n name: String!\\n kind: String!\\n parentFolder: String\\n}\\n\\ntype FileNode {\\n id: String!\\n name: String!\\n kind: String!\\n documentType: String!\\n parentFolder: String\\n}\\n\\nunion Node = FolderNode | FileNode\\n\\ntype DocumentDriveState {\\n name: String!\\n nodes: [Node!]!\\n icon: String\\n}\",\n initialValue: '\"{\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"nodes\\\\\":[],\\\\\"icon\\\\\":null}\"',\n examples: [],\n },\n local: {\n schema:\n \"type ListenerFilter {\\n documentType: [String!]!\\n documentId: [ID!]\\n scope: [String!]\\n branch: [String!]\\n}\\n\\nenum TransmitterType {\\n Internal,\\n SwitchboardPush,\\n PullResponder,\\n SecureConnect, \\n MatrixConnect,\\n RESTWebhook\\n}\\n\\ntype ListenerCallInfo {\\n transmitterType: TransmitterType\\n name: String\\n data: String\\n}\\n\\ntype Listener {\\n listenerId: ID!\\n label: String\\n block: Boolean!\\n system: Boolean!\\n filter: ListenerFilter!\\n callInfo: ListenerCallInfo\\n}\\n\\nenum TriggerType {\\n PullResponder\\n}\\n\\ntype PullResponderTriggerData {\\n listenerId: ID!\\n url: String!\\n interval: String!\\n}\\n\\nunion TriggerData = PullResponderTriggerData\\n\\ntype Trigger {\\n id: ID!\\n type: TriggerType!\\n data: TriggerData\\n}\\n\\ntype DocumentDriveLocalState{\\n sharingType: String\\n listeners: [Listener!]!\\n triggers: [Trigger!]!\\n availableOffline: Boolean!\\n}\",\n initialValue:\n '\"{ \\\\\"listeners\\\\\": [], \\\\\"triggers\\\\\": [], \\\\\"sharingType\\\\\": \\\\\"private\\\\\", \\\\\"availableOffline\\\\\": false}\"',\n examples: [],\n },\n },\n modules: [\n {\n id: \"GRzuvv78tBvmB6ciitokLfonNHA=\",\n name: \"Node\",\n description: \"\",\n operations: [\n {\n id: \"7xiTdxonc9yEASR8sfV/KnbSV10=\",\n name: \"ADD_FILE\",\n description: \"\",\n schema:\n \"input AddFileInput {\\n id: ID!\\n name: String!\\n documentType: String!\\n parentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"4lzNMMKKdIAtEU6i12xLgi9hp+U=\",\n name: \"ADD_FOLDER\",\n description: \"\",\n schema:\n \"input AddFolderInput {\\n id: ID!\\n name: String!\\n parentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"53jH2/3TWTTcgCJiv2C+BmuC6i0=\",\n name: \"DELETE_NODE\",\n description: \"\",\n schema: \"input DeleteNodeInput {\\n id: ID!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"pNn+Y1/HVq/GNMk7t0u3g3gtMLE=\",\n name: \"UPDATE_FILE\",\n description: \"\",\n schema:\n \"input UpdateFileInput {\\n id: ID!\\n parentFolder: ID\\n name: String\\n documentType: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"P0x1M8Mnt+Q/+9nggkwgVbfybsc=\",\n name: \"UPDATE_NODE\",\n description: \"\",\n schema:\n \"input UpdateNodeInput {\\n id: ID!\\n parentFolder: ID\\n name: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"vnQ7OB5b3wGLgjhbgJqAIpA+JLE=\",\n name: \"COPY_NODE\",\n description: \"\",\n schema:\n \"input CopyNodeInput {\\n srcId: ID!\\n targetId: ID!\\n targetName: String\\n targetParentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"VNyiD/sNGzk6k9A1Qe7s8dmrJxA=\",\n name: \"MOVE_NODE\",\n description: \"\",\n schema:\n \"input MoveNodeInput {\\n srcFolder: ID!\\n targetParentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"0dHwHlxOM9x0vMZ+gLnKxf2qTEo=\",\n name: \"Drive\",\n description: \"\",\n operations: [\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z1dsU=\",\n name: \"SET_DRIVE_NAME\",\n description: \"\",\n schema: \"input SetDriveNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z30dsU=\",\n name: \"SET_DRIVE_ICON\",\n description: \"\",\n schema: \"input SetDriveIconInput {\\n icon: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z2dsU=\",\n name: \"SET_SHARING_TYPE\",\n description: \"\",\n schema: \"input SetSharingTypeInput {\\n type: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z3dsU=\",\n name: \"SET_AVAILABLE_OFFLINE\",\n description: \"\",\n schema:\n \"input SetAvailableOfflineInput {\\n availableOffline: Boolean!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z9dsU=\",\n name: \"ADD_LISTENER\",\n description: \"\",\n schema:\n \"input ListenerFilterInput {\\n documentType: [String!]\\n documentId: [ID!]\\n scope: [String!]\\n branch: [String!]\\n}\\n\\ninput ListenerCallInfoInput {\\n transmitterType: TransmitterType\\n name: String\\n data: String\\n}\\n\\ninput ListenerInput {\\n listenerId: ID!\\n label: String\\n block: Boolean!\\n system: Boolean!\\n filter: ListenerFilterInput!\\n callInfo: ListenerCallInfoInput\\n}\\n\\ninput AddListenerInput {\\n listener: ListenerInput!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z10dsU=\",\n name: \"REMOVE_LISTENER\",\n description: \"\",\n schema: \"input RemoveListenerInput {\\n listenerId: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z20dsU=\",\n name: \"ADD_TRIGGER\",\n description: \"\",\n schema:\n \"input PullResponderTriggerDataInput {\\n listenerId: ID!\\n url: String!\\n interval: String!\\n}\\n\\ninput TriggerInput {\\n id: ID!\\n type: TriggerType!\\n data: PullResponderTriggerDataInput\\n}\\n\\ninput AddTriggerInput {\\n trigger: TriggerInput!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z30dsU=\",\n name: \"REMOVE_TRIGGER\",\n description: \"\",\n schema: \"input RemoveTriggerInput {\\n triggerId: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n ],\n },\n ],\n },\n ],\n};\n","export const driveDocumentType = \"powerhouse/document-drive\";\n","import { z } from \"zod\";\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"../../document-model/document-schema.js\";\nimport { driveDocumentType } from \"./document-type.js\";\nimport {\n DocumentDriveLocalStateSchema,\n DocumentDriveStateSchema,\n} from \"./schema/zod.js\";\nimport type { DocumentDriveDocument, DocumentDrivePHState } from \"./types.js\";\n\n/** Schema for validating the header object of a Drive document */\nexport const DriveDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({\n documentType: z.literal(driveDocumentType),\n});\n\n/** Schema for validating the state object of a Drive document */\nexport const DrivePHStateSchema = BaseDocumentStateSchema.extend({\n global: DocumentDriveStateSchema(),\n local: DocumentDriveLocalStateSchema(),\n});\n\nexport const DriveDocumentSchema = z.object({\n header: DriveDocumentHeaderSchema,\n state: DrivePHStateSchema,\n initialState: DrivePHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a Drive document state object */\nexport function isDriveState(state: unknown): state is DocumentDrivePHState {\n return DrivePHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a Drive document state object */\nexport function assertIsDriveState(\n state: unknown,\n): asserts state is DocumentDrivePHState {\n DrivePHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a Drive document */\nexport function isDriveDocument(\n document: unknown,\n): document is DocumentDriveDocument {\n return DriveDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a Drive document */\nexport function assertIsDriveDocument(\n document: unknown,\n): asserts document is DocumentDriveDocument {\n DriveDocumentSchema.parse(document);\n}\n","/**\n * Factory methods for creating DocumentDriveDocument instances\n */\n\nimport {\n createBaseState,\n defaultBaseState,\n type PHBaseState,\n} from \"../../document-model/state.js\";\nimport type {\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n DocumentDrivePHState,\n} from \"./types.js\";\n\nexport function defaultGlobalState(): DocumentDriveGlobalState {\n return {\n icon: null,\n name: \"\",\n nodes: [],\n };\n}\n\nexport function defaultLocalState(): DocumentDriveLocalState {\n return {\n availableOffline: false,\n listeners: [],\n sharingType: null,\n triggers: [],\n };\n}\n\nexport function defaultPHState(): DocumentDrivePHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(\n state?: Partial<DocumentDriveGlobalState>,\n): DocumentDriveGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n } as DocumentDriveGlobalState;\n}\n\nexport function createLocalState(\n state?: Partial<DocumentDriveLocalState>,\n): DocumentDriveLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as DocumentDriveLocalState;\n}\n\nexport function createState(\n baseState?: Partial<PHBaseState>,\n globalState?: Partial<DocumentDriveGlobalState>,\n localState?: Partial<DocumentDriveLocalState>,\n): DocumentDrivePHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport type { Listener, Trigger } from \"../../gen/schema/types.js\";\nimport type { DocumentDriveDriveOperations } from \"../../gen/drive/actions.js\";\nimport { isDraft, original } from \"mutative\";\n\n/**\n * The untouched base of a mutative draft, or the value itself when it is not a\n * draft. Build replacement lists from it and freeze them before assigning, as\n * the node reducer does, so finalize skips the walk over the assigned list.\n */\nfunction readBase<T extends object>(value: T): T {\n return isDraft(value) ? original(value) : value;\n}\n\nexport const driveReducer: DocumentDriveDriveOperations = {\n setDriveNameOperation(state, action, dispatch) {\n state.name = action.input.name;\n },\n setDriveIconOperation(state, action, dispatch) {\n state.icon = action.input.icon ?? null;\n },\n setSharingTypeOperation(state, action, dispatch) {\n state.sharingType = action.input.type;\n },\n setAvailableOfflineOperation(state, action, dispatch) {\n state.availableOffline = action.input.availableOffline;\n },\n addListenerOperation(state, action, dispatch) {\n const { listener: input } = action.input;\n if (state.listeners.find((l) => l.listenerId === input.listenerId)) {\n throw new Error(`A listener with Id: ${input.listenerId} already exists`);\n }\n // Convert InputMaybe (undefined | null | T) to Maybe (null | T)\n const listener: Listener = {\n listenerId: input.listenerId,\n label: input.label ?? null,\n block: input.block,\n system: input.system,\n filter: {\n documentType: input.filter.documentType ?? null,\n documentId: input.filter.documentId ?? null,\n scope: input.filter.scope ?? null,\n branch: input.filter.branch ?? null,\n },\n callInfo: input.callInfo\n ? {\n transmitterType: input.callInfo.transmitterType ?? null,\n name: input.callInfo.name ?? null,\n data: input.callInfo.data ?? null,\n }\n : null,\n };\n state.listeners.push(listener);\n },\n removeListenerOperation(state, action, dispatch) {\n const listeners = readBase(state).listeners.filter(\n (listener) => listener.listenerId !== action.input.listenerId,\n );\n state.listeners = Object.freeze(listeners) as Listener[];\n },\n addTriggerOperation(state, action, dispatch) {\n const { trigger: input } = action.input;\n if (state.triggers.find((t) => t.id === input.id)) {\n throw new Error(`A trigger with Id: ${input.id} already exists`);\n }\n // Convert InputMaybe to Maybe - PullResponderTriggerData has all required fields so spread works\n const trigger: Trigger = {\n id: input.id,\n type: input.type,\n data: input.data ? { ...input.data } : null,\n };\n state.triggers.push(trigger);\n },\n removeTriggerOperation(state, action, dispatch) {\n const triggers = readBase(state).triggers.filter(\n (trigger) => trigger.id !== action.input.triggerId,\n );\n state.triggers = Object.freeze(triggers) as Trigger[];\n },\n};\n","import type {\n CopyNodeInput,\n FileNode,\n FolderNode,\n Node,\n} from \"../gen/schema/types.js\";\nimport type {\n GenerateNodesCopyIdGenerator,\n GenerateNodesCopySrc,\n} from \"./types.js\";\nimport { isDraft, original } from \"mutative\";\n\nexport function isFileNode(node: Node): node is FileNode {\n return node.kind === \"file\";\n}\n\nexport function isFolderNode(node: Node): node is FolderNode {\n return node.kind === \"folder\";\n}\n\nexport function getAncestors(node: Node, allNodes: Node[]): Node[] {\n if (!node.parentFolder) {\n return [];\n } else {\n const parentNode = allNodes.find((_node) => _node.id === node.parentFolder);\n if (!parentNode) {\n throw new Error(`Parent node with id ${node.parentFolder} not found`);\n }\n return [parentNode, ...getAncestors(parentNode, allNodes)];\n }\n}\n\nexport function getDescendants(node: Node, allNodes: Node[]): Node[] {\n const children = allNodes.filter((_node) => _node.parentFolder === node.id);\n const descendants = children.map((child) => getDescendants(child, allNodes));\n return [...children, ...descendants.flat()];\n}\n\n/**\n * Generates a copy of nodes based on the provided source and target information.\n * @param src - The source information for generating the copy.\n * @param idGenerator - The function used to generate new IDs for the copied nodes.\n * @param nodes - The array of nodes to copy from.\n * @returns An array of copied nodes with updated IDs and parent folders.\n * @throws Error if the root node with the specified ID is not found.\n */\nexport function generateNodesCopy(\n src: GenerateNodesCopySrc,\n idGenerator: GenerateNodesCopyIdGenerator,\n nodes: Node[],\n): CopyNodeInput[] {\n const rootNode = nodes.find((node) => node.id === src.srcId);\n\n if (!rootNode) {\n throw new Error(`Node with id ${src.srcId} not found`);\n }\n\n const nodesToCopy = [\n {\n ...rootNode,\n name: src.targetName || rootNode.name,\n parentFolder: src.targetParentFolder || null,\n },\n ...getDescendants(rootNode, nodes),\n ];\n\n const ids: Record<string, string | undefined> = {};\n\n // Add targetParentFolder to ids so that is not replaced by a new id\n if (src.targetParentFolder) {\n ids[src.targetParentFolder] = src.targetParentFolder;\n }\n\n const getNewNodeId = (node: Node): string => {\n let newId = ids[node.id];\n\n if (!newId) {\n const oldId = node.id;\n newId = idGenerator(node);\n ids[oldId] = newId;\n }\n\n return newId;\n };\n\n const copyNodesInput = nodesToCopy.map<CopyNodeInput>((node) => ({\n srcId: node.id,\n targetId: getNewNodeId(node),\n targetName: node.name,\n targetParentFolder: node.parentFolder ? ids[node.parentFolder] : null,\n }));\n\n return copyNodesInput;\n}\n\nexport function getNextCopyNumber(\n files: string[],\n baseFilename: string,\n): number {\n let maxNumber = 0; // Start by assuming no copies exist\n\n // Regex to find files that match the base filename followed by \" (copy)\" and possibly a number\n const regex = new RegExp(\n `^${escapeRegExp(baseFilename)} \\\\(copy\\\\)(?: (\\\\d+))?$`,\n );\n\n for (const file of files) {\n const match = file.match(regex);\n if (match) {\n const number = match[1] ? parseInt(match[1], 10) : 1;\n if (number > maxNumber) {\n maxNumber = number;\n }\n }\n }\n\n return maxNumber + 1;\n}\n\nexport function escapeRegExp(string: string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n\n/**\n * A plain, unfrozen copy of the node list for read-only scans. Inside a\n * mutative draft the copy is taken from the untouched base list, so a find or\n * filter over it does not create a child draft per element it visits, and it is\n * a copy because the stored list is frozen and V8 scans a frozen array several\n * times slower than a normal one. Callers must read before they write: the base\n * list does not see mutations made earlier in the same action.\n */\nexport function readNodes(state: { nodes: Node[] }): Node[] {\n return [...(isDraft(state) ? original(state).nodes : state.nodes)];\n}\n\n/**\n * The given array sorted by id and frozen, in place -- it takes ownership of\n * the array it is handed, which is why it is private to this module and only\n * ever given a list built at the call site. The freeze is what makes assigning\n * the list to a mutative draft cheap: assigning a draftable value to a draft\n * property queues a finalize pass that walks every element of the assigned\n * value, and the walk exits at its Object.isFrozen check instead. Elements must\n * be plain nodes -- an element that is still a draft would never be replaced by\n * its final value, because the walk that does that replacement is the one being\n * skipped.\n */\nfunction freezeSortedById(nodes: Node[]): readonly Node[] {\n nodes.sort((a, b) => a.id.localeCompare(b.id));\n return Object.freeze(nodes);\n}\n\n/**\n * A copy of the given list, sorted by id and frozen, which is the shape the\n * node reducer assigns. Read the list with readNodes, build the new list from\n * it, and pass what this returns to assignNodes. The copy is what keeps the\n * freeze off the caller's array.\n */\nexport function sortNodesById(nodes: readonly Node[]): readonly Node[] {\n return freezeSortedById([...nodes]);\n}\n\n/**\n * The node list with a node added, ordered by id and frozen, in the same shape\n * sortNodesById returns. The list is built and sorted as plain objects, so\n * inside a mutative draft the comparator never reads an element through the\n * draft proxy. Pass the list read with readNodes: the draft's own list would\n * put child drafts in the result, which the freeze then keeps mutative from\n * resolving.\n */\nexport function insertNodeSorted(\n nodes: readonly Node[],\n node: Node,\n): readonly Node[] {\n return freezeSortedById([...nodes, node]);\n}\n\n/**\n * Installs a node list as state.nodes. Every assignment the node reducer makes\n * goes through here, and this is the one place a frozen array crosses into\n * state: the generated DocumentDriveGlobalState types nodes as a mutable\n * Node[], so the cast below is where that gap is paid rather than spread over\n * the reducer. Consumers must treat drive.state.global.nodes as read-only --\n * mutating it in place (push, sort, splice) throws in strict mode; copy it\n * first, as readNodes does. Note that UPGRADE_DOCUMENT's initialState and\n * imported documents replace a whole scope and can install a list this\n * function never saw.\n */\nexport function assignNodes(\n state: { nodes: Node[] },\n nodes: readonly Node[],\n): void {\n state.nodes = nodes as Node[];\n}\n\nexport function handleTargetNameCollisions(params: {\n nodes: Node[];\n targetParentFolder: string | null;\n srcName: string;\n srcKind: \"file\" | \"folder\";\n}) {\n const { nodes, targetParentFolder, srcName, srcKind } = params;\n\n const targetNodeChildrenNames = nodes\n .filter((node) =>\n targetParentFolder === \"\"\n ? node.parentFolder === null\n : node.parentFolder === targetParentFolder,\n )\n .filter((node) => node.kind === srcKind)\n .map((node) => node.name);\n\n const targetHasNodesWithSameName = targetNodeChildrenNames.includes(srcName);\n\n const targetName = targetHasNodesWithSameName\n ? `${srcName} (copy) ${getNextCopyNumber(targetNodeChildrenNames, srcName)}`\n : srcName;\n\n return targetName;\n}\n\nexport const isValidName = (name: string) => {\n // Names are display labels (URLs use a slugified id), so allow any unicode;\n // reject only empty/whitespace-only names and control characters.\n // eslint-disable-next-line no-control-regex\n return name.trim().length > 0 && !/[\\u0000-\\u001F\\u007F]/.test(name);\n};\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport type { FileNode } from \"../../gen/schema/types.js\";\nimport type { DocumentDriveNodeOperations } from \"../../gen/node/actions.js\";\nimport {\n assignNodes,\n getDescendants,\n handleTargetNameCollisions,\n insertNodeSorted,\n isFileNode,\n isFolderNode,\n isValidName,\n readNodes,\n sortNodesById,\n} from \"../utils.js\";\n\nexport const nodeReducer: DocumentDriveNodeOperations = {\n addFileOperation(state, action, dispatch) {\n const nodes = readNodes(state);\n if (nodes.find((node) => node.id === action.input.id)) {\n throw new Error(`Node with id ${action.input.id} already exists!`);\n }\n\n if (!isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: action.input.name,\n srcKind: \"file\",\n targetParentFolder: action.input.parentFolder || null,\n });\n\n const fileNode: FileNode = {\n id: action.input.id,\n name,\n kind: \"file\",\n parentFolder: action.input.parentFolder ?? null,\n documentType: action.input.documentType,\n };\n assignNodes(state, insertNodeSorted(nodes, fileNode));\n\n dispatch?.({\n type: \"CREATE_CHILD_DOCUMENT\",\n input: {\n id: action.input.id,\n documentType: action.input.documentType,\n },\n });\n },\n addFolderOperation(state, action) {\n const nodes = readNodes(state);\n if (nodes.find((node) => node.id === action.input.id)) {\n throw new Error(`Node with id ${action.input.id} already exists!`);\n }\n\n if (!isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: action.input.name,\n srcKind: \"folder\",\n targetParentFolder: action.input.parentFolder || null,\n });\n\n assignNodes(\n state,\n insertNodeSorted(nodes, {\n ...action.input,\n name,\n kind: \"folder\",\n parentFolder: action.input.parentFolder ?? null,\n }),\n );\n },\n deleteNodeOperation(state, action, dispatch) {\n const nodes = readNodes(state);\n const node = nodes.find((node) => node.id === action.input.id);\n if (!node) {\n throw new Error(`Node with id ${action.input.id} not found`);\n }\n const descendants = getDescendants(node, nodes);\n assignNodes(\n state,\n sortNodesById(\n nodes.filter(\n (node) =>\n node.id !== action.input.id &&\n !descendants.find((descendant) => descendant.id === node.id),\n ),\n ),\n );\n\n [node, ...descendants]\n .filter((node) => isFileNode(node))\n .forEach((node) => {\n dispatch?.({\n type: \"DELETE_CHILD_DOCUMENT\",\n input: {\n id: node.id,\n },\n });\n });\n },\n updateFileOperation(state, action) {\n if (action.input.name && !isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const nodes = readNodes(state);\n assignNodes(\n state,\n sortNodesById(\n nodes.map((node) =>\n node.id === action.input.id\n ? {\n ...node,\n ...{\n name: handleTargetNameCollisions({\n nodes: nodes.filter((n) => n.id !== action.input.id),\n srcName: action.input.name ?? node.name,\n srcKind: \"file\",\n targetParentFolder:\n action.input.parentFolder ?? node.parentFolder,\n }),\n documentType:\n action.input.documentType ??\n (node as FileNode).documentType,\n },\n }\n : node,\n ),\n ),\n );\n },\n updateNodeOperation(state, action) {\n if (action.input.name && !isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const nodes = readNodes(state);\n assignNodes(\n state,\n sortNodesById(\n nodes.map((node) =>\n node.id === action.input.id\n ? {\n ...node,\n ...{\n name: handleTargetNameCollisions({\n nodes: nodes.filter((n) => n.id !== action.input.id),\n srcName: action.input.name ?? node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder:\n action.input.parentFolder ?? node.parentFolder,\n }),\n parentFolder:\n action.input.parentFolder === null\n ? null\n : node.parentFolder,\n },\n }\n : node,\n ),\n ),\n );\n },\n copyNodeOperation(state, action, dispatch) {\n const nodes = readNodes(state);\n const node = nodes.find((node) => node.id === action.input.srcId);\n\n if (!node) {\n throw new Error(`Node with id ${action.input.srcId} not found`);\n }\n\n const duplicatedNode = nodes.find(\n (node) => node.id === action.input.targetId,\n );\n\n if (duplicatedNode) {\n throw new Error(`Node with id ${action.input.targetId} already exists`);\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: action.input.targetName || node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder: action.input.targetParentFolder || null,\n });\n\n const newNode = {\n ...node,\n id: action.input.targetId,\n slug: action.input.targetId,\n name,\n parentFolder: action.input.targetParentFolder || null,\n };\n\n assignNodes(state, insertNodeSorted(nodes, newNode));\n\n const isFile = isFileNode(newNode);\n if (isFile) {\n dispatch?.({\n type: \"COPY_CHILD_DOCUMENT\",\n input: {\n id: action.input.srcId,\n newId: action.input.targetId,\n },\n });\n }\n },\n moveNodeOperation(state, action) {\n if (action.input.srcFolder === action.input.targetParentFolder) {\n throw new Error(\n \"Circular Reference Error: Attempting to move a node to its current parent folder\",\n );\n }\n\n const nodes = readNodes(state);\n const node = nodes.find((node) => node.id === action.input.srcFolder);\n\n if (!node) {\n throw new Error(`Node with id ${action.input.srcFolder} not found`);\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder: action.input.targetParentFolder || null,\n });\n\n if (isFolderNode(node)) {\n const descendants = getDescendants(node, nodes);\n // throw error if moving a folder to one of its descendants\n if (\n descendants.find(\n (descendant) => descendant.id === action.input.targetParentFolder,\n )\n ) {\n throw new Error(\n \"Circular Reference Error: Cannot move a folder to one of its descendants\",\n );\n }\n }\n\n assignNodes(\n state,\n sortNodesById(\n nodes.map((node) => {\n if (node.id === action.input.srcFolder) {\n return {\n ...node,\n name,\n parentFolder: action.input.targetParentFolder || null,\n };\n }\n\n return node;\n }),\n ),\n );\n },\n};\n","import { isDocumentAction } from \"../../document-model/documents.js\";\nimport { createReducer } from \"../../document-model/reducer.js\";\nimport type { Reducer, StateReducer } from \"../../document-model/types.js\";\nimport { driveReducer } from \"../src/reducers/drive.js\";\nimport { nodeReducer } from \"../src/reducers/node.js\";\nimport {\n AddFileInputSchema,\n AddFolderInputSchema,\n AddListenerInputSchema,\n AddTriggerInputSchema,\n CopyNodeInputSchema,\n DeleteNodeInputSchema,\n MoveNodeInputSchema,\n RemoveListenerInputSchema,\n RemoveTriggerInputSchema,\n SetAvailableOfflineInputSchema,\n SetDriveIconInputSchema,\n SetDriveNameInputSchema,\n SetSharingTypeInputSchema,\n UpdateFileInputSchema,\n UpdateNodeInputSchema,\n} from \"./schema/zod.js\";\nimport type { DocumentDrivePHState } from \"./types.js\";\n\nconst schemaMemo = new Map<() => unknown, unknown>();\n\nfunction memoizedSchema<T>(makeSchema: () => T): T {\n let schema = schemaMemo.get(makeSchema) as T | undefined;\n if (schema === undefined) {\n schema = makeSchema();\n schemaMemo.set(makeSchema, schema);\n }\n return schema;\n}\n\nconst driveStateReducer: StateReducer<DocumentDrivePHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n\n const typedAction = action as any;\n switch (typedAction.type) {\n case \"ADD_FILE\":\n memoizedSchema(AddFileInputSchema).parse(typedAction.input);\n nodeReducer.addFileOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_FOLDER\":\n memoizedSchema(AddFolderInputSchema).parse(typedAction.input);\n nodeReducer.addFolderOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"DELETE_NODE\":\n memoizedSchema(DeleteNodeInputSchema).parse(typedAction.input);\n nodeReducer.deleteNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"UPDATE_FILE\":\n memoizedSchema(UpdateFileInputSchema).parse(typedAction.input);\n nodeReducer.updateFileOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"UPDATE_NODE\":\n memoizedSchema(UpdateNodeInputSchema).parse(typedAction.input);\n nodeReducer.updateNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"COPY_NODE\":\n memoizedSchema(CopyNodeInputSchema).parse(typedAction.input);\n nodeReducer.copyNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"MOVE_NODE\":\n memoizedSchema(MoveNodeInputSchema).parse(typedAction.input);\n nodeReducer.moveNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_DRIVE_NAME\":\n memoizedSchema(SetDriveNameInputSchema).parse(typedAction.input);\n driveReducer.setDriveNameOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_DRIVE_ICON\":\n memoizedSchema(SetDriveIconInputSchema).parse(typedAction.input);\n driveReducer.setDriveIconOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_SHARING_TYPE\":\n memoizedSchema(SetSharingTypeInputSchema).parse(typedAction.input);\n driveReducer.setSharingTypeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_AVAILABLE_OFFLINE\":\n memoizedSchema(SetAvailableOfflineInputSchema).parse(typedAction.input);\n driveReducer.setAvailableOfflineOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_LISTENER\":\n memoizedSchema(AddListenerInputSchema).parse(typedAction.input);\n driveReducer.addListenerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"REMOVE_LISTENER\":\n memoizedSchema(RemoveListenerInputSchema).parse(typedAction.input);\n driveReducer.removeListenerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_TRIGGER\":\n memoizedSchema(AddTriggerInputSchema).parse(typedAction.input);\n driveReducer.addTriggerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"REMOVE_TRIGGER\":\n memoizedSchema(RemoveTriggerInputSchema).parse(typedAction.input);\n driveReducer.removeTriggerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n default:\n return state;\n }\n};\n\nexport const driveDocumentReducer: Reducer<DocumentDrivePHState> =\n createReducer<DocumentDrivePHState>(driveStateReducer);\n","import type {\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n} from \"./schema/types.js\";\nimport type { DocumentDrivePHState } from \"./types.js\";\nimport type {\n AssertIsDocumentOfType,\n AssertIsStateOfType,\n CreateDocument,\n CreateState,\n IsDocumentOfType,\n IsStateOfType,\n LoadFromInput,\n SaveToFileHandle,\n} from \"document-model\";\nimport {\n baseCreateDocument,\n baseLoadFromInput,\n baseSaveToFileHandle,\n defaultBaseState,\n} from \"document-model\";\nimport {\n assertIsDriveDocument,\n assertIsDriveState,\n isDriveDocument,\n isDriveState,\n} from \"./document-schema.js\";\nimport { driveDocumentType } from \"./document-type.js\";\nimport { driveDocumentReducer } from \"./reducer.js\";\n\nexport const initialGlobalState: DocumentDriveGlobalState = {\n name: \"\",\n nodes: [],\n icon: null,\n};\nexport const initialLocalState: DocumentDriveLocalState = {\n listeners: [],\n triggers: [],\n sharingType: \"private\",\n availableOffline: false,\n};\n\nexport const driveCreateState: CreateState<DocumentDrivePHState> = (\n state: Partial<DocumentDrivePHState> | undefined,\n) => {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n};\n\nexport const driveCreateDocument: CreateDocument<DocumentDrivePHState> = (\n state,\n) => {\n return baseCreateDocument(driveCreateState, state, driveDocumentType);\n};\n\nexport const driveSaveToFileHandle: SaveToFileHandle = (document, input) => {\n return baseSaveToFileHandle(document, input);\n};\n\nexport const driveLoadFromInput: LoadFromInput<DocumentDrivePHState> = (\n input,\n) => {\n return baseLoadFromInput(input, driveDocumentReducer);\n};\n\nexport const isStateOfType: IsStateOfType<DocumentDrivePHState> = (state) => {\n return isDriveState(state);\n};\n\nexport const assertIsStateOfType: AssertIsStateOfType<DocumentDrivePHState> = (\n state,\n) => {\n assertIsDriveState(state);\n};\n\nexport const isDocumentOfType: IsDocumentOfType<DocumentDrivePHState> = (\n document,\n) => {\n return isDriveDocument(document);\n};\n\nexport const assertIsDocumentOfType: AssertIsDocumentOfType<\n DocumentDrivePHState\n> = (document) => {\n assertIsDriveDocument(document);\n};\n","import { createState, defaultBaseState } from \"../document-model/state.js\";\nimport { driveDocumentFileExtension } from \"./constants.js\";\nimport * as actions from \"./gen/creators.js\";\nimport { driveDocumentModel } from \"./gen/document-model.js\";\nimport { driveDocumentReducer } from \"./gen/reducer.js\";\nimport {\n assertIsDocumentOfType,\n assertIsStateOfType,\n driveCreateDocument,\n driveCreateState,\n driveLoadFromInput,\n driveSaveToFileHandle,\n isDocumentOfType,\n isStateOfType,\n} from \"./gen/utils.js\";\nimport type { DriveDocumentModelModule } from \"./types.js\";\nexport const driveDocumentModelModule: DriveDocumentModelModule = {\n actions,\n reducer: driveDocumentReducer,\n documentModel: createState(defaultBaseState(), driveDocumentModel),\n utils: {\n fileExtension: driveDocumentFileExtension,\n createState: driveCreateState,\n createDocument: driveCreateDocument,\n loadFromInput: driveLoadFromInput,\n saveToFileHandle: driveSaveToFileHandle,\n isStateOfType,\n assertIsStateOfType,\n isDocumentOfType,\n assertIsDocumentOfType,\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAa,6BAA6B;;;ACuC1C,MAAa,uBAAuB,MAClC,MAAM,KAAA,KAAa,MAAM;AAE3B,MAAa,0BAA0B,EACpC,IAAI,CAAC,CACL,QAAQ,MAAM,oBAAoB,CAAC,CAAC;AAEvC,MAAa,wBAAwB,EAAE,KAAK;CAC1C;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAa,oBAAoB,EAAE,KAAK,CAAC,eAAe,CAAC;AAEzD,SAAgB,qBAA4D;CAC1E,OAAO,EAAE,OAAO;EACd,cAAc,EAAE,OAAO;EACvB,IAAI,EAAE,OAAO;EACb,MAAM,EAAE,OAAO;EACf,cAAc,EAAE,OAAO,CAAC,CAAC,QAAQ;CACnC,CAAC;AACH;AAEA,SAAgB,uBAEd;CACA,OAAO,EAAE,OAAO;EACd,IAAI,EAAE,OAAO;EACb,MAAM,EAAE,OAAO;EACf,cAAc,EAAE,OAAO,CAAC,CAAC,QAAQ;CACnC,CAAC;AACH;AAEA,SAAgB,yBAEd;CACA,OAAO,EAAE,OAAO,EACd,UAAU,oBAAoB,EAChC,CAAC;AACH;AAEA,SAAgB,wBAEd;CACA,OAAO,EAAE,O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AAChC;;;ACxEA,MAAa,2BAAqD;CAChE,SAAA;CACA,SAAS;CACT,eAAeA,cAAY,iBAAiB,GAAG,kBAAkB;CACjE,OAAO;EACL,eAAe;EACf,aAAa;EACb,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { $ as AddOperationExampleAction, $a as UpgradeReducer, $c as deleteOperationExample, $i as SetOperationErrorCodeAction, $l as baseCreateDocument, $n as MutationDeleteOperationErrorArgs, $o as SetAuthorWebsiteInputSchema, $r as RedoActionInput, $t as DocumentModelOperationExampleOperations, $u as PHDocumentState, Aa as SigningParameters, Ai as SetAuthorNameAction, Al as setOperationErrorDescription, An as LoadStateActionInput, Ao as ModuleSchema, Ar as MutationSetOperationTemplateArgs, As as UpdateStateExampleInputSchema, At as DeleteOperationErrorInput, Au as sortMappedOperations, Ba as UpdateChangeLogItemAction, Bc as addModule, Bi as SetModelIdAction, Bl as undo, Bn as ModuleSpecification, Bo as PublisherSchema, Br as OperationsByScope, Bt as DocumentModelGlobalState, Bu as operationOutcome, Ca as Set_PreferredEditor, Ci as SchemaNOOPAction, Cl as setModelId, Cn as Incremental, Co as DocumentModelInputSchema, Cr as MutationSetOperationErrorCodeArgs, Cs as Set_PreferredEditorSchema, Ct as DeleteChildDocumentSignal, Cu as prepareOperations, Da as SignalResults, Di as SchemaSetPreferredEditorAction, Dl as setName, Dn as LoadFromFile, Do as LoadStateActionStateInputSchema, Dr as MutationSetOperationNameArgs, Ds as UndoSchema, Dt as DeleteModuleInput, Du as reshuffleByTimestamp, Ea as SignalResult, Ei as SchemaSetNameAction, El as setModuleName, En as IsStateOfType, Eo as LoadStateActionSchema, Er as MutationSetOperationErrorTemplateArgs, Es as UndoActionSchema, Et as DeleteModuleAction, Eu as replayDocument, Fa as SubgraphModule, Fc as actionContext, Fi as SetInitialStateInput, Fl as setOperationSchema, Fn as MakeOptional, Fo as PowerhouseModuleSchema, Fr as MutationUpdateStateExampleArgs, Ft as DeleteStateExampleInput, Fu as Operation, G as Actions, Ga as UpdateRelationshipActionInput, Gc as baseActions, Gi as SetModuleDescriptionInput, Gl as IntegrityIssueSubType, Gn as MutationAddModuleArgs, Go as ReorderChangeLogItemsInputSchema, Gr as PowerhouseModule, Gt as DocumentModelLocalState, Gu as undoOperationV2, H as ActionSignatureContext, Ha as UpdateOperationExampleAction, Hc as addOperationError, Hi as SetModelNameAction, Hl as updateOperationExample, Hn as MoveOperationInput, Ho as RedoActionInputSchema, Hr as PartialState, Ht as DocumentModelHeaderOperations, Hu as setNameOperation, Ia as Undo, Ic as actionFromAction, Ii as SetModelDescriptionAction, Il as setOperationScope, In as Manifest, Io as PowerhouseModulesSchema, Ir as NOOPAction, It as DocumentAction, Iu as OperationContext, J as AddModuleAction, Ja as UpgradeDocumentAction, Jc as createAction, Ji as SetNameAction, Jl as PHDocumentHeader, Jn as MutationAddOperationExampleArgs, Jo as ReorderOperationErrorsInputSchema, Jr as PruneActionInput, Jt as DocumentModelModuleOperations, Ju as Condition, K as AddChangeLogItemAction, Ka as UpdateStateExampleAction, Kc as buildOperationSignature, Ki as SetModuleNameAction, Kl as IntegrityIssueType, Kn as MutationAddOperationArgs, Ko as ReorderModuleOperationsInputSchema, Kr as Prune, Kt as DocumentModelModule, Ku as AuthGroups, La as UndoAction, Lc as actionSigner, Li as SetModelDescriptionInput, Ll as setOperationTemplate, Ln as MappedOperation, Lo as PruneActionInputSchema, Lr as OperationErrorSpecification, Lt as DocumentModelAction, Lu as OperationOutcome, Ma as SkipHeaderOperations, Mi as SetAuthorWebsiteAction, Ml as setOperationErrorTemplate, Mn as Load_State, Mo as OperationErrorSchema, Mr as MutationUndoArgs, Ms as isDefinedNonNullAny, Mt as DeleteOperationExampleInput, Mu as split, Na as State, Nc as Action, Ni as SetAuthorWebsiteInput, Nl as setOperationName, Nn as MakeEmpty, No as OperationScopeSchema, Nr as MutationUpdateChangeLogItemInputArgs, Nt as DeleteOperationInput, Nu as updateHeaderRevision, Oa as SignalType, Oi as SchemaUndoAction, Ol as setOperationDescription, On as LoadFromInput, Oo as Load_StateSchema, Or as MutationSetOperationReducerArgs, Os as UpdateChangeLogItemInputSchema, Ot as DeleteOperationAction, Ou as reshuffleByTimestampAndIndex, Pa as StateReducer, Pc as ActionContext, Pi as SetInitialStateAction, Pl as setOperationReducer, Pn as MakeMaybe, Po as OperationSpecificationSchema, Pr as MutationUpdateOperationExampleArgs, Pt as DeleteStateExampleAction, Pu as DocumentOperations, Q as AddOperationErrorInput, Qa as UpgradeManifest, Qc as deleteOperationError, Qi as SetOperationDescriptionInput, Ql as attachBranch, Qn as MutationDeleteOperationArgs, Qo as SetAuthorNameInputSchema, Qr as RedoAction, Qt as DocumentModelOperationExampleAction, Qu as PHBaseState, Ra as UndoActionInput, Rc as actions, Ri as SetModelExtensionAction, Rl as setPreferredEditor, Rn as Maybe, Ro as PruneActionSchema, Rr as OperationIndex, Rt as DocumentModelDocument, Ru as OperationWithContext, Sa as Set_Name, Sd as serializeSignature, Si as SchemaLoadStateAction, Sl as setModelExtension, Sn as ISigner, So as DocumentModelGlobalStateSchema, Sr as MutationSetOperationDescriptionArgs, Ss as Set_NameSchema, St as DeleteChildDocumentInput, Su as precedes, Ta as SignalDispatch, Ti as SchemaRedoAction, Tl as setModuleDescription, Tn as IsDocumentOfType, To as LoadStateActionInputSchema, Tr as MutationSetOperationErrorNameArgs, Ts as UndoActionInputSchema, Tt as DeleteDocumentActionInput, Tu as removeExistingOperations, U as ActionSigningHandler, Ua as UpdateOperationExampleInput, Uc as addOperationExample, Ui as SetModelNameInput, Ul as updateStateExample, Un as Mutation, Uo as RedoActionSchema, Ur as PhAiToolAnnotations, Ut as DocumentModelInput, Uu as setPreferredEditorOperation, V as ActionErrorCallback, Va as UpdateChangeLogItemInput, Vc as addOperation, Vi as SetModelIdInput, Vl as updateChangeLogItem, Vn as MoveOperationAction, Vo as PwaConfigSchema, Vr as PartialRecord, Vt as DocumentModelHeaderAction, Vu as redoOperation, W as ActionVerificationHandler, Wa as UpdateRelationshipAction, Wc as addStateExample, Wi as SetModuleDescriptionAction, Wl as verifyOperationSignature, Wn as MutationAddChangeLogItemInputArgs, Wo as RedoSchema, Wr as PhAiToolDescriptor, Wt as DocumentModelLib, Wu as undoOperation, X as AddOperationAction, Xa as User, Xc as deleteModule, Xi as SetNameOperation, Xl as addUndo, Xn as MutationDeleteChangeLogItemInputArgs, Xo as ReorderStateExamplesInputSchema, Xr as Query, Xt as DocumentModelOperationErrorAction, Xu as Operand, Y as AddModuleInput, Ya as UpgradeDocumentActionInput, Yc as deleteChangeLogItem, Yi as SetNameActionInput, Yl as PHDocumentMeta, Yn as MutationAddStateExampleArgs, Yo as ReorderOperationExamplesInputSchema, Yr as Publisher, Yt as DocumentModelOperationAction, Yu as Grant, Z as AddOperationErrorAction, Za as ValidationError, Zc as deleteOperation, Zi as SetOperationDescriptionAction, Zl as appendWithoutApplying, Zn as MutationDeleteModuleArgs, Zo as ScopeStateSchema, Zr as Redo, Zt as DocumentModelOperationErrorOperations, Zu as PHAuthState, _a as SetPreferredEditorAction, _d as HashConfig, _i as ReplayDocumentOptions, _l as reorderStateExamples, _n as ID, _o as DeleteOperationErrorInputSchema, _r as MutationSetModelIdArgs, _s as SetOperationScopeInputSchema, _t as CreateDocumentAction, _u as mapSkippedOperationsV2, aa as SetOperationErrorTemplateAction, ad as createDocumentState, ai as ReorderChangeLogItemsAction, al as operationExampleCreators, an as DocumentModelVersioningAction, ao as AddChangeLogItemInputSchema, ar as MutationRedoArgs, as as SetModuleDescriptionInputSchema, at as AddStateExampleInput, au as filterDuplicatedOperations, ba as SetStateSchemaAction, bd as UserActionSigner, bi as SaveToFileHandle, bl as setInitialState, bn as ISignal, bo as DeleteStateExampleInputSchema, br as MutationSetModuleNameArgs, bs as SetPreferredEditorActionSchema, bt as DeleteChangeLogItemAction, bu as operationsAreEqual, ca as SetOperationNameInput, cd as createState, ci as ReorderModuleOperationsInput, cl as operationWithContext, cn as DocumentSpecification, co as AddOperationExampleInputSchema, cr as MutationReorderModulesArgs, cs as SetNameActionSchema, ct as Author, cu as garbageCollectV2, da as SetOperationSchemaAction, dd as defaultDocumentState, di as ReorderOperationErrorsAction, dl as releaseNewVersion, dn as EditorModule, do as AuthorSchema, dr as MutationReorderStateExamplesArgs, ds as SetOperationErrorDescriptionInputSchema, dt as ConfigEntryType, du as hashDocumentStateForScope, ea as SetOperationErrorCodeInput, ed as PHGroupState, ei as Reducer, el as deleteStateExample, en as DocumentModelOperationOperations, eo as UpgradeTransition, er as MutationDeleteOperationExampleArgs, es as SetInitialStateInputSchema, et as AddOperationExampleInput, eu as baseReducerVersion, fa as SetOperationSchemaInput, fd as defaultGlobalState, fi as ReorderOperationErrorsInput, fl as reorderChangeLogItems, fn as EditorProps, fo as CodeExampleSchema, fr as MutationSetAuthorNameArgs, fs as SetOperationErrorNameInputSchema, ft as CopyChildDocumentInput, fu as isDocumentAction, ga as SetOperationTemplateInput, gd as AppActionSigner, gi as ReorderStateExamplesInput, gl as reorderOperationExamples, gn as IAction, go as DeleteModuleInputSchema, gr as MutationSetModelExtensionArgs, gs as SetOperationSchemaInputSchema, gt as CreateDocument, gu as mapSkippedOperations, ha as SetOperationTemplateAction, hd as ActionSigner, hi as ReorderStateExamplesAction, hl as reorderOperationErrors, hn as GetDocumentOptions, ho as DeleteChangeLogItemInputSchema, hr as MutationSetModelDescriptionArgs, hs as SetOperationReducerInputSchema, ht as CreateChildDocumentSignal, hu as isUndoRedo, ia as SetOperationErrorNameInput, id as createBaseState, ii as RemoveRelationshipActionInput, il as noop, in as DocumentModelUtils, io as normalizeDocumentModelVersion, ir as MutationPruneArgs, is as SetModelNameInputSchema, it as AddStateExampleAction, iu as filterDocumentOperationsResultingState, ja as SkipHeaderOperationIndex, ji as SetAuthorNameInput, jl as setOperationErrorName, jn as LoadStateActionStateInput, jo as MoveOperationInputSchema, jr as MutationSetStateSchemaArgs, js as definedNonNullAnySchema, jt as DeleteOperationExampleAction, ju as sortOperations, ka as SignatureVerificationHandler, ki as ScopeState, kl as setOperationErrorCode, kn as LoadStateAction, ko as ManifestSchema, kr as MutationSetOperationSchemaArgs, ks as UpdateOperationExampleInputSchema, kt as DeleteOperationErrorAction, ku as skipHeaderOperations, la as SetOperationReducerAction, ld as defaultAuthState, li as ReorderModulesAction, ll as prune, ln as ENSInfo, lo as AddOperationInputSchema, lr as MutationReorderOperationErrorsArgs, ls as SetOperationDescriptionInputSchema, lt as CodeExample, lu as getDocumentLastModified, ma as SetOperationScopeInput, md as defaultPHState, mi as ReorderOperationExamplesInput, ml as reorderModules, mn as FileInput, mo as ConfigEntryTypeSchema, mr as MutationSetInitialStateArgs, ms as SetOperationNameInputSchema, mt as CreateChildDocumentInput, mu as isUndo, na as SetOperationErrorDescriptionInput, nd as backfillAuthState, ni as ReleaseNewVersionAction, nl as loadState, nn as DocumentModelStateAction, no as applyUpgradeDocumentAction, nr as MutationLoadStateArgs, ns as SetModelExtensionInputSchema, nt as AddRelationshipAction, nu as checkOperationsIntegrity, oa as SetOperationErrorTemplateInput, od as createGlobalState, oi as ReorderChangeLogItemsInput, ol as operationFromAction, on as DocumentModelVersioningOperations, oo as AddModuleInputSchema, or as MutationReorderChangeLogItemsInputArgs, os as SetModuleNameInputSchema, ot as AssertIsDocumentOfType, ou as garbageCollect, pa as SetOperationScopeAction, pd as defaultLocalState, pi as ReorderOperationExamplesAction, pl as reorderModuleOperations, pn as Exact, po as ConfigEntrySchema, pr as MutationSetAuthorWebsiteArgs, ps as SetOperationErrorTemplateInputSchema, pt as CopyChildDocumentSignal, pu as isNoopOperation, q as AddChangeLogItemInput, qa as UpdateStateExampleInput, qc as buildSignedAction, qi as SetModuleNameInput, ql as PHDocument, qn as MutationAddOperationErrorArgs, qo as ReorderModulesInputSchema, qr as PruneAction, qt as DocumentModelModuleAction, qu as Capability, ra as SetOperationErrorNameAction, rd as createAuthState, ri as RemoveRelationshipAction, rl as moveOperation, rn as DocumentModelStateOperations, ro as computeUpgradeTransitions, rr as MutationMoveOperationArgs, rs as SetModelIdInputSchema, rt as AddRelationshipActionInput, ru as diffOperations, sa as SetOperationNameAction, sd as createLocalState, si as ReorderModuleOperationsAction, sl as operationFromOperation, sn as DocumentOperationsIgnoreMap, so as AddOperationErrorInputSchema, sr as MutationReorderModuleOperationsArgs, ss as SetNameActionInputSchema, st as AssertIsStateOfType, su as garbageCollectDocumentOperations, ta as SetOperationErrorDescriptionAction, td as Principal, ti as ReducerOptions, tl as documentModelActions, tn as DocumentModelPHState, to as applyDeleteDocumentAction, tr as MutationDeleteStateExampleArgs, ts as SetModelDescriptionInputSchema, tt as AddOperationInput, tu as checkCleanedOperationsIntegrity, ua as SetOperationReducerInput, ud as defaultBaseState, ui as ReorderModulesInput, ul as redo, un as EditorDispatch, uo as AddStateExampleInputSchema, ur as MutationReorderOperationExamplesArgs, us as SetOperationErrorCodeInputSchema, ut as ConfigEntry, uu as groupOperationsByScope, va as SetPreferredEditorActionInput, vd as PHDocumentSignatureInfo, vi as RevisionsFilter, vl as setAuthorName, vn as IDocument, vo as DeleteOperationExampleInputSchema, vr as MutationSetModelNameArgs, vs as SetOperationTemplateInputSchema, vt as CreateDocumentActionInput, vu as merge, wa as Signal, wi as SchemaPruneAction, wl as setModelName, wn as InputMaybe, wo as DocumentSpecificationSchema, wr as MutationSetOperationErrorDescriptionArgs, ws as StateSchema, wt as DeleteDocumentAction, wu as readOnly, xa as SetStateSchemaInput, xd as deserializeSignature, xi as Scalars, xl as setModelDescription, xn as ISignalResult, xo as DocumentActionSchema, xr as MutationSetNameArgs, xs as SetStateSchemaInputSchema, xt as DeleteChangeLogItemInput, xu as parseResultingState, ya as SetPreferredEditorOperation, yd as Signature, yi as SaveToFile, yl as setAuthorWebsite, yn as IOperation, yo as DeleteOperationInputSchema, yr as MutationSetModuleDescriptionArgs, ys as SetPreferredEditorActionInputSchema, yt as CreateState, yu as nextSkipNumber, za as UndoRedoAction, zc as addChangeLogItem, zi as SetModelExtensionInput, zl as setStateSchema, zn as MinimalBackupData, zo as PruneSchema, zr as OperationSpecification, zt as DocumentModelDocumentModelModule, zu as loadStateOperation } from "../types-CpnWmiFY.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { n as generateId, r as generateMock, t as deriveOperationId } from "../utils-
|
|
4
|
-
export { AUTH_ACTION_TYPES, AUTH_DENIED_BY_GRANT_REASON, AUTH_NO_GRANT_REASON, AUTH_VERSION_UNSUPPORTED_REASON, Action, ActionContext, ActionErrorCallback, ActionSignatureContext, ActionSigner, ActionSigningHandler, ActionVerificationHandler, Actions, AddChangeLogItemAction, AddChangeLogItemInput, AddChangeLogItemInputSchema, AddModuleAction, AddModuleInput, AddModuleInputSchema, AddOperationAction, AddOperationErrorAction, AddOperationErrorInput, AddOperationErrorInputSchema, AddOperationExampleAction, AddOperationExampleInput, AddOperationExampleInputSchema, AddOperationInput, AddOperationInputSchema, AddRelationshipAction, AddRelationshipActionInput, AddStateExampleAction, AddStateExampleInput, AddStateExampleInputSchema, AppActionSigner, AssertIsDocumentOfType, AssertIsStateOfType, AuthAction, AuthActionNotAllowedError, AuthAdministrationLockoutError, AuthAdministrationMissingError, AuthAlreadyInitializedError, AuthDecision, AuthEvaluation, AuthGroups, AuthInitializerNotCreatorError, AuthPolicyNotPreservedError, AuthRefusal, AuthRequest, AuthSubject, AuthVerb, Author, AuthorSchema, BaseDocumentHeaderSchema, BaseDocumentStateSchema, BulkArchiveEntry, Capability, CodeExample, CodeExampleSchema, Condition, ConditionContext, ConfigEntry, ConfigEntrySchema, ConfigEntryType, ConfigEntryTypeSchema, CopyChildDocumentInput, CopyChildDocumentSignal, CreateChildDocumentInput, CreateChildDocumentSignal, CreateDocument, CreateDocumentAction, CreateDocumentActionInput, CreateState, DOCUMENT_DELETED_REASON, DeleteChangeLogItemAction, DeleteChangeLogItemInput, DeleteChangeLogItemInputSchema, DeleteChildDocumentInput, DeleteChildDocumentSignal, DeleteDocumentAction, DeleteDocumentActionInput, DeleteModuleAction, DeleteModuleInput, DeleteModuleInputSchema, DeleteOperationAction, DeleteOperationErrorAction, DeleteOperationErrorInput, DeleteOperationErrorInputSchema, DeleteOperationExampleAction, DeleteOperationExampleInput, DeleteOperationExampleInputSchema, DeleteOperationInput, DeleteOperationInputSchema, DeleteStateExampleAction, DeleteStateExampleInput, DeleteStateExampleInputSchema, DocumentAction, DocumentActionSchema, DocumentModelAction, DocumentModelDocument, DocumentModelDocumentModelModule, DocumentModelGlobalState, DocumentModelGlobalStateSchema, DocumentModelHeaderAction, DocumentModelHeaderOperations, DocumentModelHeaderSchema, DocumentModelInput, DocumentModelInputSchema, DocumentModelLib, DocumentModelLocalState, DocumentModelModule, DocumentModelModuleAction, DocumentModelModuleOperations, DocumentModelOperationAction, DocumentModelOperationErrorAction, DocumentModelOperationErrorOperations, DocumentModelOperationExampleAction, DocumentModelOperationExampleOperations, DocumentModelOperationOperations, DocumentModelPHState, DocumentModelPHStateSchema, DocumentModelSchema, DocumentModelStateAction, DocumentModelStateOperations, DocumentModelUtils, DocumentModelVersioningAction, DocumentModelVersioningOperations, DocumentOperations, DocumentOperationsIgnoreMap, DocumentSpecification, DocumentSpecificationSchema, DowngradeNotSupportedError, ENSInfo, EditorDispatch, EditorModule, EditorProps, Exact, FileInput, FileSystemError, GetDocumentOptions, Grant, GrantNotFoundError, GrantSchema, GroupPrincipalNotAllowedError, HASH_ALGORITHM_SHA1, HASH_ALGORITHM_SHA256, HASH_ALGORITHM_SHA512, HASH_ENCODING_BASE64, HASH_ENCODING_HEX, HashConfig, HashMismatchError, IAction, ID, IDocument, IOperation, ISignal, ISignalResult, ISigner, Incremental, InitializeAuthAction, InitializeAuthActionInput, InitializeAuthActionInputSchema, InputMaybe, IntegrityIssueSubType, IntegrityIssueType, InvalidActionInputError, InvalidActionInputZodError, InvalidAuthVersionError, InvalidGrantError, IsDocumentOfType, IsStateOfType, LoadFromFile, LoadFromInput, LoadStateAction, LoadStateActionInput, LoadStateActionInputSchema, LoadStateActionSchema, LoadStateActionStateInput, LoadStateActionStateInputSchema, Load_State, Load_StateSchema, MAX_AUTH_GRANTS, MAX_CAPABILITY_OPERATIONS, MAX_CONDITION_DEPTH, MAX_CONDITION_NODES, MAX_SUPPORTED_AUTH_VERSION, MakeEmpty, MakeMaybe, MakeOptional, Manifest, ManifestSchema, MappedOperation, Maybe, MinimalBackupData, ModuleSchema, ModuleSpecification, MoveGrantAction, MoveGrantActionInput, MoveGrantActionInputSchema, MoveOperationAction, MoveOperationInput, MoveOperationInputSchema, Mutation, MutationAddChangeLogItemInputArgs, MutationAddModuleArgs, MutationAddOperationArgs, MutationAddOperationErrorArgs, MutationAddOperationExampleArgs, MutationAddStateExampleArgs, MutationDeleteChangeLogItemInputArgs, MutationDeleteModuleArgs, MutationDeleteOperationArgs, MutationDeleteOperationErrorArgs, MutationDeleteOperationExampleArgs, MutationDeleteStateExampleArgs, MutationLoadStateArgs, MutationMoveOperationArgs, MutationPruneArgs, MutationRedoArgs, MutationReorderChangeLogItemsInputArgs, MutationReorderModuleOperationsArgs, MutationReorderModulesArgs, MutationReorderOperationErrorsArgs, MutationReorderOperationExamplesArgs, MutationReorderStateExamplesArgs, MutationSetAuthorNameArgs, MutationSetAuthorWebsiteArgs, MutationSetInitialStateArgs, MutationSetModelDescriptionArgs, MutationSetModelExtensionArgs, MutationSetModelIdArgs, MutationSetModelNameArgs, MutationSetModuleDescriptionArgs, MutationSetModuleNameArgs, MutationSetNameArgs, MutationSetOperationDescriptionArgs, MutationSetOperationErrorCodeArgs, MutationSetOperationErrorDescriptionArgs, MutationSetOperationErrorNameArgs, MutationSetOperationErrorTemplateArgs, MutationSetOperationNameArgs, MutationSetOperationReducerArgs, MutationSetOperationSchemaArgs, MutationSetOperationTemplateArgs, MutationSetStateSchemaArgs, MutationUndoArgs, MutationUpdateChangeLogItemInputArgs, MutationUpdateOperationExampleArgs, MutationUpdateStateExampleArgs, NOOPAction, OPERATION_NAME_PATTERN, Operand, Operation, OperationContext, OperationErrorSchema, OperationErrorSpecification, OperationIndex, OperationOutcome, OperationScopeSchema, OperationSpecification, OperationSpecificationSchema, OperationWithContext, OperationsByScope, PHAuthState, PHBaseState, PHDocument, PHDocumentHeader, PHDocumentMeta, PHDocumentSignatureInfo, PHDocumentState, PHGroupState, PartialRecord, PartialState, PhAiToolAnnotations, PhAiToolDescriptor, PowerhouseModule, PowerhouseModuleSchema, PowerhouseModulesSchema, Principal, Prune, PruneAction, PruneActionInput, PruneActionInputSchema, PruneActionSchema, PruneSchema, Publisher, PublisherSchema, PwaConfigSchema, Query, RESERVED_OPERATION_NAMES, Redo, RedoAction, RedoActionInput, RedoActionInputSchema, RedoActionSchema, RedoSchema, Reducer, ReducerOptions, ReleaseNewVersionAction, RemoveGrantAction, RemoveGrantActionInput, RemoveGrantActionInputSchema, RemoveRelationshipAction, RemoveRelationshipActionInput, ReorderChangeLogItemsAction, ReorderChangeLogItemsInput, ReorderChangeLogItemsInputSchema, ReorderModuleOperationsAction, ReorderModuleOperationsInput, ReorderModuleOperationsInputSchema, ReorderModulesAction, ReorderModulesInput, ReorderModulesInputSchema, ReorderOperationErrorsAction, ReorderOperationErrorsInput, ReorderOperationErrorsInputSchema, ReorderOperationExamplesAction, ReorderOperationExamplesInput, ReorderOperationExamplesInputSchema, ReorderStateExamplesAction, ReorderStateExamplesInput, ReorderStateExamplesInputSchema, ReplayDocumentOptions, ReservedOperationName, RevisionsFilter, SaveToFile, SaveToFileHandle, Scalars, SchemaLoadStateAction, SchemaNOOPAction, SchemaPruneAction, SchemaRedoAction, SchemaSetNameAction, SchemaSetPreferredEditorAction, SchemaUndoAction, ScopeState, ScopeStateSchema, SetAuthorNameAction, SetAuthorNameInput, SetAuthorNameInputSchema, SetAuthorWebsiteAction, SetAuthorWebsiteInput, SetAuthorWebsiteInputSchema, SetGrantAction, SetGrantActionInput, SetGrantActionInputSchema, SetInitialStateAction, SetInitialStateInput, SetInitialStateInputSchema, SetModelDescriptionAction, SetModelDescriptionInput, SetModelDescriptionInputSchema, SetModelExtensionAction, SetModelExtensionInput, SetModelExtensionInputSchema, SetModelIdAction, SetModelIdInput, SetModelIdInputSchema, SetModelNameAction, SetModelNameInput, SetModelNameInputSchema, SetModuleDescriptionAction, SetModuleDescriptionInput, SetModuleDescriptionInputSchema, SetModuleNameAction, SetModuleNameInput, SetModuleNameInputSchema, SetNameAction, SetNameActionInput, SetNameActionInputSchema, SetNameActionSchema, SetNameOperation, SetOperationDescriptionAction, SetOperationDescriptionInput, SetOperationDescriptionInputSchema, SetOperationErrorCodeAction, SetOperationErrorCodeInput, SetOperationErrorCodeInputSchema, SetOperationErrorDescriptionAction, SetOperationErrorDescriptionInput, SetOperationErrorDescriptionInputSchema, SetOperationErrorNameAction, SetOperationErrorNameInput, SetOperationErrorNameInputSchema, SetOperationErrorTemplateAction, SetOperationErrorTemplateInput, SetOperationErrorTemplateInputSchema, SetOperationNameAction, SetOperationNameInput, SetOperationNameInputSchema, SetOperationReducerAction, SetOperationReducerInput, SetOperationReducerInputSchema, SetOperationSchemaAction, SetOperationSchemaInput, SetOperationSchemaInputSchema, SetOperationScopeAction, SetOperationScopeInput, SetOperationScopeInputSchema, SetOperationTemplateAction, SetOperationTemplateInput, SetOperationTemplateInputSchema, SetPreferredEditorAction, SetPreferredEditorActionInput, SetPreferredEditorActionInputSchema, SetPreferredEditorActionSchema, SetPreferredEditorOperation, SetStateSchemaAction, SetStateSchemaInput, SetStateSchemaInputSchema, Set_Name, Set_NameSchema, Set_PreferredEditor, Set_PreferredEditorSchema, Signal, SignalDispatch, SignalResult, SignalResults, SignalType, Signature, SignatureVerificationHandler, SigningParameters, SkipHeaderOperationIndex, SkipHeaderOperations, State, StateReducer, StateSchema, SubgraphModule, TransportAction, TransportActionContext, TransportSigner, Undo, UndoAction, UndoActionInput, UndoActionInputSchema, UndoActionSchema, UndoRedoAction, UndoSchema, UnsupportedDocumentModelVersionError, UpdateChangeLogItemAction, UpdateChangeLogItemInput, UpdateChangeLogItemInputSchema, UpdateOperationExampleAction, UpdateOperationExampleInput, UpdateOperationExampleInputSchema, UpdateRelationshipAction, UpdateRelationshipActionInput, UpdateStateExampleAction, UpdateStateExampleInput, UpdateStateExampleInputSchema, UpgradeDocumentAction, UpgradeDocumentActionInput, UpgradeManifest, UpgradeReducer, UpgradeTransition, User, UserActionSigner, ValidationError, VersionedReducers, VersionedReplayConfig, ab2hex, actionContext, actionFromAction, actionSigner, actions, addChangeLogItem, addModule, addOperation, addOperationError, addOperationExample, addStateExample, addUndo, appendWithoutApplying, applyAuthAction, applyDeleteDocumentAction, applyInitializeAuthAction, applyMoveGrantAction, applyRemoveGrantAction, applySetGrantAction, applyUpgradeDocumentAction, assertAuthAdministrationRetained, assertAuthPreservedOnDuplicate, assertAuthScopeActionAllowed, assertIsDocumentModelDocument, assertIsDocumentModelState, assertModuleIdUnique, assertOperationErrorIdUnique, assertOperationExampleIdUnique, assertOperationIdUnique, assertValidGrant, assertValidGrantUpsert, assertValidInitialGrants, attachBranch, backfillAuthState, base58Decode, base64UrlToBytes, baseActions, baseCreateDocument, baseLoadFromInput, baseLoadFromInputVersioned, baseReducer, baseReducerVersion, baseSaveToFileHandle, buildOperationSignature, buildOperationSignatureMessage, buildOperationSignatureParams, buildSignedAction, checkCleanedOperationsIntegrity, checkOperationsIntegrity, computeUpgradeTransitions, createAction, createAuthState, createBaseState, createDocumentState, createGlobalState, createLocalState, createMinimalZip, createPresignedHeader, createReducer, createSignedHeader, createSignedHeaderForSigner, createState, createVerificationSigner, createZip, decide, defaultAuthState, defaultBaseState, defaultDocumentState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, deleteChangeLogItem, deleteModule, deleteOperation, deleteOperationError, deleteOperationExample, deleteStateExample, deriveOperationId, deserializeSignature, diffOperations, documentModelActions, documentModelDocumentType, documentModelFileExtension, documentModelGlobalState, documentModelHeaderReducer, documentModelInitialGlobalState, documentModelInitialLocalState, documentModelLoadFromInput, documentModelModuleReducer, documentModelOperationErrorReducer, documentModelOperationExampleReducer, documentModelOperationReducer, documentModelReducer, documentModelSaveToFileHandle, documentModelStateReducer, documentModelStateSchemaReducer, documentModelVersioningReducer, evaluate, evaluateCondition, evaluateGrantStack, evaluateGrants, fetchFileBrowser, filterDocumentOperationsResultingState, filterDuplicatedOperations, findModuleOrThrow, findOperationErrorOrThrow, findOperationExampleOrThrow, findOperationOrThrow, garbageCollect, garbageCollectDocumentOperations, garbageCollectV2, generateId, generateMock, getAllOperationNames, getDocumentLastModified, getFileBrowser, getUnixTimestamp, grantProblem, groupDocumentType, groupMembershipActionTypes, groupOperationsByScope, hashBrowser, hashDocumentStateForScope, hex2ab, initializeAuth, isAuthAction, isDefinedNonNullAny, isDenied, isDocumentAction, isDocumentCreator, isDocumentModelDocument, isDocumentModelState, isDocumentZip, isNoopOperation, isPlainValue, isReservedOperationName, isUndo, isUndoRedo, isValidOperationNameFormat, loadState, loadStateOperation, mapSkippedOperations, mapSkippedOperationsV2, mentionedGroupIds, merge, moveGrant, moveOperation, nextSkipNumber, noop, normalizeDocumentModelVersion, operationExampleCreators, operationFromAction, operationFromOperation, operationOutcome, operationWithContext, operationsAreEqual, parseBulkArchive, parseResultingState, precedes, prepareOperations, processUndoRedo, prune, pruneOperation, readFileBrowser, readOnly, redo, redoOperation, referencedGroupIds, releaseNewVersion, removeExistingOperations, removeGrant, reorderChangeLogItems, reorderModuleOperations, reorderModules, reorderOperationErrors, reorderOperationExamples, reorderStateExamples, replayDocument, replayDocumentVersioned, replayOperations, reshuffleByTimestamp, reshuffleByTimestampAndIndex, resolveSnapshotAuth, serializeSignature, setAuthorName, setAuthorWebsite, setGrant, setInitialState, setModelDescription, setModelExtension, setModelId, setModelName, setModuleDescription, setModuleName, setName, setNameOperation, setOperationDescription, setOperationErrorCode, setOperationErrorDescription, setOperationErrorName, setOperationErrorTemplate, setOperationName, setOperationReducer, setOperationSchema, setOperationScope, setOperationTemplate, setPreferredEditor, setPreferredEditorOperation, setStateSchema, sign, skipHeaderOperations, sortMappedOperations, sortOperations, split, toTransportAction, undo, undoOperation, undoOperationV2, updateChangeLogItem, updateDocument, updateHeaderRevision, updateOperationExample, updateStateExample, validateHeader, validateInitialState, validateModule, validateModuleOperation, validateModules, validateOperationName, validateOperations, validateStateSchemaName, verify, verifyOperationSignature, writeFileBrowser, zipEntries };
|
|
1
|
+
import { $ as AddOperationExampleAction, $a as AddOperationExampleInputSchema, $c as deleteOperationExample, $i as SetOperationReducerAction, $l as checkCleanedOperationsIntegrity, $n as MutationRedoArgs, $o as SetOperationErrorTemplateInputSchema, $r as ReorderModuleOperationsAction, $t as DocumentModelOperationExampleOperations, $u as defaultGlobalState, Aa as UpdateChangeLogItemAction, Ad as Signature, Ai as SetModelIdAction, Al as setOperationErrorTemplate, An as MakeMaybe, Ao as RedoSchema, Ar as NOOPAction, As as signActionV2, At as DeleteOperationErrorInput, Au as split, Ba as User, Bc as addModule, Bi as SetNameOperation, Bl as updateOperationExample, Bn as MutationAddChangeLogItemInputArgs, Bo as SetInitialStateInputSchema, Br as PowerhouseModule, Bt as DocumentModelGlobalState, Bu as PHDocumentState, Ca as State, Cd as setPreferredEditorOperation, Ci as SetAuthorWebsiteInput, Cl as setModuleDescription, Cn as Incremental, Co as PieceModulesSchema, Cr as MutationSetOperationSchemaArgs, Cs as DOCUMENT_SCOPE_ACTION_TYPES, Ct as DeleteChildDocumentSignal, Cu as removeExistingOperations, Da as UndoAction, Dd as AppActionSigner, Di as SetModelDescriptionInput, Dl as setOperationErrorCode, Dn as LoadFromFile, Do as PwaConfigSchema, Dr as MutationUpdateChangeLogItemInputArgs, Ds as canonicalJson, Dt as DeleteModuleInput, Du as skipHeaderOperations, Ea as Undo, Ed as ActionSigner, Ei as SetModelDescriptionAction, El as setOperationDescription, En as IsStateOfType, Eo as PublisherSchema, Er as MutationUndoArgs, Es as actionSigningTarget, Et as DeleteModuleAction, Eu as reshuffleByTimestampAndIndex, Fa as UpdateRelationshipActionInput, Fc as actionContext, Fi as SetModuleDescriptionInput, Fl as setOperationTemplate, Fn as MinimalBackupData, Fo as ReorderOperationExamplesInputSchema, Fr as PartialRecord, Ft as DeleteStateExampleInput, Fu as Condition, G as Actions, Ga as applyDeleteDocumentAction, Gc as baseActions, Gi as SetOperationErrorDescriptionAction, Gl as PHDocument, Gn as MutationAddStateExampleArgs, Go as SetModuleDescriptionInputSchema, Gr as RedoActionInput, Gt as DocumentModelLocalState, Gu as createBaseState, H as ActionSignatureContext, Ha as UpgradeManifest, Hc as addOperationError, Hi as SetOperationDescriptionInput, Hl as verifyOperationSignature, Hn as MutationAddOperationArgs, Ho as SetModelExtensionInputSchema, Hr as Query, Ht as DocumentModelHeaderOperations, Hu as Principal, Ia as UpdateStateExampleAction, Ic as actionFromAction, Ii as SetModuleNameAction, Il as setPreferredEditor, In as ModuleSpecification, Io as ReorderStateExamplesInputSchema, Ir as PartialState, It as DocumentAction, Iu as Grant, J as AddModuleAction, Ja as normalizeDocumentModelVersion, Jc as createAction, Ji as SetOperationErrorNameInput, Jl as addUndo, Jn as MutationDeleteOperationArgs, Jo as SetNameActionSchema, Jr as ReleaseNewVersionAction, Jt as DocumentModelModuleOperations, Ju as createLocalState, K as AddChangeLogItemAction, Ka as applyUpgradeDocumentAction, Kc as buildOperationSignature, Ki as SetOperationErrorDescriptionInput, Kl as PHDocumentHeader, Kn as MutationDeleteChangeLogItemInputArgs, Ko as SetModuleNameInputSchema, Kr as Reducer, Kt as DocumentModelModule, Ku as createDocumentState, La as UpdateStateExampleInput, Lc as actionSigner, Li as SetModuleNameInput, Ll as setStateSchema, Ln as MoveOperationAction, Lo as ScopeStateSchema, Lr as PhAiToolAnnotations, Lt as DocumentModelAction, Lu as Operand, Ma as UpdateOperationExampleAction, Md as deserializeSignature, Mi as SetModelNameAction, Ml as setOperationReducer, Mn as Manifest, Mo as ReorderModuleOperationsInputSchema, Mr as OperationIndex, Ms as v2TupleProblem, Mt as DeleteOperationExampleInput, Mu as withSignaturePolicy, Na as UpdateOperationExampleInput, Nc as Action, Nd as serializeSignature, Ni as SetModelNameInput, Nl as setOperationSchema, Nn as MappedOperation, No as ReorderModulesInputSchema, Nr as OperationSpecification, Nt as DeleteOperationInput, Nu as AuthGroups, Oa as UndoActionInput, Od as HashConfig, Oi as SetModelExtensionAction, Ol as setOperationErrorDescription, On as LoadFromInput, Oo as RedoActionInputSchema, Or as MutationUpdateOperationExampleArgs, Os as hashActionV2, Ot as DeleteOperationAction, Ou as sortMappedOperations, Pa as UpdateRelationshipAction, Pc as ActionContext, Pi as SetModuleDescriptionAction, Pl as setOperationScope, Pn as Maybe, Po as ReorderOperationErrorsInputSchema, Pr as OperationsByScope, Pt as DeleteStateExampleAction, Pu as Capability, Q as AddOperationErrorInput, Qa as AddOperationErrorInputSchema, Qc as deleteOperationError, Qi as SetOperationNameInput, Ql as baseReducerVersion, Qn as MutationMoveOperationArgs, Qo as SetOperationErrorNameInputSchema, Qr as ReorderChangeLogItemsInput, Qt as DocumentModelOperationExampleAction, Qu as defaultDocumentState, Ra as UpgradeDocumentAction, Rc as actions, Ri as SetNameAction, Rl as undo, Rn as MoveOperationInput, Ro as SetAuthorNameInputSchema, Rr as PhAiToolDescriptor, Rt as DocumentModelDocument, Ru as PHAuthState, Sa as SkipHeaderOperations, Sd as setNameOperation, Si as SetAuthorWebsiteAction, Sl as setModelName, Sn as ISigner, So as PieceModuleSchema, Sr as MutationSetOperationReducerArgs, Ss as CanonicalJsonError, St as DeleteChildDocumentInput, Su as readOnly, Ta as SubgraphModule, Td as undoOperationV2, Ti as SetInitialStateInput, Tl as setName, Tn as IsDocumentOfType, To as PowerhouseModulesSchema, Tr as MutationSetStateSchemaArgs, Ts as actionSignerIdentity, Tt as DeleteDocumentActionInput, Tu as reshuffleByTimestamp, U as ActionSigningHandler, Ua as UpgradeReducer, Uc as addOperationExample, Ui as SetOperationErrorCodeAction, Ul as IntegrityIssueSubType, Un as MutationAddOperationErrorArgs, Uo as SetModelIdInputSchema, Ur as Redo, Ut as DocumentModelInput, Uu as backfillAuthState, V as ActionErrorCallback, Va as ValidationError, Vc as addOperation, Vi as SetOperationDescriptionAction, Vl as updateStateExample, Vn as MutationAddModuleArgs, Vo as SetModelDescriptionInputSchema, Vr as Publisher, Vt as DocumentModelHeaderAction, Vu as PHGroupState, W as ActionVerificationHandler, Wa as UpgradeTransition, Wc as addStateExample, Wi as SetOperationErrorCodeInput, Wl as IntegrityIssueType, Wn as MutationAddOperationExampleArgs, Wo as SetModelNameInputSchema, Wr as RedoAction, Wt as DocumentModelLib, Wu as createAuthState, X as AddOperationAction, Xa as AddChangeLogItemInputSchema, Xc as deleteModule, Xi as SetOperationErrorTemplateInput, Xl as attachBranch, Xn as MutationDeleteOperationExampleArgs, Xo as SetOperationErrorCodeInputSchema, Xr as RemoveRelationshipActionInput, Xt as DocumentModelOperationErrorAction, Xu as defaultAuthState, Y as AddModuleInput, Ya as withProtocolVersions, Yc as deleteChangeLogItem, Yi as SetOperationErrorTemplateAction, Yl as appendWithoutApplying, Yn as MutationDeleteOperationErrorArgs, Yo as SetOperationDescriptionInputSchema, Yr as RemoveRelationshipAction, Yt as DocumentModelOperationAction, Yu as createState, Z as AddOperationErrorAction, Za as AddModuleInputSchema, Zc as deleteOperation, Zi as SetOperationNameAction, Zl as baseCreateDocument, Zn as MutationDeleteStateExampleArgs, Zo as SetOperationErrorDescriptionInputSchema, Zr as ReorderChangeLogItemsAction, Zt as DocumentModelOperationErrorOperations, Zu as defaultBaseState, _a as SignalResults, _d as OperationContext, _i as SchemaSetPreferredEditorAction, _l as setAuthorWebsite, _n as ID, _o as ModuleSchema, _r as MutationSetOperationErrorCodeArgs, _s as definedNonNullAnySchema, _t as CreateDocumentAction, _u as nextSkipNumber, aa as SetOperationTemplateAction, ad as SIGNATURE_PROTOCOL, ai as ReorderOperationExamplesAction, al as operationFromAction, an as DocumentModelVersioningAction, ao as ConfigEntryTypeSchema, ar as MutationReorderStateExamplesArgs, as as SetPreferredEditorActionInputSchema, at as AddStateExampleInput, au as garbageCollectDocumentOperations, ba as SigningParameters, bd as operationOutcome, bi as SetAuthorNameAction, bl as setModelExtension, bn as ISignal, bo as OperationScopeSchema, br as MutationSetOperationErrorTemplateArgs, bs as ActionSignerIdentity, bt as DeleteChangeLogItemAction, bu as precedes, ca as SetPreferredEditorActionInput, cd as deriveDocumentId, ci as ReorderStateExamplesInput, cl as redo, cn as DocumentSpecification, co as DeleteOperationErrorInputSchema, cr as MutationSetInitialStateArgs, cs as Set_NameSchema, ct as Author, cu as groupOperationsByScope, da as SetStateSchemaInput, dd as protocolVersionsFor, di as SaveToFile, dl as reorderModuleOperations, dn as EditorModule, do as DeleteStateExampleInputSchema, dr as MutationSetModelIdArgs, ds as UndoActionInputSchema, dt as ConfigEntryType, du as isNoopOperation, ea as SetOperationReducerInput, ed as defaultLocalState, ei as ReorderModuleOperationsInput, el as deleteStateExample, en as DocumentModelOperationOperations, eo as AddOperationInputSchema, er as MutationReorderChangeLogItemsInputArgs, es as SetOperationNameInputSchema, et as AddOperationExampleInput, eu as checkOperationsIntegrity, fa as Set_Name, fd as requestedSignaturePolicy, fi as SaveToFileHandle, fl as reorderModules, fn as EditorProps, fo as DocumentActionSchema, fr as MutationSetModelNameArgs, fs as UndoActionSchema, ft as CopyChildDocumentInput, fu as isUndo, ga as SignalResult, gd as Operation, gi as SchemaSetNameAction, gl as setAuthorName, gn as IAction, go as ManifestSchema, gr as MutationSetOperationDescriptionArgs, gs as UpdateStateExampleInputSchema, gt as CreateDocument, gu as merge, ha as SignalDispatch, hd as DocumentOperations, hi as SchemaRedoAction, hl as reorderStateExamples, hn as GetDocumentOptions, ho as DocumentSpecificationSchema, hr as MutationSetNameArgs, hs as UpdateOperationExampleInputSchema, ht as CreateChildDocumentSignal, hu as mapSkippedOperationsV2, ia as SetOperationScopeInput, id as ProtocolVersions, ii as ReorderOperationErrorsInput, il as operationExampleCreators, in as DocumentModelUtils, io as ConfigEntrySchema, ir as MutationReorderOperationExamplesArgs, is as SetOperationTemplateInputSchema, it as AddStateExampleAction, iu as garbageCollect, ja as UpdateChangeLogItemInput, jd as UserActionSigner, ji as SetModelIdInput, jl as setOperationName, jn as MakeOptional, jo as ReorderChangeLogItemsInputSchema, jr as OperationErrorSpecification, js as targetDocumentId, jt as DeleteOperationExampleAction, ju as updateHeaderRevision, ka as UndoRedoAction, kd as PHDocumentSignatureInfo, ki as SetModelExtensionInput, kl as setOperationErrorName, kn as MakeEmpty, ko as RedoActionSchema, kr as MutationUpdateStateExampleArgs, ks as isV2ActionHash, kt as DeleteOperationErrorAction, ku as sortOperations, la as SetPreferredEditorOperation, ld as isDerivedDocumentId, li as ReplayDocumentOptions, ll as releaseNewVersion, ln as ENSInfo, lo as DeleteOperationExampleInputSchema, lr as MutationSetModelDescriptionArgs, ls as Set_PreferredEditorSchema, lt as CodeExample, lu as hashDocumentStateForScope, ma as Signal, md as v2RequiredProtocolVersions, mi as SchemaNOOPAction, ml as reorderOperationExamples, mn as FileInput, mo as DocumentModelInputSchema, mr as MutationSetModuleNameArgs, ms as UpdateChangeLogItemInputSchema, mt as CreateChildDocumentInput, mu as mapSkippedOperations, na as SetOperationSchemaInput, nd as DEFAULT_SIGNATURE_POLICY, ni as ReorderModulesInput, nl as moveOperation, nn as DocumentModelStateAction, no as AuthorSchema, nr as MutationReorderModulesArgs, ns as SetOperationSchemaInputSchema, nt as AddRelationshipAction, nu as filterDocumentOperationsResultingState, oa as SetOperationTemplateInput, od as SIGNATURE_PROTOCOL_V2, oi as ReorderOperationExamplesInput, ol as operationFromOperation, on as DocumentModelVersioningOperations, oo as DeleteChangeLogItemInputSchema, or as MutationSetAuthorNameArgs, os as SetPreferredEditorActionSchema, ot as AssertIsDocumentOfType, ou as garbageCollectV2, pa as Set_PreferredEditor, pd as signaturePolicyOf, pi as Scalars, pl as reorderOperationErrors, pn as Exact, po as DocumentModelGlobalStateSchema, pr as MutationSetModuleDescriptionArgs, ps as UndoSchema, pt as CopyChildDocumentSignal, pu as isUndoRedo, q as AddChangeLogItemInput, qa as computeUpgradeTransitions, qc as buildSignedAction, qi as SetOperationErrorNameAction, ql as PHDocumentMeta, qn as MutationDeleteModuleArgs, qo as SetNameActionInputSchema, qr as ReducerOptions, qt as DocumentModelModuleAction, qu as createGlobalState, ra as SetOperationScopeAction, rd as DocumentIdParams, ri as ReorderOperationErrorsAction, rl as noop, rn as DocumentModelStateOperations, ro as CodeExampleSchema, rr as MutationReorderOperationErrorsArgs, rs as SetOperationScopeInputSchema, rt as AddRelationshipActionInput, ru as filterDuplicatedOperations, sa as SetPreferredEditorAction, sd as SignaturePolicy, si as ReorderStateExamplesAction, sl as operationWithContext, sn as DocumentOperationsIgnoreMap, so as DeleteModuleInputSchema, sr as MutationSetAuthorWebsiteArgs, ss as SetStateSchemaInputSchema, st as AssertIsStateOfType, su as getDocumentLastModified, ta as SetOperationSchemaAction, td as defaultPHState, ti as ReorderModulesAction, tl as documentModelActions, tn as DocumentModelPHState, to as AddStateExampleInputSchema, tr as MutationReorderModuleOperationsArgs, ts as SetOperationReducerInputSchema, tt as AddOperationInput, tu as diffOperations, ua as SetStateSchemaAction, ud as isSignaturePolicy, ui as RevisionsFilter, ul as reorderChangeLogItems, un as EditorDispatch, uo as DeleteOperationInputSchema, ur as MutationSetModelExtensionArgs, us as StateSchema, ut as ConfigEntry, uu as isDocumentAction, va as SignalType, vd as OperationOutcome, vi as SchemaUndoAction, vl as setInitialState, vn as IDocument, vo as MoveOperationInputSchema, vr as MutationSetOperationErrorDescriptionArgs, vs as isDefinedNonNullAny, vt as CreateDocumentActionInput, vu as operationsAreEqual, wa as StateReducer, wd as undoOperation, wi as SetInitialStateAction, wl as setModuleName, wn as InputMaybe, wo as PowerhouseModuleSchema, wr as MutationSetOperationTemplateArgs, ws as actionPreimageV2, wt as DeleteDocumentAction, wu as replayDocument, xa as SkipHeaderOperationIndex, xd as redoOperation, xi as SetAuthorNameInput, xl as setModelId, xn as ISignalResult, xo as OperationSpecificationSchema, xr as MutationSetOperationNameArgs, xs as ActionSigningTarget, xt as DeleteChangeLogItemInput, xu as prepareOperations, ya as SignatureVerificationHandler, yd as OperationWithContext, yi as ScopeState, yl as setModelDescription, yn as IOperation, yo as OperationErrorSchema, yr as MutationSetOperationErrorNameArgs, ys as ACTION_SIGNATURE_V2_PREFIX, yt as CreateState, yu as parseResultingState, za as UpgradeDocumentActionInput, zc as addChangeLogItem, zi as SetNameActionInput, zl as updateChangeLogItem, zn as Mutation, zo as SetAuthorWebsiteInputSchema, zr as PieceModule, zt as DocumentModelDocumentModelModule, zu as PHBaseState } from "../types-xLPOHE23.js";
|
|
2
|
+
import { $ as fetchFileBrowser, $n as isDocumentCreator, $t as documentModelInitialGlobalState, A as documentModelVersioningReducer, An as InitializeAuthActionInput, At as assertIsDocumentModelState, B as createVerificationSigner, Bn as SetGrantActionInput, Bt as base64UrlToBytes, C as documentModelModuleReducer, Cn as AuthEvaluation, Ct as groupMembershipActionTypes, D as documentModelReducer, Dn as AuthVerb, Dt as DocumentModelPHStateSchema, E as documentModelOperationReducer, En as AuthSubject, Et as DocumentModelHeaderSchema, F as updateDocument, Fn as MoveGrantActionInputSchema, Ft as AUTH_VERSION_UNSUPPORTED_REASON, G as BulkArchiveEntry, Gn as applyRemoveGrantAction, Gt as hex2ab, H as sign, Hn as applyAuthAction, Ht as buildOperationSignatureParams, I as createCopyHeader, In as RemoveGrantAction, It as DOCUMENT_DELETED_REASON, J as baseSaveToFileHandle, Jn as assertAuthScopeActionAllowed, Jt as HASH_ALGORITHM_SHA512, K as baseLoadFromInput, Kn as applySetGrantAction, Kt as HASH_ALGORITHM_SHA1, L as createPresignedHeader, Ln as RemoveGrantActionInput, Lt as isDenied, M as createReducer, Mn as MAX_SUPPORTED_AUTH_VERSION, Mt as isDocumentModelState, N as processUndoRedo, Nn as MoveGrantAction, Nt as AUTH_DENIED_BY_GRANT_REASON, O as documentModelStateReducer, On as ConditionContext, Ot as DocumentModelSchema, P as replayOperations, Pn as MoveGrantActionInput, Pt as AUTH_NO_GRANT_REASON, Q as documentModelSaveToFileHandle, Qn as isAuthAction, Qt as documentModelGlobalState, R as createSignedHeader, Rn as RemoveGrantActionInputSchema, Rt as ab2hex, S as documentModelHeaderReducer, Sn as AuthDecision, St as groupDocumentType, T as documentModelOperationExampleReducer, Tn as AuthRequest, Tt as BaseDocumentStateSchema, U as validateHeader, Un as applyInitializeAuthAction, Ut as getUnixTimestamp, V as hasDerivedDocumentId, Vn as SetGrantActionInputSchema, Vt as buildOperationSignatureMessage, W as verify, Wn as applyMoveGrantAction, Wt as hashBrowser, X as createZip, Xn as evaluate, Xt as HASH_ENCODING_HEX, Y as createMinimalZip, Yn as decide, Yt as HASH_ENCODING_BASE64, Z as documentModelLoadFromInput, Zn as initializeAuth, Zt as documentModelFileExtension, _ as validateModuleOperation, _n as grantProblem, _t as InvalidActionInputError, a as assertOperationErrorIdUnique, an as InvalidGrantError, ar as TransportAction, at as zipEntries, b as validateOperations, bn as AUTH_ACTION_TYPES, bt as UnsupportedDocumentModelVersionError, c as findModuleOrThrow, cn as MAX_CONDITION_DEPTH, cr as toTransportAction, ct as replayDocumentVersioned, d as findOperationOrThrow, dn as assertValidGrant, dt as AuthInitializerNotCreatorError, en as documentModelInitialLocalState, er as mentionedGroupIds, et as getFileBrowser, f as getAllOperationNames, fn as assertValidGrantUpsert, ft as AuthPolicyNotPreservedError, g as validateModule, gn as evaluateGrants, gt as HashMismatchError, h as validateInitialState, hn as evaluateGrantStack, ht as GrantNotFoundError, i as assertModuleIdUnique, in as GroupPrincipalNotAllowedError, ir as setGrant, it as writeFileBrowser, j as baseReducer, jn as InitializeAuthActionInputSchema, jt as isDocumentModelDocument, k as documentModelStateSchemaReducer, kn as InitializeAuthAction, kt as assertIsDocumentModelDocument, l as findOperationErrorOrThrow, ln as MAX_CONDITION_NODES, lt as AuthActionNotAllowedError, m as isValidOperationNameFormat, mn as evaluateCondition, mt as FileSystemError, n as RESERVED_OPERATION_NAMES, nn as AuthAdministrationMissingError, nr as removeGrant, nt as parseBulkArchive, o as assertOperationExampleIdUnique, on as MAX_AUTH_GRANTS, or as TransportActionContext, ot as VersionedReducers, p as isReservedOperationName, pn as assertValidInitialGrants, pt as DowngradeNotSupportedError, q as baseLoadFromInputVersioned, qn as assertAuthPreservedOnDuplicate, qt as HASH_ALGORITHM_SHA256, r as ReservedOperationName, rn as GrantSchema, rr as resolveSnapshotAuth, rt as readFileBrowser, s as assertOperationIdUnique, sn as MAX_CAPABILITY_OPERATIONS, sr as TransportSigner, st as VersionedReplayConfig, t as OPERATION_NAME_PATTERN, tn as AuthAdministrationLockoutError, tr as moveGrant, tt as isDocumentZip, u as findOperationExampleOrThrow, un as assertAuthAdministrationRetained, ut as AuthAlreadyInitializedError, v as validateModules, vn as isPlainValue, vt as InvalidActionInputZodError, w as documentModelOperationErrorReducer, wn as AuthRefusal, wt as BaseDocumentHeaderSchema, x as validateStateSchemaName, xn as AuthAction, xt as documentModelDocumentType, y as validateOperationName, yn as referencedGroupIds, yt as InvalidAuthVersionError, z as createSignedHeaderForSigner, zn as SetGrantAction, zt as base58Decode } from "../index-CDDyUSHE.js";
|
|
3
|
+
import { n as generateId, r as generateMock, t as deriveOperationId } from "../utils-BrKxCmKx.js";
|
|
4
|
+
export { ACTION_SIGNATURE_V2_PREFIX, AUTH_ACTION_TYPES, AUTH_DENIED_BY_GRANT_REASON, AUTH_NO_GRANT_REASON, AUTH_VERSION_UNSUPPORTED_REASON, Action, ActionContext, type ActionErrorCallback, type ActionSignatureContext, ActionSigner, ActionSignerIdentity, type ActionSigningHandler, ActionSigningTarget, type ActionVerificationHandler, type Actions, type AddChangeLogItemAction, type AddChangeLogItemInput, AddChangeLogItemInputSchema, type AddModuleAction, type AddModuleInput, AddModuleInputSchema, type AddOperationAction, type AddOperationErrorAction, type AddOperationErrorInput, AddOperationErrorInputSchema, type AddOperationExampleAction, type AddOperationExampleInput, AddOperationExampleInputSchema, type AddOperationInput, AddOperationInputSchema, type AddRelationshipAction, type AddRelationshipActionInput, type AddStateExampleAction, type AddStateExampleInput, AddStateExampleInputSchema, AppActionSigner, type AssertIsDocumentOfType, type AssertIsStateOfType, AuthAction, AuthActionNotAllowedError, AuthAdministrationLockoutError, AuthAdministrationMissingError, AuthAlreadyInitializedError, AuthDecision, AuthEvaluation, AuthGroups, AuthInitializerNotCreatorError, AuthPolicyNotPreservedError, AuthRefusal, AuthRequest, AuthSubject, AuthVerb, type Author, AuthorSchema, BaseDocumentHeaderSchema, BaseDocumentStateSchema, BulkArchiveEntry, CanonicalJsonError, Capability, type CodeExample, CodeExampleSchema, Condition, ConditionContext, type ConfigEntry, ConfigEntrySchema, type ConfigEntryType, ConfigEntryTypeSchema, type CopyChildDocumentInput, type CopyChildDocumentSignal, type CreateChildDocumentInput, type CreateChildDocumentSignal, type CreateDocument, type CreateDocumentAction, type CreateDocumentActionInput, type CreateState, DEFAULT_SIGNATURE_POLICY, DOCUMENT_DELETED_REASON, DOCUMENT_SCOPE_ACTION_TYPES, type DeleteChangeLogItemAction, type DeleteChangeLogItemInput, DeleteChangeLogItemInputSchema, type DeleteChildDocumentInput, type DeleteChildDocumentSignal, type DeleteDocumentAction, type DeleteDocumentActionInput, type DeleteModuleAction, type DeleteModuleInput, DeleteModuleInputSchema, type DeleteOperationAction, type DeleteOperationErrorAction, type DeleteOperationErrorInput, DeleteOperationErrorInputSchema, type DeleteOperationExampleAction, type DeleteOperationExampleInput, DeleteOperationExampleInputSchema, type DeleteOperationInput, DeleteOperationInputSchema, type DeleteStateExampleAction, type DeleteStateExampleInput, DeleteStateExampleInputSchema, type DocumentAction, DocumentActionSchema, DocumentIdParams, type DocumentModelAction, type DocumentModelDocument, type DocumentModelDocumentModelModule, type DocumentModelGlobalState, DocumentModelGlobalStateSchema, type DocumentModelHeaderAction, type DocumentModelHeaderOperations, DocumentModelHeaderSchema, type DocumentModelInput, DocumentModelInputSchema, type DocumentModelLib, type DocumentModelLocalState, type DocumentModelModule, type DocumentModelModuleAction, type DocumentModelModuleOperations, type DocumentModelOperationAction, type DocumentModelOperationErrorAction, type DocumentModelOperationErrorOperations, type DocumentModelOperationExampleAction, type DocumentModelOperationExampleOperations, type DocumentModelOperationOperations, type DocumentModelPHState, DocumentModelPHStateSchema, DocumentModelSchema, type DocumentModelStateAction, type DocumentModelStateOperations, type DocumentModelUtils, type DocumentModelVersioningAction, type DocumentModelVersioningOperations, DocumentOperations, type DocumentOperationsIgnoreMap, type DocumentSpecification, DocumentSpecificationSchema, DowngradeNotSupportedError, type ENSInfo, type EditorDispatch, type EditorModule, type EditorProps, type Exact, type FileInput, FileSystemError, type GetDocumentOptions, Grant, GrantNotFoundError, GrantSchema, GroupPrincipalNotAllowedError, HASH_ALGORITHM_SHA1, HASH_ALGORITHM_SHA256, HASH_ALGORITHM_SHA512, HASH_ENCODING_BASE64, HASH_ENCODING_HEX, HashConfig, HashMismatchError, type IAction, type ID, type IDocument, type IOperation, type ISignal, type ISignalResult, type ISigner, type Incremental, InitializeAuthAction, InitializeAuthActionInput, InitializeAuthActionInputSchema, type InputMaybe, IntegrityIssueSubType, IntegrityIssueType, InvalidActionInputError, InvalidActionInputZodError, InvalidAuthVersionError, InvalidGrantError, type IsDocumentOfType, type IsStateOfType, type LoadFromFile, type LoadFromInput, MAX_AUTH_GRANTS, MAX_CAPABILITY_OPERATIONS, MAX_CONDITION_DEPTH, MAX_CONDITION_NODES, MAX_SUPPORTED_AUTH_VERSION, type MakeEmpty, type MakeMaybe, type MakeOptional, type Manifest, ManifestSchema, type MappedOperation, type Maybe, type MinimalBackupData, ModuleSchema, type ModuleSpecification, MoveGrantAction, MoveGrantActionInput, MoveGrantActionInputSchema, type MoveOperationAction, type MoveOperationInput, MoveOperationInputSchema, type Mutation, type MutationAddChangeLogItemInputArgs, type MutationAddModuleArgs, type MutationAddOperationArgs, type MutationAddOperationErrorArgs, type MutationAddOperationExampleArgs, type MutationAddStateExampleArgs, type MutationDeleteChangeLogItemInputArgs, type MutationDeleteModuleArgs, type MutationDeleteOperationArgs, type MutationDeleteOperationErrorArgs, type MutationDeleteOperationExampleArgs, type MutationDeleteStateExampleArgs, type MutationMoveOperationArgs, type MutationRedoArgs, type MutationReorderChangeLogItemsInputArgs, type MutationReorderModuleOperationsArgs, type MutationReorderModulesArgs, type MutationReorderOperationErrorsArgs, type MutationReorderOperationExamplesArgs, type MutationReorderStateExamplesArgs, type MutationSetAuthorNameArgs, type MutationSetAuthorWebsiteArgs, type MutationSetInitialStateArgs, type MutationSetModelDescriptionArgs, type MutationSetModelExtensionArgs, type MutationSetModelIdArgs, type MutationSetModelNameArgs, type MutationSetModuleDescriptionArgs, type MutationSetModuleNameArgs, type MutationSetNameArgs, type MutationSetOperationDescriptionArgs, type MutationSetOperationErrorCodeArgs, type MutationSetOperationErrorDescriptionArgs, type MutationSetOperationErrorNameArgs, type MutationSetOperationErrorTemplateArgs, type MutationSetOperationNameArgs, type MutationSetOperationReducerArgs, type MutationSetOperationSchemaArgs, type MutationSetOperationTemplateArgs, type MutationSetStateSchemaArgs, type MutationUndoArgs, type MutationUpdateChangeLogItemInputArgs, type MutationUpdateOperationExampleArgs, type MutationUpdateStateExampleArgs, type NOOPAction, OPERATION_NAME_PATTERN, Operand, Operation, OperationContext, OperationErrorSchema, type OperationErrorSpecification, type OperationIndex, OperationOutcome, OperationScopeSchema, type OperationSpecification, OperationSpecificationSchema, OperationWithContext, type OperationsByScope, PHAuthState, PHBaseState, PHDocument, PHDocumentHeader, PHDocumentMeta, PHDocumentSignatureInfo, PHDocumentState, PHGroupState, type PartialRecord, type PartialState, type PhAiToolAnnotations, type PhAiToolDescriptor, type PieceModule, PieceModuleSchema, PieceModulesSchema, type PowerhouseModule, PowerhouseModuleSchema, PowerhouseModulesSchema, Principal, ProtocolVersions, type Publisher, PublisherSchema, PwaConfigSchema, type Query, RESERVED_OPERATION_NAMES, type Redo, type RedoAction, type RedoActionInput, RedoActionInputSchema, RedoActionSchema, RedoSchema, type Reducer, type ReducerOptions, type ReleaseNewVersionAction, RemoveGrantAction, RemoveGrantActionInput, RemoveGrantActionInputSchema, type RemoveRelationshipAction, type RemoveRelationshipActionInput, type ReorderChangeLogItemsAction, type ReorderChangeLogItemsInput, ReorderChangeLogItemsInputSchema, type ReorderModuleOperationsAction, type ReorderModuleOperationsInput, ReorderModuleOperationsInputSchema, type ReorderModulesAction, type ReorderModulesInput, ReorderModulesInputSchema, type ReorderOperationErrorsAction, type ReorderOperationErrorsInput, ReorderOperationErrorsInputSchema, type ReorderOperationExamplesAction, type ReorderOperationExamplesInput, ReorderOperationExamplesInputSchema, type ReorderStateExamplesAction, type ReorderStateExamplesInput, ReorderStateExamplesInputSchema, type ReplayDocumentOptions, ReservedOperationName, type RevisionsFilter, SIGNATURE_PROTOCOL, SIGNATURE_PROTOCOL_V2, type SaveToFile, type SaveToFileHandle, type Scalars, type SchemaNOOPAction, type SchemaRedoAction, type SchemaSetNameAction, type SchemaSetPreferredEditorAction, type SchemaUndoAction, type ScopeState, ScopeStateSchema, type SetAuthorNameAction, type SetAuthorNameInput, SetAuthorNameInputSchema, type SetAuthorWebsiteAction, type SetAuthorWebsiteInput, SetAuthorWebsiteInputSchema, SetGrantAction, SetGrantActionInput, SetGrantActionInputSchema, type SetInitialStateAction, type SetInitialStateInput, SetInitialStateInputSchema, type SetModelDescriptionAction, type SetModelDescriptionInput, SetModelDescriptionInputSchema, type SetModelExtensionAction, type SetModelExtensionInput, SetModelExtensionInputSchema, type SetModelIdAction, type SetModelIdInput, SetModelIdInputSchema, type SetModelNameAction, type SetModelNameInput, SetModelNameInputSchema, type SetModuleDescriptionAction, type SetModuleDescriptionInput, SetModuleDescriptionInputSchema, type SetModuleNameAction, type SetModuleNameInput, SetModuleNameInputSchema, type SetNameAction, type SetNameActionInput, SetNameActionInputSchema, SetNameActionSchema, type SetNameOperation, type SetOperationDescriptionAction, type SetOperationDescriptionInput, SetOperationDescriptionInputSchema, type SetOperationErrorCodeAction, type SetOperationErrorCodeInput, SetOperationErrorCodeInputSchema, type SetOperationErrorDescriptionAction, type SetOperationErrorDescriptionInput, SetOperationErrorDescriptionInputSchema, type SetOperationErrorNameAction, type SetOperationErrorNameInput, SetOperationErrorNameInputSchema, type SetOperationErrorTemplateAction, type SetOperationErrorTemplateInput, SetOperationErrorTemplateInputSchema, type SetOperationNameAction, type SetOperationNameInput, SetOperationNameInputSchema, type SetOperationReducerAction, type SetOperationReducerInput, SetOperationReducerInputSchema, type SetOperationSchemaAction, type SetOperationSchemaInput, SetOperationSchemaInputSchema, type SetOperationScopeAction, type SetOperationScopeInput, SetOperationScopeInputSchema, type SetOperationTemplateAction, type SetOperationTemplateInput, SetOperationTemplateInputSchema, type SetPreferredEditorAction, type SetPreferredEditorActionInput, SetPreferredEditorActionInputSchema, SetPreferredEditorActionSchema, type SetPreferredEditorOperation, type SetStateSchemaAction, type SetStateSchemaInput, SetStateSchemaInputSchema, type Set_Name, Set_NameSchema, type Set_PreferredEditor, Set_PreferredEditorSchema, type Signal, type SignalDispatch, type SignalResult, type SignalResults, type SignalType, Signature, SignaturePolicy, type SignatureVerificationHandler, type SigningParameters, type SkipHeaderOperationIndex, type SkipHeaderOperations, type State, type StateReducer, StateSchema, type SubgraphModule, TransportAction, TransportActionContext, TransportSigner, type Undo, type UndoAction, type UndoActionInput, UndoActionInputSchema, UndoActionSchema, type UndoRedoAction, UndoSchema, UnsupportedDocumentModelVersionError, type UpdateChangeLogItemAction, type UpdateChangeLogItemInput, UpdateChangeLogItemInputSchema, type UpdateOperationExampleAction, type UpdateOperationExampleInput, UpdateOperationExampleInputSchema, type UpdateRelationshipAction, type UpdateRelationshipActionInput, type UpdateStateExampleAction, type UpdateStateExampleInput, UpdateStateExampleInputSchema, type UpgradeDocumentAction, type UpgradeDocumentActionInput, UpgradeManifest, UpgradeReducer, UpgradeTransition, type User, UserActionSigner, type ValidationError, VersionedReducers, VersionedReplayConfig, ab2hex, actionContext, actionFromAction, actionPreimageV2, actionSigner, actionSignerIdentity, actionSigningTarget, actions, addChangeLogItem, addModule, addOperation, addOperationError, addOperationExample, addStateExample, addUndo, appendWithoutApplying, applyAuthAction, applyDeleteDocumentAction, applyInitializeAuthAction, applyMoveGrantAction, applyRemoveGrantAction, applySetGrantAction, applyUpgradeDocumentAction, assertAuthAdministrationRetained, assertAuthPreservedOnDuplicate, assertAuthScopeActionAllowed, assertIsDocumentModelDocument, assertIsDocumentModelState, assertModuleIdUnique, assertOperationErrorIdUnique, assertOperationExampleIdUnique, assertOperationIdUnique, assertValidGrant, assertValidGrantUpsert, assertValidInitialGrants, attachBranch, backfillAuthState, base58Decode, base64UrlToBytes, baseActions, baseCreateDocument, baseLoadFromInput, baseLoadFromInputVersioned, baseReducer, baseReducerVersion, baseSaveToFileHandle, buildOperationSignature, buildOperationSignatureMessage, buildOperationSignatureParams, buildSignedAction, canonicalJson, checkCleanedOperationsIntegrity, checkOperationsIntegrity, computeUpgradeTransitions, createAction, createAuthState, createBaseState, createCopyHeader, createDocumentState, createGlobalState, createLocalState, createMinimalZip, createPresignedHeader, createReducer, createSignedHeader, createSignedHeaderForSigner, createState, createVerificationSigner, createZip, decide, defaultAuthState, defaultBaseState, defaultDocumentState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, deleteChangeLogItem, deleteModule, deleteOperation, deleteOperationError, deleteOperationExample, deleteStateExample, deriveDocumentId, deriveOperationId, deserializeSignature, diffOperations, documentModelActions, documentModelDocumentType, documentModelFileExtension, documentModelGlobalState, documentModelHeaderReducer, documentModelInitialGlobalState, documentModelInitialLocalState, documentModelLoadFromInput, documentModelModuleReducer, documentModelOperationErrorReducer, documentModelOperationExampleReducer, documentModelOperationReducer, documentModelReducer, documentModelSaveToFileHandle, documentModelStateReducer, documentModelStateSchemaReducer, documentModelVersioningReducer, evaluate, evaluateCondition, evaluateGrantStack, evaluateGrants, fetchFileBrowser, filterDocumentOperationsResultingState, filterDuplicatedOperations, findModuleOrThrow, findOperationErrorOrThrow, findOperationExampleOrThrow, findOperationOrThrow, garbageCollect, garbageCollectDocumentOperations, garbageCollectV2, generateId, generateMock, getAllOperationNames, getDocumentLastModified, getFileBrowser, getUnixTimestamp, grantProblem, groupDocumentType, groupMembershipActionTypes, groupOperationsByScope, hasDerivedDocumentId, hashActionV2, hashBrowser, hashDocumentStateForScope, hex2ab, initializeAuth, isAuthAction, isDefinedNonNullAny, isDenied, isDerivedDocumentId, isDocumentAction, isDocumentCreator, isDocumentModelDocument, isDocumentModelState, isDocumentZip, isNoopOperation, isPlainValue, isReservedOperationName, isSignaturePolicy, isUndo, isUndoRedo, isV2ActionHash, isValidOperationNameFormat, mapSkippedOperations, mapSkippedOperationsV2, mentionedGroupIds, merge, moveGrant, moveOperation, nextSkipNumber, noop, normalizeDocumentModelVersion, operationExampleCreators, operationFromAction, operationFromOperation, operationOutcome, operationWithContext, operationsAreEqual, parseBulkArchive, parseResultingState, precedes, prepareOperations, processUndoRedo, protocolVersionsFor, readFileBrowser, readOnly, redo, redoOperation, referencedGroupIds, releaseNewVersion, removeExistingOperations, removeGrant, reorderChangeLogItems, reorderModuleOperations, reorderModules, reorderOperationErrors, reorderOperationExamples, reorderStateExamples, replayDocument, replayDocumentVersioned, replayOperations, requestedSignaturePolicy, reshuffleByTimestamp, reshuffleByTimestampAndIndex, resolveSnapshotAuth, serializeSignature, setAuthorName, setAuthorWebsite, setGrant, setInitialState, setModelDescription, setModelExtension, setModelId, setModelName, setModuleDescription, setModuleName, setName, setNameOperation, setOperationDescription, setOperationErrorCode, setOperationErrorDescription, setOperationErrorName, setOperationErrorTemplate, setOperationName, setOperationReducer, setOperationSchema, setOperationScope, setOperationTemplate, setPreferredEditor, setPreferredEditorOperation, setStateSchema, sign, signActionV2, signaturePolicyOf, skipHeaderOperations, sortMappedOperations, sortOperations, split, targetDocumentId, toTransportAction, undo, undoOperation, undoOperationV2, updateChangeLogItem, updateDocument, updateHeaderRevision, updateOperationExample, updateStateExample, v2RequiredProtocolVersions, v2TupleProblem, validateHeader, validateInitialState, validateModule, validateModuleOperation, validateModules, validateOperationName, validateOperations, validateStateSchemaName, verify, verifyOperationSignature, withProtocolVersions, withSignaturePolicy, writeFileBrowser, zipEntries };
|
|
5
|
+
export {};
|