@powerhousedao/builder-team-admin 0.0.1 → 0.0.2

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 (102) hide show
  1. package/dist/document-models/expense-report/module.d.ts +2 -2
  2. package/dist/document-models/expense-report/module.d.ts.map +1 -1
  3. package/dist/document-models/expense-report/module.js +4 -2
  4. package/dist/document-models/service-subscriptions/module.d.ts +2 -2
  5. package/dist/document-models/service-subscriptions/module.d.ts.map +1 -1
  6. package/dist/document-models/service-subscriptions/module.js +4 -2
  7. package/dist/package.json +1 -1
  8. package/dist/powerhouse.manifest.json +9 -1
  9. package/package.json +1 -1
  10. package/dist/document-models/builders/actions.d.ts +0 -14
  11. package/dist/document-models/builders/actions.d.ts.map +0 -1
  12. package/dist/document-models/builders/actions.js +0 -4
  13. package/dist/document-models/builders/gen/actions.d.ts +0 -4
  14. package/dist/document-models/builders/gen/actions.d.ts.map +0 -1
  15. package/dist/document-models/builders/gen/actions.js +0 -1
  16. package/dist/document-models/builders/gen/builders/actions.d.ts +0 -12
  17. package/dist/document-models/builders/gen/builders/actions.d.ts.map +0 -1
  18. package/dist/document-models/builders/gen/builders/actions.js +0 -1
  19. package/dist/document-models/builders/gen/builders/creators.d.ts +0 -5
  20. package/dist/document-models/builders/gen/builders/creators.d.ts.map +0 -1
  21. package/dist/document-models/builders/gen/builders/creators.js +0 -4
  22. package/dist/document-models/builders/gen/builders/error.d.ts +0 -2
  23. package/dist/document-models/builders/gen/builders/error.d.ts.map +0 -1
  24. package/dist/document-models/builders/gen/builders/error.js +0 -1
  25. package/dist/document-models/builders/gen/builders/operations.d.ts +0 -8
  26. package/dist/document-models/builders/gen/builders/operations.d.ts.map +0 -1
  27. package/dist/document-models/builders/gen/builders/operations.js +0 -3
  28. package/dist/document-models/builders/gen/creators.d.ts +0 -3
  29. package/dist/document-models/builders/gen/creators.d.ts.map +0 -1
  30. package/dist/document-models/builders/gen/creators.js +0 -2
  31. package/dist/document-models/builders/gen/document-model.d.ts +0 -3
  32. package/dist/document-models/builders/gen/document-model.d.ts.map +0 -1
  33. package/dist/document-models/builders/gen/document-model.js +0 -59
  34. package/dist/document-models/builders/gen/document-schema.d.ts +0 -142
  35. package/dist/document-models/builders/gen/document-schema.d.ts.map +0 -1
  36. package/dist/document-models/builders/gen/document-schema.js +0 -33
  37. package/dist/document-models/builders/gen/document-type.d.ts +0 -2
  38. package/dist/document-models/builders/gen/document-type.d.ts.map +0 -1
  39. package/dist/document-models/builders/gen/document-type.js +0 -1
  40. package/dist/document-models/builders/gen/index.d.ts +0 -12
  41. package/dist/document-models/builders/gen/index.d.ts.map +0 -1
  42. package/dist/document-models/builders/gen/index.js +0 -11
  43. package/dist/document-models/builders/gen/ph-factories.d.ts +0 -23
  44. package/dist/document-models/builders/gen/ph-factories.d.ts.map +0 -1
  45. package/dist/document-models/builders/gen/ph-factories.js +0 -47
  46. package/dist/document-models/builders/gen/reducer.d.ts +0 -3
  47. package/dist/document-models/builders/gen/reducer.d.ts.map +0 -1
  48. package/dist/document-models/builders/gen/reducer.js +0 -21
  49. package/dist/document-models/builders/gen/schema/index.d.ts +0 -3
  50. package/dist/document-models/builders/gen/schema/index.d.ts.map +0 -1
  51. package/dist/document-models/builders/gen/schema/index.js +0 -2
  52. package/dist/document-models/builders/gen/schema/types.d.ts +0 -146
  53. package/dist/document-models/builders/gen/schema/types.d.ts.map +0 -1
  54. package/dist/document-models/builders/gen/schema/types.js +0 -1
  55. package/dist/document-models/builders/gen/schema/zod.d.ts +0 -13
  56. package/dist/document-models/builders/gen/schema/zod.d.ts.map +0 -1
  57. package/dist/document-models/builders/gen/schema/zod.js +0 -21
  58. package/dist/document-models/builders/gen/types.d.ts +0 -12
  59. package/dist/document-models/builders/gen/types.d.ts.map +0 -1
  60. package/dist/document-models/builders/gen/types.js +0 -1
  61. package/dist/document-models/builders/gen/utils.d.ts +0 -15
  62. package/dist/document-models/builders/gen/utils.d.ts.map +0 -1
  63. package/dist/document-models/builders/gen/utils.js +0 -51
  64. package/dist/document-models/builders/hooks.d.ts +0 -11
  65. package/dist/document-models/builders/hooks.d.ts.map +0 -1
  66. package/dist/document-models/builders/hooks.js +0 -26
  67. package/dist/document-models/builders/index.d.ts +0 -10
  68. package/dist/document-models/builders/index.d.ts.map +0 -1
  69. package/dist/document-models/builders/index.js +0 -9
  70. package/dist/document-models/builders/module.d.ts +0 -5
  71. package/dist/document-models/builders/module.d.ts.map +0 -1
  72. package/dist/document-models/builders/module.js +0 -10
  73. package/dist/document-models/builders/src/index.d.ts +0 -2
  74. package/dist/document-models/builders/src/index.d.ts.map +0 -1
  75. package/dist/document-models/builders/src/index.js +0 -1
  76. package/dist/document-models/builders/src/reducers/builders.d.ts +0 -3
  77. package/dist/document-models/builders/src/reducers/builders.d.ts.map +0 -1
  78. package/dist/document-models/builders/src/reducers/builders.js +0 -8
  79. package/dist/document-models/builders/src/tests/builders.test.d.ts +0 -6
  80. package/dist/document-models/builders/src/tests/builders.test.d.ts.map +0 -1
  81. package/dist/document-models/builders/src/tests/builders.test.js +0 -29
  82. package/dist/document-models/builders/src/tests/document-model.test.d.ts +0 -10
  83. package/dist/document-models/builders/src/tests/document-model.test.d.ts.map +0 -1
  84. package/dist/document-models/builders/src/tests/document-model.test.js +0 -104
  85. package/dist/document-models/builders/src/utils.d.ts +0 -2
  86. package/dist/document-models/builders/src/utils.d.ts.map +0 -1
  87. package/dist/document-models/builders/src/utils.js +0 -1
  88. package/dist/document-models/builders/utils.d.ts +0 -14
  89. package/dist/document-models/builders/utils.d.ts.map +0 -1
  90. package/dist/document-models/builders/utils.js +0 -7
  91. package/dist/document-models/expense-report/src/tests/document-model.test.d.ts +0 -10
  92. package/dist/document-models/expense-report/src/tests/document-model.test.d.ts.map +0 -1
  93. package/dist/document-models/expense-report/src/tests/document-model.test.js +0 -104
  94. package/dist/document-models/expense-report/src/tests/wallet.test.d.ts +0 -6
  95. package/dist/document-models/expense-report/src/tests/wallet.test.d.ts.map +0 -1
  96. package/dist/document-models/expense-report/src/tests/wallet.test.js +0 -159
  97. package/dist/editors/builders/editor.d.ts +0 -3
  98. package/dist/editors/builders/editor.d.ts.map +0 -1
  99. package/dist/editors/builders/editor.js +0 -204
  100. package/dist/editors/builders/module.d.ts +0 -4
  101. package/dist/editors/builders/module.d.ts.map +0 -1
  102. package/dist/editors/builders/module.js +0 -10
