@powerhousedao/vetra 6.0.2-staging.8 → 6.1.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/dist/app-module-D_cAVvt0.js +48 -0
  2. package/dist/app-module-D_cAVvt0.js.map +1 -0
  3. package/dist/codegen/index.d.ts +117 -0
  4. package/dist/codegen/index.d.ts.map +1 -0
  5. package/dist/codegen/index.js +793 -0
  6. package/dist/codegen/index.js.map +1 -0
  7. package/dist/connect-BRlVKs1s.js +6 -0
  8. package/dist/connect-BRlVKs1s.js.map +1 -0
  9. package/dist/document-editor-1NFr9t3a.js +48 -0
  10. package/dist/document-editor-1NFr9t3a.js.map +1 -0
  11. package/dist/document-models/app-module/index.d.ts +12 -2
  12. package/dist/document-models/app-module/index.d.ts.map +1 -0
  13. package/dist/document-models/app-module/index.js +5 -2
  14. package/dist/document-models/document-editor/index.d.ts +12 -2
  15. package/dist/document-models/document-editor/index.d.ts.map +1 -0
  16. package/dist/document-models/document-editor/index.js +5 -2
  17. package/dist/document-models/index.d.ts +6 -29
  18. package/dist/document-models/index.js +6 -2
  19. package/dist/document-models/processor-module/index.d.ts +12 -2
  20. package/dist/document-models/processor-module/index.d.ts.map +1 -0
  21. package/dist/document-models/processor-module/index.js +5 -2
  22. package/dist/document-models/subgraph-module/index.d.ts +12 -2
  23. package/dist/document-models/subgraph-module/index.d.ts.map +1 -0
  24. package/dist/document-models/subgraph-module/index.js +5 -2
  25. package/dist/document-models/vetra-package/index.d.ts +12 -2
  26. package/dist/document-models/vetra-package/index.d.ts.map +1 -0
  27. package/dist/document-models/vetra-package/index.js +3 -2
  28. package/dist/{editor-9B-mf9yE.js → editor-BwbJ65NZ.js} +10 -9
  29. package/dist/editor-BwbJ65NZ.js.map +1 -0
  30. package/dist/{editor-CQwD5q6a.js → editor-CJAn9WTA.js} +8 -7
  31. package/dist/editor-CJAn9WTA.js.map +1 -0
  32. package/dist/{editor-CwC9mpEu.js → editor-CLERZjRS.js} +11 -11
  33. package/dist/editor-CLERZjRS.js.map +1 -0
  34. package/dist/{editor-Bm0GwtcN.js → editor-DWufJcmG.js} +7 -7
  35. package/dist/editor-DWufJcmG.js.map +1 -0
  36. package/dist/{editor-ouUpfWQx.js → editor-DabfMxkF.js} +15 -15
  37. package/dist/editor-DabfMxkF.js.map +1 -0
  38. package/dist/{editor-BwBHWEmR.js → editor-WWMGVelM.js} +9 -9
  39. package/dist/editor-WWMGVelM.js.map +1 -0
  40. package/dist/editors/hooks/index.js +1 -1
  41. package/dist/editors/index.d.ts +13 -12
  42. package/dist/editors/index.d.ts.map +1 -1
  43. package/dist/editors/index.js +2 -2
  44. package/dist/factory-Bd_0OaF8.js +79 -0
  45. package/dist/factory-Bd_0OaF8.js.map +1 -0
  46. package/dist/{codegen-PnsnCMkw.js → factory-CEzh-u5J.js} +55 -7
  47. package/dist/factory-CEzh-u5J.js.map +1 -0
  48. package/dist/{hooks-Vx4YtE1e.js → hooks-Btogj1f0.js} +1 -1
  49. package/dist/{hooks-Vx4YtE1e.js.map → hooks-Btogj1f0.js.map} +1 -1
  50. package/dist/index-BPoF8P3O.d.ts +357 -0
  51. package/dist/index-BPoF8P3O.d.ts.map +1 -0
  52. package/dist/index-BoGed4Fa.d.ts +437 -0
  53. package/dist/index-BoGed4Fa.d.ts.map +1 -0
  54. package/dist/index-C4s0aLv3.d.ts +424 -0
  55. package/dist/index-C4s0aLv3.d.ts.map +1 -0
  56. package/dist/index-ClaOdn_F.d.ts +393 -0
  57. package/dist/index-ClaOdn_F.d.ts.map +1 -0
  58. package/dist/index.d.ts +142 -2
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +13 -5
  61. package/dist/index.js.map +1 -1
  62. package/dist/{logger-BLNtquAC.js → logger-CYkStoEb.js} +1 -1
  63. package/dist/{logger-BLNtquAC.js.map → logger-CYkStoEb.js.map} +1 -1
  64. package/dist/module-DPyV2vUY.js +138 -0
  65. package/dist/module-DPyV2vUY.js.map +1 -0
  66. package/dist/module-Drla4Vmn.d.ts +478 -0
  67. package/dist/module-Drla4Vmn.d.ts.map +1 -0
  68. package/dist/{vetra-package-VqptqKzx.js → module-dDKBr6QY.js} +186 -236
  69. package/dist/module-dDKBr6QY.js.map +1 -0
  70. package/dist/{module-DWvO3WCv.js → module-jWN6gsmi.js} +15 -11
  71. package/dist/module-jWN6gsmi.js.map +1 -0
  72. package/dist/module-pK0hpO6c.js +131 -0
  73. package/dist/module-pK0hpO6c.js.map +1 -0
  74. package/dist/module-ryHOwQp-.js +105 -0
  75. package/dist/module-ryHOwQp-.js.map +1 -0
  76. package/dist/module-x2Liyk0-.js +80 -0
  77. package/dist/module-x2Liyk0-.js.map +1 -0
  78. package/dist/ph-factories-B0_E6LY6.js +53 -0
  79. package/dist/ph-factories-B0_E6LY6.js.map +1 -0
  80. package/dist/ph-factories-B6PSPkPQ.js +52 -0
  81. package/dist/ph-factories-B6PSPkPQ.js.map +1 -0
  82. package/dist/ph-factories-Bn_HTUfT.js +50 -0
  83. package/dist/ph-factories-Bn_HTUfT.js.map +1 -0
  84. package/dist/ph-factories-CJXfT_Z1.js +51 -0
  85. package/dist/ph-factories-CJXfT_Z1.js.map +1 -0
  86. package/dist/powerhouse.manifest.d.ts +8 -5
  87. package/dist/powerhouse.manifest.d.ts.map +1 -1
  88. package/dist/powerhouse.manifest.js +19 -12
  89. package/dist/processor-module-B7IAItXQ.js +48 -0
  90. package/dist/processor-module-B7IAItXQ.js.map +1 -0
  91. package/dist/processors/codegen/index.d.ts +7 -4
  92. package/dist/processors/codegen/index.d.ts.map +1 -1
  93. package/dist/processors/codegen/index.js +2 -2
  94. package/dist/processors/index.d.ts +4 -15
  95. package/dist/processors/index.d.ts.map +1 -1
  96. package/dist/processors/index.js +8 -81
  97. package/dist/processors/index.js.map +1 -1
  98. package/dist/processors/vetra-read-model/index.d.ts +18599 -2
  99. package/dist/processors/vetra-read-model/index.d.ts.map +1 -0
  100. package/dist/processors/vetra-read-model/index.js +2 -54
  101. package/dist/style.css +7 -8
  102. package/dist/subgraph-module-CfzSZTNC.js +48 -0
  103. package/dist/subgraph-module-CfzSZTNC.js.map +1 -0
  104. package/dist/switchboard-CIUZkhea.js +8 -0
  105. package/dist/switchboard-CIUZkhea.js.map +1 -0
  106. package/dist/{useVetraDocument-DF0teXXM.js → useVetraDocument-BQKyels4.js} +1 -1
  107. package/dist/{useVetraDocument-DF0teXXM.js.map → useVetraDocument-BQKyels4.js.map} +1 -1
  108. package/dist/{app-module-BbhoykB5.js → utils-BRx88WW3.js} +70 -235
  109. package/dist/utils-BRx88WW3.js.map +1 -0
  110. package/dist/{processor-module-CkuQiq7B.js → utils-Byjf33qt.js} +63 -240
  111. package/dist/utils-Byjf33qt.js.map +1 -0
  112. package/dist/utils-CWO5kDus.js +162 -0
  113. package/dist/utils-CWO5kDus.js.map +1 -0
  114. package/dist/utils-CnZc-0E4.js +202 -0
  115. package/dist/utils-CnZc-0E4.js.map +1 -0
  116. package/dist/vetra-package-BgTjv343.js +100 -0
  117. package/dist/vetra-package-BgTjv343.js.map +1 -0
  118. package/package.json +19 -14
  119. package/dist/app-module-BbhoykB5.js.map +0 -1
  120. package/dist/codegen-PnsnCMkw.js.map +0 -1
  121. package/dist/document-editor-CHM7Pu4m.js +0 -344
  122. package/dist/document-editor-CHM7Pu4m.js.map +0 -1
  123. package/dist/document-models/index.d.ts.map +0 -1
  124. package/dist/editor-9B-mf9yE.js.map +0 -1
  125. package/dist/editor-Bm0GwtcN.js.map +0 -1
  126. package/dist/editor-BwBHWEmR.js.map +0 -1
  127. package/dist/editor-CD3KcVf6.js +0 -2
  128. package/dist/editor-CQwD5q6a.js.map +0 -1
  129. package/dist/editor-CwC9mpEu.js.map +0 -1
  130. package/dist/editor-ouUpfWQx.js.map +0 -1
  131. package/dist/index-CHfOF-Et.d.ts +0 -363
  132. package/dist/index-CHfOF-Et.d.ts.map +0 -1
  133. package/dist/index-CL_CHW_Z.d.ts +0 -330
  134. package/dist/index-CL_CHW_Z.d.ts.map +0 -1
  135. package/dist/index-COsHJRmm.d.ts +0 -37
  136. package/dist/index-COsHJRmm.d.ts.map +0 -1
  137. package/dist/index-C_kUPMNf.d.ts +0 -298
  138. package/dist/index-C_kUPMNf.d.ts.map +0 -1
  139. package/dist/index-Qr_rU6VS.d.ts +0 -271
  140. package/dist/index-Qr_rU6VS.d.ts.map +0 -1
  141. package/dist/index-cBMMID-w.d.ts +0 -323
  142. package/dist/index-cBMMID-w.d.ts.map +0 -1
  143. package/dist/module-DWvO3WCv.js.map +0 -1
  144. package/dist/module-XCoMwFat.js +0 -59
  145. package/dist/module-XCoMwFat.js.map +0 -1
  146. package/dist/processor-module-CkuQiq7B.js.map +0 -1
  147. package/dist/processors/vetra-read-model/index.js.map +0 -1
  148. package/dist/subgraph-module-CU_-umq2.js +0 -278
  149. package/dist/subgraph-module-CU_-umq2.js.map +0 -1
  150. package/dist/vetra-package-VqptqKzx.js.map +0 -1
