@powerhousedao/vetra-builder-package 0.0.32 → 0.0.33
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/editors/builder-team-editor/config.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/document-models/builder-account/gen/actions.d.ts +0 -9
- package/dist/document-models/builder-account/gen/actions.js +0 -4
- package/dist/document-models/builder-account/gen/creators.d.ts +0 -4
- package/dist/document-models/builder-account/gen/creators.js +0 -4
- package/dist/document-models/builder-account/gen/document-model.d.ts +0 -2
- package/dist/document-models/builder-account/gen/document-model.js +0 -253
- package/dist/document-models/builder-account/gen/index.d.ts +0 -7
- package/dist/document-models/builder-account/gen/index.js +0 -6
- package/dist/document-models/builder-account/gen/members/actions.d.ts +0 -11
- package/dist/document-models/builder-account/gen/members/actions.js +0 -1
- package/dist/document-models/builder-account/gen/members/creators.d.ts +0 -4
- package/dist/document-models/builder-account/gen/members/creators.js +0 -4
- package/dist/document-models/builder-account/gen/members/error.d.ts +0 -1
- package/dist/document-models/builder-account/gen/members/error.js +0 -1
- package/dist/document-models/builder-account/gen/members/object.d.ts +0 -7
- package/dist/document-models/builder-account/gen/members/object.js +0 -10
- package/dist/document-models/builder-account/gen/members/operations.d.ts +0 -7
- package/dist/document-models/builder-account/gen/members/operations.js +0 -1
- package/dist/document-models/builder-account/gen/object.d.ts +0 -20
- package/dist/document-models/builder-account/gen/object.js +0 -36
- package/dist/document-models/builder-account/gen/packages/actions.d.ts +0 -23
- package/dist/document-models/builder-account/gen/packages/actions.js +0 -1
- package/dist/document-models/builder-account/gen/packages/creators.d.ts +0 -7
- package/dist/document-models/builder-account/gen/packages/creators.js +0 -7
- package/dist/document-models/builder-account/gen/packages/error.d.ts +0 -1
- package/dist/document-models/builder-account/gen/packages/error.js +0 -1
- package/dist/document-models/builder-account/gen/packages/object.d.ts +0 -10
- package/dist/document-models/builder-account/gen/packages/object.js +0 -19
- package/dist/document-models/builder-account/gen/packages/operations.d.ts +0 -10
- package/dist/document-models/builder-account/gen/packages/operations.js +0 -1
- package/dist/document-models/builder-account/gen/ph-factories.d.ts +0 -26
- package/dist/document-models/builder-account/gen/ph-factories.js +0 -62
- package/dist/document-models/builder-account/gen/profile/actions.d.ts +0 -23
- package/dist/document-models/builder-account/gen/profile/actions.js +0 -1
- package/dist/document-models/builder-account/gen/profile/creators.d.ts +0 -7
- package/dist/document-models/builder-account/gen/profile/creators.js +0 -7
- package/dist/document-models/builder-account/gen/profile/error.d.ts +0 -1
- package/dist/document-models/builder-account/gen/profile/error.js +0 -1
- package/dist/document-models/builder-account/gen/profile/object.d.ts +0 -10
- package/dist/document-models/builder-account/gen/profile/object.js +0 -19
- package/dist/document-models/builder-account/gen/profile/operations.d.ts +0 -10
- package/dist/document-models/builder-account/gen/profile/operations.js +0 -1
- package/dist/document-models/builder-account/gen/reducer.d.ts +0 -4
- package/dist/document-models/builder-account/gen/reducer.js +0 -87
- package/dist/document-models/builder-account/gen/schema/index.d.ts +0 -2
- package/dist/document-models/builder-account/gen/schema/index.js +0 -2
- package/dist/document-models/builder-account/gen/schema/types.d.ts +0 -269
- package/dist/document-models/builder-account/gen/schema/types.js +0 -1
- package/dist/document-models/builder-account/gen/schema/zod.d.ts +0 -34
- package/dist/document-models/builder-account/gen/schema/zod.js +0 -192
- package/dist/document-models/builder-account/gen/spaces/actions.d.ts +0 -23
- package/dist/document-models/builder-account/gen/spaces/actions.js +0 -1
- package/dist/document-models/builder-account/gen/spaces/creators.d.ts +0 -7
- package/dist/document-models/builder-account/gen/spaces/creators.js +0 -7
- package/dist/document-models/builder-account/gen/spaces/error.d.ts +0 -13
- package/dist/document-models/builder-account/gen/spaces/error.js +0 -11
- package/dist/document-models/builder-account/gen/spaces/object.d.ts +0 -10
- package/dist/document-models/builder-account/gen/spaces/object.js +0 -19
- package/dist/document-models/builder-account/gen/spaces/operations.d.ts +0 -10
- package/dist/document-models/builder-account/gen/spaces/operations.js +0 -1
- package/dist/document-models/builder-account/gen/types.d.ts +0 -9
- package/dist/document-models/builder-account/gen/types.js +0 -1
- package/dist/document-models/builder-account/gen/utils.d.ts +0 -21
- package/dist/document-models/builder-account/gen/utils.js +0 -54
- package/dist/document-models/builder-account/index.d.ts +0 -40
- package/dist/document-models/builder-account/index.js +0 -21
- package/dist/document-models/builder-account/src/reducers/members.d.ts +0 -2
- package/dist/document-models/builder-account/src/reducers/members.js +0 -11
- package/dist/document-models/builder-account/src/reducers/packages.d.ts +0 -2
- package/dist/document-models/builder-account/src/reducers/packages.js +0 -108
- package/dist/document-models/builder-account/src/reducers/profile.d.ts +0 -2
- package/dist/document-models/builder-account/src/reducers/profile.js +0 -43
- package/dist/document-models/builder-account/src/reducers/spaces.d.ts +0 -2
- package/dist/document-models/builder-account/src/reducers/spaces.js +0 -52
- package/dist/document-models/builder-account/src/tests/document-model.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/document-model.test.js +0 -18
- package/dist/document-models/builder-account/src/tests/members.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/members.test.js +0 -32
- package/dist/document-models/builder-account/src/tests/packages.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/packages.test.js +0 -56
- package/dist/document-models/builder-account/src/tests/profile.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/profile.test.js +0 -56
- package/dist/document-models/builder-account/src/tests/spaces.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/spaces.test.js +0 -56
- package/dist/document-models/builder-account/src/utils.d.ts +0 -1
- package/dist/document-models/builder-account/src/utils.js +0 -1
- package/dist/document-models/renown-profile/gen/actions.d.ts +0 -5
- package/dist/document-models/renown-profile/gen/actions.js +0 -2
- package/dist/document-models/renown-profile/gen/authorization/actions.d.ts +0 -11
- package/dist/document-models/renown-profile/gen/authorization/actions.js +0 -1
- package/dist/document-models/renown-profile/gen/authorization/creators.d.ts +0 -4
- package/dist/document-models/renown-profile/gen/authorization/creators.js +0 -4
- package/dist/document-models/renown-profile/gen/authorization/error.d.ts +0 -1
- package/dist/document-models/renown-profile/gen/authorization/error.js +0 -1
- package/dist/document-models/renown-profile/gen/authorization/object.d.ts +0 -7
- package/dist/document-models/renown-profile/gen/authorization/object.js +0 -10
- package/dist/document-models/renown-profile/gen/authorization/operations.d.ts +0 -7
- package/dist/document-models/renown-profile/gen/authorization/operations.js +0 -1
- package/dist/document-models/renown-profile/gen/creators.d.ts +0 -2
- package/dist/document-models/renown-profile/gen/creators.js +0 -2
- package/dist/document-models/renown-profile/gen/document-model.d.ts +0 -2
- package/dist/document-models/renown-profile/gen/document-model.js +0 -99
- package/dist/document-models/renown-profile/gen/index.d.ts +0 -7
- package/dist/document-models/renown-profile/gen/index.js +0 -6
- package/dist/document-models/renown-profile/gen/object.d.ts +0 -16
- package/dist/document-models/renown-profile/gen/object.js +0 -30
- package/dist/document-models/renown-profile/gen/ph-factories.d.ts +0 -26
- package/dist/document-models/renown-profile/gen/ph-factories.js +0 -53
- package/dist/document-models/renown-profile/gen/profile/actions.d.ts +0 -15
- package/dist/document-models/renown-profile/gen/profile/actions.js +0 -1
- package/dist/document-models/renown-profile/gen/profile/creators.d.ts +0 -5
- package/dist/document-models/renown-profile/gen/profile/creators.js +0 -5
- package/dist/document-models/renown-profile/gen/profile/error.d.ts +0 -1
- package/dist/document-models/renown-profile/gen/profile/error.js +0 -1
- package/dist/document-models/renown-profile/gen/profile/object.d.ts +0 -8
- package/dist/document-models/renown-profile/gen/profile/object.js +0 -13
- package/dist/document-models/renown-profile/gen/profile/operations.d.ts +0 -8
- package/dist/document-models/renown-profile/gen/profile/operations.js +0 -1
- package/dist/document-models/renown-profile/gen/reducer.d.ts +0 -4
- package/dist/document-models/renown-profile/gen/reducer.js +0 -37
- package/dist/document-models/renown-profile/gen/schema/index.d.ts +0 -2
- package/dist/document-models/renown-profile/gen/schema/index.js +0 -2
- package/dist/document-models/renown-profile/gen/schema/types.d.ts +0 -174
- package/dist/document-models/renown-profile/gen/schema/types.js +0 -1
- package/dist/document-models/renown-profile/gen/schema/zod.d.ts +0 -16
- package/dist/document-models/renown-profile/gen/schema/zod.js +0 -62
- package/dist/document-models/renown-profile/gen/types.d.ts +0 -9
- package/dist/document-models/renown-profile/gen/types.js +0 -1
- package/dist/document-models/renown-profile/gen/utils.d.ts +0 -21
- package/dist/document-models/renown-profile/gen/utils.js +0 -45
- package/dist/document-models/renown-profile/index.d.ts +0 -28
- package/dist/document-models/renown-profile/index.js +0 -21
- package/dist/document-models/renown-profile/src/reducers/authorization.d.ts +0 -2
- package/dist/document-models/renown-profile/src/reducers/authorization.js +0 -8
- package/dist/document-models/renown-profile/src/reducers/profile.d.ts +0 -2
- package/dist/document-models/renown-profile/src/reducers/profile.js +0 -11
- package/dist/document-models/renown-profile/src/tests/authorization.test.d.ts +0 -5
- package/dist/document-models/renown-profile/src/tests/authorization.test.js +0 -24
- package/dist/document-models/renown-profile/src/tests/document-model.test.d.ts +0 -5
- package/dist/document-models/renown-profile/src/tests/document-model.test.js +0 -18
- package/dist/document-models/renown-profile/src/tests/profile.test.d.ts +0 -5
- package/dist/document-models/renown-profile/src/tests/profile.test.js +0 -24
- package/dist/document-models/renown-profile/src/utils.d.ts +0 -1
- package/dist/document-models/renown-profile/src/utils.js +0 -1
- package/dist/document-models/vetra-package/gen/actions.d.ts +0 -3
- package/dist/document-models/vetra-package/gen/actions.js +0 -1
- package/dist/document-models/vetra-package/gen/creators.d.ts +0 -1
- package/dist/document-models/vetra-package/gen/creators.js +0 -1
- package/dist/document-models/vetra-package/gen/document-model.d.ts +0 -2
- package/dist/document-models/vetra-package/gen/document-model.js +0 -125
- package/dist/document-models/vetra-package/gen/index.d.ts +0 -7
- package/dist/document-models/vetra-package/gen/index.js +0 -6
- package/dist/document-models/vetra-package/gen/meta/actions.d.ts +0 -35
- package/dist/document-models/vetra-package/gen/meta/actions.js +0 -1
- package/dist/document-models/vetra-package/gen/meta/creators.d.ts +0 -10
- package/dist/document-models/vetra-package/gen/meta/creators.js +0 -10
- package/dist/document-models/vetra-package/gen/meta/error.d.ts +0 -1
- package/dist/document-models/vetra-package/gen/meta/error.js +0 -1
- package/dist/document-models/vetra-package/gen/meta/object.d.ts +0 -13
- package/dist/document-models/vetra-package/gen/meta/object.js +0 -28
- package/dist/document-models/vetra-package/gen/meta/operations.d.ts +0 -13
- package/dist/document-models/vetra-package/gen/meta/operations.js +0 -1
- package/dist/document-models/vetra-package/gen/object.d.ts +0 -14
- package/dist/document-models/vetra-package/gen/object.js +0 -25
- package/dist/document-models/vetra-package/gen/ph-factories.d.ts +0 -26
- package/dist/document-models/vetra-package/gen/ph-factories.js +0 -59
- package/dist/document-models/vetra-package/gen/reducer.d.ts +0 -4
- package/dist/document-models/vetra-package/gen/reducer.js +0 -48
- package/dist/document-models/vetra-package/gen/schema/index.d.ts +0 -2
- package/dist/document-models/vetra-package/gen/schema/index.js +0 -2
- package/dist/document-models/vetra-package/gen/schema/types.d.ts +0 -187
- package/dist/document-models/vetra-package/gen/schema/types.js +0 -1
- package/dist/document-models/vetra-package/gen/schema/zod.d.ts +0 -20
- package/dist/document-models/vetra-package/gen/schema/zod.js +0 -73
- package/dist/document-models/vetra-package/gen/types.d.ts +0 -9
- package/dist/document-models/vetra-package/gen/types.js +0 -1
- package/dist/document-models/vetra-package/gen/utils.d.ts +0 -21
- package/dist/document-models/vetra-package/gen/utils.js +0 -51
- package/dist/document-models/vetra-package/index.d.ts +0 -31
- package/dist/document-models/vetra-package/index.js +0 -21
- package/dist/document-models/vetra-package/src/reducers/meta.d.ts +0 -2
- package/dist/document-models/vetra-package/src/reducers/meta.js +0 -34
- package/dist/document-models/vetra-package/src/tests/document-model.test.d.ts +0 -5
- package/dist/document-models/vetra-package/src/tests/document-model.test.js +0 -18
- package/dist/document-models/vetra-package/src/tests/meta.test.d.ts +0 -5
- package/dist/document-models/vetra-package/src/tests/meta.test.js +0 -80
- package/dist/document-models/vetra-package/src/utils.d.ts +0 -1
- package/dist/document-models/vetra-package/src/utils.js +0 -1
- package/dist/editors/builder-account-editor/editor.d.ts +0 -3
- package/dist/editors/builder-account-editor/editor.js +0 -195
- package/dist/editors/builder-account-editor/index.d.ts +0 -3
- package/dist/editors/builder-account-editor/index.js +0 -12
- package/dist/editors/hooks/useRenownProfileDocument.d.ts +0 -3
- package/dist/editors/hooks/useRenownProfileDocument.js +0 -8
- package/dist/editors/renown-profile-editor/editor.d.ts +0 -3
- package/dist/editors/renown-profile-editor/editor.js +0 -33
- package/dist/editors/renown-profile-editor/index.d.ts +0 -2
- package/dist/editors/renown-profile-editor/index.js +0 -11
- package/dist/processors/old_vetra-builder-relational-db-processor/factory.d.ts +0 -3
- package/dist/processors/old_vetra-builder-relational-db-processor/factory.js +0 -22
- package/dist/processors/old_vetra-builder-relational-db-processor/index.d.ts +0 -9
- package/dist/processors/old_vetra-builder-relational-db-processor/index.js +0 -32
- package/dist/processors/old_vetra-builder-relational-db-processor/migrations.d.ts +0 -3
- package/dist/processors/old_vetra-builder-relational-db-processor/migrations.js +0 -14
- package/dist/processors/old_vetra-builder-relational-db-processor/schema.d.ts +0 -7
- package/dist/processors/old_vetra-builder-relational-db-processor/schema.js +0 -1
- package/dist/processors/renown-profile/factory.d.ts +0 -3
- package/dist/processors/renown-profile/factory.js +0 -22
- package/dist/processors/renown-profile/index.d.ts +0 -9
- package/dist/processors/renown-profile/index.js +0 -81
- package/dist/processors/renown-profile/migrations.d.ts +0 -3
- package/dist/processors/renown-profile/migrations.js +0 -39
- package/dist/processors/renown-profile/schema.d.ts +0 -14
- package/dist/processors/renown-profile/schema.js +0 -1
- package/dist/processors/renown-read-model/migrations.d.ts +0 -3
- package/dist/processors/renown-read-model/migrations.js +0 -55
- package/dist/processors/renown-read-model/schema.d.ts +0 -21
- package/dist/processors/renown-read-model/schema.js +0 -1
- package/dist/processors/vetra-builder-read-model/builder-account-handlers.d.ts +0 -27
- package/dist/processors/vetra-builder-read-model/builder-account-handlers.js +0 -249
- package/dist/processors/vetra-builder-read-model/database-helpers.d.ts +0 -39
- package/dist/processors/vetra-builder-read-model/database-helpers.js +0 -144
- package/dist/processors/vetra-builder-read-model/factory.d.ts +0 -3
- package/dist/processors/vetra-builder-read-model/factory.js +0 -25
- package/dist/processors/vetra-builder-read-model/index.d.ts +0 -29
- package/dist/processors/vetra-builder-read-model/index.js +0 -370
- package/dist/processors/vetra-builder-read-model/migrations.d.ts +0 -3
- package/dist/processors/vetra-builder-read-model/migrations.js +0 -152
- package/dist/processors/vetra-builder-read-model/package-handlers.d.ts +0 -20
- package/dist/processors/vetra-builder-read-model/package-handlers.js +0 -116
- package/dist/processors/vetra-builder-read-model/schema.d.ts +0 -66
- package/dist/processors/vetra-builder-read-model/schema.js +0 -1
- package/dist/processors/vetra-builder-read-model/types.d.ts +0 -32
- package/dist/processors/vetra-builder-read-model/types.js +0 -1
- package/dist/processors/vetra-read-model/builder-account-handlers.d.ts +0 -27
- package/dist/processors/vetra-read-model/builder-account-handlers.js +0 -249
- package/dist/processors/vetra-read-model/database-helpers.d.ts +0 -39
- package/dist/processors/vetra-read-model/database-helpers.js +0 -144
- package/dist/processors/vetra-read-model/document-drive-handlers.d.ts +0 -21
- package/dist/processors/vetra-read-model/document-drive-handlers.js +0 -77
- package/dist/processors/vetra-read-model/factory.d.ts +0 -3
- package/dist/processors/vetra-read-model/factory.js +0 -25
- package/dist/processors/vetra-read-model/index.d.ts +0 -29
- package/dist/processors/vetra-read-model/index.js +0 -370
- package/dist/processors/vetra-read-model/migrations.d.ts +0 -3
- package/dist/processors/vetra-read-model/migrations.js +0 -152
- package/dist/processors/vetra-read-model/package-handlers.d.ts +0 -20
- package/dist/processors/vetra-read-model/package-handlers.js +0 -116
- package/dist/processors/vetra-read-model/schema.d.ts +0 -66
- package/dist/processors/vetra-read-model/schema.js +0 -1
- package/dist/processors/vetra-read-model/types.d.ts +0 -32
- package/dist/processors/vetra-read-model/types.js +0 -1
- package/dist/subgraphs/builder-account/index.d.ts +0 -10
- package/dist/subgraphs/builder-account/index.js +0 -11
- package/dist/subgraphs/builder-account/resolvers.d.ts +0 -2
- package/dist/subgraphs/builder-account/resolvers.js +0 -276
- package/dist/subgraphs/builder-account/schema.d.ts +0 -2
- package/dist/subgraphs/builder-account/schema.js +0 -267
- package/dist/subgraphs/renown-profile/index.d.ts +0 -10
- package/dist/subgraphs/renown-profile/index.js +0 -11
- package/dist/subgraphs/renown-profile/resolvers.d.ts +0 -2
- package/dist/subgraphs/renown-profile/resolvers.js +0 -151
- package/dist/subgraphs/renown-profile/schema.d.ts +0 -2
- package/dist/subgraphs/renown-profile/schema.js +0 -104
- package/dist/subgraphs/renown-read-model/index.d.ts +0 -10
- package/dist/subgraphs/renown-read-model/index.js +0 -11
- package/dist/subgraphs/renown-read-model/resolvers.d.ts +0 -2
- package/dist/subgraphs/renown-read-model/resolvers.js +0 -25
- package/dist/subgraphs/renown-read-model/schema.d.ts +0 -2
- package/dist/subgraphs/renown-read-model/schema.js +0 -16
- package/dist/subgraphs/vetra/index.d.ts +0 -10
- package/dist/subgraphs/vetra/index.js +0 -11
- package/dist/subgraphs/vetra/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra/resolvers.js +0 -10
- package/dist/subgraphs/vetra/schema.d.ts +0 -2
- package/dist/subgraphs/vetra/schema.js +0 -9
- package/dist/subgraphs/vetra-builder-read-model/index.d.ts +0 -10
- package/dist/subgraphs/vetra-builder-read-model/index.js +0 -11
- package/dist/subgraphs/vetra-builder-read-model/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra-builder-read-model/resolvers.js +0 -174
- package/dist/subgraphs/vetra-builder-read-model/schema.d.ts +0 -2
- package/dist/subgraphs/vetra-builder-read-model/schema.js +0 -79
- package/dist/subgraphs/vetra-builders-bkp/index.d.ts +0 -10
- package/dist/subgraphs/vetra-builders-bkp/index.js +0 -11
- package/dist/subgraphs/vetra-builders-bkp/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra-builders-bkp/resolvers.js +0 -10
- package/dist/subgraphs/vetra-builders-bkp/schema.d.ts +0 -2
- package/dist/subgraphs/vetra-builders-bkp/schema.js +0 -9
- package/dist/subgraphs/vetra-package/index.d.ts +0 -10
- package/dist/subgraphs/vetra-package/index.js +0 -11
- package/dist/subgraphs/vetra-package/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra-package/resolvers.js +0 -168
- package/dist/subgraphs/vetra-package/schema.d.ts +0 -2
- package/dist/subgraphs/vetra-package/schema.js +0 -123
- package/dist/subgraphs/vetra-read-model/index.d.ts +0 -10
- package/dist/subgraphs/vetra-read-model/index.js +0 -11
- package/dist/subgraphs/vetra-read-model/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra-read-model/resolvers.js +0 -174
- package/dist/subgraphs/vetra-read-model/schema.d.ts +0 -2
- package/dist/subgraphs/vetra-read-model/schema.js +0 -79
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
export type Maybe<T> = T | null;
|
|
2
|
-
export type InputMaybe<T> = T | null | undefined;
|
|
3
|
-
export type Exact<T extends {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}> = {
|
|
6
|
-
[K in keyof T]: T[K];
|
|
7
|
-
};
|
|
8
|
-
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
-
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
-
};
|
|
11
|
-
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
-
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
-
};
|
|
14
|
-
export type MakeEmpty<T extends {
|
|
15
|
-
[key: string]: unknown;
|
|
16
|
-
}, K extends keyof T> = {
|
|
17
|
-
[_ in K]?: never;
|
|
18
|
-
};
|
|
19
|
-
export type Incremental<T> = T | {
|
|
20
|
-
[P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never;
|
|
21
|
-
};
|
|
22
|
-
/** All built-in and custom scalars, mapped to their actual values */
|
|
23
|
-
export type Scalars = {
|
|
24
|
-
ID: {
|
|
25
|
-
input: string;
|
|
26
|
-
output: string;
|
|
27
|
-
};
|
|
28
|
-
String: {
|
|
29
|
-
input: string;
|
|
30
|
-
output: string;
|
|
31
|
-
};
|
|
32
|
-
Boolean: {
|
|
33
|
-
input: boolean;
|
|
34
|
-
output: boolean;
|
|
35
|
-
};
|
|
36
|
-
Int: {
|
|
37
|
-
input: number;
|
|
38
|
-
output: number;
|
|
39
|
-
};
|
|
40
|
-
Float: {
|
|
41
|
-
input: number;
|
|
42
|
-
output: number;
|
|
43
|
-
};
|
|
44
|
-
Amount: {
|
|
45
|
-
input: {
|
|
46
|
-
unit?: string;
|
|
47
|
-
value?: number;
|
|
48
|
-
};
|
|
49
|
-
output: {
|
|
50
|
-
unit?: string;
|
|
51
|
-
value?: number;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
Amount_Crypto: {
|
|
55
|
-
input: {
|
|
56
|
-
unit: string;
|
|
57
|
-
value: string;
|
|
58
|
-
};
|
|
59
|
-
output: {
|
|
60
|
-
unit: string;
|
|
61
|
-
value: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
Amount_Currency: {
|
|
65
|
-
input: {
|
|
66
|
-
unit: string;
|
|
67
|
-
value: string;
|
|
68
|
-
};
|
|
69
|
-
output: {
|
|
70
|
-
unit: string;
|
|
71
|
-
value: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
Amount_Fiat: {
|
|
75
|
-
input: {
|
|
76
|
-
unit: string;
|
|
77
|
-
value: number;
|
|
78
|
-
};
|
|
79
|
-
output: {
|
|
80
|
-
unit: string;
|
|
81
|
-
value: number;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
Amount_Money: {
|
|
85
|
-
input: number;
|
|
86
|
-
output: number;
|
|
87
|
-
};
|
|
88
|
-
Amount_Percentage: {
|
|
89
|
-
input: number;
|
|
90
|
-
output: number;
|
|
91
|
-
};
|
|
92
|
-
Amount_Tokens: {
|
|
93
|
-
input: number;
|
|
94
|
-
output: number;
|
|
95
|
-
};
|
|
96
|
-
Currency: {
|
|
97
|
-
input: string;
|
|
98
|
-
output: string;
|
|
99
|
-
};
|
|
100
|
-
Date: {
|
|
101
|
-
input: string;
|
|
102
|
-
output: string;
|
|
103
|
-
};
|
|
104
|
-
DateTime: {
|
|
105
|
-
input: string;
|
|
106
|
-
output: string;
|
|
107
|
-
};
|
|
108
|
-
EmailAddress: {
|
|
109
|
-
input: string;
|
|
110
|
-
output: string;
|
|
111
|
-
};
|
|
112
|
-
EthereumAddress: {
|
|
113
|
-
input: string;
|
|
114
|
-
output: string;
|
|
115
|
-
};
|
|
116
|
-
OID: {
|
|
117
|
-
input: string;
|
|
118
|
-
output: string;
|
|
119
|
-
};
|
|
120
|
-
OLabel: {
|
|
121
|
-
input: string;
|
|
122
|
-
output: string;
|
|
123
|
-
};
|
|
124
|
-
PHID: {
|
|
125
|
-
input: string;
|
|
126
|
-
output: string;
|
|
127
|
-
};
|
|
128
|
-
URL: {
|
|
129
|
-
input: string;
|
|
130
|
-
output: string;
|
|
131
|
-
};
|
|
132
|
-
Upload: {
|
|
133
|
-
input: File;
|
|
134
|
-
output: File;
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
export type AddKeywordsInput = {
|
|
138
|
-
/** Add your inputs here */
|
|
139
|
-
id?: InputMaybe<Scalars["OID"]["input"]>;
|
|
140
|
-
label: Scalars["String"]["input"];
|
|
141
|
-
};
|
|
142
|
-
export type RemoveKeywordsInput = {
|
|
143
|
-
/** Add your inputs here */
|
|
144
|
-
id: Scalars["OID"]["input"];
|
|
145
|
-
};
|
|
146
|
-
export type SetAuthorInput = {
|
|
147
|
-
/** Add your inputs here */
|
|
148
|
-
name: Scalars["String"]["input"];
|
|
149
|
-
website?: InputMaybe<Scalars["URL"]["input"]>;
|
|
150
|
-
};
|
|
151
|
-
export type SetPackageCategoryInput = {
|
|
152
|
-
/** Add your inputs here */
|
|
153
|
-
category: Scalars["String"]["input"];
|
|
154
|
-
};
|
|
155
|
-
export type SetPackageDescriptionInput = {
|
|
156
|
-
/** Add your inputs here */
|
|
157
|
-
description: Scalars["String"]["input"];
|
|
158
|
-
};
|
|
159
|
-
export type SetPackageGithubInput = {
|
|
160
|
-
/** Add your inputs here */
|
|
161
|
-
github: Scalars["URL"]["input"];
|
|
162
|
-
};
|
|
163
|
-
export type SetPackageNameInput = {
|
|
164
|
-
/** Add your inputs here */
|
|
165
|
-
name: Scalars["String"]["input"];
|
|
166
|
-
};
|
|
167
|
-
export type SetPackageNpmInput = {
|
|
168
|
-
/** Add your inputs here */
|
|
169
|
-
npm: Scalars["URL"]["input"];
|
|
170
|
-
};
|
|
171
|
-
export type VetraBuilderPackageAuthor = {
|
|
172
|
-
name: Scalars["String"]["output"];
|
|
173
|
-
website: Maybe<Scalars["URL"]["output"]>;
|
|
174
|
-
};
|
|
175
|
-
export type VetraBuilderPackageKeyword = {
|
|
176
|
-
id: Scalars["OID"]["output"];
|
|
177
|
-
label: Scalars["String"]["output"];
|
|
178
|
-
};
|
|
179
|
-
export type VetraPackageState = {
|
|
180
|
-
author: VetraBuilderPackageAuthor;
|
|
181
|
-
category: Maybe<Scalars["String"]["output"]>;
|
|
182
|
-
description: Maybe<Scalars["String"]["output"]>;
|
|
183
|
-
github: Maybe<Scalars["URL"]["output"]>;
|
|
184
|
-
keywords: Array<VetraBuilderPackageKeyword>;
|
|
185
|
-
name: Scalars["String"]["output"];
|
|
186
|
-
npm: Maybe<Scalars["URL"]["output"]>;
|
|
187
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { AddKeywordsInput, RemoveKeywordsInput, SetAuthorInput, SetPackageCategoryInput, SetPackageDescriptionInput, SetPackageGithubInput, SetPackageNameInput, SetPackageNpmInput, VetraBuilderPackageAuthor, VetraBuilderPackageKeyword, VetraPackageState } from "./types.js";
|
|
3
|
-
type Properties<T> = Required<{
|
|
4
|
-
[K in keyof T]: z.ZodType<T[K], any, T[K]>;
|
|
5
|
-
}>;
|
|
6
|
-
type definedNonNullAny = {};
|
|
7
|
-
export declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
|
|
8
|
-
export declare const definedNonNullAnySchema: z.ZodEffects<z.ZodAny, definedNonNullAny, any>;
|
|
9
|
-
export declare function AddKeywordsInputSchema(): z.ZodObject<Properties<AddKeywordsInput>>;
|
|
10
|
-
export declare function RemoveKeywordsInputSchema(): z.ZodObject<Properties<RemoveKeywordsInput>>;
|
|
11
|
-
export declare function SetAuthorInputSchema(): z.ZodObject<Properties<SetAuthorInput>>;
|
|
12
|
-
export declare function SetPackageCategoryInputSchema(): z.ZodObject<Properties<SetPackageCategoryInput>>;
|
|
13
|
-
export declare function SetPackageDescriptionInputSchema(): z.ZodObject<Properties<SetPackageDescriptionInput>>;
|
|
14
|
-
export declare function SetPackageGithubInputSchema(): z.ZodObject<Properties<SetPackageGithubInput>>;
|
|
15
|
-
export declare function SetPackageNameInputSchema(): z.ZodObject<Properties<SetPackageNameInput>>;
|
|
16
|
-
export declare function SetPackageNpmInputSchema(): z.ZodObject<Properties<SetPackageNpmInput>>;
|
|
17
|
-
export declare function VetraBuilderPackageAuthorSchema(): z.ZodObject<Properties<VetraBuilderPackageAuthor>>;
|
|
18
|
-
export declare function VetraBuilderPackageKeywordSchema(): z.ZodObject<Properties<VetraBuilderPackageKeyword>>;
|
|
19
|
-
export declare function VetraPackageStateSchema(): z.ZodObject<Properties<VetraPackageState>>;
|
|
20
|
-
export {};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
|
|
3
|
-
export const definedNonNullAnySchema = z
|
|
4
|
-
.any()
|
|
5
|
-
.refine((v) => isDefinedNonNullAny(v));
|
|
6
|
-
export function AddKeywordsInputSchema() {
|
|
7
|
-
return z.object({
|
|
8
|
-
id: z.string().nullish(),
|
|
9
|
-
label: z.string(),
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
export function RemoveKeywordsInputSchema() {
|
|
13
|
-
return z.object({
|
|
14
|
-
id: z.string(),
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
export function SetAuthorInputSchema() {
|
|
18
|
-
return z.object({
|
|
19
|
-
name: z.string(),
|
|
20
|
-
website: z.string().url().nullish(),
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
export function SetPackageCategoryInputSchema() {
|
|
24
|
-
return z.object({
|
|
25
|
-
category: z.string(),
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
export function SetPackageDescriptionInputSchema() {
|
|
29
|
-
return z.object({
|
|
30
|
-
description: z.string(),
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
export function SetPackageGithubInputSchema() {
|
|
34
|
-
return z.object({
|
|
35
|
-
github: z.string().url(),
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
export function SetPackageNameInputSchema() {
|
|
39
|
-
return z.object({
|
|
40
|
-
name: z.string(),
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
export function SetPackageNpmInputSchema() {
|
|
44
|
-
return z.object({
|
|
45
|
-
npm: z.string().url(),
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
export function VetraBuilderPackageAuthorSchema() {
|
|
49
|
-
return z.object({
|
|
50
|
-
__typename: z.literal("VetraBuilderPackageAuthor").optional(),
|
|
51
|
-
name: z.string(),
|
|
52
|
-
website: z.string().url().nullable(),
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
export function VetraBuilderPackageKeywordSchema() {
|
|
56
|
-
return z.object({
|
|
57
|
-
__typename: z.literal("VetraBuilderPackageKeyword").optional(),
|
|
58
|
-
id: z.string(),
|
|
59
|
-
label: z.string(),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
export function VetraPackageStateSchema() {
|
|
63
|
-
return z.object({
|
|
64
|
-
__typename: z.literal("VetraPackageState").optional(),
|
|
65
|
-
author: VetraBuilderPackageAuthorSchema(),
|
|
66
|
-
category: z.string().nullable(),
|
|
67
|
-
description: z.string().nullable(),
|
|
68
|
-
github: z.string().url().nullable(),
|
|
69
|
-
keywords: z.array(VetraBuilderPackageKeywordSchema()),
|
|
70
|
-
name: z.string(),
|
|
71
|
-
npm: z.string().url().nullable(),
|
|
72
|
-
});
|
|
73
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PHDocument } from "document-model";
|
|
2
|
-
import type { VetraPackageAction } from "./actions.js";
|
|
3
|
-
import type { VetraPackagePHState } from "./ph-factories.js";
|
|
4
|
-
import type { VetraPackageState } from "./schema/types.js";
|
|
5
|
-
export { z } from "./schema/index.js";
|
|
6
|
-
export type * from "./schema/types.js";
|
|
7
|
-
type VetraPackageLocalState = Record<PropertyKey, never>;
|
|
8
|
-
export type VetraPackageDocument = PHDocument<VetraPackagePHState>;
|
|
9
|
-
export type { VetraPackageState, VetraPackageLocalState, VetraPackageAction };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { z } from "./schema/index.js";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type CreateDocument, type CreateState, type LoadFromFile, type LoadFromInput } from "document-model";
|
|
2
|
-
import { type VetraPackageState, type VetraPackageLocalState } from "./types.js";
|
|
3
|
-
import { VetraPackagePHState } from "./ph-factories.js";
|
|
4
|
-
export declare const initialGlobalState: VetraPackageState;
|
|
5
|
-
export declare const initialLocalState: VetraPackageLocalState;
|
|
6
|
-
export declare const createState: CreateState<VetraPackagePHState>;
|
|
7
|
-
export declare const createDocument: CreateDocument<VetraPackagePHState>;
|
|
8
|
-
export declare const saveToFile: (document: any, path: string, name?: string) => Promise<string>;
|
|
9
|
-
export declare const saveToFileHandle: (document: any, input: any) => Promise<void>;
|
|
10
|
-
export declare const loadFromFile: LoadFromFile<VetraPackagePHState>;
|
|
11
|
-
export declare const loadFromInput: LoadFromInput<VetraPackagePHState>;
|
|
12
|
-
declare const utils: {
|
|
13
|
-
fileExtension: string;
|
|
14
|
-
createState: CreateState<VetraPackagePHState>;
|
|
15
|
-
createDocument: CreateDocument<VetraPackagePHState>;
|
|
16
|
-
saveToFile: (document: any, path: string, name?: string) => Promise<string>;
|
|
17
|
-
saveToFileHandle: (document: any, input: any) => Promise<void>;
|
|
18
|
-
loadFromFile: LoadFromFile<VetraPackagePHState>;
|
|
19
|
-
loadFromInput: LoadFromInput<VetraPackagePHState>;
|
|
20
|
-
};
|
|
21
|
-
export default utils;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { baseCreateDocument, baseSaveToFile, baseSaveToFileHandle, baseLoadFromFile, baseLoadFromInput, defaultBaseState, generateId, } from "document-model";
|
|
2
|
-
import { reducer } from "./reducer.js";
|
|
3
|
-
export const initialGlobalState = {
|
|
4
|
-
name: "",
|
|
5
|
-
description: null,
|
|
6
|
-
category: null,
|
|
7
|
-
author: {
|
|
8
|
-
name: "",
|
|
9
|
-
website: null,
|
|
10
|
-
},
|
|
11
|
-
keywords: [],
|
|
12
|
-
github: null,
|
|
13
|
-
npm: null,
|
|
14
|
-
};
|
|
15
|
-
export const initialLocalState = {};
|
|
16
|
-
export const createState = (state) => {
|
|
17
|
-
return {
|
|
18
|
-
...defaultBaseState(),
|
|
19
|
-
global: { ...initialGlobalState, ...(state?.global ?? {}) },
|
|
20
|
-
local: { ...initialLocalState, ...(state?.local ?? {}) },
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export const createDocument = (state) => {
|
|
24
|
-
const document = baseCreateDocument(createState, state);
|
|
25
|
-
document.header.documentType = "powerhouse/vetra/package";
|
|
26
|
-
// for backwards compatibility, but this is NOT a valid signed document id
|
|
27
|
-
document.header.id = generateId();
|
|
28
|
-
return document;
|
|
29
|
-
};
|
|
30
|
-
export const saveToFile = (document, path, name) => {
|
|
31
|
-
return baseSaveToFile(document, path, "phvp", name);
|
|
32
|
-
};
|
|
33
|
-
export const saveToFileHandle = (document, input) => {
|
|
34
|
-
return baseSaveToFileHandle(document, input);
|
|
35
|
-
};
|
|
36
|
-
export const loadFromFile = (path) => {
|
|
37
|
-
return baseLoadFromFile(path, reducer);
|
|
38
|
-
};
|
|
39
|
-
export const loadFromInput = (input) => {
|
|
40
|
-
return baseLoadFromInput(input, reducer);
|
|
41
|
-
};
|
|
42
|
-
const utils = {
|
|
43
|
-
fileExtension: "phvp",
|
|
44
|
-
createState,
|
|
45
|
-
createDocument,
|
|
46
|
-
saveToFile,
|
|
47
|
-
saveToFileHandle,
|
|
48
|
-
loadFromFile,
|
|
49
|
-
loadFromInput,
|
|
50
|
-
};
|
|
51
|
-
export default utils;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a scaffold file meant for customization.
|
|
3
|
-
* Delete the file and run the code generator again to have it reset
|
|
4
|
-
*/
|
|
5
|
-
import { type DocumentModelModule } from "document-model";
|
|
6
|
-
import { reducer } from "./gen/reducer.js";
|
|
7
|
-
import { documentModel } from "./gen/document-model.js";
|
|
8
|
-
import type { VetraPackagePHState } from "./gen/ph-factories.js";
|
|
9
|
-
declare const utils: {
|
|
10
|
-
fileExtension: string;
|
|
11
|
-
createState: import("document-model").CreateState<VetraPackagePHState>;
|
|
12
|
-
createDocument: import("document-model").CreateDocument<VetraPackagePHState>;
|
|
13
|
-
saveToFile: (document: any, path: string, name?: string) => Promise<string>;
|
|
14
|
-
saveToFileHandle: (document: any, input: any) => Promise<void>;
|
|
15
|
-
loadFromFile: import("document-model").LoadFromFile<VetraPackagePHState>;
|
|
16
|
-
loadFromInput: import("document-model").LoadFromInput<VetraPackagePHState>;
|
|
17
|
-
};
|
|
18
|
-
declare const actions: {
|
|
19
|
-
setPackageName: (input: import("./index.js").SetPackageNameInput) => import("./gen/actions.js").SetPackageNameAction;
|
|
20
|
-
setPackageDescription: (input: import("./index.js").SetPackageDescriptionInput) => import("./gen/actions.js").SetPackageDescriptionAction;
|
|
21
|
-
setPackageCategory: (input: import("./index.js").SetPackageCategoryInput) => import("./gen/actions.js").SetPackageCategoryAction;
|
|
22
|
-
setPackageGithub: (input: import("./index.js").SetPackageGithubInput) => import("./gen/actions.js").SetPackageGithubAction;
|
|
23
|
-
setPackageNpm: (input: import("./index.js").SetPackageNpmInput) => import("./gen/actions.js").SetPackageNpmAction;
|
|
24
|
-
setAuthor: (input: import("./index.js").SetAuthorInput) => import("./gen/actions.js").SetAuthorAction;
|
|
25
|
-
addKeywords: (input: import("./index.js").AddKeywordsInput) => import("./gen/actions.js").AddKeywordsAction;
|
|
26
|
-
removeKeywords: (input: import("./index.js").RemoveKeywordsInput) => import("./gen/actions.js").RemoveKeywordsAction;
|
|
27
|
-
};
|
|
28
|
-
export declare const module: DocumentModelModule<VetraPackagePHState>;
|
|
29
|
-
export { reducer, actions, utils, documentModel };
|
|
30
|
-
export * from "./gen/types.js";
|
|
31
|
-
export * from "./src/utils.js";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a scaffold file meant for customization.
|
|
3
|
-
* Delete the file and run the code generator again to have it reset
|
|
4
|
-
*/
|
|
5
|
-
import { actions as BaseActions, } from "document-model";
|
|
6
|
-
import { actions as VetraPackageActions } from "./gen/index.js";
|
|
7
|
-
import { reducer } from "./gen/reducer.js";
|
|
8
|
-
import { documentModel } from "./gen/document-model.js";
|
|
9
|
-
import genUtils from "./gen/utils.js";
|
|
10
|
-
import * as customUtils from "./src/utils.js";
|
|
11
|
-
const utils = { ...genUtils, ...customUtils };
|
|
12
|
-
const actions = { ...BaseActions, ...VetraPackageActions };
|
|
13
|
-
export const module = {
|
|
14
|
-
reducer,
|
|
15
|
-
actions,
|
|
16
|
-
utils,
|
|
17
|
-
documentModel,
|
|
18
|
-
};
|
|
19
|
-
export { reducer, actions, utils, documentModel };
|
|
20
|
-
export * from "./gen/types.js";
|
|
21
|
-
export * from "./src/utils.js";
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export const reducer = {
|
|
2
|
-
setPackageNameOperation(state, action, dispatch) {
|
|
3
|
-
// TODO: Implement "setPackageNameOperation" reducer
|
|
4
|
-
throw new Error('Reducer "setPackageNameOperation" not yet implemented');
|
|
5
|
-
},
|
|
6
|
-
setPackageDescriptionOperation(state, action, dispatch) {
|
|
7
|
-
// TODO: Implement "setPackageDescriptionOperation" reducer
|
|
8
|
-
throw new Error('Reducer "setPackageDescriptionOperation" not yet implemented');
|
|
9
|
-
},
|
|
10
|
-
setPackageCategoryOperation(state, action, dispatch) {
|
|
11
|
-
// TODO: Implement "setPackageCategoryOperation" reducer
|
|
12
|
-
throw new Error('Reducer "setPackageCategoryOperation" not yet implemented');
|
|
13
|
-
},
|
|
14
|
-
setPackageGithubOperation(state, action, dispatch) {
|
|
15
|
-
// TODO: Implement "setPackageGithubOperation" reducer
|
|
16
|
-
throw new Error('Reducer "setPackageGithubOperation" not yet implemented');
|
|
17
|
-
},
|
|
18
|
-
setPackageNpmOperation(state, action, dispatch) {
|
|
19
|
-
// TODO: Implement "setPackageNpmOperation" reducer
|
|
20
|
-
throw new Error('Reducer "setPackageNpmOperation" not yet implemented');
|
|
21
|
-
},
|
|
22
|
-
setAuthorOperation(state, action, dispatch) {
|
|
23
|
-
// TODO: Implement "setAuthorOperation" reducer
|
|
24
|
-
throw new Error('Reducer "setAuthorOperation" not yet implemented');
|
|
25
|
-
},
|
|
26
|
-
addKeywordsOperation(state, action, dispatch) {
|
|
27
|
-
// TODO: Implement "addKeywordsOperation" reducer
|
|
28
|
-
throw new Error('Reducer "addKeywordsOperation" not yet implemented');
|
|
29
|
-
},
|
|
30
|
-
removeKeywordsOperation(state, action, dispatch) {
|
|
31
|
-
// TODO: Implement "removeKeywordsOperation" reducer
|
|
32
|
-
throw new Error('Reducer "removeKeywordsOperation" not yet implemented');
|
|
33
|
-
}
|
|
34
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a scaffold file meant for customization:
|
|
3
|
-
* - change it by adding new tests or modifying the existing ones
|
|
4
|
-
*/
|
|
5
|
-
import { describe, it, expect } from 'vitest';
|
|
6
|
-
import utils, { initialGlobalState, initialLocalState } from '../../gen/utils.js';
|
|
7
|
-
describe('Vetra Package Document Model', () => {
|
|
8
|
-
it('should create a new Vetra Package document', () => {
|
|
9
|
-
const document = utils.createDocument();
|
|
10
|
-
expect(document).toBeDefined();
|
|
11
|
-
expect(document.header.documentType).toBe('powerhouse/vetra/package');
|
|
12
|
-
});
|
|
13
|
-
it('should create a new Vetra Package document with a valid initial state', () => {
|
|
14
|
-
const document = utils.createDocument();
|
|
15
|
-
expect(document.state.global).toStrictEqual(initialGlobalState);
|
|
16
|
-
expect(document.state.local).toStrictEqual(initialLocalState);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a scaffold file meant for customization:
|
|
3
|
-
* - change it by adding new tests or modifying the existing ones
|
|
4
|
-
*/
|
|
5
|
-
import { describe, it, expect, beforeEach } from 'vitest';
|
|
6
|
-
import { generateMock } from '@powerhousedao/codegen';
|
|
7
|
-
import utils from '../../gen/utils.js';
|
|
8
|
-
import { z, } from '../../gen/schema/index.js';
|
|
9
|
-
import { reducer } from '../../gen/reducer.js';
|
|
10
|
-
import * as creators from '../../gen/meta/creators.js';
|
|
11
|
-
describe('Meta Operations', () => {
|
|
12
|
-
let document;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
document = utils.createDocument();
|
|
15
|
-
});
|
|
16
|
-
it('should handle setPackageName operation', () => {
|
|
17
|
-
const input = generateMock(z.SetPackageNameInputSchema());
|
|
18
|
-
const updatedDocument = reducer(document, creators.setPackageName(input));
|
|
19
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
20
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_PACKAGE_NAME');
|
|
21
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
22
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
23
|
-
});
|
|
24
|
-
it('should handle setPackageDescription operation', () => {
|
|
25
|
-
const input = generateMock(z.SetPackageDescriptionInputSchema());
|
|
26
|
-
const updatedDocument = reducer(document, creators.setPackageDescription(input));
|
|
27
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
28
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_PACKAGE_DESCRIPTION');
|
|
29
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
30
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
31
|
-
});
|
|
32
|
-
it('should handle setPackageCategory operation', () => {
|
|
33
|
-
const input = generateMock(z.SetPackageCategoryInputSchema());
|
|
34
|
-
const updatedDocument = reducer(document, creators.setPackageCategory(input));
|
|
35
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
36
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_PACKAGE_CATEGORY');
|
|
37
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
38
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
39
|
-
});
|
|
40
|
-
it('should handle setPackageGithub operation', () => {
|
|
41
|
-
const input = generateMock(z.SetPackageGithubInputSchema());
|
|
42
|
-
const updatedDocument = reducer(document, creators.setPackageGithub(input));
|
|
43
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
44
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_PACKAGE_GITHUB');
|
|
45
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
46
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
47
|
-
});
|
|
48
|
-
it('should handle setPackageNpm operation', () => {
|
|
49
|
-
const input = generateMock(z.SetPackageNpmInputSchema());
|
|
50
|
-
const updatedDocument = reducer(document, creators.setPackageNpm(input));
|
|
51
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
52
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_PACKAGE_NPM');
|
|
53
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
54
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
55
|
-
});
|
|
56
|
-
it('should handle setAuthor operation', () => {
|
|
57
|
-
const input = generateMock(z.SetAuthorInputSchema());
|
|
58
|
-
const updatedDocument = reducer(document, creators.setAuthor(input));
|
|
59
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
60
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_AUTHOR');
|
|
61
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
62
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
63
|
-
});
|
|
64
|
-
it('should handle addKeywords operation', () => {
|
|
65
|
-
const input = generateMock(z.AddKeywordsInputSchema());
|
|
66
|
-
const updatedDocument = reducer(document, creators.addKeywords(input));
|
|
67
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
68
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('ADD_KEYWORDS');
|
|
69
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
70
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
71
|
-
});
|
|
72
|
-
it('should handle removeKeywords operation', () => {
|
|
73
|
-
const input = generateMock(z.RemoveKeywordsInputSchema());
|
|
74
|
-
const updatedDocument = reducer(document, creators.removeKeywords(input));
|
|
75
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
76
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('REMOVE_KEYWORDS');
|
|
77
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
78
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|