@@ -1,5 +1,5 @@
1
1
  import type { DocumentModelModule } from "document-model";
2
- import type { ExpenseReportPHState } from "@powerhousedao/builder-team-admin/document-models/expense-report";
3
- /** Document model module for the Todo List document type */
2
+ import type { ExpenseReportPHState } from "./gen/index.js";
3
+ /** Document model module for the Expense Report document type */
4
4
  export declare const ExpenseReport: DocumentModelModule<ExpenseReportPHState>;
5
5
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/expense-report/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kEAAkE,CAAC;AAQ7G,4DAA4D;AAC5D,eAAO,MAAM,aAAa,EAAE,mBAAmB,CAAC,oBAAoB,CAKnE,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/expense-report/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAK3D,iEAAiE;AACjE,eAAO,MAAM,aAAa,EAAE,mBAAmB,CAAC,oBAAoB,CAKnE,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { createState } from "document-model";
2
2
  import { defaultBaseState } from "document-model/core";
3
- import { actions, documentModel, reducer, utils, } from "@powerhousedao/builder-team-admin/document-models/expense-report";
4
- /** Document model module for the Todo List document type */
3
+ import { documentModel, reducer } from "./gen/index.js";
4
+ import { actions } from "./actions.js";
5
+ import { utils } from "./utils.js";
6
+ /** Document model module for the Expense Report document type */
5
7
  export const ExpenseReport = {
6
8
  reducer,
7
9
  actions,
@@ -1,5 +1,5 @@
1
1
  import type { DocumentModelModule } from "document-model";
2
- import type { ServiceSubscriptionsPHState } from "@powerhousedao/builder-team-admin/document-models/service-subscriptions";
3
- /** Document model module for the Todo List document type */
2
+ import type { ServiceSubscriptionsPHState } from "./gen/index.js";
3
+ /** Document model module for the Service Subscriptions document type */
4
4
  export declare const ServiceSubscriptions: DocumentModelModule<ServiceSubscriptionsPHState>;
5
5
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/service-subscriptions/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yEAAyE,CAAC;AAQ3H,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,EAAE,mBAAmB,CAAC,2BAA2B,CAM/E,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/service-subscriptions/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAKlE,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,EAAE,mBAAmB,CAAC,2BAA2B,CAM/E,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { createState } from "document-model";
2
2
  import { defaultBaseState } from "document-model/core";
3
- import { actions, documentModel, reducer, utils, } from "@powerhousedao/builder-team-admin/document-models/service-subscriptions";
4
- /** Document model module for the Todo List document type */
3
+ import { documentModel, reducer } from "./gen/index.js";
4
+ import { actions } from "./actions.js";
5
+ import { utils } from "./utils.js";
6
+ /** Document model module for the Service Subscriptions document type */
5
7
  export const ServiceSubscriptions = {
6
8
  reducer,
7
9
  actions,
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/builder-team-admin",
3
3
  "description": "Builder Team Admin drive that holds a teams profile and its relevant document models.",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "files": [
@@ -21,7 +21,15 @@
21
21
  ]
22
22
  }
23
23
  ],