@@ -0,0 +1,138 @@
1
+ import { t as __exportAll } from "./chunk-pbuEa-1d.js";
2
+ import { f as reducer, p as actions, r as utils$1 } from "./utils-Byjf33qt.js";
3
+ import { createState, defaultBaseState } from "document-model";
4
+ //#region document-models/processor-module/v1/gen/document-model.ts
5
+ const documentModel = {
6
+ id: "powerhouse/processor",
7
+ name: "Processor Module",
8
+ author: {
9
+ name: "Powerhouse",
10
+ website: "https://powerhouse.inc"
11
+ },
12
+ extension: ".processor",
13
+ description: "Declares a processor (a server-side function that reacts to document operations to build read models, send notifications, sync to external systems, etc.) shipped by a Vetra Reactor Package. Create one Processor Module document per processor: pick the processor type, list the document types it subscribes to, attach it to any drive apps that should run it, and mark it CONFIRMED to trigger codegen of the processor scaffold under `processors/`.",
14
+ specifications: [{
15
+ state: {
16
+ local: {
17
+ schema: "",
18
+ examples: [],
19
+ initialValue: ""
20
+ },
21
+ global: {
22
+ schema: "\"\"\"\nConfiguration for a processor contributed by the package. A processor receives\noperations from documents of matching types and runs server-side logic (e.g.\nbuilding a read model, indexing, syncing to an external system).\n\"\"\"\ntype ProcessorModuleState {\n \"\"\"Display name of the processor. Also determines the generated folder name under `processors/`.\"\"\"\n name: String!\n \"\"\"Processor implementation kind (e.g. 'read-model', 'relational-db'). Determines which scaffold codegen emits.\"\"\"\n type: String!\n \"\"\"Document types this processor subscribes to. Each entry has a stable id so it can be removed individually.\"\"\"\n documentTypes: [DocumentTypeItem!]!\n \"\"\"Lifecycle status. While DRAFT the processor definition is editable and codegen is skipped; switching to CONFIRMED triggers scaffold generation.\"\"\"\n status: StatusType!\n \"\"\"Drive-app names this processor is attached to. The processor runs in the context of each listed app.\"\"\"\n processorApps: [String!]!\n}\n\n\"\"\"A document type id (e.g. 'my-org/invoice') attached to the processor with a stable entry id.\"\"\"\ntype DocumentTypeItem {\n \"\"\"Stable identifier for the entry; used to remove it.\"\"\"\n id: OID!\n \"\"\"Document type id this processor subscribes to.\"\"\"\n documentType: String!\n}\n\n\"\"\"\nLifecycle status of a module definition.\n- DRAFT: still being edited; codegen does not run.\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\n\"\"\"\nenum StatusType {\n DRAFT\n CONFIRMED\n}",
23
+ examples: [],
24
+ initialValue: "{\n \"name\": \"\",\n \"type\": \"\",\n \"documentTypes\": [],\n \"status\": \"DRAFT\",\n \"processorApps\": []\n}"
25
+ }
26
+ },
27
+ modules: [{
28
+ id: "91ad39c1-4e8b-4127-b3c8-e835b85e6360",
29
+ name: "base_operations",
30
+ description: "Set the processor's identity, kind, lifecycle status, subscribed document types, and attached drive apps.",
31
+ operations: [
32
+ {
33
+ id: "6f3a5c90-39f2-4302-a073-6195a71c5054",
34
+ name: "SET_PROCESSOR_NAME",
35
+ description: "Set the display name of the processor. Also determines the generated folder name under `processors/`.",
36
+ schema: "input SetProcessorNameInput {\n name: String!\n}",
37
+ template: "",
38
+ reducer: "",
39
+ errors: [],
40
+ examples: [],
41
+ scope: "global"
42
+ },
43
+ {
44
+ id: "b8f28bb4-c6ae-40e6-86fa-29ef14ff8667",
45
+ name: "SET_PROCESSOR_TYPE",
46
+ description: "Set the processor implementation kind (e.g. 'read-model', 'relational-db'). Determines which scaffold codegen emits.",
47
+ schema: "input SetProcessorTypeInput {\n type: String!\n}",
48
+ template: "",
49
+ reducer: "",
50
+ errors: [],
51
+ examples: [],
52
+ scope: "global"
53
+ },
54
+ {
55
+ id: "fbbd7a71-c495-4efc-b8f6-1e57798dbbb4",
56
+ name: "ADD_DOCUMENT_TYPE",
57
+ description: "Subscribe the processor to a document type. Caller supplies a stable id so the entry can be removed later.",
58
+ schema: "input AddDocumentTypeInput {\n id: OID!\n documentType: String!\n}",
59
+ template: "",
60
+ reducer: "",
61
+ errors: [],
62
+ examples: [],
63
+ scope: "global"
64
+ },
65
+ {
66
+ id: "544d413f-423c-4d97-9570-84a19bffeab9",
67
+ name: "REMOVE_DOCUMENT_TYPE",
68
+ description: "Unsubscribe the processor from a document type by removing its entry id.",
69
+ schema: "input RemoveDocumentTypeInput {\n id: OID!\n}",
70
+ template: "",
71
+ reducer: "",
72
+ errors: [],
73
+ examples: [],
74
+ scope: "global"
75
+ },
76
+ {
77
+ id: "df5eb500-7308-498c-9b80-028878ee198b",
78
+ name: "ADD_PROCESSOR_APP",
79
+ description: "Attach the processor to a drive app by name. The processor will run in the context of that app.",
80
+ schema: "input AddProcessorAppInput {\n processorApp: String!\n}",
81
+ template: "",
82
+ reducer: "",
83
+ errors: [],
84
+ examples: [],
85
+ scope: "global"
86
+ },
87
+ {
88
+ id: "07e4168f-1a7b-41ef-953d-219028be7bb9",
89
+ name: "REMOVE_PROCESSOR_APP",
90
+ description: "Detach the processor from a drive app by name. No-op if the app is not currently attached.",
91
+ schema: "input RemoveProcessorAppInput {\n processorApp: String!\n}",
92
+ template: "",
93
+ reducer: "",
94
+ errors: [],
95
+ examples: [],
96
+ scope: "global"
97
+ },
98
+ {
99
+ id: "7b6706eb-5e25-4d64-829a-e3a251380fd1",
100
+ name: "SET_PROCESSOR_STATUS",
101
+ description: "Move the processor between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.",
102
+ schema: "input SetProcessorStatusInput {\n status: StatusType!\n}",
103
+ template: "",
104
+ reducer: "",
105
+ errors: [],
106
+ examples: [],
107
+ scope: "global"
108
+ }
109
+ ]
110
+ }],
111
+ version: 1,
112
+ changeLog: []
113
+ }]
114
+ };
115
+ //#endregion
116
+ //#region document-models/processor-module/v1/src/utils.ts
117
+ var utils_exports = /* @__PURE__ */ __exportAll({});
118
+ //#endregion
119
+ //#region document-models/processor-module/v1/utils.ts
120
+ /** Utils for the ProcessorModule document model */
121
+ const utils = {
122
+ ...utils$1,
123
+ ...utils_exports
124
+ };
125
+ //#endregion
126
+ //#region document-models/processor-module/v1/module.ts
127
+ /** Document model module for the ProcessorModule document type */
128
+ const ProcessorModule = {
129
+ version: 1,
130
+ reducer,
131
+ actions,
132
+ utils,
133
+ documentModel: createState(defaultBaseState(), documentModel)
134
+ };
135
+ //#endregion
136
+ export { utils as n, documentModel as r, ProcessorModule as t };
137
+
138
+ //# sourceMappingURL=module-DPyV2vUY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-DPyV2vUY.js","names":["genUtils","customUtils"],"sources":["../document-models/processor-module/v1/gen/document-model.ts","../document-models/processor-module/v1/src/utils.ts","../document-models/processor-module/v1/utils.ts","../document-models/processor-module/v1/module.ts"],"sourcesContent":["import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/processor\",\n name: \"Processor Module\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".processor\",\n description:\n \"Declares a processor (a server-side function that reacts to document operations to build read models, send notifications, sync to external systems, etc.) shipped by a Vetra Reactor Package. Create one Processor Module document per processor: pick the processor type, list the document types it subscribes to, attach it to any drive apps that should run it, and mark it CONFIRMED to trigger codegen of the processor scaffold under `processors/`.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nConfiguration for a processor contributed by the package. A processor receives\\noperations from documents of matching types and runs server-side logic (e.g.\\nbuilding a read model, indexing, syncing to an external system).\\n\"\"\"\\ntype ProcessorModuleState {\\n \"\"\"Display name of the processor. Also determines the generated folder name under `processors/`.\"\"\"\\n name: String!\\n \"\"\"Processor implementation kind (e.g. \\'read-model\\', \\'relational-db\\'). Determines which scaffold codegen emits.\"\"\"\\n type: String!\\n \"\"\"Document types this processor subscribes to. Each entry has a stable id so it can be removed individually.\"\"\"\\n documentTypes: [DocumentTypeItem!]!\\n \"\"\"Lifecycle status. While DRAFT the processor definition is editable and codegen is skipped; switching to CONFIRMED triggers scaffold generation.\"\"\"\\n status: StatusType!\\n \"\"\"Drive-app names this processor is attached to. The processor runs in the context of each listed app.\"\"\"\\n processorApps: [String!]!\\n}\\n\\n\"\"\"A document type id (e.g. \\'my-org/invoice\\') attached to the processor with a stable entry id.\"\"\"\\ntype DocumentTypeItem {\\n \"\"\"Stable identifier for the entry; used to remove it.\"\"\"\\n id: OID!\\n \"\"\"Document type id this processor subscribes to.\"\"\"\\n documentType: String!\\n}\\n\\n\"\"\"\\nLifecycle status of a module definition.\\n- DRAFT: still being edited; codegen does not run.\\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\\n\"\"\"\\nenum StatusType {\\n DRAFT\\n CONFIRMED\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": \"\",\\n \"type\": \"\",\\n \"documentTypes\": [],\\n \"status\": \"DRAFT\",\\n \"processorApps\": []\\n}',\n },\n },\n modules: [\n {\n id: \"91ad39c1-4e8b-4127-b3c8-e835b85e6360\",\n name: \"base_operations\",\n description:\n \"Set the processor's identity, kind, lifecycle status, subscribed document types, and attached drive apps.\",\n operations: [\n {\n id: \"6f3a5c90-39f2-4302-a073-6195a71c5054\",\n name: \"SET_PROCESSOR_NAME\",\n description:\n \"Set the display name of the processor. Also determines the generated folder name under `processors/`.\",\n schema: \"input SetProcessorNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"b8f28bb4-c6ae-40e6-86fa-29ef14ff8667\",\n name: \"SET_PROCESSOR_TYPE\",\n description:\n \"Set the processor implementation kind (e.g. 'read-model', 'relational-db'). Determines which scaffold codegen emits.\",\n schema: \"input SetProcessorTypeInput {\\n type: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"fbbd7a71-c495-4efc-b8f6-1e57798dbbb4\",\n name: \"ADD_DOCUMENT_TYPE\",\n description:\n \"Subscribe the processor to a document type. Caller supplies a stable id so the entry can be removed later.\",\n schema:\n \"input AddDocumentTypeInput {\\n id: OID!\\n documentType: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"544d413f-423c-4d97-9570-84a19bffeab9\",\n name: \"REMOVE_DOCUMENT_TYPE\",\n description:\n \"Unsubscribe the processor from a document type by removing its entry id.\",\n schema: \"input RemoveDocumentTypeInput {\\n id: OID!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"df5eb500-7308-498c-9b80-028878ee198b\",\n name: \"ADD_PROCESSOR_APP\",\n description:\n \"Attach the processor to a drive app by name. The processor will run in the context of that app.\",\n schema:\n \"input AddProcessorAppInput {\\n processorApp: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"07e4168f-1a7b-41ef-953d-219028be7bb9\",\n name: \"REMOVE_PROCESSOR_APP\",\n description:\n \"Detach the processor from a drive app by name. No-op if the app is not currently attached.\",\n schema:\n \"input RemoveProcessorAppInput {\\n processorApp: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"7b6706eb-5e25-4d64-829a-e3a251380fd1\",\n name: \"SET_PROCESSOR_STATUS\",\n description:\n \"Move the processor between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.\",\n schema:\n \"input SetProcessorStatusInput {\\n status: StatusType!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { ProcessorModulePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the ProcessorModule document model */\nexport const utils: DocumentModelUtils<ProcessorModulePHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { ProcessorModulePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the ProcessorModule document type */\nexport const ProcessorModule = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<ProcessorModulePHState>;\n"],"mappings":";;;;AAEA,MAAa,gBAA0C;CACrD,IAAI;CACJ,MAAM;CACN,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CACD,WAAW;CACX,aACE;CACF,gBAAgB,CACd;EACE,OAAO;GACL,OAAO;IACL,QAAQ;IACR,UAAU,EAAE;IACZ,cAAc;IACf;GACD,QAAQ;IACN,QACE;IACF,UAAU,EAAE;IACZ,cACE;IACH;GACF;EACD,SAAS,CACP;GACE,IAAI;GACJ,MAAM;GACN,aACE;GACF,YAAY;IACV;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACF;GACF,CACF;EACD,SAAS;EACT,WAAW,EAAE;EACd,CACF;CACF;;;;;;;AExHD,MAAa,QAAoD;CAC/D,GAAGA;CACH,GAAGC;CACJ;;;;ACAD,MAAa,kBAAkB;CAC7B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,kBAAkB,EAAE,cAAc;CAC9D"}
@@ -0,0 +1,478 @@
1
+ import * as document_model0 from "document-model";
2
+ import { Action, DocumentModelGlobalState, DocumentModelUtils, PHAuthState, PHBaseState, PHDocument, PHDocumentController, PHDocumentState, Reducer, SignalDispatch } from "document-model";
3
+ import * as z$1 from "zod";
4
+ import { z } from "zod";
5
+ import { DocumentDispatch } from "@powerhousedao/reactor-browser";
6
+
7
+ //#region document-models/vetra-package/v1/gen/base-operations/actions.d.ts
8
+ type SetPackageNameAction = Action & {
9
+ type: "SET_PACKAGE_NAME";
10
+ input: SetPackageNameInput;
11
+ };
12
+ type SetPackageDescriptionAction = Action & {
13
+ type: "SET_PACKAGE_DESCRIPTION";
14
+ input: SetPackageDescriptionInput;
15
+ };
16
+ type SetPackageCategoryAction = Action & {
17
+ type: "SET_PACKAGE_CATEGORY";
18
+ input: SetPackageCategoryInput;
19
+ };
20
+ type SetPackageAuthorAction = Action & {
21
+ type: "SET_PACKAGE_AUTHOR";
22
+ input: SetPackageAuthorInput;
23
+ };
24
+ type SetPackageAuthorNameAction = Action & {
25
+ type: "SET_PACKAGE_AUTHOR_NAME";
26
+ input: SetPackageAuthorNameInput;
27
+ };
28
+ type SetPackageAuthorWebsiteAction = Action & {
29
+ type: "SET_PACKAGE_AUTHOR_WEBSITE";
30
+ input: SetPackageAuthorWebsiteInput;
31
+ };
32
+ type AddPackageKeywordAction = Action & {
33
+ type: "ADD_PACKAGE_KEYWORD";
34
+ input: AddPackageKeywordInput;
35
+ };
36
+ type RemovePackageKeywordAction = Action & {
37
+ type: "REMOVE_PACKAGE_KEYWORD";
38
+ input: RemovePackageKeywordInput;
39
+ };
40
+ type SetPackageGithubUrlAction = Action & {
41
+ type: "SET_PACKAGE_GITHUB_URL";
42
+ input: SetPackageGithubUrlInput;
43
+ };
44
+ type SetPackageNpmUrlAction = Action & {
45
+ type: "SET_PACKAGE_NPM_URL";
46
+ input: SetPackageNpmUrlInput;
47
+ };
48
+ type VetraPackageBaseOperationsAction = SetPackageNameAction | SetPackageDescriptionAction | SetPackageCategoryAction | SetPackageAuthorAction | SetPackageAuthorNameAction | SetPackageAuthorWebsiteAction | AddPackageKeywordAction | RemovePackageKeywordAction | SetPackageGithubUrlAction | SetPackageNpmUrlAction;
49
+ //#endregion
50
+ //#region document-models/vetra-package/v1/gen/actions.d.ts
51
+ type VetraPackageAction = VetraPackageBaseOperationsAction;
52
+ //#endregion
53
+ //#region document-models/vetra-package/v1/gen/schema/types.d.ts
54
+ type Maybe<T> = T | null | undefined;
55
+ type InputMaybe<T> = T | null | undefined;
56
+ type Exact<T extends {
57
+ [key: string]: unknown;
58
+ }> = { [K in keyof T]: T[K] };
59
+ type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
60
+ type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
61
+ type MakeEmpty<T extends {
62
+ [key: string]: unknown;
63
+ }, K extends keyof T> = { [_ in K]?: never };
64
+ type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never };
65
+ /** All built-in and custom scalars, mapped to their actual values */
66
+ type Scalars = {
67
+ ID: {
68
+ input: string;
69
+ output: string;
70
+ };
71
+ String: {
72
+ input: string;
73
+ output: string;
74
+ };
75
+ Boolean: {
76
+ input: boolean;
77
+ output: boolean;
78
+ };
79
+ Int: {
80
+ input: number;
81
+ output: number;
82
+ };
83
+ Float: {
84
+ input: number;
85
+ output: number;
86
+ };
87
+ Address: {
88
+ input: `${string}:0x${string}`;
89
+ output: `${string}:0x${string}`;
90
+ };
91
+ Amount: {
92
+ input: {
93
+ unit?: string;
94
+ value?: number;
95
+ };
96
+ output: {
97
+ unit?: string;
98
+ value?: number;
99
+ };
100
+ };
101
+ Amount_Crypto: {
102
+ input: {
103
+ unit: string;
104
+ value: string;
105
+ };
106
+ output: {
107
+ unit: string;
108
+ value: string;
109
+ };
110
+ };
111
+ Amount_Currency: {
112
+ input: {
113
+ unit: string;
114
+ value: string;
115
+ };
116
+ output: {
117
+ unit: string;
118
+ value: string;
119
+ };
120
+ };
121
+ Amount_Fiat: {
122
+ input: {
123
+ unit: string;
124
+ value: number;
125
+ };
126
+ output: {
127
+ unit: string;
128
+ value: number;
129
+ };
130
+ };
131
+ Amount_Money: {
132
+ input: number;
133
+ output: number;
134
+ };
135
+ Amount_Percentage: {
136
+ input: number;
137
+ output: number;
138
+ };
139
+ Amount_Tokens: {
140
+ input: number;
141
+ output: number;
142
+ };
143
+ Attachment: {
144
+ input: string;
145
+ output: string;
146
+ };
147
+ Currency: {
148
+ input: string;
149
+ output: string;
150
+ };
151
+ Date: {
152
+ input: string;
153
+ output: string;
154
+ };
155
+ DateTime: {
156
+ input: string;
157
+ output: string;
158
+ };
159
+ EmailAddress: {
160
+ input: string;
161
+ output: string;
162
+ };
163
+ EthereumAddress: {
164
+ input: string;
165
+ output: string;
166
+ };
167
+ OID: {
168
+ input: string;
169
+ output: string;
170
+ };
171
+ OLabel: {
172
+ input: string;
173
+ output: string;
174
+ };
175
+ PHID: {
176
+ input: string;
177
+ output: string;
178
+ };
179
+ URL: {
180
+ input: string;
181
+ output: string;
182
+ };
183
+ Unknown: {
184
+ input: unknown;
185
+ output: unknown;
186
+ };
187
+ Upload: {
188
+ input: File;
189
+ output: File;
190
+ };
191
+ };
192
+ type AddPackageKeywordInput = {
193
+ id: Scalars["String"]["input"];
194
+ label: Scalars["String"]["input"];
195
+ };
196
+ /** Author/maintainer of the Vetra Package. */
197
+ type Author = {
198
+ /** Display name of the author or organization. */name: Maybe<Scalars["String"]["output"]>; /** Author's website URL. */
199
+ website: Maybe<Scalars["URL"]["output"]>;
200
+ };
201
+ /** A single search keyword attached to the package. */
202
+ type Keyword = {
203
+ /** Stable identifier for the keyword entry; used to remove it. */id: Scalars["OID"]["output"]; /** Display label for the keyword (e.g. 'invoicing', 'defi'). */
204
+ label: Scalars["String"]["output"];
205
+ };
206
+ type RemovePackageKeywordInput = {
207
+ id: Scalars["String"]["input"];
208
+ };
209
+ type SetPackageAuthorInput = {
210
+ name?: InputMaybe<Scalars["OID"]["input"]>;
211
+ website?: InputMaybe<Scalars["URL"]["input"]>;
212
+ };
213
+ type SetPackageAuthorNameInput = {
214
+ name: Scalars["String"]["input"];
215
+ };
216
+ type SetPackageAuthorWebsiteInput = {
217
+ website: Scalars["URL"]["input"];
218
+ };
219
+ type SetPackageCategoryInput = {
220
+ category: Scalars["String"]["input"];
221
+ };
222
+ type SetPackageDescriptionInput = {
223
+ description: Scalars["String"]["input"];
224
+ };
225
+ type SetPackageGithubUrlInput = {
226
+ url: Scalars["URL"]["input"];
227
+ };
228
+ type SetPackageNameInput = {
229
+ name: Scalars["String"]["input"];
230
+ };
231
+ type SetPackageNpmUrlInput = {
232
+ url: Scalars["URL"]["input"];
233
+ };
234
+ /**
235
+ * Package metadata used to publish a Vetra Reactor Package to npm and surface
236
+ * it inside Connect/Switchboard. All fields are optional so a package can be
237
+ * created empty and filled in incrementally during development.
238
+ */
239
+ type VetraPackageState = {
240
+ /** Author/maintainer information surfaced in the published package metadata. */author: Author; /** Free-form category label used to group packages in directories (e.g. 'Finance', 'Productivity'). */
241
+ category: Maybe<Scalars["String"]["output"]>; /** One-paragraph summary of what the package provides. Shown on package listing pages. */
242
+ description: Maybe<Scalars["String"]["output"]>; /** Public source code URL (typically a GitHub repository). */
243
+ githubUrl: Maybe<Scalars["URL"]["output"]>; /** Search keywords associated with the package. Each keyword has a stable id so it can be removed individually. */
244
+ keywords: Array<Keyword>; /** Human-readable package name (e.g. 'Pizza Plaza'). Distinct from the npm package id. */
245
+ name: Maybe<Scalars["String"]["output"]>; /** Published npm package URL. Set once the package has been released. */
246
+ npmUrl: Maybe<Scalars["URL"]["output"]>;
247
+ };
248
+ //#endregion
249
+ //#region document-models/vetra-package/v1/gen/types.d.ts
250
+ type VetraPackageLocalState = Record<PropertyKey, never>;
251
+ type VetraPackagePHState = PHBaseState & {
252
+ global: VetraPackageState;
253
+ local: VetraPackageLocalState;
254
+ };
255
+ type VetraPackageDocument = PHDocument<VetraPackagePHState>;
256
+ //#endregion
257
+ //#region document-models/vetra-package/v1/actions.d.ts
258
+ /** Actions for the VetraPackage document model */
259
+ declare const actions: {
260
+ setPackageName: (input: SetPackageNameInput) => SetPackageNameAction;
261
+ setPackageDescription: (input: SetPackageDescriptionInput) => SetPackageDescriptionAction;
262
+ setPackageCategory: (input: SetPackageCategoryInput) => SetPackageCategoryAction;
263
+ setPackageAuthor: (input: SetPackageAuthorInput) => SetPackageAuthorAction;
264
+ setPackageAuthorName: (input: SetPackageAuthorNameInput) => SetPackageAuthorNameAction;
265
+ setPackageAuthorWebsite: (input: SetPackageAuthorWebsiteInput) => SetPackageAuthorWebsiteAction;
266
+ addPackageKeyword: (input: AddPackageKeywordInput) => AddPackageKeywordAction;
267
+ removePackageKeyword: (input: RemovePackageKeywordInput) => RemovePackageKeywordAction;
268
+ setPackageGithubUrl: (input: SetPackageGithubUrlInput) => SetPackageGithubUrlAction;
269
+ setPackageNpmUrl: (input: SetPackageNpmUrlInput) => SetPackageNpmUrlAction;
270
+ setName: (name: string | {
271
+ name: string;
272
+ }) => document_model0.SetNameAction;
273
+ setPreferredEditor: (input: string | null | {
274
+ preferredEditor: string | null;
275
+ }) => document_model0.SetPreferredEditorAction;
276
+ undo: (count?: number, scope?: string) => document_model0.UndoAction;
277
+ redo: (count?: number, scope?: string) => document_model0.RedoAction;
278
+ prune: (start?: number, end?: number, scope?: string) => document_model0.SchemaPruneAction;
279
+ loadState: <TState extends document_model0.PHBaseState = document_model0.PHBaseState>(state: TState & {
280
+ name: string;
281
+ }, operations: number) => document_model0.LoadStateAction;
282
+ noop: (scope?: string) => document_model0.NOOPAction;
283
+ };
284
+ //#endregion
285
+ //#region document-models/vetra-package/v1/gen/base-operations/operations.d.ts
286
+ interface VetraPackageBaseOperationsOperations {
287
+ setPackageNameOperation: (state: VetraPackageState, action: SetPackageNameAction, dispatch?: SignalDispatch) => void;
288
+ setPackageDescriptionOperation: (state: VetraPackageState, action: SetPackageDescriptionAction, dispatch?: SignalDispatch) => void;
289
+ setPackageCategoryOperation: (state: VetraPackageState, action: SetPackageCategoryAction, dispatch?: SignalDispatch) => void;
290
+ setPackageAuthorOperation: (state: VetraPackageState, action: SetPackageAuthorAction, dispatch?: SignalDispatch) => void;
291
+ setPackageAuthorNameOperation: (state: VetraPackageState, action: SetPackageAuthorNameAction, dispatch?: SignalDispatch) => void;
292
+ setPackageAuthorWebsiteOperation: (state: VetraPackageState, action: SetPackageAuthorWebsiteAction, dispatch?: SignalDispatch) => void;
293
+ addPackageKeywordOperation: (state: VetraPackageState, action: AddPackageKeywordAction, dispatch?: SignalDispatch) => void;
294
+ removePackageKeywordOperation: (state: VetraPackageState, action: RemovePackageKeywordAction, dispatch?: SignalDispatch) => void;
295
+ setPackageGithubUrlOperation: (state: VetraPackageState, action: SetPackageGithubUrlAction, dispatch?: SignalDispatch) => void;
296
+ setPackageNpmUrlOperation: (state: VetraPackageState, action: SetPackageNpmUrlAction, dispatch?: SignalDispatch) => void;
297
+ }
298
+ //#endregion
299
+ //#region document-models/vetra-package/v1/gen/controller.d.ts
300
+ declare const VetraPackageController: new (initialDocument?: document_model0.PHDocument<VetraPackagePHState> | undefined) => PHDocumentController<VetraPackagePHState> & document_model0.ActionMap<VetraPackageBaseOperationsAction, PHDocumentController<VetraPackagePHState>>;
301
+ declare namespace creators_d_exports {
302
+ export { addPackageKeyword, removePackageKeyword, setPackageAuthor, setPackageAuthorName, setPackageAuthorWebsite, setPackageCategory, setPackageDescription, setPackageGithubUrl, setPackageName, setPackageNpmUrl };
303
+ }
304
+ declare const setPackageName: (input: SetPackageNameInput) => SetPackageNameAction;
305
+ declare const setPackageDescription: (input: SetPackageDescriptionInput) => SetPackageDescriptionAction;
306
+ declare const setPackageCategory: (input: SetPackageCategoryInput) => SetPackageCategoryAction;
307
+ declare const setPackageAuthor: (input: SetPackageAuthorInput) => SetPackageAuthorAction;
308
+ declare const setPackageAuthorName: (input: SetPackageAuthorNameInput) => SetPackageAuthorNameAction;
309
+ declare const setPackageAuthorWebsite: (input: SetPackageAuthorWebsiteInput) => SetPackageAuthorWebsiteAction;
310
+ declare const addPackageKeyword: (input: AddPackageKeywordInput) => AddPackageKeywordAction;
311
+ declare const removePackageKeyword: (input: RemovePackageKeywordInput) => RemovePackageKeywordAction;
312
+ declare const setPackageGithubUrl: (input: SetPackageGithubUrlInput) => SetPackageGithubUrlAction;
313
+ declare const setPackageNpmUrl: (input: SetPackageNpmUrlInput) => SetPackageNpmUrlAction;
314
+ //#endregion
315
+ //#region document-models/vetra-package/v1/gen/document-model.d.ts
316
+ declare const documentModel: DocumentModelGlobalState;
317
+ //#endregion
318
+ //#region document-models/vetra-package/v1/gen/document-schema.d.ts
319
+ /** Schema for validating the header object of a VetraPackage document */
320
+ declare const VetraPackageDocumentHeaderSchema: z.ZodObject<{
321
+ id: z.ZodString;
322
+ name: z.ZodString;
323
+ createdAtUtcIso: z.ZodString;
324
+ lastModifiedAtUtcIso: z.ZodString;
325
+ documentType: z.ZodLiteral<"powerhouse/package">;
326
+ }, z.core.$strip>;
327
+ /** Schema for validating the state object of a VetraPackage document */
328
+ declare const VetraPackagePHStateSchema: z.ZodObject<{
329
+ global: z.ZodObject<Required<{
330
+ author: z.ZodType<Author, unknown, z.core.$ZodTypeInternals<Author, unknown>>;
331
+ category: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
332
+ description: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
333
+ githubUrl: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
334
+ keywords: z.ZodType<Keyword[], unknown, z.core.$ZodTypeInternals<Keyword[], unknown>>;
335
+ name: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
336
+ npmUrl: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
337
+ }>, z.core.$strip>;
338
+ }, z.core.$strip>;
339
+ declare const VetraPackageDocumentSchema: z.ZodObject<{
340
+ header: z.ZodObject<{
341
+ id: z.ZodString;
342
+ name: z.ZodString;
343
+ createdAtUtcIso: z.ZodString;
344
+ lastModifiedAtUtcIso: z.ZodString;
345
+ documentType: z.ZodLiteral<"powerhouse/package">;
346
+ }, z.core.$strip>;
347
+ state: z.ZodObject<{
348
+ global: z.ZodObject<Required<{
349
+ author: z.ZodType<Author, unknown, z.core.$ZodTypeInternals<Author, unknown>>;
350
+ category: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
351
+ description: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
352
+ githubUrl: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
353
+ keywords: z.ZodType<Keyword[], unknown, z.core.$ZodTypeInternals<Keyword[], unknown>>;
354
+ name: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
355
+ npmUrl: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
356
+ }>, z.core.$strip>;
357
+ }, z.core.$strip>;
358
+ initialState: z.ZodObject<{
359
+ global: z.ZodObject<Required<{
360
+ author: z.ZodType<Author, unknown, z.core.$ZodTypeInternals<Author, unknown>>;
361
+ category: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
362
+ description: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
363
+ githubUrl: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
364
+ keywords: z.ZodType<Keyword[], unknown, z.core.$ZodTypeInternals<Keyword[], unknown>>;
365
+ name: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
366
+ npmUrl: z.ZodType<Maybe<string>, unknown, z.core.$ZodTypeInternals<Maybe<string>, unknown>>;
367
+ }>, z.core.$strip>;
368
+ }, z.core.$strip>;
369
+ }, z.core.$strip>;
370
+ /** Simple helper function to check if a state object is a VetraPackage document state object */
371
+ declare function isVetraPackageState(state: unknown): state is VetraPackagePHState;
372
+ /** Simple helper function to assert that a document state object is a VetraPackage document state object */
373
+ declare function assertIsVetraPackageState(state: unknown): asserts state is VetraPackagePHState;
374
+ /** Simple helper function to check if a document is a VetraPackage document */
375
+ declare function isVetraPackageDocument(document: unknown): document is VetraPackageDocument;
376
+ /** Simple helper function to assert that a document is a VetraPackage document */
377
+ declare function assertIsVetraPackageDocument(document: unknown): asserts document is VetraPackageDocument;
378
+ //#endregion
379
+ //#region document-models/vetra-package/v1/gen/document-type.d.ts
380
+ /**
381
+ * WARNING: DO NOT EDIT
382
+ * This file is auto-generated and updated by codegen
383
+ */
384
+ declare const vetraPackageDocumentType = "powerhouse/package";
385
+ //#endregion
386
+ //#region document-models/vetra-package/v1/gen/ph-factories.d.ts
387
+ declare function defaultGlobalState(): VetraPackageState;
388
+ declare function defaultLocalState(): VetraPackageLocalState;
389
+ declare function defaultPHState(): VetraPackagePHState;
390
+ declare function createState$1(baseState?: Partial<PHBaseState>, globalState?: Partial<VetraPackageState>, localState?: Partial<VetraPackageLocalState>): VetraPackagePHState;
391
+ /**
392
+ * Creates a VetraPackageDocument with custom global and local state
393
+ * This properly handles the PHBaseState requirements while allowing
394
+ * document-specific state to be set.
395
+ */
396
+ declare function createVetraPackageDocument(state?: Partial<{
397
+ auth?: Partial<PHAuthState>;
398
+ document?: Partial<PHDocumentState>;
399
+ global?: Partial<VetraPackageState>;
400
+ local?: Partial<VetraPackageLocalState>;
401
+ }>): VetraPackageDocument;
402
+ //#endregion
403
+ //#region document-models/vetra-package/v1/gen/reducer.d.ts
404
+ declare const reducer: Reducer<VetraPackagePHState>;
405
+ //#endregion
406
+ //#region document-models/vetra-package/v1/gen/schema/zod.d.ts
407
+ type Properties<T> = Required<{ [K in keyof T]: z$1.ZodType<T[K]> }>;
408
+ type definedNonNullAny = {};
409
+ declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
410
+ declare const definedNonNullAnySchema: z$1.ZodAny & z$1.ZodType<definedNonNullAny, any, z$1.core.$ZodTypeInternals<definedNonNullAny, any>>;
411
+ declare function AddPackageKeywordInputSchema(): z$1.ZodObject<Properties<AddPackageKeywordInput>>;
412
+ declare function AuthorSchema(): z$1.ZodObject<Properties<Author>>;
413
+ declare function KeywordSchema(): z$1.ZodObject<Properties<Keyword>>;
414
+ declare function RemovePackageKeywordInputSchema(): z$1.ZodObject<Properties<RemovePackageKeywordInput>>;
415
+ declare function SetPackageAuthorInputSchema(): z$1.ZodObject<Properties<SetPackageAuthorInput>>;
416
+ declare function SetPackageAuthorNameInputSchema(): z$1.ZodObject<Properties<SetPackageAuthorNameInput>>;
417
+ declare function SetPackageAuthorWebsiteInputSchema(): z$1.ZodObject<Properties<SetPackageAuthorWebsiteInput>>;
418
+ declare function SetPackageCategoryInputSchema(): z$1.ZodObject<Properties<SetPackageCategoryInput>>;
419
+ declare function SetPackageDescriptionInputSchema(): z$1.ZodObject<Properties<SetPackageDescriptionInput>>;
420
+ declare function SetPackageGithubUrlInputSchema(): z$1.ZodObject<Properties<SetPackageGithubUrlInput>>;
421
+ declare function SetPackageNameInputSchema(): z$1.ZodObject<Properties<SetPackageNameInput>>;
422
+ declare function SetPackageNpmUrlInputSchema(): z$1.ZodObject<Properties<SetPackageNpmUrlInput>>;
423
+ declare function VetraPackageStateSchema(): z$1.ZodObject<Properties<VetraPackageState>>;
424
+ //#endregion
425
+ //#region document-models/vetra-package/v1/gen/utils.d.ts
426
+ declare const initialGlobalState: VetraPackageState;
427
+ declare const initialLocalState: VetraPackageLocalState;
428
+ //#endregion
429
+ //#region document-models/vetra-package/v1/hooks.d.ts
430
+ /** Hook to get a VetraPackage document by its id */
431
+ declare function useVetraPackageDocumentById(documentId: string | null | undefined): [VetraPackageDocument, DocumentDispatch<VetraPackageAction>] | [undefined, undefined];
432
+ /** Hook to get the selected VetraPackage document */
433
+ declare function useSelectedVetraPackageDocument(): [VetraPackageDocument, DocumentDispatch<VetraPackageAction>];
434
+ /** Hook to get all VetraPackage documents in the selected drive */
435
+ declare function useVetraPackageDocumentsInSelectedDrive(): VetraPackageDocument[] | undefined;
436
+ /** Hook to get all VetraPackage documents in the selected folder */
437
+ declare function useVetraPackageDocumentsInSelectedFolder(): VetraPackageDocument[] | undefined;
438
+ //#endregion
439
+ //#region document-models/vetra-package/v1/utils.d.ts
440
+ /** Utils for the VetraPackage document model */
441
+ declare const utils: DocumentModelUtils<VetraPackagePHState>;
442
+ //#endregion
443
+ //#region document-models/vetra-package/v1/module.d.ts
444
+ /** Document model module for the VetraPackage document type */
445
+ declare const VetraPackage: {
446
+ readonly version: 1;
447
+ readonly reducer: document_model0.Reducer<VetraPackagePHState>;
448
+ readonly actions: {
449
+ setPackageName: (input: SetPackageNameInput) => SetPackageNameAction;
450
+ setPackageDescription: (input: SetPackageDescriptionInput) => SetPackageDescriptionAction;
451
+ setPackageCategory: (input: SetPackageCategoryInput) => SetPackageCategoryAction;
452
+ setPackageAuthor: (input: SetPackageAuthorInput) => SetPackageAuthorAction;
453
+ setPackageAuthorName: (input: SetPackageAuthorNameInput) => SetPackageAuthorNameAction;
454
+ setPackageAuthorWebsite: (input: SetPackageAuthorWebsiteInput) => SetPackageAuthorWebsiteAction;
455
+ addPackageKeyword: (input: AddPackageKeywordInput) => AddPackageKeywordAction;
456
+ removePackageKeyword: (input: RemovePackageKeywordInput) => RemovePackageKeywordAction;
457
+ setPackageGithubUrl: (input: SetPackageGithubUrlInput) => SetPackageGithubUrlAction;
458
+ setPackageNpmUrl: (input: SetPackageNpmUrlInput) => SetPackageNpmUrlAction;
459
+ setName: (name: string | {
460
+ name: string;
461
+ }) => document_model0.SetNameAction;
462
+ setPreferredEditor: (input: string | null | {
463
+ preferredEditor: string | null;
464
+ }) => document_model0.SetPreferredEditorAction;
465
+ undo: (count?: number, scope?: string) => document_model0.UndoAction;
466
+ redo: (count?: number, scope?: string) => document_model0.RedoAction;
467
+ prune: (start?: number, end?: number, scope?: string) => document_model0.SchemaPruneAction;
468
+ loadState: <TState extends document_model0.PHBaseState = document_model0.PHBaseState>(state: TState & {
469
+ name: string;
470
+ }, operations: number) => document_model0.LoadStateAction;
471
+ noop: (scope?: string) => document_model0.NOOPAction;
472
+ };
473
+ readonly utils: document_model0.DocumentModelUtils<VetraPackagePHState>;
474
+ readonly documentModel: document_model0.DocumentModelPHState;
475
+ };
476
+ //#endregion
477
+ export { VetraPackageDocument as $, vetraPackageDocumentType as A, SetPackageDescriptionAction as At, creators_d_exports as B, isDefinedNonNullAny as C, VetraPackageAction as Ct, defaultGlobalState as D, SetPackageAuthorNameAction as Dt, createVetraPackageDocument as E, SetPackageAuthorAction as Et, assertIsVetraPackageState as F, setPackageCategory as G, setPackageAuthor as H, isVetraPackageDocument as I, setPackageName as J, setPackageDescription as K, isVetraPackageState as L, VetraPackageDocumentSchema as M, SetPackageNameAction as Mt, VetraPackagePHStateSchema as N, SetPackageNpmUrlAction as Nt, defaultLocalState as O, SetPackageAuthorWebsiteAction as Ot, assertIsVetraPackageDocument as P, VetraPackageBaseOperationsAction as Pt, actions as Q, documentModel as R, definedNonNullAnySchema as S, VetraPackageState as St, createState$1 as T, RemovePackageKeywordAction as Tt, setPackageAuthorName as U, removePackageKeyword as V, setPackageAuthorWebsite as W, VetraPackageController as X, setPackageNpmUrl as Y, VetraPackageBaseOperationsOperations as Z, SetPackageDescriptionInputSchema as _, SetPackageCategoryInput as _t, useVetraPackageDocumentsInSelectedDrive as a, Incremental as at, SetPackageNpmUrlInputSchema as b, SetPackageNameInput as bt, initialLocalState as c, MakeEmpty as ct, KeywordSchema as d, Maybe as dt, VetraPackageLocalState as et, RemovePackageKeywordInputSchema as f, RemovePackageKeywordInput as ft, SetPackageCategoryInputSchema as g, SetPackageAuthorWebsiteInput as gt, SetPackageAuthorWebsiteInputSchema as h, SetPackageAuthorNameInput as ht, useVetraPackageDocumentById as i, Exact as it, VetraPackageDocumentHeaderSchema as j, SetPackageGithubUrlAction as jt, defaultPHState as k, SetPackageCategoryAction as kt, AddPackageKeywordInputSchema as l, MakeMaybe as lt, SetPackageAuthorNameInputSchema as m, SetPackageAuthorInput as mt, utils as n, AddPackageKeywordInput as nt, useVetraPackageDocumentsInSelectedFolder as o, InputMaybe as ot, SetPackageAuthorInputSchema as p, Scalars as pt, setPackageGithubUrl as q, useSelectedVetraPackageDocument as r, Author as rt, initialGlobalState as s, Keyword as st, VetraPackage as t, VetraPackagePHState as tt, AuthorSchema as u, MakeOptional as ut, SetPackageGithubUrlInputSchema as v, SetPackageDescriptionInput as vt, reducer as w, AddPackageKeywordAction as wt, VetraPackageStateSchema as x, SetPackageNpmUrlInput as xt, SetPackageNameInputSchema as y, SetPackageGithubUrlInput as yt, addPackageKeyword as z };
478
+ //# sourceMappingURL=module-Drla4Vmn.d.ts.map