@powerhousedao/vetra-builder-package 0.0.32 → 0.0.34
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/components/ProfileSection.d.ts +4 -10
- package/dist/editors/builder-team-editor/components/ProfileSection.js +66 -2
- package/dist/editors/builder-team-editor/config.js +10 -10
- package/dist/editors/builder-team-editor/editor.js +1 -1
- package/dist/scripts/upload-to-drive.d.ts +13 -0
- package/dist/scripts/upload-to-drive.js +261 -0
- package/dist/style.css +1 -1
- package/package.json +4 -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,174 +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 AddAuthorizationInput = {
|
|
138
|
-
audience?: InputMaybe<Scalars["String"]["input"]>;
|
|
139
|
-
expiry?: InputMaybe<Scalars["Int"]["input"]>;
|
|
140
|
-
/** Add your inputs here */
|
|
141
|
-
id: Scalars["OID"]["input"];
|
|
142
|
-
issuer: Scalars["String"]["input"];
|
|
143
|
-
subject: Scalars["String"]["input"];
|
|
144
|
-
};
|
|
145
|
-
export type RenownAuthorization = {
|
|
146
|
-
audience: Maybe<Scalars["String"]["output"]>;
|
|
147
|
-
expiry: Maybe<Scalars["Int"]["output"]>;
|
|
148
|
-
id: Scalars["OID"]["output"];
|
|
149
|
-
issuer: Scalars["String"]["output"];
|
|
150
|
-
subject: Scalars["String"]["output"];
|
|
151
|
-
};
|
|
152
|
-
export type RenownProfileState = {
|
|
153
|
-
authorizations: Array<RenownAuthorization>;
|
|
154
|
-
ethAddress: Maybe<Scalars["EthereumAddress"]["output"]>;
|
|
155
|
-
userImage: Maybe<Scalars["String"]["output"]>;
|
|
156
|
-
/** Add your global state fields here */
|
|
157
|
-
username: Maybe<Scalars["String"]["output"]>;
|
|
158
|
-
};
|
|
159
|
-
export type RevokeAuthorizationInput = {
|
|
160
|
-
/** Add your inputs here */
|
|
161
|
-
authorizationId: Scalars["OID"]["input"];
|
|
162
|
-
};
|
|
163
|
-
export type SetEthAddressInput = {
|
|
164
|
-
/** Add your inputs here */
|
|
165
|
-
ethAddress: Scalars["EthereumAddress"]["input"];
|
|
166
|
-
};
|
|
167
|
-
export type SetUserImageInput = {
|
|
168
|
-
/** Add your inputs here */
|
|
169
|
-
userImage?: InputMaybe<Scalars["String"]["input"]>;
|
|
170
|
-
};
|
|
171
|
-
export type SetUsernameInput = {
|
|
172
|
-
/** Add your inputs here */
|
|
173
|
-
username: Scalars["String"]["input"];
|
|
174
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { AddAuthorizationInput, RenownAuthorization, RenownProfileState, RevokeAuthorizationInput, SetEthAddressInput, SetUserImageInput, SetUsernameInput } 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 AddAuthorizationInputSchema(): z.ZodObject<Properties<AddAuthorizationInput>>;
|
|
10
|
-
export declare function RenownAuthorizationSchema(): z.ZodObject<Properties<RenownAuthorization>>;
|
|
11
|
-
export declare function RenownProfileStateSchema(): z.ZodObject<Properties<RenownProfileState>>;
|
|
12
|
-
export declare function RevokeAuthorizationInputSchema(): z.ZodObject<Properties<RevokeAuthorizationInput>>;
|
|
13
|
-
export declare function SetEthAddressInputSchema(): z.ZodObject<Properties<SetEthAddressInput>>;
|
|
14
|
-
export declare function SetUserImageInputSchema(): z.ZodObject<Properties<SetUserImageInput>>;
|
|
15
|
-
export declare function SetUsernameInputSchema(): z.ZodObject<Properties<SetUsernameInput>>;
|
|
16
|
-
export {};
|
|
@@ -1,62 +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 AddAuthorizationInputSchema() {
|
|
7
|
-
return z.object({
|
|
8
|
-
audience: z.string().nullish(),
|
|
9
|
-
expiry: z.number().nullish(),
|
|
10
|
-
id: z.string(),
|
|
11
|
-
issuer: z.string(),
|
|
12
|
-
subject: z.string(),
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
export function RenownAuthorizationSchema() {
|
|
16
|
-
return z.object({
|
|
17
|
-
__typename: z.literal("RenownAuthorization").optional(),
|
|
18
|
-
audience: z.string().nullable(),
|
|
19
|
-
expiry: z.number().nullable(),
|
|
20
|
-
id: z.string(),
|
|
21
|
-
issuer: z.string(),
|
|
22
|
-
subject: z.string(),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
export function RenownProfileStateSchema() {
|
|
26
|
-
return z.object({
|
|
27
|
-
__typename: z.literal("RenownProfileState").optional(),
|
|
28
|
-
authorizations: z.array(RenownAuthorizationSchema()),
|
|
29
|
-
ethAddress: z
|
|
30
|
-
.string()
|
|
31
|
-
.regex(/^0x[a-fA-F0-9]{40}$/, {
|
|
32
|
-
message: "Invalid Ethereum address format",
|
|
33
|
-
})
|
|
34
|
-
.nullable(),
|
|
35
|
-
userImage: z.string().nullable(),
|
|
36
|
-
username: z.string().nullable(),
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
export function RevokeAuthorizationInputSchema() {
|
|
40
|
-
return z.object({
|
|
41
|
-
authorizationId: z.string(),
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
export function SetEthAddressInputSchema() {
|
|
45
|
-
return z.object({
|
|
46
|
-
ethAddress: z
|
|
47
|
-
.string()
|
|
48
|
-
.regex(/^0x[a-fA-F0-9]{40}$/, {
|
|
49
|
-
message: "Invalid Ethereum address format",
|
|
50
|
-
}),
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
export function SetUserImageInputSchema() {
|
|
54
|
-
return z.object({
|
|
55
|
-
userImage: z.string().nullish(),
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
export function SetUsernameInputSchema() {
|
|
59
|
-
return z.object({
|
|
60
|
-
username: z.string(),
|
|
61
|
-
});
|
|
62
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PHDocument } from "document-model";
|
|
2
|
-
import type { RenownProfileAction } from "./actions.js";
|
|
3
|
-
import type { RenownProfilePHState } from "./ph-factories.js";
|
|
4
|
-
import type { RenownProfileState } from "./schema/types.js";
|
|
5
|
-
export { z } from "./schema/index.js";
|
|
6
|
-
export type * from "./schema/types.js";
|
|
7
|
-
type RenownProfileLocalState = Record<PropertyKey, never>;
|
|
8
|
-
export type RenownProfileDocument = PHDocument<RenownProfilePHState>;
|
|
9
|
-
export type { RenownProfileState, RenownProfileLocalState, RenownProfileAction, };
|
|
@@ -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 RenownProfileState, type RenownProfileLocalState } from "./types.js";
|
|
3
|
-
import { RenownProfilePHState } from "./ph-factories.js";
|
|
4
|
-
export declare const initialGlobalState: RenownProfileState;
|
|
5
|
-
export declare const initialLocalState: RenownProfileLocalState;
|
|
6
|
-
export declare const createState: CreateState<RenownProfilePHState>;
|
|
7
|
-
export declare const createDocument: CreateDocument<RenownProfilePHState>;
|
|
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<RenownProfilePHState>;
|
|
11
|
-
export declare const loadFromInput: LoadFromInput<RenownProfilePHState>;
|
|
12
|
-
declare const utils: {
|
|
13
|
-
fileExtension: string;
|
|
14
|
-
createState: CreateState<RenownProfilePHState>;
|
|
15
|
-
createDocument: CreateDocument<RenownProfilePHState>;
|
|
16
|
-
saveToFile: (document: any, path: string, name?: string) => Promise<string>;
|
|
17
|
-
saveToFileHandle: (document: any, input: any) => Promise<void>;
|
|
18
|
-
loadFromFile: LoadFromFile<RenownProfilePHState>;
|
|
19
|
-
loadFromInput: LoadFromInput<RenownProfilePHState>;
|
|
20
|
-
};
|
|
21
|
-
export default utils;
|
|
@@ -1,45 +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
|
-
username: null,
|
|
5
|
-
ethAddress: null,
|
|
6
|
-
userImage: null,
|
|
7
|
-
authorizations: [],
|
|
8
|
-
};
|
|
9
|
-
export const initialLocalState = {};
|
|
10
|
-
export const createState = (state) => {
|
|
11
|
-
return {
|
|
12
|
-
...defaultBaseState(),
|
|
13
|
-
global: { ...initialGlobalState, ...(state?.global ?? {}) },
|
|
14
|
-
local: { ...initialLocalState, ...(state?.local ?? {}) },
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export const createDocument = (state) => {
|
|
18
|
-
const document = baseCreateDocument(createState, state);
|
|
19
|
-
document.header.documentType = "powerhouse/renown-profile";
|
|
20
|
-
// for backwards compatibility, but this is NOT a valid signed document id
|
|
21
|
-
document.header.id = generateId();
|
|
22
|
-
return document;
|
|
23
|
-
};
|
|
24
|
-
export const saveToFile = (document, path, name) => {
|
|
25
|
-
return baseSaveToFile(document, path, "renown-profile", name);
|
|
26
|
-
};
|
|
27
|
-
export const saveToFileHandle = (document, input) => {
|
|
28
|
-
return baseSaveToFileHandle(document, input);
|
|
29
|
-
};
|
|
30
|
-
export const loadFromFile = (path) => {
|
|
31
|
-
return baseLoadFromFile(path, reducer);
|
|
32
|
-
};
|
|
33
|
-
export const loadFromInput = (input) => {
|
|
34
|
-
return baseLoadFromInput(input, reducer);
|
|
35
|
-
};
|
|
36
|
-
const utils = {
|
|
37
|
-
fileExtension: "renown-profile",
|
|
38
|
-
createState,
|
|
39
|
-
createDocument,
|
|
40
|
-
saveToFile,
|
|
41
|
-
saveToFileHandle,
|
|
42
|
-
loadFromFile,
|
|
43
|
-
loadFromInput,
|
|
44
|
-
};
|
|
45
|
-
export default utils;
|
|
@@ -1,28 +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 { RenownProfilePHState } from "./gen/ph-factories.js";
|
|
9
|
-
declare const utils: {
|
|
10
|
-
fileExtension: string;
|
|
11
|
-
createState: import("document-model").CreateState<RenownProfilePHState>;
|
|
12
|
-
createDocument: import("document-model").CreateDocument<RenownProfilePHState>;
|
|
13
|
-
saveToFile: (document: any, path: string, name?: string) => Promise<string>;
|
|
14
|
-
saveToFileHandle: (document: any, input: any) => Promise<void>;
|
|
15
|
-
loadFromFile: import("document-model").LoadFromFile<RenownProfilePHState>;
|
|
16
|
-
loadFromInput: import("document-model").LoadFromInput<RenownProfilePHState>;
|
|
17
|
-
};
|
|
18
|
-
declare const actions: {
|
|
19
|
-
setUsername: (input: import("./index.js").SetUsernameInput) => import("./gen/actions.js").SetUsernameAction;
|
|
20
|
-
setEthAddress: (input: import("./index.js").SetEthAddressInput) => import("./gen/actions.js").SetEthAddressAction;
|
|
21
|
-
setUserImage: (input: import("./index.js").SetUserImageInput) => import("./gen/actions.js").SetUserImageAction;
|
|
22
|
-
addAuthorization: (input: import("./index.js").AddAuthorizationInput) => import("./gen/actions.js").AddAuthorizationAction;
|
|
23
|
-
revokeAuthorization: (input: import("./index.js").RevokeAuthorizationInput) => import("./gen/actions.js").RevokeAuthorizationAction;
|
|
24
|
-
};
|
|
25
|
-
export declare const module: DocumentModelModule<RenownProfilePHState>;
|
|
26
|
-
export { reducer, actions, utils, documentModel };
|
|
27
|
-
export * from "./gen/types.js";
|
|
28
|
-
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 RenownProfileActions } 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, ...RenownProfileActions };
|
|
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,8 +0,0 @@
|
|
|
1
|
-
export const reducer = {
|
|
2
|
-
addAuthorizationOperation(state, action, dispatch) {
|
|
3
|
-
state.authorizations.push(action.input);
|
|
4
|
-
},
|
|
5
|
-
revokeAuthorizationOperation(state, action, dispatch) {
|
|
6
|
-
state.authorizations = state.authorizations.filter((authorization) => authorization.id !== action.input.authorizationId);
|
|
7
|
-
},
|
|
8
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export const reducer = {
|
|
2
|
-
setUsernameOperation(state, action, dispatch) {
|
|
3
|
-
state.username = action.input.username;
|
|
4
|
-
},
|
|
5
|
-
setEthAddressOperation(state, action, dispatch) {
|
|
6
|
-
state.ethAddress = action.input.ethAddress;
|
|
7
|
-
},
|
|
8
|
-
setUserImageOperation(state, action, dispatch) {
|
|
9
|
-
state.userImage = action.input.userImage ?? null;
|
|
10
|
-
},
|
|
11
|
-
};
|
|
@@ -1,24 +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/authorization/creators.js";
|
|
11
|
-
describe("Authorization Operations", () => {
|
|
12
|
-
let document;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
document = utils.createDocument();
|
|
15
|
-
});
|
|
16
|
-
it("should handle addAuthorization operation", () => {
|
|
17
|
-
const input = generateMock(z.AddAuthorizationInputSchema());
|
|
18
|
-
const updatedDocument = reducer(document, creators.addAuthorization(input));
|
|
19
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
20
|
-
expect(updatedDocument.operations.global[0].action.type).toBe("ADD_AUTHORIZATION");
|
|
21
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
22
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -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("Renown Profile Document Model", () => {
|
|
8
|
-
it("should create a new Renown Profile document", () => {
|
|
9
|
-
const document = utils.createDocument();
|
|
10
|
-
expect(document).toBeDefined();
|
|
11
|
-
expect(document.header.documentType).toBe("powerhouse/renown-profile");
|
|
12
|
-
});
|
|
13
|
-
it("should create a new Renown Profile 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,24 +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/profile/creators.js";
|
|
11
|
-
describe("Profile Operations", () => {
|
|
12
|
-
let document;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
document = utils.createDocument();
|
|
15
|
-
});
|
|
16
|
-
it("should handle setUsername operation", () => {
|
|
17
|
-
const input = generateMock(z.SetUsernameInputSchema());
|
|
18
|
-
const updatedDocument = reducer(document, creators.setUsername(input));
|
|
19
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
20
|
-
expect(updatedDocument.operations.global[0].action.type).toBe("SET_USERNAME");
|
|
21
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
22
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./meta/actions.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./meta/creators.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./meta/creators.js";
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
export const documentModel = {
|
|
2
|
-
author: {
|
|
3
|
-
name: "Powerhouse Inc.",
|
|
4
|
-
website: "https://powerhouse.inc",
|
|
5
|
-
},
|
|
6
|
-
description: "This document model contains all required data fields to describe a package in vetra.",
|
|
7
|
-
extension: "phvp",
|
|
8
|
-
id: "powerhouse/vetra/package",
|
|
9
|
-
name: "VetraPackage",
|
|
10
|
-
specifications: [
|
|
11
|
-
{
|
|
12
|
-
changeLog: [],
|
|
13
|
-
modules: [
|
|
14
|
-
{
|
|
15
|
-
description: "",
|
|
16
|
-
id: "949be2ec-48c0-4dbc-8367-91cc9d991ff0",
|
|
17
|
-
name: "meta",
|
|
18
|
-
operations: [
|
|
19
|
-
{
|
|
20
|
-
description: "",
|
|
21
|
-
errors: [],
|
|
22
|
-
examples: [],
|
|
23
|
-
id: "05268f4e-b5c5-4cce-b825-8d10d73a8911",
|
|
24
|
-
name: "SET_PACKAGE_NAME",
|
|
25
|
-
reducer: "",
|
|
26
|
-
schema: 'input SetPackageNameInput {\n "Add your inputs here"\n name: String!\n}',
|
|
27
|
-
scope: "global",
|
|
28
|
-
template: "",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
description: "",
|
|
32
|
-
errors: [],
|
|
33
|
-
examples: [],
|
|
34
|
-
id: "ef8514fb-ccaf-4a74-a23c-2e080ee1199b",
|
|
35
|
-
name: "SET_PACKAGE_DESCRIPTION",
|
|
36
|
-
reducer: "",
|
|
37
|
-
schema: 'input SetPackageDescriptionInput {\n "Add your inputs here"\n description: String!\n}',
|
|
38
|
-
scope: "global",
|
|
39
|
-
template: "",
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
description: "",
|
|
43
|
-
errors: [],
|
|
44
|
-
examples: [],
|
|
45
|
-
id: "15529bdd-48a2-434a-922f-8d6384c2c61d",
|
|
46
|
-
name: "SET_PACKAGE_CATEGORY",
|
|
47
|
-
reducer: "",
|
|
48
|
-
schema: 'input SetPackageCategoryInput {\n "Add your inputs here"\n category: String!\n}',
|
|
49
|
-
scope: "global",
|
|
50
|
-
template: "",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
description: "",
|
|
54
|
-
errors: [],
|
|
55
|
-
examples: [],
|
|
56
|
-
id: "0d56a511-af73-4ef9-af81-a71287d60cd7",
|
|
57
|
-
name: "SET_PACKAGE_GITHUB",
|
|
58
|
-
reducer: "",
|
|
59
|
-
schema: 'input SetPackageGithubInput {\n "Add your inputs here"\n github: URL!\n}',
|
|
60
|
-
scope: "global",
|
|
61
|
-
template: "",
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
description: "",
|
|
65
|
-
errors: [],
|
|
66
|
-
examples: [],
|
|
67
|
-
id: "4173bc3a-9994-4206-8550-1091bc67f6e5",
|
|
68
|
-
name: "SET_PACKAGE_NPM",
|
|
69
|
-
reducer: "",
|
|
70
|
-
schema: 'input SetPackageNpmInput {\n "Add your inputs here"\n npm: URL!\n}',
|
|
71
|
-
scope: "global",
|
|
72
|
-
template: "",
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
description: "",
|
|
76
|
-
errors: [],
|
|
77
|
-
examples: [],
|
|
78
|
-
id: "e42fe70b-cdb8-4382-926e-66fac39f2329",
|
|
79
|
-
name: "SET_AUTHOR",
|
|
80
|
-
reducer: "",
|
|
81
|
-
schema: 'input SetAuthorInput {\n "Add your inputs here"\n name: String!\n website: URL\n}',
|
|
82
|
-
scope: "global",
|
|
83
|
-
template: "",
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
description: "",
|
|
87
|
-
errors: [],
|
|
88
|
-
examples: [],
|
|
89
|
-
id: "832d5f30-e9fe-4a75-94d3-80765b5dfdaa",
|
|
90
|
-
name: "ADD_KEYWORDS",
|
|
91
|
-
reducer: "",
|
|
92
|
-
schema: 'input AddKeywordsInput {\n "Add your inputs here"\n id: OID\n label: String!\n}',
|
|
93
|
-
scope: "global",
|
|
94
|
-
template: "",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
description: "",
|
|
98
|
-
errors: [],
|
|
99
|
-
examples: [],
|
|
100
|
-
id: "457784ee-8e78-4eb5-8f52-0265ef5303ba",
|
|
101
|
-
name: "REMOVE_KEYWORDS",
|
|
102
|
-
reducer: "",
|
|
103
|
-
schema: 'input RemoveKeywordsInput {\n "Add your inputs here"\n id: OID!\n}',
|
|
104
|
-
scope: "global",
|
|
105
|
-
template: "",
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
state: {
|
|
111
|
-
global: {
|
|
112
|
-
examples: [],
|
|
113
|
-
initialValue: '"{\\n \\"name\\": \\"\\",\\n \\"description\\": null,\\n \\"category\\": null,\\n \\"author\\": {\\n \\"name\\": \\"\\",\\n \\"website\\": null\\n },\\n \\"keywords\\": [],\\n \\"github\\": null,\\n \\"npm\\": null\\n}"',
|
|
114
|
-
schema: "type VetraPackageState {\n name: String!\n description: String\n category: String\n author: VetraBuilderPackageAuthor!\n keywords: [VetraBuilderPackageKeyword!]!\n github: URL\n npm: URL\n}\n\ntype VetraBuilderPackageAuthor {\n name: String!\n website: URL\n}\n\ntype VetraBuilderPackageKeyword {\n id: OID!\n label: String!\n}",
|
|
115
|
-
},
|
|
116
|
-
local: {
|
|
117
|
-
examples: [],
|
|
118
|
-
initialValue: '""',
|
|
119
|
-
schema: "",
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
version: 1,
|
|
123
|
-
},
|
|
124
|
-
],
|
|
125
|
-
};
|