@powerhousedao/vetra-builder-package 5.2.0-dev.2 → 5.2.0-dev.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/document-models/builder-account/gen/schema/types.d.ts +282 -0
- package/dist/document-models/builder-account/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/builder-account/gen/schema/types.js +1 -0
- package/dist/document-models/builder-account/gen/schema/zod.d.ts +35 -0
- package/dist/document-models/builder-account/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/builder-account/gen/schema/zod.js +192 -0
- package/dist/document-models/builder-account/index.d.ts +3 -0
- package/dist/document-models/builder-account/index.d.ts.map +1 -0
- package/dist/document-models/builder-account/index.js +2 -0
- package/dist/document-models/builder-account/upgrades/index.d.ts +3 -0
- package/dist/document-models/builder-account/upgrades/index.d.ts.map +1 -0
- package/dist/document-models/builder-account/upgrades/index.js +2 -0
- package/dist/document-models/builder-account/upgrades/upgrade-manifest.d.ts +4 -0
- package/dist/document-models/builder-account/upgrades/upgrade-manifest.d.ts.map +1 -0
- package/dist/document-models/builder-account/upgrades/upgrade-manifest.js +7 -0
- package/dist/document-models/builder-account/upgrades/versions.d.ts +3 -0
- package/dist/document-models/builder-account/upgrades/versions.d.ts.map +1 -0
- package/dist/document-models/builder-account/upgrades/versions.js +2 -0
- package/dist/document-models/builder-account/v1/actions.d.ts +31 -0
- package/dist/document-models/builder-account/v1/actions.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/actions.js +10 -0
- package/dist/document-models/builder-account/v1/gen/actions.d.ts +10 -0
- package/dist/document-models/builder-account/v1/gen/actions.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/actions.js +4 -0
- package/dist/document-models/builder-account/v1/gen/controller.d.ts +4 -0
- package/dist/document-models/builder-account/v1/gen/controller.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/controller.js +3 -0
- package/dist/document-models/builder-account/v1/gen/creators.d.ts +9 -0
- package/dist/document-models/builder-account/v1/gen/creators.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/creators.js +8 -0
- package/dist/document-models/builder-account/v1/gen/document-model.d.ts +3 -0
- package/dist/document-models/builder-account/v1/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/document-model.js +253 -0
- package/dist/document-models/builder-account/v1/gen/document-schema.d.ts +50 -0
- package/dist/document-models/builder-account/v1/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/document-schema.js +33 -0
- package/dist/document-models/builder-account/v1/gen/document-type.d.ts +2 -0
- package/dist/document-models/builder-account/v1/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/document-type.js +1 -0
- package/dist/document-models/builder-account/v1/gen/index.d.ts +16 -0
- package/dist/document-models/builder-account/v1/gen/index.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/index.js +15 -0
- package/dist/document-models/builder-account/v1/gen/members/actions.d.ts +12 -0
- package/dist/document-models/builder-account/v1/gen/members/actions.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/members/actions.js +1 -0
- package/dist/document-models/builder-account/v1/gen/members/creators.d.ts +5 -0
- package/dist/document-models/builder-account/v1/gen/members/creators.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/members/creators.js +4 -0
- package/dist/document-models/builder-account/v1/gen/members/error.d.ts +2 -0
- package/dist/document-models/builder-account/v1/gen/members/error.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/members/error.js +1 -0
- package/dist/document-models/builder-account/v1/gen/members/operations.d.ts +8 -0
- package/dist/document-models/builder-account/v1/gen/members/operations.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/members/operations.js +1 -0
- package/dist/document-models/builder-account/v1/gen/packages/actions.d.ts +24 -0
- package/dist/document-models/builder-account/v1/gen/packages/actions.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/packages/actions.js +1 -0
- package/dist/document-models/builder-account/v1/gen/packages/creators.d.ts +8 -0
- package/dist/document-models/builder-account/v1/gen/packages/creators.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/packages/creators.js +7 -0
- package/dist/document-models/builder-account/v1/gen/packages/error.d.ts +2 -0
- package/dist/document-models/builder-account/v1/gen/packages/error.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/packages/error.js +1 -0
- package/dist/document-models/builder-account/v1/gen/packages/operations.d.ts +11 -0
- package/dist/document-models/builder-account/v1/gen/packages/operations.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/packages/operations.js +1 -0
- package/dist/document-models/builder-account/v1/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/builder-account/v1/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/ph-factories.js +59 -0
- package/dist/document-models/builder-account/v1/gen/profile/actions.d.ts +24 -0
- package/dist/document-models/builder-account/v1/gen/profile/actions.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/profile/actions.js +1 -0
- package/dist/document-models/builder-account/v1/gen/profile/creators.d.ts +8 -0
- package/dist/document-models/builder-account/v1/gen/profile/creators.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/profile/creators.js +7 -0
- package/dist/document-models/builder-account/v1/gen/profile/error.d.ts +2 -0
- package/dist/document-models/builder-account/v1/gen/profile/error.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/profile/error.js +1 -0
- package/dist/document-models/builder-account/v1/gen/profile/operations.d.ts +11 -0
- package/dist/document-models/builder-account/v1/gen/profile/operations.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/profile/operations.js +1 -0
- package/dist/document-models/builder-account/v1/gen/reducer.d.ts +3 -0
- package/dist/document-models/builder-account/v1/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/reducer.js +101 -0
- package/dist/document-models/builder-account/v1/gen/schema/index.d.ts +3 -0
- package/dist/document-models/builder-account/v1/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/schema/index.js +2 -0
- package/dist/document-models/builder-account/v1/gen/schema/types.d.ts +282 -0
- package/dist/document-models/builder-account/v1/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/schema/types.js +1 -0
- package/dist/document-models/builder-account/v1/gen/schema/zod.d.ts +35 -0
- package/dist/document-models/builder-account/v1/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/schema/zod.js +192 -0
- package/dist/document-models/builder-account/v1/gen/spaces/actions.d.ts +24 -0
- package/dist/document-models/builder-account/v1/gen/spaces/actions.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/spaces/actions.js +1 -0
- package/dist/document-models/builder-account/v1/gen/spaces/creators.d.ts +8 -0
- package/dist/document-models/builder-account/v1/gen/spaces/creators.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/spaces/creators.js +7 -0
- package/dist/document-models/builder-account/v1/gen/spaces/error.d.ts +14 -0
- package/dist/document-models/builder-account/v1/gen/spaces/error.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/spaces/error.js +9 -0
- package/dist/document-models/builder-account/v1/gen/spaces/operations.d.ts +11 -0
- package/dist/document-models/builder-account/v1/gen/spaces/operations.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/spaces/operations.js +1 -0
- package/dist/document-models/builder-account/v1/gen/types.d.ts +12 -0
- package/dist/document-models/builder-account/v1/gen/types.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/types.js +1 -0
- package/dist/document-models/builder-account/v1/gen/utils.d.ts +15 -0
- package/dist/document-models/builder-account/v1/gen/utils.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/gen/utils.js +63 -0
- package/dist/document-models/builder-account/v1/hooks.d.ts +14 -0
- package/dist/document-models/builder-account/v1/hooks.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/hooks.js +25 -0
- package/dist/document-models/builder-account/v1/index.d.ts +6 -0
- package/dist/document-models/builder-account/v1/index.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/index.js +5 -0
- package/dist/document-models/builder-account/v1/module.d.ts +5 -0
- package/dist/document-models/builder-account/v1/module.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/module.js +14 -0
- package/dist/document-models/builder-account/v1/src/index.d.ts +2 -0
- package/dist/document-models/builder-account/v1/src/index.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/src/index.js +1 -0
- package/dist/document-models/builder-account/v1/src/reducers/members.d.ts +3 -0
- package/dist/document-models/builder-account/v1/src/reducers/members.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/src/reducers/members.js +10 -0
- package/dist/document-models/builder-account/v1/src/reducers/packages.d.ts +3 -0
- package/dist/document-models/builder-account/v1/src/reducers/packages.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/src/reducers/packages.js +22 -0
- package/dist/document-models/builder-account/v1/src/reducers/profile.d.ts +3 -0
- package/dist/document-models/builder-account/v1/src/reducers/profile.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/src/reducers/profile.js +22 -0
- package/dist/document-models/builder-account/v1/src/reducers/spaces.d.ts +3 -0
- package/dist/document-models/builder-account/v1/src/reducers/spaces.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/src/reducers/spaces.js +22 -0
- package/dist/document-models/builder-account/v1/src/utils.d.ts +2 -0
- package/dist/document-models/builder-account/v1/src/utils.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/src/utils.js +1 -0
- package/dist/document-models/builder-account/v1/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/builder-account/v1/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/tests/document-model.test.js +104 -0
- package/dist/document-models/builder-account/v1/tests/members.test.d.ts +2 -0
- package/dist/document-models/builder-account/v1/tests/members.test.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/tests/members.test.js +25 -0
- package/dist/document-models/builder-account/v1/tests/packages.test.d.ts +2 -0
- package/dist/document-models/builder-account/v1/tests/packages.test.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/tests/packages.test.js +55 -0
- package/dist/document-models/builder-account/v1/tests/profile.test.d.ts +2 -0
- package/dist/document-models/builder-account/v1/tests/profile.test.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/tests/profile.test.js +55 -0
- package/dist/document-models/builder-account/v1/tests/spaces.test.d.ts +2 -0
- package/dist/document-models/builder-account/v1/tests/spaces.test.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/tests/spaces.test.js +55 -0
- package/dist/document-models/builder-account/v1/utils.d.ts +14 -0
- package/dist/document-models/builder-account/v1/utils.d.ts.map +1 -0
- package/dist/document-models/builder-account/v1/utils.js +7 -0
- package/dist/document-models/builder-team/actions.d.ts +16 -16
- package/dist/document-models/builder-team/actions.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/schema/zod.js +6 -6
- package/dist/document-models/builder-team/hooks.d.ts +2 -2
- package/dist/document-models/builder-team/hooks.d.ts.map +1 -1
- package/dist/document-models/builder-team/index.d.ts +2 -5
- package/dist/document-models/builder-team/index.d.ts.map +1 -1
- package/dist/document-models/builder-team/index.js +2 -5
- package/dist/document-models/builder-team/upgrades/index.d.ts +3 -0
- package/dist/document-models/builder-team/upgrades/index.d.ts.map +1 -0
- package/dist/document-models/builder-team/upgrades/index.js +2 -0
- package/dist/document-models/builder-team/upgrades/upgrade-manifest.d.ts +4 -0
- package/dist/document-models/builder-team/upgrades/upgrade-manifest.d.ts.map +1 -0
- package/dist/document-models/builder-team/upgrades/upgrade-manifest.js +7 -0
- package/dist/document-models/builder-team/upgrades/versions.d.ts +3 -0
- package/dist/document-models/builder-team/upgrades/versions.d.ts.map +1 -0
- package/dist/document-models/builder-team/upgrades/versions.js +2 -0
- package/dist/document-models/builder-team/v1/actions.d.ts +30 -0
- package/dist/document-models/builder-team/v1/actions.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/actions.js +10 -0
- package/dist/document-models/builder-team/v1/gen/actions.d.ts +10 -0
- package/dist/document-models/builder-team/v1/gen/actions.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/actions.js +4 -0
- package/dist/document-models/builder-team/v1/gen/controller.d.ts +4 -0
- package/dist/document-models/builder-team/v1/gen/controller.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/controller.js +3 -0
- package/dist/document-models/builder-team/v1/gen/creators.d.ts +9 -0
- package/dist/document-models/builder-team/v1/gen/creators.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/creators.js +8 -0
- package/dist/document-models/builder-team/v1/gen/document-model.d.ts +3 -0
- package/dist/document-models/builder-team/v1/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/document-model.js +234 -0
- package/dist/document-models/builder-team/v1/gen/document-schema.d.ts +50 -0
- package/dist/document-models/builder-team/v1/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/document-schema.js +33 -0
- package/dist/document-models/builder-team/v1/gen/document-type.d.ts +2 -0
- package/dist/document-models/builder-team/v1/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/document-type.js +1 -0
- package/dist/document-models/builder-team/v1/gen/index.d.ts +16 -0
- package/dist/document-models/builder-team/v1/gen/index.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/index.js +15 -0
- package/dist/document-models/builder-team/v1/gen/member/actions.d.ts +16 -0
- package/dist/document-models/builder-team/v1/gen/member/actions.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/member/actions.js +1 -0
- package/dist/document-models/builder-team/v1/gen/member/creators.d.ts +6 -0
- package/dist/document-models/builder-team/v1/gen/member/creators.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/member/creators.js +5 -0
- package/dist/document-models/builder-team/v1/gen/member/error.d.ts +2 -0
- package/dist/document-models/builder-team/v1/gen/member/error.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/member/error.js +1 -0
- package/dist/document-models/builder-team/v1/gen/member/operations.d.ts +9 -0
- package/dist/document-models/builder-team/v1/gen/member/operations.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/member/operations.js +1 -0
- package/dist/document-models/builder-team/v1/gen/packages/actions.d.ts +20 -0
- package/dist/document-models/builder-team/v1/gen/packages/actions.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/packages/actions.js +1 -0
- package/dist/document-models/builder-team/v1/gen/packages/creators.d.ts +7 -0
- package/dist/document-models/builder-team/v1/gen/packages/creators.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/packages/creators.js +6 -0
- package/dist/document-models/builder-team/v1/gen/packages/error.d.ts +2 -0
- package/dist/document-models/builder-team/v1/gen/packages/error.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/packages/error.js +1 -0
- package/dist/document-models/builder-team/v1/gen/packages/operations.d.ts +10 -0
- package/dist/document-models/builder-team/v1/gen/packages/operations.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/packages/operations.js +1 -0
- package/dist/document-models/builder-team/v1/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/builder-team/v1/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/ph-factories.js +59 -0
- package/dist/document-models/builder-team/v1/gen/profile/actions.d.ts +24 -0
- package/dist/document-models/builder-team/v1/gen/profile/actions.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/profile/actions.js +1 -0
- package/dist/document-models/builder-team/v1/gen/profile/creators.d.ts +8 -0
- package/dist/document-models/builder-team/v1/gen/profile/creators.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/profile/creators.js +7 -0
- package/dist/document-models/builder-team/v1/gen/profile/error.d.ts +2 -0
- package/dist/document-models/builder-team/v1/gen/profile/error.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/profile/error.js +1 -0
- package/dist/document-models/builder-team/v1/gen/profile/operations.d.ts +11 -0
- package/dist/document-models/builder-team/v1/gen/profile/operations.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/profile/operations.js +1 -0
- package/dist/document-models/builder-team/v1/gen/reducer.d.ts +3 -0
- package/dist/document-models/builder-team/v1/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/reducer.js +96 -0
- package/dist/document-models/builder-team/v1/gen/schema/index.d.ts +3 -0
- package/dist/document-models/builder-team/v1/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/schema/index.js +2 -0
- package/dist/document-models/builder-team/v1/gen/schema/types.d.ts +255 -0
- package/dist/document-models/builder-team/v1/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/schema/types.js +1 -0
- package/dist/document-models/builder-team/v1/gen/schema/zod.d.ts +32 -0
- package/dist/document-models/builder-team/v1/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/schema/zod.js +161 -0
- package/dist/document-models/builder-team/v1/gen/spaces/actions.d.ts +20 -0
- package/dist/document-models/builder-team/v1/gen/spaces/actions.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/spaces/actions.js +1 -0
- package/dist/document-models/builder-team/v1/gen/spaces/creators.d.ts +7 -0
- package/dist/document-models/builder-team/v1/gen/spaces/creators.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/spaces/creators.js +6 -0
- package/dist/document-models/builder-team/v1/gen/spaces/error.d.ts +2 -0
- package/dist/document-models/builder-team/v1/gen/spaces/error.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/spaces/error.js +1 -0
- package/dist/document-models/builder-team/v1/gen/spaces/operations.d.ts +10 -0
- package/dist/document-models/builder-team/v1/gen/spaces/operations.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/spaces/operations.js +1 -0
- package/dist/document-models/builder-team/v1/gen/types.d.ts +12 -0
- package/dist/document-models/builder-team/v1/gen/types.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/types.js +1 -0
- package/dist/document-models/builder-team/v1/gen/utils.d.ts +15 -0
- package/dist/document-models/builder-team/v1/gen/utils.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/gen/utils.js +63 -0
- package/dist/document-models/builder-team/v1/hooks.d.ts +14 -0
- package/dist/document-models/builder-team/v1/hooks.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/hooks.js +25 -0
- package/dist/document-models/builder-team/v1/index.d.ts +6 -0
- package/dist/document-models/builder-team/v1/index.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/index.js +5 -0
- package/dist/document-models/builder-team/v1/module.d.ts +5 -0
- package/dist/document-models/builder-team/v1/module.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/module.js +14 -0
- package/dist/document-models/builder-team/v1/src/index.d.ts +2 -0
- package/dist/document-models/builder-team/v1/src/index.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/src/index.js +1 -0
- package/dist/document-models/builder-team/v1/src/reducers/member.d.ts +3 -0
- package/dist/document-models/builder-team/v1/src/reducers/member.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/src/reducers/member.js +14 -0
- package/dist/document-models/builder-team/v1/src/reducers/packages.d.ts +3 -0
- package/dist/document-models/builder-team/v1/src/reducers/packages.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/src/reducers/packages.js +28 -0
- package/dist/document-models/builder-team/v1/src/reducers/profile.d.ts +3 -0
- package/dist/document-models/builder-team/v1/src/reducers/profile.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/src/reducers/profile.js +22 -0
- package/dist/document-models/builder-team/v1/src/reducers/spaces.d.ts +3 -0
- package/dist/document-models/builder-team/v1/src/reducers/spaces.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/src/reducers/spaces.js +23 -0
- package/dist/document-models/builder-team/v1/src/utils.d.ts +2 -0
- package/dist/document-models/builder-team/v1/src/utils.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/src/utils.js +1 -0
- package/dist/document-models/builder-team/v1/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/builder-team/v1/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/tests/document-model.test.js +104 -0
- package/dist/document-models/builder-team/v1/tests/member.test.d.ts +2 -0
- package/dist/document-models/builder-team/v1/tests/member.test.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/tests/member.test.js +35 -0
- package/dist/document-models/builder-team/v1/tests/packages.test.d.ts +2 -0
- package/dist/document-models/builder-team/v1/tests/packages.test.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/tests/packages.test.js +45 -0
- package/dist/document-models/builder-team/v1/tests/profile.test.d.ts +2 -0
- package/dist/document-models/builder-team/v1/tests/profile.test.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/tests/profile.test.js +55 -0
- package/dist/document-models/builder-team/v1/tests/spaces.test.d.ts +2 -0
- package/dist/document-models/builder-team/v1/tests/spaces.test.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/tests/spaces.test.js +45 -0
- package/dist/document-models/builder-team/v1/utils.d.ts +14 -0
- package/dist/document-models/builder-team/v1/utils.d.ts.map +1 -0
- package/dist/document-models/builder-team/v1/utils.js +7 -0
- package/dist/document-models/document-models.d.ts.map +1 -1
- package/dist/document-models/document-models.js +4 -0
- package/dist/document-models/index.d.ts +2 -0
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +2 -0
- package/dist/document-models/upgrade-manifests.d.ts +3 -0
- package/dist/document-models/upgrade-manifests.d.ts.map +1 -0
- package/dist/document-models/upgrade-manifests.js +6 -0
- package/dist/processors/factory.d.ts.map +1 -1
- package/dist/processors/factory.js +12 -0
- package/dist/style.css +7 -1
- package/package.json +50 -49
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a scaffold file meant for customization:
|
|
3
|
+
* - change it by adding new tests or modifying the existing ones
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* This is a scaffold file meant for customization:
|
|
7
|
+
* - change it by adding new tests or modifying the existing ones
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=document-model.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-model.test.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-account/v1/tests/document-model.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a scaffold file meant for customization:
|
|
3
|
+
* - change it by adding new tests or modifying the existing ones
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* This is a scaffold file meant for customization:
|
|
7
|
+
* - change it by adding new tests or modifying the existing ones
|
|
8
|
+
*/
|
|
9
|
+
import { describe, it, expect } from "vitest";
|
|
10
|
+
import { utils, initialGlobalState, initialLocalState, builderAccountDocumentType, isBuilderAccountDocument, assertIsBuilderAccountDocument, isBuilderAccountState, assertIsBuilderAccountState, } from "@powerhousedao/vetra-builder-package/document-models/builder-account/v1";
|
|
11
|
+
import { ZodError } from "zod";
|
|
12
|
+
describe("BuilderAccount Document Model", () => {
|
|
13
|
+
it("should create a new BuilderAccount document", () => {
|
|
14
|
+
const document = utils.createDocument();
|
|
15
|
+
expect(document).toBeDefined();
|
|
16
|
+
expect(document.header.documentType).toBe(builderAccountDocumentType);
|
|
17
|
+
});
|
|
18
|
+
it("should create a new BuilderAccount document with a valid initial state", () => {
|
|
19
|
+
const document = utils.createDocument();
|
|
20
|
+
expect(document.state.global).toStrictEqual(initialGlobalState);
|
|
21
|
+
expect(document.state.local).toStrictEqual(initialLocalState);
|
|
22
|
+
expect(isBuilderAccountDocument(document)).toBe(true);
|
|
23
|
+
expect(isBuilderAccountState(document.state)).toBe(true);
|
|
24
|
+
});
|
|
25
|
+
it("should reject a document that is not a BuilderAccount document", () => {
|
|
26
|
+
const wrongDocumentType = utils.createDocument();
|
|
27
|
+
wrongDocumentType.header.documentType = "the-wrong-thing-1234";
|
|
28
|
+
try {
|
|
29
|
+
expect(assertIsBuilderAccountDocument(wrongDocumentType)).toThrow();
|
|
30
|
+
expect(isBuilderAccountDocument(wrongDocumentType)).toBe(false);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
expect(error).toBeInstanceOf(ZodError);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const wrongState = utils.createDocument();
|
|
37
|
+
// @ts-expect-error - we are testing the error case
|
|
38
|
+
wrongState.state.global = {
|
|
39
|
+
...{ notWhat: "you want" },
|
|
40
|
+
};
|
|
41
|
+
try {
|
|
42
|
+
expect(isBuilderAccountState(wrongState.state)).toBe(false);
|
|
43
|
+
expect(assertIsBuilderAccountState(wrongState.state)).toThrow();
|
|
44
|
+
expect(isBuilderAccountDocument(wrongState)).toBe(false);
|
|
45
|
+
expect(assertIsBuilderAccountDocument(wrongState)).toThrow();
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
expect(error).toBeInstanceOf(ZodError);
|
|
49
|
+
}
|
|
50
|
+
const wrongInitialState = utils.createDocument();
|
|
51
|
+
// @ts-expect-error - we are testing the error case
|
|
52
|
+
wrongInitialState.initialState.global = {
|
|
53
|
+
...{ notWhat: "you want" },
|
|
54
|
+
};
|
|
55
|
+
try {
|
|
56
|
+
expect(isBuilderAccountState(wrongInitialState.state)).toBe(false);
|
|
57
|
+
expect(assertIsBuilderAccountState(wrongInitialState.state)).toThrow();
|
|
58
|
+
expect(isBuilderAccountDocument(wrongInitialState)).toBe(false);
|
|
59
|
+
expect(assertIsBuilderAccountDocument(wrongInitialState)).toThrow();
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
expect(error).toBeInstanceOf(ZodError);
|
|
63
|
+
}
|
|
64
|
+
const missingIdInHeader = utils.createDocument();
|
|
65
|
+
// @ts-expect-error - we are testing the error case
|
|
66
|
+
delete missingIdInHeader.header.id;
|
|
67
|
+
try {
|
|
68
|
+
expect(isBuilderAccountDocument(missingIdInHeader)).toBe(false);
|
|
69
|
+
expect(assertIsBuilderAccountDocument(missingIdInHeader)).toThrow();
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
expect(error).toBeInstanceOf(ZodError);
|
|
73
|
+
}
|
|
74
|
+
const missingNameInHeader = utils.createDocument();
|
|
75
|
+
// @ts-expect-error - we are testing the error case
|
|
76
|
+
delete missingNameInHeader.header.name;
|
|
77
|
+
try {
|
|
78
|
+
expect(isBuilderAccountDocument(missingNameInHeader)).toBe(false);
|
|
79
|
+
expect(assertIsBuilderAccountDocument(missingNameInHeader)).toThrow();
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
expect(error).toBeInstanceOf(ZodError);
|
|
83
|
+
}
|
|
84
|
+
const missingCreatedAtUtcIsoInHeader = utils.createDocument();
|
|
85
|
+
// @ts-expect-error - we are testing the error case
|
|
86
|
+
delete missingCreatedAtUtcIsoInHeader.header.createdAtUtcIso;
|
|
87
|
+
try {
|
|
88
|
+
expect(isBuilderAccountDocument(missingCreatedAtUtcIsoInHeader)).toBe(false);
|
|
89
|
+
expect(assertIsBuilderAccountDocument(missingCreatedAtUtcIsoInHeader)).toThrow();
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
expect(error).toBeInstanceOf(ZodError);
|
|
93
|
+
}
|
|
94
|
+
const missingLastModifiedAtUtcIsoInHeader = utils.createDocument();
|
|
95
|
+
// @ts-expect-error - we are testing the error case
|
|
96
|
+
delete missingLastModifiedAtUtcIsoInHeader.header.lastModifiedAtUtcIso;
|
|
97
|
+
try {
|
|
98
|
+
expect(isBuilderAccountDocument(missingLastModifiedAtUtcIsoInHeader)).toBe(false);
|
|
99
|
+
expect(assertIsBuilderAccountDocument(missingLastModifiedAtUtcIsoInHeader)).toThrow();
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
expect(error).toBeInstanceOf(ZodError);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.test.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-account/v1/tests/members.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { reducer, utils, isBuilderAccountDocument, addMember, removeMember, AddMemberInputSchema, RemoveMemberInputSchema, } from "@powerhousedao/vetra-builder-package/document-models/builder-account/v1";
|
|
4
|
+
describe("MembersOperations", () => {
|
|
5
|
+
it("should handle addMember operation", () => {
|
|
6
|
+
const document = utils.createDocument();
|
|
7
|
+
const input = generateMock(AddMemberInputSchema());
|
|
8
|
+
const updatedDocument = reducer(document, addMember(input));
|
|
9
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
10
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
11
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("ADD_MEMBER");
|
|
12
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
13
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
14
|
+
});
|
|
15
|
+
it("should handle removeMember operation", () => {
|
|
16
|
+
const document = utils.createDocument();
|
|
17
|
+
const input = generateMock(RemoveMemberInputSchema());
|
|
18
|
+
const updatedDocument = reducer(document, removeMember(input));
|
|
19
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
20
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
21
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("REMOVE_MEMBER");
|
|
22
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
23
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packages.test.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-account/v1/tests/packages.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { reducer, utils, isBuilderAccountDocument, addPackage, setPackageDriveId, updatePackage, reorderPackages, deletePackage, AddPackageInputSchema, SetPackageDriveIdInputSchema, UpdatePackageInputSchema, ReorderPackagesInputSchema, DeletePackageInputSchema, } from "@powerhousedao/vetra-builder-package/document-models/builder-account/v1";
|
|
4
|
+
describe("PackagesOperations", () => {
|
|
5
|
+
it("should handle addPackage operation", () => {
|
|
6
|
+
const document = utils.createDocument();
|
|
7
|
+
const input = generateMock(AddPackageInputSchema());
|
|
8
|
+
const updatedDocument = reducer(document, addPackage(input));
|
|
9
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
10
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
11
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("ADD_PACKAGE");
|
|
12
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
13
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
14
|
+
});
|
|
15
|
+
it("should handle setPackageDriveId operation", () => {
|
|
16
|
+
const document = utils.createDocument();
|
|
17
|
+
const input = generateMock(SetPackageDriveIdInputSchema());
|
|
18
|
+
const updatedDocument = reducer(document, setPackageDriveId(input));
|
|
19
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
20
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
21
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("SET_PACKAGE_DRIVE_ID");
|
|
22
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
23
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
24
|
+
});
|
|
25
|
+
it("should handle updatePackage operation", () => {
|
|
26
|
+
const document = utils.createDocument();
|
|
27
|
+
const input = generateMock(UpdatePackageInputSchema());
|
|
28
|
+
const updatedDocument = reducer(document, updatePackage(input));
|
|
29
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
30
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
31
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("UPDATE_PACKAGE");
|
|
32
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
33
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
34
|
+
});
|
|
35
|
+
it("should handle reorderPackages operation", () => {
|
|
36
|
+
const document = utils.createDocument();
|
|
37
|
+
const input = generateMock(ReorderPackagesInputSchema());
|
|
38
|
+
const updatedDocument = reducer(document, reorderPackages(input));
|
|
39
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
40
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
41
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("REORDER_PACKAGES");
|
|
42
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
43
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
44
|
+
});
|
|
45
|
+
it("should handle deletePackage operation", () => {
|
|
46
|
+
const document = utils.createDocument();
|
|
47
|
+
const input = generateMock(DeletePackageInputSchema());
|
|
48
|
+
const updatedDocument = reducer(document, deletePackage(input));
|
|
49
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
50
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
51
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("DELETE_PACKAGE");
|
|
52
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
53
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.test.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-account/v1/tests/profile.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { reducer, utils, isBuilderAccountDocument, setLogo, setProfileName, setSlug, setProfileDescription, updateSocials, SetLogoInputSchema, SetProfileNameInputSchema, SetSlugInputSchema, SetProfileDescriptionInputSchema, UpdateSocialsInputSchema, } from "@powerhousedao/vetra-builder-package/document-models/builder-account/v1";
|
|
4
|
+
describe("ProfileOperations", () => {
|
|
5
|
+
it("should handle setLogo operation", () => {
|
|
6
|
+
const document = utils.createDocument();
|
|
7
|
+
const input = generateMock(SetLogoInputSchema());
|
|
8
|
+
const updatedDocument = reducer(document, setLogo(input));
|
|
9
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
10
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
11
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("SET_LOGO");
|
|
12
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
13
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
14
|
+
});
|
|
15
|
+
it("should handle setProfileName operation", () => {
|
|
16
|
+
const document = utils.createDocument();
|
|
17
|
+
const input = generateMock(SetProfileNameInputSchema());
|
|
18
|
+
const updatedDocument = reducer(document, setProfileName(input));
|
|
19
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
20
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
21
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("SET_PROFILE_NAME");
|
|
22
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
23
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
24
|
+
});
|
|
25
|
+
it("should handle setSlug operation", () => {
|
|
26
|
+
const document = utils.createDocument();
|
|
27
|
+
const input = generateMock(SetSlugInputSchema());
|
|
28
|
+
const updatedDocument = reducer(document, setSlug(input));
|
|
29
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
30
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
31
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("SET_SLUG");
|
|
32
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
33
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
34
|
+
});
|
|
35
|
+
it("should handle setProfileDescription operation", () => {
|
|
36
|
+
const document = utils.createDocument();
|
|
37
|
+
const input = generateMock(SetProfileDescriptionInputSchema());
|
|
38
|
+
const updatedDocument = reducer(document, setProfileDescription(input));
|
|
39
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
40
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
41
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("SET_PROFILE_DESCRIPTION");
|
|
42
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
43
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
44
|
+
});
|
|
45
|
+
it("should handle updateSocials operation", () => {
|
|
46
|
+
const document = utils.createDocument();
|
|
47
|
+
const input = generateMock(UpdateSocialsInputSchema());
|
|
48
|
+
const updatedDocument = reducer(document, updateSocials(input));
|
|
49
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
50
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
51
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("UPDATE_SOCIALS");
|
|
52
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
53
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spaces.test.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-account/v1/tests/spaces.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { reducer, utils, isBuilderAccountDocument, addSpace, deleteSpace, setSpaceTitle, setSpaceDescription, reorderSpaces, AddSpaceInputSchema, DeleteSpaceInputSchema, SetSpaceTitleInputSchema, SetSpaceDescriptionInputSchema, ReorderSpacesInputSchema, } from "@powerhousedao/vetra-builder-package/document-models/builder-account/v1";
|
|
4
|
+
describe("SpacesOperations", () => {
|
|
5
|
+
it("should handle addSpace operation", () => {
|
|
6
|
+
const document = utils.createDocument();
|
|
7
|
+
const input = generateMock(AddSpaceInputSchema());
|
|
8
|
+
const updatedDocument = reducer(document, addSpace(input));
|
|
9
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
10
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
11
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("ADD_SPACE");
|
|
12
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
13
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
14
|
+
});
|
|
15
|
+
it("should handle deleteSpace operation", () => {
|
|
16
|
+
const document = utils.createDocument();
|
|
17
|
+
const input = generateMock(DeleteSpaceInputSchema());
|
|
18
|
+
const updatedDocument = reducer(document, deleteSpace(input));
|
|
19
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
20
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
21
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("DELETE_SPACE");
|
|
22
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
23
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
24
|
+
});
|
|
25
|
+
it("should handle setSpaceTitle operation", () => {
|
|
26
|
+
const document = utils.createDocument();
|
|
27
|
+
const input = generateMock(SetSpaceTitleInputSchema());
|
|
28
|
+
const updatedDocument = reducer(document, setSpaceTitle(input));
|
|
29
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
30
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
31
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("SET_SPACE_TITLE");
|
|
32
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
33
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
34
|
+
});
|
|
35
|
+
it("should handle setSpaceDescription operation", () => {
|
|
36
|
+
const document = utils.createDocument();
|
|
37
|
+
const input = generateMock(SetSpaceDescriptionInputSchema());
|
|
38
|
+
const updatedDocument = reducer(document, setSpaceDescription(input));
|
|
39
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
40
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
41
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("SET_SPACE_DESCRIPTION");
|
|
42
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
43
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
44
|
+
});
|
|
45
|
+
it("should handle reorderSpaces operation", () => {
|
|
46
|
+
const document = utils.createDocument();
|
|
47
|
+
const input = generateMock(ReorderSpacesInputSchema());
|
|
48
|
+
const updatedDocument = reducer(document, reorderSpaces(input));
|
|
49
|
+
expect(isBuilderAccountDocument(updatedDocument)).toBe(true);
|
|
50
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
51
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("REORDER_SPACES");
|
|
52
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
53
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BuilderAccountPHState } from "./gen/types.js";
|
|
2
|
+
/** Utils for the BuilderAccount document model */
|
|
3
|
+
export declare const utils: {
|
|
4
|
+
fileExtension: string;
|
|
5
|
+
createState: import("document-model").CreateState<BuilderAccountPHState>;
|
|
6
|
+
createDocument: import("document-model").CreateDocument<BuilderAccountPHState>;
|
|
7
|
+
loadFromInput: import("document-model").LoadFromInput<BuilderAccountPHState>;
|
|
8
|
+
saveToFileHandle: import("document-model").SaveToFileHandle;
|
|
9
|
+
isStateOfType: import("document-model").IsStateOfType<BuilderAccountPHState>;
|
|
10
|
+
assertIsStateOfType: import("document-model").AssertIsStateOfType<BuilderAccountPHState>;
|
|
11
|
+
isDocumentOfType: import("document-model").IsDocumentOfType<BuilderAccountPHState>;
|
|
12
|
+
assertIsDocumentOfType: import("document-model").AssertIsDocumentOfType<BuilderAccountPHState>;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-account/v1/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAI5D,kDAAkD;AAClD,eAAO,MAAM,KAAK;;;;;;;;;;CAGmC,CAAC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/** Actions for the BuilderTeam document model */
|
|
2
2
|
export declare const actions: {
|
|
3
|
-
addPackage: (input: import("./
|
|
4
|
-
updatePackageInfo: (input: import("./
|
|
5
|
-
removePackage: (input: import("./
|
|
6
|
-
reorderPackages: (input: import("./
|
|
7
|
-
addSpace: (input: import("./
|
|
8
|
-
updateSpaceInfo: (input: import("./
|
|
9
|
-
removeSpace: (input: import("./
|
|
10
|
-
reorderSpaces: (input: import("./
|
|
11
|
-
addMember: (input: import("./
|
|
12
|
-
updateMemberInfo: (input: import("./
|
|
13
|
-
removeMember: (input: import("./
|
|
14
|
-
setLogo: (input: import("./
|
|
15
|
-
setTeamName: (input: import("./
|
|
16
|
-
setSlug: (input: import("./
|
|
17
|
-
setDescription: (input: import("./
|
|
18
|
-
setSocials: (input: import("./
|
|
3
|
+
addPackage: (input: import("./gen/types.js").AddPackageInput) => import("./gen/actions.js").AddPackageAction;
|
|
4
|
+
updatePackageInfo: (input: import("./gen/types.js").UpdatePackageInfoInput) => import("./gen/actions.js").UpdatePackageInfoAction;
|
|
5
|
+
removePackage: (input: import("./gen/types.js").RemovePackageInput) => import("./gen/actions.js").RemovePackageAction;
|
|
6
|
+
reorderPackages: (input: import("./gen/types.js").ReorderPackagesInput) => import("./gen/actions.js").ReorderPackagesAction;
|
|
7
|
+
addSpace: (input: import("./gen/types.js").AddSpaceInput) => import("./gen/actions.js").AddSpaceAction;
|
|
8
|
+
updateSpaceInfo: (input: import("./gen/types.js").UpdateSpaceInfoInput) => import("./gen/actions.js").UpdateSpaceInfoAction;
|
|
9
|
+
removeSpace: (input: import("./gen/types.js").RemoveSpaceInput) => import("./gen/actions.js").RemoveSpaceAction;
|
|
10
|
+
reorderSpaces: (input: import("./gen/types.js").ReorderSpacesInput) => import("./gen/actions.js").ReorderSpacesAction;
|
|
11
|
+
addMember: (input: import("./gen/types.js").AddMemberInput) => import("./gen/actions.js").AddMemberAction;
|
|
12
|
+
updateMemberInfo: (input: import("./gen/types.js").UpdateMemberInfoInput) => import("./gen/actions.js").UpdateMemberInfoAction;
|
|
13
|
+
removeMember: (input: import("./gen/types.js").RemoveMemberInput) => import("./gen/actions.js").RemoveMemberAction;
|
|
14
|
+
setLogo: (input: import("./gen/types.js").SetLogoInput) => import("./gen/actions.js").SetLogoAction;
|
|
15
|
+
setTeamName: (input: import("./gen/types.js").SetTeamNameInput) => import("./gen/actions.js").SetTeamNameAction;
|
|
16
|
+
setSlug: (input: import("./gen/types.js").SetSlugInput) => import("./gen/actions.js").SetSlugAction;
|
|
17
|
+
setDescription: (input: import("./gen/types.js").SetDescriptionInput) => import("./gen/actions.js").SetDescriptionAction;
|
|
18
|
+
setSocials: (input: import("./gen/types.js").SetSocialsInput) => import("./gen/actions.js").SetSocialsAction;
|
|
19
19
|
setName: (name: string | {
|
|
20
20
|
name: string;
|
|
21
21
|
}) => import("document-model").SetNameAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/builder-team/actions.ts"],"names":[],"mappings":"AAQA,iDAAiD;AAEjD,eAAO,MAAM,OAAO;iBAOuI
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/builder-team/actions.ts"],"names":[],"mappings":"AAQA,iDAAiD;AAEjD,eAAO,MAAM,OAAO;iBAOuI,+CAAsB;wBAA4K,sDAA6B;oBAA8L,kDAAyB;sBAAmL,oDAA2B;eAA9pB,6CAAoB;sBAAoK,oDAA2B;kBAAsL,gDAAuB;oBAA2K,kDAAyB;gBAAnqB,8CAAqB;uBAAwK,qDAA4B;mBAA0L,iDAAwB;cAArU,4CAAmB;kBAA6J,gDAAuB;cAAsK,4CAAmB;qBAAgK,mDAA0B;iBAAiL,+CAAsB;;;;gBAAg8L,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADp1O,CAAC"}
|
|
@@ -110,7 +110,7 @@ export function UpdatePackageInfoInputSchema() {
|
|
|
110
110
|
phid: z.string().nullish(),
|
|
111
111
|
spaceId: z.string().nullish(),
|
|
112
112
|
title: z.string().nullish(),
|
|
113
|
-
vetraDriveUrl: z.
|
|
113
|
+
vetraDriveUrl: z.url().nullish(),
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
export function UpdateSpaceInfoInputSchema() {
|
|
@@ -124,7 +124,7 @@ export function VetraBuilderProfileSchema() {
|
|
|
124
124
|
return z.object({
|
|
125
125
|
__typename: z.literal("VetraBuilderProfile").optional(),
|
|
126
126
|
description: z.string().nullish(),
|
|
127
|
-
logo: z.
|
|
127
|
+
logo: z.url().nullish(),
|
|
128
128
|
name: z.string(),
|
|
129
129
|
slug: z.string(),
|
|
130
130
|
socials: z.lazy(() => VetraBuilderSocialsSchema()),
|
|
@@ -133,9 +133,9 @@ export function VetraBuilderProfileSchema() {
|
|
|
133
133
|
export function VetraBuilderSocialsSchema() {
|
|
134
134
|
return z.object({
|
|
135
135
|
__typename: z.literal("VetraBuilderSocials").optional(),
|
|
136
|
-
github: z.
|
|
137
|
-
website: z.
|
|
138
|
-
xProfile: z.
|
|
136
|
+
github: z.url().nullish(),
|
|
137
|
+
website: z.url().nullish(),
|
|
138
|
+
xProfile: z.url().nullish(),
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
export function VetraBuilderSpaceSchema() {
|
|
@@ -156,6 +156,6 @@ export function VetraPackageInfoSchema() {
|
|
|
156
156
|
npm: z.string().nullish(),
|
|
157
157
|
phid: z.string().nullish(),
|
|
158
158
|
title: z.string().nullish(),
|
|
159
|
-
vetraDriveUrl: z.
|
|
159
|
+
vetraDriveUrl: z.url().nullish(),
|
|
160
160
|
});
|
|
161
161
|
}
|
|
@@ -5,7 +5,7 @@ export declare function useBuilderTeamDocumentById(documentId: string | null | u
|
|
|
5
5
|
/** Hook to get the selected BuilderTeam document */
|
|
6
6
|
export declare function useSelectedBuilderTeamDocument(): [BuilderTeamDocument, DocumentDispatch<BuilderTeamAction>] | [undefined, undefined];
|
|
7
7
|
/** Hook to get all BuilderTeam documents in the selected drive */
|
|
8
|
-
export declare function useBuilderTeamDocumentsInSelectedDrive(): BuilderTeamDocument[] | undefined;
|
|
8
|
+
export declare function useBuilderTeamDocumentsInSelectedDrive(): import("./gen/types.js").BuilderTeamDocument[] | undefined;
|
|
9
9
|
/** Hook to get all BuilderTeam documents in the selected folder */
|
|
10
|
-
export declare function useBuilderTeamDocumentsInSelectedFolder(): BuilderTeamDocument[] | undefined;
|
|
10
|
+
export declare function useBuilderTeamDocumentsInSelectedFolder(): import("./gen/types.js").BuilderTeamDocument[] | undefined;
|
|
11
11
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../document-models/builder-team/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAOvE,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,mEAAmE,CAAC;AAG3E,mDAAmD;AACnD,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAEnC,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,GAC1D,CAAC,SAAS,EAAE,SAAS,CAAC,CAIzB;AAED,oDAAoD;AACpD,wBAAgB,8BAA8B,IAC1C,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,GAC1D,CAAC,SAAS,EAAE,SAAS,CAAC,CAIzB;AAED,kEAAkE;AAClE,wBAAgB,sCAAsC
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../document-models/builder-team/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAOvE,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,mEAAmE,CAAC;AAG3E,mDAAmD;AACnD,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAEnC,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,GAC1D,CAAC,SAAS,EAAE,SAAS,CAAC,CAIzB;AAED,oDAAoD;AACpD,wBAAgB,8BAA8B,IAC1C,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,GAC1D,CAAC,SAAS,EAAE,SAAS,CAAC,CAIzB;AAED,kEAAkE;AAClE,wBAAgB,sCAAsC,+DAGrD;AAED,mEAAmE;AACnE,wBAAgB,uCAAuC,+DAGtD"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./hooks.js";
|
|
4
|
-
export { actions } from "./actions.js";
|
|
5
|
-
export { utils } from "./utils.js";
|
|
1
|
+
export * from "./v1/index.js";
|
|
2
|
+
export * from "./upgrades/index.js";
|
|
6
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../document-models/builder-team/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../document-models/builder-team/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-team/upgrades/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-manifest.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-team/upgrades/upgrade-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAiB,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEjE,eAAO,MAAM,0BAA0B,EAAE,eAAe,CACtD,OAAO,iBAAiB,CAMzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-team/upgrades/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,cAAe,CAAC;AAE9C,eAAO,MAAM,aAAa,GAAuB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Actions for the BuilderTeam document model */
|
|
2
|
+
export declare const actions: {
|
|
3
|
+
addPackage: (input: import("./index.js").AddPackageInput) => import("./index.js").AddPackageAction;
|
|
4
|
+
updatePackageInfo: (input: import("./index.js").UpdatePackageInfoInput) => import("./index.js").UpdatePackageInfoAction;
|
|
5
|
+
removePackage: (input: import("./index.js").RemovePackageInput) => import("./index.js").RemovePackageAction;
|
|
6
|
+
reorderPackages: (input: import("./index.js").ReorderPackagesInput) => import("./index.js").ReorderPackagesAction;
|
|
7
|
+
addSpace: (input: import("./index.js").AddSpaceInput) => import("./index.js").AddSpaceAction;
|
|
8
|
+
updateSpaceInfo: (input: import("./index.js").UpdateSpaceInfoInput) => import("./index.js").UpdateSpaceInfoAction;
|
|
9
|
+
removeSpace: (input: import("./index.js").RemoveSpaceInput) => import("./index.js").RemoveSpaceAction;
|
|
10
|
+
reorderSpaces: (input: import("./index.js").ReorderSpacesInput) => import("./index.js").ReorderSpacesAction;
|
|
11
|
+
addMember: (input: import("./index.js").AddMemberInput) => import("./index.js").AddMemberAction;
|
|
12
|
+
updateMemberInfo: (input: import("./index.js").UpdateMemberInfoInput) => import("./index.js").UpdateMemberInfoAction;
|
|
13
|
+
removeMember: (input: import("./index.js").RemoveMemberInput) => import("./index.js").RemoveMemberAction;
|
|
14
|
+
setLogo: (input: import("./index.js").SetLogoInput) => import("./index.js").SetLogoAction;
|
|
15
|
+
setTeamName: (input: import("./index.js").SetTeamNameInput) => import("./index.js").SetTeamNameAction;
|
|
16
|
+
setSlug: (input: import("./index.js").SetSlugInput) => import("./index.js").SetSlugAction;
|
|
17
|
+
setDescription: (input: import("./index.js").SetDescriptionInput) => import("./index.js").SetDescriptionAction;
|
|
18
|
+
setSocials: (input: import("./index.js").SetSocialsInput) => import("./index.js").SetSocialsAction;
|
|
19
|
+
setName: (name: string | {
|
|
20
|
+
name: string;
|
|
21
|
+
}) => import("document-model").SetNameAction;
|
|
22
|
+
undo: (count?: number, scope?: string) => import("document-model").UndoAction;
|
|
23
|
+
redo: (count?: number, scope?: string) => import("document-model").RedoAction;
|
|
24
|
+
prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
|
|
25
|
+
loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
|
|
26
|
+
name: string;
|
|
27
|
+
}, operations: number) => import("document-model").LoadStateAction;
|
|
28
|
+
noop: (scope?: string) => import("document-model").NOOPAction;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-team/v1/actions.ts"],"names":[],"mappings":"AAQA,iDAAiD;AAEjD,eAAO,MAAM,OAAO;iBAOuI,2CAAsB;wBAA4K,kDAA6B;oBAA8L,8CAAyB;sBAAmL,gDAA2B;eAA9pB,yCAAoB;sBAAoK,gDAA2B;kBAAsL,4CAAuB;oBAA2K,8CAAyB;gBAAnqB,0CAAqB;uBAAwK,iDAA4B;mBAA0L,6CAAwB;cAArU,wCAAmB;kBAA6J,4CAAuB;cAAsK,wCAAmB;qBAAgK,+CAA0B;iBAAiL,2CAAsB;;;;gBAAg8L,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADp1O,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { baseActions } from "document-model";
|
|
2
|
+
import { profileActions, memberActions, spacesActions, packagesActions, } from "./gen/creators.js";
|
|
3
|
+
/** Actions for the BuilderTeam document model */
|
|
4
|
+
export const actions = {
|
|
5
|
+
...baseActions,
|
|
6
|
+
...profileActions,
|
|
7
|
+
...memberActions,
|
|
8
|
+
...spacesActions,
|
|
9
|
+
...packagesActions,
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BuilderTeamProfileAction } from "./profile/actions.js";
|
|
2
|
+
import type { BuilderTeamMemberAction } from "./member/actions.js";
|
|
3
|
+
import type { BuilderTeamSpacesAction } from "./spaces/actions.js";
|
|
4
|
+
import type { BuilderTeamPackagesAction } from "./packages/actions.js";
|
|
5
|
+
export * from "./profile/actions.js";
|
|
6
|
+
export * from "./member/actions.js";
|
|
7
|
+
export * from "./spaces/actions.js";
|
|
8
|
+
export * from "./packages/actions.js";
|
|
9
|
+
export type BuilderTeamAction = BuilderTeamProfileAction | BuilderTeamMemberAction | BuilderTeamSpacesAction | BuilderTeamPackagesAction;
|
|
10
|
+
//# sourceMappingURL=actions.d.ts.map
|