24
- "apps": [],
24
+ "apps": [
25
+ {
26
+ "id": "builder-team-admin",
27
+ "name": "Builder Team Admin",
28
+ "documentTypes": [
29
+ "powerhouse/document-drive"
30
+ ]
31
+ }
32
+ ],
25
33
  "subgraphs": [],
26
34
  "importScripts": []
27
35
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/builder-team-admin",
3
3
  "description": "Builder Team Admin drive that holds a teams profile and its relevant document models.",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "files": [
@@ -1,14 +0,0 @@
1
- /** Actions for the Builders document model */
2
- export declare const actions: {
3
- addBuilder: (input: import("./index.js").AddBuilderInput) => import("./index.js").AddBuilderAction;
4
- removeBuilder: (input: import("./index.js").RemoveBuilderInput) => import("./index.js").RemoveBuilderAction;
5
- setName: (name: string) => import("document-model").SetNameAction;
6
- undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
7
- redo: (count?: number, scope?: string) => import("document-model").RedoAction;
8
- prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
9
- loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
10
- name: string;
11
- }, operations: number) => import("document-model").LoadStateAction;
12
- noop: (scope?: string) => import("document-model").NOOPAction;
13
- };
14
- //# sourceMappingURL=actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/builders/actions.ts"],"names":[],"mappings":"AAGA,8CAA8C;AAC9C,eAAO,MAAM,OAAO;iBACsF,2CAAsB;oBAAwK,8CAAyB;;eAA4mN,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CAD51O,CAAC"}
@@ -1,4 +0,0 @@
1
- import { baseActions } from "document-model";
2
- import { buildersActions } from "./gen/creators.js";
3
- /** Actions for the Builders document model */
4
- export const actions = { ...baseActions, ...buildersActions };
@@ -1,4 +0,0 @@
1
- import type { BuildersBuildersAction } from "./builders/actions.js";
2
- export * from "./builders/actions.js";
3
- export type BuildersAction = BuildersBuildersAction;
4
- //# sourceMappingURL=actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../document-models/builders/gen/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,cAAc,uBAAuB,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,sBAAsB,CAAC"}
@@ -1 +0,0 @@
1
- export * from "./builders/actions.js";
@@ -1,12 +0,0 @@
1
- import { type Action } from "document-model";
2
- import type { AddBuilderInput, RemoveBuilderInput } from "../types.js";
3
- export type AddBuilderAction = Action & {
4
- type: "ADD_BUILDER";
5
- input: AddBuilderInput;
6
- };
7
- export type RemoveBuilderAction = Action & {
8
- type: "REMOVE_BUILDER";
9
- input: RemoveBuilderInput;
10
- };
11
- export type BuildersBuildersAction = AddBuilderAction | RemoveBuilderAction;
12
- //# sourceMappingURL=actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../document-models/builders/gen/builders/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEvE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG;IACtC,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG;IACzC,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,kBAAkB,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,GAAG,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- import {} from "document-model";
@@ -1,5 +0,0 @@
1
- import type { AddBuilderInput, RemoveBuilderInput } from "../types.js";
2
- import type { AddBuilderAction, RemoveBuilderAction } from "./actions.js";
3
- export declare const addBuilder: (input: AddBuilderInput) => AddBuilderAction;
4
- export declare const removeBuilder: (input: RemoveBuilderInput) => RemoveBuilderAction;
5
- //# sourceMappingURL=creators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/builders/gen/builders/creators.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE1E,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,qBAO9C,CAAC;AAEJ,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,wBAOpD,CAAC"}
@@ -1,4 +0,0 @@
1
- import { createAction } from "document-model/core";
2
- import { AddBuilderInputSchema, RemoveBuilderInputSchema, } from "../schema/zod.js";
3
- export const addBuilder = (input) => createAction("ADD_BUILDER", { ...input }, undefined, AddBuilderInputSchema, "global");
4
- export const removeBuilder = (input) => createAction("REMOVE_BUILDER", { ...input }, undefined, RemoveBuilderInputSchema, "global");
@@ -1,2 +0,0 @@
1
- export declare const errors: {};
2
- //# sourceMappingURL=error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../document-models/builders/gen/builders/error.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,IAAK,CAAC"}
@@ -1 +0,0 @@
1
- export const errors = {};
@@ -1,8 +0,0 @@
1
- import { type SignalDispatch } from "document-model";
2
- import { type AddBuilderAction, type RemoveBuilderAction } from "./actions.js";
3
- import { type BuildersState } from "../types.js";
4
- export interface BuildersBuildersOperations {
5
- addBuilderOperation: (state: BuildersState, action: AddBuilderAction, dispatch?: SignalDispatch) => void;
6
- removeBuilderOperation: (state: BuildersState, action: RemoveBuilderAction, dispatch?: SignalDispatch) => void;
7
- }
8
- //# sourceMappingURL=operations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../document-models/builders/gen/builders/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,0BAA0B;IACzC,mBAAmB,EAAE,CACnB,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,gBAAgB,EACxB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,sBAAsB,EAAE,CACtB,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;CACX"}
@@ -1,3 +0,0 @@
1
- import {} from "document-model";
2
- import {} from "./actions.js";
3
- import {} from "../types.js";
@@ -1,3 +0,0 @@
1
- export * from "./builders/creators.js";
2
- export * as buildersActions from "./builders/creators.js";
3
- //# sourceMappingURL=creators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/builders/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from "./builders/creators.js";
2
- export * as buildersActions from "./builders/creators.js";
@@ -1,3 +0,0 @@
1
- import type { DocumentModelGlobalState } from "document-model";
2
- export declare const documentModel: DocumentModelGlobalState;
3
- //# sourceMappingURL=document-model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/builders/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,wBA0D3B,CAAC"}
@@ -1,59 +0,0 @@
1
- export const documentModel = {
2
- id: "powerhouse/builders",
3
- name: "Builders",
4
- extension: "",
5
- description: "A list of builders that a SNO can have",
6
- author: {
7
- name: "Powerhouse",
8
- website: "https://powerhouse.inc",
9
- },
10
- specifications: [
11
- {
12
- version: 1,
13
- changeLog: [],
14
- state: {
15
- global: {
16
- schema: "type BuildersState {\n builders: [PHID!]!\n}",
17
- initialValue: '"{\\n \\"builders\\": []\\n}"',
18
- examples: [],
19
- },
20
- local: {
21
- schema: "",
22
- initialValue: '""',
23
- examples: [],
24
- },
25
- },
26
- modules: [
27
- {
28
- id: "6a2edfaa-812d-486f-86ee-9f9282e9a26c",
29
- name: "builders",
30
- description: "",
31
- operations: [
32
- {
33
- id: "804e9500-fe85-489d-aae3-2a0e8a6c1cb8",
34
- name: "ADD_BUILDER",
35
- description: "",
36
- schema: "input AddBuilderInput {\n builderPhid: PHID!\n}",
37
- template: "",
38
- reducer: "",
39
- errors: [],
40
- examples: [],
41
- scope: "global",
42
- },
43
- {
44
- id: "42c43f0c-c3b1-484f-8a9e-1946e73f70ad",
45
- name: "REMOVE_BUILDER",
46
- description: "",
47
- schema: "input RemoveBuilderInput {\n builderPhid: PHID!\n}",
48
- template: "",
49
- reducer: "",
50
- errors: [],
51
- examples: [],
52
- scope: "global",
53
- },
54
- ],
55
- },
56
- ],
57
- },
58
- ],
59
- };
@@ -1,142 +0,0 @@
1
- import { z } from "zod";
2
- import type { BuildersDocument, BuildersPHState } from "./types.js";
3
- /** Schema for validating the header object of a Builders document */
4
- export declare const BuildersDocumentHeaderSchema: z.ZodObject<{
5
- id: z.ZodString;
6
- name: z.ZodString;
7
- createdAtUtcIso: z.ZodString;
8
- lastModifiedAtUtcIso: z.ZodString;
9
- } & {
10
- documentType: z.ZodLiteral<"powerhouse/builders">;
11
- }, "strip", z.ZodTypeAny, {
12
- id: string;
13
- name: string;
14
- documentType: "powerhouse/builders";
15
- createdAtUtcIso: string;
16
- lastModifiedAtUtcIso: string;
17
- }, {
18
- id: string;
19
- name: string;
20
- documentType: "powerhouse/builders";
21
- createdAtUtcIso: string;
22
- lastModifiedAtUtcIso: string;
23
- }>;
24
- /** Schema for validating the state object of a Builders document */
25
- export declare const BuildersPHStateSchema: z.ZodObject<{} & {
26
- global: z.ZodObject<Required<{
27
- builders: z.ZodType<string[], any, string[]>;
28
- }>, z.UnknownKeysParam, z.ZodTypeAny, {
29
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
30
- }, {
31
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
32
- }>;
33
- }, "strip", z.ZodTypeAny, {
34
- global: {
35
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
36
- };
37
- }, {
38
- global: {
39
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
40
- };
41
- }>;
42
- export declare const BuildersDocumentSchema: z.ZodObject<{
43
- header: z.ZodObject<{
44
- id: z.ZodString;
45
- name: z.ZodString;
46
- createdAtUtcIso: z.ZodString;
47
- lastModifiedAtUtcIso: z.ZodString;
48
- } & {
49
- documentType: z.ZodLiteral<"powerhouse/builders">;
50
- }, "strip", z.ZodTypeAny, {
51
- id: string;
52
- name: string;
53
- documentType: "powerhouse/builders";
54
- createdAtUtcIso: string;
55
- lastModifiedAtUtcIso: string;
56
- }, {
57
- id: string;
58
- name: string;
59
- documentType: "powerhouse/builders";
60
- createdAtUtcIso: string;
61
- lastModifiedAtUtcIso: string;
62
- }>;
63
- state: z.ZodObject<{} & {
64
- global: z.ZodObject<Required<{
65
- builders: z.ZodType<string[], any, string[]>;
66
- }>, z.UnknownKeysParam, z.ZodTypeAny, {
67
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
68
- }, {
69
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
70
- }>;
71
- }, "strip", z.ZodTypeAny, {
72
- global: {
73
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
74
- };
75
- }, {
76
- global: {
77
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
78
- };
79
- }>;
80
- initialState: z.ZodObject<{} & {
81
- global: z.ZodObject<Required<{
82
- builders: z.ZodType<string[], any, string[]>;
83
- }>, z.UnknownKeysParam, z.ZodTypeAny, {
84
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
85
- }, {
86
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
87
- }>;
88
- }, "strip", z.ZodTypeAny, {
89
- global: {
90
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
91
- };
92
- }, {
93
- global: {
94
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
95
- };
96
- }>;
97
- }, "strip", z.ZodTypeAny, {
98
- header: {
99
- id: string;
100
- name: string;
101
- documentType: "powerhouse/builders";
102
- createdAtUtcIso: string;
103
- lastModifiedAtUtcIso: string;
104
- };
105
- state: {
106
- global: {
107
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
108
- };
109
- };
110
- initialState: {
111
- global: {
112
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
113
- };
114
- };
115
- }, {
116
- header: {
117
- id: string;
118
- name: string;
119
- documentType: "powerhouse/builders";
120
- createdAtUtcIso: string;
121
- lastModifiedAtUtcIso: string;
122
- };
123
- state: {
124
- global: {
125
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
126
- };
127
- };
128
- initialState: {
129
- global: {
130
- builders: Array<import("./types.js").Scalars["PHID"]["output"]>;
131
- };
132
- };
133
- }>;
134
- /** Simple helper function to check if a state object is a Builders document state object */
135
- export declare function isBuildersState(state: unknown): state is BuildersPHState;
136
- /** Simple helper function to assert that a document state object is a Builders document state object */
137
- export declare function assertIsBuildersState(state: unknown): asserts state is BuildersPHState;
138
- /** Simple helper function to check if a document is a Builders document */
139
- export declare function isBuildersDocument(document: unknown): document is BuildersDocument;
140
- /** Simple helper function to assert that a document is a Builders document */
141
- export declare function assertIsBuildersDocument(document: unknown): asserts document is BuildersDocument;
142
- //# sourceMappingURL=document-schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"document-schema.d.ts","sourceRoot":"","sources":["../../../../document-models/builders/gen/document-schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEpE,qEAAqE;AACrE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;EAEvC,CAAC;AAEH,oEAAoE;AACpE,eAAO,MAAM,qBAAqB;;;;wBAmCwT,oCAAe;;wBAAf,oCAAe;;;;wBAAf,oCAAe;;;;wBAAf,oCAAe;;EAjCvW,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;4BA+BuT,oCAAe;;4BAAf,oCAAe;;;;4BAAf,oCAAe;;;;4BAAf,oCAAe;;;;;;;4BAAf,oCAAe;;4BAAf,oCAAe;;;;4BAAf,oCAAe;;;;4BAAf,oCAAe;;;;;;;;;;;;;4BAAf,oCAAe;;;;;4BAAf,oCAAe;;;;;;;;;;;;;4BAAf,oCAAe;;;;;4BAAf,oCAAe;;;EA3BvW,CAAC;AAEH,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAExE;AAED,wGAAwG;AACxG,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,eAAe,CAElC;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,gBAAgB,CAE9B;AAED,8EAA8E;AAC9E,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,gBAAgB,CAEtC"}
@@ -1,33 +0,0 @@
1
- import { BaseDocumentHeaderSchema, BaseDocumentStateSchema, } from "document-model";
2
- import { z } from "zod";
3
- import { buildersDocumentType } from "./document-type.js";
4
- import { BuildersStateSchema } from "./schema/zod.js";
5
- /** Schema for validating the header object of a Builders document */
6
- export const BuildersDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({
7
- documentType: z.literal(buildersDocumentType),
8
- });
9
- /** Schema for validating the state object of a Builders document */
10
- export const BuildersPHStateSchema = BaseDocumentStateSchema.extend({
11
- global: BuildersStateSchema(),
12
- });
13
- export const BuildersDocumentSchema = z.object({
14
- header: BuildersDocumentHeaderSchema,
15
- state: BuildersPHStateSchema,
16
- initialState: BuildersPHStateSchema,
17
- });
18
- /** Simple helper function to check if a state object is a Builders document state object */
19
- export function isBuildersState(state) {
20
- return BuildersPHStateSchema.safeParse(state).success;
21
- }
22
- /** Simple helper function to assert that a document state object is a Builders document state object */
23
- export function assertIsBuildersState(state) {
24
- BuildersPHStateSchema.parse(state);
25
- }
26
- /** Simple helper function to check if a document is a Builders document */
27
- export function isBuildersDocument(document) {
28
- return BuildersDocumentSchema.safeParse(document).success;
29
- }
30
- /** Simple helper function to assert that a document is a Builders document */
31
- export function assertIsBuildersDocument(document) {
32
- BuildersDocumentSchema.parse(document);
33
- }
@@ -1,2 +0,0 @@
1
- export declare const buildersDocumentType = "powerhouse/builders";
2
- //# sourceMappingURL=document-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"document-type.d.ts","sourceRoot":"","sources":["../../../../document-models/builders/gen/document-type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,wBAAwB,CAAC"}
@@ -1 +0,0 @@
1
- export const buildersDocumentType = "powerhouse/builders";
@@ -1,12 +0,0 @@
1
- export * from "./actions.js";
2
- export * from "./document-model.js";
3
- export * from "./types.js";
4
- export * from "./creators.js";
5
- export { createBuildersDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
6
- export * from "./utils.js";
7
- export * from "./reducer.js";
8
- export * from "./schema/index.js";
9
- export * from "./document-type.js";
10
- export * from "./document-schema.js";
11
- export * from "./builders/operations.js";
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/builders/gen/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC"}
@@ -1,11 +0,0 @@
1
- export * from "./actions.js";
2
- export * from "./document-model.js";
3
- export * from "./types.js";
4
- export * from "./creators.js";
5
- export { createBuildersDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
6
- export * from "./utils.js";
7
- export * from "./reducer.js";
8
- export * from "./schema/index.js";
9
- export * from "./document-type.js";
10
- export * from "./document-schema.js";
11
- export * from "./builders/operations.js";
@@ -1,23 +0,0 @@
1
- /**
2
- * Factory methods for creating BuildersDocument instances
3
- */
4
- import type { PHAuthState, PHDocumentState, PHBaseState } from "document-model";
5
- import type { BuildersDocument, BuildersLocalState, BuildersGlobalState, BuildersPHState } from "./types.js";
6
- export declare function defaultGlobalState(): BuildersGlobalState;
7
- export declare function defaultLocalState(): BuildersLocalState;
8
- export declare function defaultPHState(): BuildersPHState;
9
- export declare function createGlobalState(state?: Partial<BuildersGlobalState>): BuildersGlobalState;
10
- export declare function createLocalState(state?: Partial<BuildersLocalState>): BuildersLocalState;
11
- export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<BuildersGlobalState>, localState?: Partial<BuildersLocalState>): BuildersPHState;
12
- /**
13
- * Creates a BuildersDocument with custom global and local state
14
- * This properly handles the PHBaseState requirements while allowing
15
- * document-specific state to be set.
16
- */
17
- export declare function createBuildersDocument(state?: Partial<{
18
- auth?: Partial<PHAuthState>;
19
- document?: Partial<PHDocumentState>;
20
- global?: Partial<BuildersGlobalState>;
21
- local?: Partial<BuildersLocalState>;
22
- }>): BuildersDocument;
23
- //# sourceMappingURL=ph-factories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ph-factories.d.ts","sourceRoot":"","sources":["../../../../document-models/builders/gen/ph-factories.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEhF,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EAChB,MAAM,YAAY,CAAC;AAGpB,wBAAgB,kBAAkB,IAAI,mBAAmB,CAIxD;AAED,wBAAgB,iBAAiB,IAAI,kBAAkB,CAEtD;AAED,wBAAgB,cAAc,IAAI,eAAe,CAMhD;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACnC,mBAAmB,CAKrB;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAClC,kBAAkB,CAKpB;AAED,wBAAgB,WAAW,CACzB,SAAS,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,EAChC,WAAW,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAC1C,UAAU,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACvC,eAAe,CAMjB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACrC,CAAC,GACD,gBAAgB,CAYlB"}
@@ -1,47 +0,0 @@
1
- import { createBaseState, defaultBaseState } from "document-model/core";
2
- import { createDocument } from "./utils.js";
3
- export function defaultGlobalState() {
4
- return {
5
- builders: [],
6
- };
7
- }
8
- export function defaultLocalState() {
9
- return {};
10
- }
11
- export function defaultPHState() {
12
- return {
13
- ...defaultBaseState(),
14
- global: defaultGlobalState(),
15
- local: defaultLocalState(),
16
- };
17
- }
18
- export function createGlobalState(state) {
19
- return {
20
- ...defaultGlobalState(),
21
- ...(state || {}),
22
- };
23
- }
24
- export function createLocalState(state) {
25
- return {
26
- ...defaultLocalState(),
27
- ...(state || {}),
28
- };
29
- }
30
- export function createState(baseState, globalState, localState) {
31
- return {
32
- ...createBaseState(baseState?.auth, baseState?.document),
33
- global: createGlobalState(globalState),
34
- local: createLocalState(localState),
35
- };
36
- }
37
- /**
38
- * Creates a BuildersDocument with custom global and local state
39
- * This properly handles the PHBaseState requirements while allowing
40
- * document-specific state to be set.
41
- */
42
- export function createBuildersDocument(state) {
43
- const document = createDocument(state
44
- ? createState(createBaseState(state.auth, state.document), state.global, state.local)
45
- : undefined);
46
- return document;
47
- }
@@ -1,3 +0,0 @@
1
- import type { BuildersPHState } from "@powerhousedao/builder-team-admin/document-models/builders";
2
- export declare const reducer: import("document-model").Reducer<BuildersPHState>;
3
- //# sourceMappingURL=reducer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/builders/gen/reducer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4DAA4D,CAAC;AA0ClG,eAAO,MAAM,OAAO,mDAA+C,CAAC"}
@@ -1,21 +0,0 @@
1
- import { isDocumentAction, createReducer } from "document-model/core";
2
- import { buildersBuildersOperations } from "../src/reducers/builders.js";
3
- import { AddBuilderInputSchema, RemoveBuilderInputSchema, } from "./schema/zod.js";
4
- const stateReducer = (state, action, dispatch) => {
5
- if (isDocumentAction(action)) {
6
- return state;
7
- }
8
- switch (action.type) {
9
- case "ADD_BUILDER":
10
- AddBuilderInputSchema().parse(action.input);
11
- buildersBuildersOperations.addBuilderOperation(state[action.scope], action, dispatch);
12
- break;
13
- case "REMOVE_BUILDER":
14
- RemoveBuilderInputSchema().parse(action.input);
15
- buildersBuildersOperations.removeBuilderOperation(state[action.scope], action, dispatch);
16
- break;
17
- default:
18
- return state;
19
- }
20
- };
21
- export const reducer = createReducer(stateReducer);
@@ -1,3 +0,0 @@
1
- export * from "./types.js";
2
- export * from "./zod.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../document-models/builders/gen/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from "./types.js";
2
- export * from "./zod.js";