@powerhousedao/vetra-builder-package 0.0.31 → 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 -8
- 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,52 +0,0 @@
|
|
|
1
|
-
import { toPascalCase } from "document-drive/utils/misc";
|
|
2
|
-
export const reducer = {
|
|
3
|
-
addSpaceOperation(state, action, dispatch) {
|
|
4
|
-
const { title, description } = action.input;
|
|
5
|
-
state.spaces.push({
|
|
6
|
-
id: toPascalCase(title),
|
|
7
|
-
title: title ?? "",
|
|
8
|
-
description: description ?? "",
|
|
9
|
-
packages: [],
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
deleteSpaceOperation(state, action, dispatch) {
|
|
13
|
-
const { id } = action.input;
|
|
14
|
-
state.spaces = state.spaces.filter((space) => space.id !== id);
|
|
15
|
-
},
|
|
16
|
-
setSpaceTitleOperation(state, action, dispatch) {
|
|
17
|
-
const { id, newTitle } = action.input;
|
|
18
|
-
state.spaces.find((space) => space.id === id).title =
|
|
19
|
-
newTitle ?? state.spaces.find((space) => space.id === id).title;
|
|
20
|
-
},
|
|
21
|
-
setSpaceDescriptionOperation(state, action, dispatch) {
|
|
22
|
-
const { id, description } = action.input;
|
|
23
|
-
state.spaces.find((space) => space.id === id).description =
|
|
24
|
-
description ?? state.spaces.find((space) => space.id === id).description;
|
|
25
|
-
},
|
|
26
|
-
reorderSpacesOperation(state, action, dispatch) {
|
|
27
|
-
const { ids, insertAfter } = action.input;
|
|
28
|
-
// Remove the spaces being reordered from their current positions
|
|
29
|
-
const reorderedSpaces = state.spaces.filter((space) => ids.includes(space.id));
|
|
30
|
-
const remainingSpaces = state.spaces.filter((space) => !ids.includes(space.id));
|
|
31
|
-
if (insertAfter) {
|
|
32
|
-
// Find the insertAfter space index in remaining spaces
|
|
33
|
-
const insertAfterIndex = remainingSpaces.findIndex((space) => space.id === insertAfter);
|
|
34
|
-
if (insertAfterIndex !== -1) {
|
|
35
|
-
// Insert the reordered spaces after the insertAfter space
|
|
36
|
-
state.spaces = [
|
|
37
|
-
...remainingSpaces.slice(0, insertAfterIndex + 1),
|
|
38
|
-
...reorderedSpaces,
|
|
39
|
-
...remainingSpaces.slice(insertAfterIndex + 1),
|
|
40
|
-
];
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
// If insertAfter space not found, just append to the end
|
|
44
|
-
state.spaces = [...reorderedSpaces, ...remainingSpaces];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
// No insertAfter specified, just append to the end
|
|
49
|
-
state.spaces = [...reorderedSpaces, ...remainingSpaces];
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
};
|
|
@@ -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("Builder Account Document Model", () => {
|
|
8
|
-
it("should create a new Builder Account document", () => {
|
|
9
|
-
const document = utils.createDocument();
|
|
10
|
-
expect(document).toBeDefined();
|
|
11
|
-
expect(document.header.documentType).toBe("powerhouse/vetra/builder-account");
|
|
12
|
-
});
|
|
13
|
-
it("should create a new Builder Account 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,32 +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/members/creators.js';
|
|
11
|
-
describe('Members Operations', () => {
|
|
12
|
-
let document;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
document = utils.createDocument();
|
|
15
|
-
});
|
|
16
|
-
it('should handle addMember operation', () => {
|
|
17
|
-
const input = generateMock(z.AddMemberInputSchema());
|
|
18
|
-
const updatedDocument = reducer(document, creators.addMember(input));
|
|
19
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
20
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('ADD_MEMBER');
|
|
21
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
22
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
23
|
-
});
|
|
24
|
-
it('should handle removeMember operation', () => {
|
|
25
|
-
const input = generateMock(z.RemoveMemberInputSchema());
|
|
26
|
-
const updatedDocument = reducer(document, creators.removeMember(input));
|
|
27
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
28
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('REMOVE_MEMBER');
|
|
29
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
30
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
@@ -1,56 +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/packages/creators.js';
|
|
11
|
-
describe('Packages Operations', () => {
|
|
12
|
-
let document;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
document = utils.createDocument();
|
|
15
|
-
});
|
|
16
|
-
it('should handle addPackage operation', () => {
|
|
17
|
-
const input = generateMock(z.AddPackageInputSchema());
|
|
18
|
-
const updatedDocument = reducer(document, creators.addPackage(input));
|
|
19
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
20
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('ADD_PACKAGE');
|
|
21
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
22
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
23
|
-
});
|
|
24
|
-
it('should handle setPackageDriveId operation', () => {
|
|
25
|
-
const input = generateMock(z.SetPackageDriveIdInputSchema());
|
|
26
|
-
const updatedDocument = reducer(document, creators.setPackageDriveId(input));
|
|
27
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
28
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_PACKAGE_DRIVE_ID');
|
|
29
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
30
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
31
|
-
});
|
|
32
|
-
it('should handle updatePackage operation', () => {
|
|
33
|
-
const input = generateMock(z.UpdatePackageInputSchema());
|
|
34
|
-
const updatedDocument = reducer(document, creators.updatePackage(input));
|
|
35
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
36
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('UPDATE_PACKAGE');
|
|
37
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
38
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
39
|
-
});
|
|
40
|
-
it('should handle reorderPackages operation', () => {
|
|
41
|
-
const input = generateMock(z.ReorderPackagesInputSchema());
|
|
42
|
-
const updatedDocument = reducer(document, creators.reorderPackages(input));
|
|
43
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
44
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('REORDER_PACKAGES');
|
|
45
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
46
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
47
|
-
});
|
|
48
|
-
it('should handle deletePackage operation', () => {
|
|
49
|
-
const input = generateMock(z.DeletePackageInputSchema());
|
|
50
|
-
const updatedDocument = reducer(document, creators.deletePackage(input));
|
|
51
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
52
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('DELETE_PACKAGE');
|
|
53
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
54
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
@@ -1,56 +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 setLogo operation', () => {
|
|
17
|
-
const input = generateMock(z.SetLogoInputSchema());
|
|
18
|
-
const updatedDocument = reducer(document, creators.setLogo(input));
|
|
19
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
20
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_LOGO');
|
|
21
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
22
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
23
|
-
});
|
|
24
|
-
it('should handle setProfileName operation', () => {
|
|
25
|
-
const input = generateMock(z.SetProfileNameInputSchema());
|
|
26
|
-
const updatedDocument = reducer(document, creators.setProfileName(input));
|
|
27
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
28
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_PROFILE_NAME');
|
|
29
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
30
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
31
|
-
});
|
|
32
|
-
it('should handle setSlug operation', () => {
|
|
33
|
-
const input = generateMock(z.SetSlugInputSchema());
|
|
34
|
-
const updatedDocument = reducer(document, creators.setSlug(input));
|
|
35
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
36
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_SLUG');
|
|
37
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
38
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
39
|
-
});
|
|
40
|
-
it('should handle setProfileDescription operation', () => {
|
|
41
|
-
const input = generateMock(z.SetProfileDescriptionInputSchema());
|
|
42
|
-
const updatedDocument = reducer(document, creators.setProfileDescription(input));
|
|
43
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
44
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_PROFILE_DESCRIPTION');
|
|
45
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
46
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
47
|
-
});
|
|
48
|
-
it('should handle updateSocials operation', () => {
|
|
49
|
-
const input = generateMock(z.UpdateSocialsInputSchema());
|
|
50
|
-
const updatedDocument = reducer(document, creators.updateSocials(input));
|
|
51
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
52
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('UPDATE_SOCIALS');
|
|
53
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
54
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
@@ -1,56 +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/spaces/creators.js';
|
|
11
|
-
describe('Spaces Operations', () => {
|
|
12
|
-
let document;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
document = utils.createDocument();
|
|
15
|
-
});
|
|
16
|
-
it('should handle addSpace operation', () => {
|
|
17
|
-
const input = generateMock(z.AddSpaceInputSchema());
|
|
18
|
-
const updatedDocument = reducer(document, creators.addSpace(input));
|
|
19
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
20
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('ADD_SPACE');
|
|
21
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
22
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
23
|
-
});
|
|
24
|
-
it('should handle deleteSpace operation', () => {
|
|
25
|
-
const input = generateMock(z.DeleteSpaceInputSchema());
|
|
26
|
-
const updatedDocument = reducer(document, creators.deleteSpace(input));
|
|
27
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
28
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('DELETE_SPACE');
|
|
29
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
30
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
31
|
-
});
|
|
32
|
-
it('should handle setSpaceTitle operation', () => {
|
|
33
|
-
const input = generateMock(z.SetSpaceTitleInputSchema());
|
|
34
|
-
const updatedDocument = reducer(document, creators.setSpaceTitle(input));
|
|
35
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
36
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_SPACE_TITLE');
|
|
37
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
38
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
39
|
-
});
|
|
40
|
-
it('should handle setSpaceDescription operation', () => {
|
|
41
|
-
const input = generateMock(z.SetSpaceDescriptionInputSchema());
|
|
42
|
-
const updatedDocument = reducer(document, creators.setSpaceDescription(input));
|
|
43
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
44
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('SET_SPACE_DESCRIPTION');
|
|
45
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
46
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
47
|
-
});
|
|
48
|
-
it('should handle reorderSpaces operation', () => {
|
|
49
|
-
const input = generateMock(z.ReorderSpacesInputSchema());
|
|
50
|
-
const updatedDocument = reducer(document, creators.reorderSpaces(input));
|
|
51
|
-
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
52
|
-
expect(updatedDocument.operations.global[0].action.type).toBe('REORDER_SPACES');
|
|
53
|
-
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
54
|
-
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RenownProfileProfileAction } from "./profile/actions.js";
|
|
2
|
-
import type { RenownProfileAuthorizationAction } from "./authorization/actions.js";
|
|
3
|
-
export * from "./profile/actions.js";
|
|
4
|
-
export * from "./authorization/actions.js";
|
|
5
|
-
export type RenownProfileAction = RenownProfileProfileAction | RenownProfileAuthorizationAction;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Action } from "document-model";
|
|
2
|
-
import type { AddAuthorizationInput, RevokeAuthorizationInput } from "../types.js";
|
|
3
|
-
export type AddAuthorizationAction = Action & {
|
|
4
|
-
type: "ADD_AUTHORIZATION";
|
|
5
|
-
input: AddAuthorizationInput;
|
|
6
|
-
};
|
|
7
|
-
export type RevokeAuthorizationAction = Action & {
|
|
8
|
-
type: "REVOKE_AUTHORIZATION";
|
|
9
|
-
input: RevokeAuthorizationInput;
|
|
10
|
-
};
|
|
11
|
-
export type RenownProfileAuthorizationAction = AddAuthorizationAction | RevokeAuthorizationAction;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type AddAuthorizationInput, type RevokeAuthorizationInput } from "../types.js";
|
|
2
|
-
import { type AddAuthorizationAction, type RevokeAuthorizationAction } from "./actions.js";
|
|
3
|
-
export declare const addAuthorization: (input: AddAuthorizationInput) => AddAuthorizationAction;
|
|
4
|
-
export declare const revokeAuthorization: (input: RevokeAuthorizationInput) => RevokeAuthorizationAction;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { createAction } from "document-model";
|
|
2
|
-
import { z, } from "../types.js";
|
|
3
|
-
export const addAuthorization = (input) => createAction("ADD_AUTHORIZATION", { ...input }, undefined, z.AddAuthorizationInputSchema, "global");
|
|
4
|
-
export const revokeAuthorization = (input) => createAction("REVOKE_AUTHORIZATION", { ...input }, undefined, z.RevokeAuthorizationInputSchema, "global");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const errors: {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const errors = {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseDocumentClass } from "document-model";
|
|
2
|
-
import { RenownProfilePHState } from "../ph-factories.js";
|
|
3
|
-
import { type AddAuthorizationInput, type RevokeAuthorizationInput } from "../types.js";
|
|
4
|
-
export default class RenownProfile_Authorization extends BaseDocumentClass<RenownProfilePHState> {
|
|
5
|
-
addAuthorization(input: AddAuthorizationInput): this;
|
|
6
|
-
revokeAuthorization(input: RevokeAuthorizationInput): this;
|
|
7
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseDocumentClass } from "document-model";
|
|
2
|
-
import { addAuthorization, revokeAuthorization } from "./creators.js";
|
|
3
|
-
export default class RenownProfile_Authorization extends BaseDocumentClass {
|
|
4
|
-
addAuthorization(input) {
|
|
5
|
-
return this.dispatch(addAuthorization(input));
|
|
6
|
-
}
|
|
7
|
-
revokeAuthorization(input) {
|
|
8
|
-
return this.dispatch(revokeAuthorization(input));
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type SignalDispatch } from "document-model";
|
|
2
|
-
import { type AddAuthorizationAction, type RevokeAuthorizationAction } from "./actions.js";
|
|
3
|
-
import { type RenownProfileState } from "../types.js";
|
|
4
|
-
export interface RenownProfileAuthorizationOperations {
|
|
5
|
-
addAuthorizationOperation: (state: RenownProfileState, action: AddAuthorizationAction, dispatch?: SignalDispatch) => void;
|
|
6
|
-
revokeAuthorizationOperation: (state: RenownProfileState, action: RevokeAuthorizationAction, dispatch?: SignalDispatch) => void;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
export const documentModel = {
|
|
2
|
-
author: {
|
|
3
|
-
name: "Powerhouse Inc.",
|
|
4
|
-
website: "https://powerhouse.inc",
|
|
5
|
-
},
|
|
6
|
-
description: "A renown profile which contains a name, description of a renown user",
|
|
7
|
-
extension: "renown-profile",
|
|
8
|
-
id: "powerhouse/renown-profile",
|
|
9
|
-
name: "RenownProfile",
|
|
10
|
-
specifications: [
|
|
11
|
-
{
|
|
12
|
-
changeLog: [],
|
|
13
|
-
modules: [
|
|
14
|
-
{
|
|
15
|
-
description: "",
|
|
16
|
-
id: "cdd8d6b6-2cbf-46a2-bb81-7b5f12c177ab",
|
|
17
|
-
name: "profile",
|
|
18
|
-
operations: [
|
|
19
|
-
{
|
|
20
|
-
description: "sets the username of the profile",
|
|
21
|
-
errors: [],
|
|
22
|
-
examples: [],
|
|
23
|
-
id: "481a4057-e061-4cea-9a8b-223465b09ab3",
|
|
24
|
-
name: "SET_USERNAME",
|
|
25
|
-
reducer: "",
|
|
26
|
-
schema: 'input SetUsernameInput {\n "Add your inputs here"\n username: String!\n}',
|
|
27
|
-
scope: "global",
|
|
28
|
-
template: "",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
description: "sets the eth address",
|
|
32
|
-
errors: [],
|
|
33
|
-
examples: [],
|
|
34
|
-
id: "0e6ddb86-f9a0-4302-be8f-78f720b752e0",
|
|
35
|
-
name: "SET_ETH_ADDRESS",
|
|
36
|
-
reducer: "",
|
|
37
|
-
schema: 'input SetEthAddressInput {\n "Add your inputs here"\n ethAddress: EthereumAddress!\n}',
|
|
38
|
-
scope: "global",
|
|
39
|
-
template: "",
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
description: "sets the user image. provide an empty object for removing the existing",
|
|
43
|
-
errors: [],
|
|
44
|
-
examples: [],
|
|
45
|
-
id: "7d2ac96b-7229-4665-9fda-6b83fd68dcf9",
|
|
46
|
-
name: "SET_USER_IMAGE",
|
|
47
|
-
reducer: "",
|
|
48
|
-
schema: 'input SetUserImageInput {\n "Add your inputs here"\n userImage: String\n}',
|
|
49
|
-
scope: "global",
|
|
50
|
-
template: "",
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
description: "",
|
|
56
|
-
id: "fced3cb9-20d5-47de-939b-6d38c9816404",
|
|
57
|
-
name: "authorization",
|
|
58
|
-
operations: [
|
|
59
|
-
{
|
|
60
|
-
description: "",
|
|
61
|
-
errors: [],
|
|
62
|
-
examples: [],
|
|
63
|
-
id: "93f92fb8-e686-46ea-9c9e-6dac9290ee54",
|
|
64
|
-
name: "ADD_AUTHORIZATION",
|
|
65
|
-
reducer: "",
|
|
66
|
-
schema: 'input AddAuthorizationInput {\n "Add your inputs here"\n id: OID!\n audience: String\n issuer: String!\n subject: String!\n expiry: Int\n}',
|
|
67
|
-
scope: "global",
|
|
68
|
-
template: "",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
description: "",
|
|
72
|
-
errors: [],
|
|
73
|
-
examples: [],
|
|
74
|
-
id: "e68a806b-45f7-469c-b1aa-43743eac623c",
|
|
75
|
-
name: "REVOKE_AUTHORIZATION",
|
|
76
|
-
reducer: "",
|
|
77
|
-
schema: 'input RevokeAuthorizationInput {\n "Add your inputs here"\n authorizationId: OID!\n}',
|
|
78
|
-
scope: "global",
|
|
79
|
-
template: "",
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
state: {
|
|
85
|
-
global: {
|
|
86
|
-
examples: [],
|
|
87
|
-
initialValue: '"{\\n \\"username\\": null,\\n \\"ethAddress\\": null,\\n \\"userImage\\": null,\\n \\"authorizations\\": []\\n}"',
|
|
88
|
-
schema: 'type RenownProfileState {\n "Add your global state fields here"\n username: String\n ethAddress: EthereumAddress\n userImage: String\n authorizations: [RenownAuthorization!]!\n}\n\n# Issuer is ETH Address\n# Subject is the DID for Connect \n# Audience is the target ie did:web:staging.vetra.io\n# expiry \ntype RenownAuthorization {\n id: OID!\n audience: String\n issuer: String!\n subject: String!\n expiry: Int\n}',
|
|
89
|
-
},
|
|
90
|
-
local: {
|
|
91
|
-
examples: [],
|
|
92
|
-
initialValue: '""',
|
|
93
|
-
schema: "",
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
version: 1,
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from "./actions.js";
|
|
2
|
-
export * from "./document-model.js";
|
|
3
|
-
export * from "./object.js";
|
|
4
|
-
export * from "./types.js";
|
|
5
|
-
export * as actions from "./creators.js";
|
|
6
|
-
export type { RenownProfilePHState } from "./ph-factories.js";
|
|
7
|
-
export { createRenownProfileDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from "./actions.js";
|
|
2
|
-
export * from "./document-model.js";
|
|
3
|
-
export * from "./object.js";
|
|
4
|
-
export * from "./types.js";
|
|
5
|
-
export * as actions from "./creators.js";
|
|
6
|
-
export { createRenownProfileDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseDocumentClass, type SignalDispatch } from "document-model";
|
|
2
|
-
import { RenownProfilePHState } from "./ph-factories.js";
|
|
3
|
-
import RenownProfile_Profile from "./profile/object.js";
|
|
4
|
-
import RenownProfile_Authorization from "./authorization/object.js";
|
|
5
|
-
export * from "./profile/object.js";
|
|
6
|
-
export * from "./authorization/object.js";
|
|
7
|
-
interface RenownProfile extends RenownProfile_Profile, RenownProfile_Authorization {
|
|
8
|
-
}
|
|
9
|
-
declare class RenownProfile extends BaseDocumentClass<RenownProfilePHState> {
|
|
10
|
-
static fileExtension: string;
|
|
11
|
-
constructor(initialState?: Partial<RenownProfilePHState>, dispatch?: SignalDispatch);
|
|
12
|
-
saveToFile(path: string, name?: string): Promise<string>;
|
|
13
|
-
loadFromFile(path: string): Promise<void>;
|
|
14
|
-
static fromFile(path: string): Promise<RenownProfile>;
|
|
15
|
-
}
|
|
16
|
-
export { RenownProfile };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { BaseDocumentClass, applyMixins, } from "document-model";
|
|
2
|
-
import { reducer } from "./reducer.js";
|
|
3
|
-
import { createDocument } from "./utils.js";
|
|
4
|
-
import RenownProfile_Profile from "./profile/object.js";
|
|
5
|
-
import RenownProfile_Authorization from "./authorization/object.js";
|
|
6
|
-
export * from "./profile/object.js";
|
|
7
|
-
export * from "./authorization/object.js";
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
|
9
|
-
class RenownProfile extends BaseDocumentClass {
|
|
10
|
-
static fileExtension = "renown-profile";
|
|
11
|
-
constructor(initialState, dispatch) {
|
|
12
|
-
super(reducer, createDocument(initialState), dispatch);
|
|
13
|
-
}
|
|
14
|
-
saveToFile(path, name) {
|
|
15
|
-
return super.saveToFile(path, RenownProfile.fileExtension, name);
|
|
16
|
-
}
|
|
17
|
-
loadFromFile(path) {
|
|
18
|
-
return super.loadFromFile(path);
|
|
19
|
-
}
|
|
20
|
-
static async fromFile(path) {
|
|
21
|
-
const document = new this();
|
|
22
|
-
await document.loadFromFile(path);
|
|
23
|
-
return document;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
applyMixins(RenownProfile, [
|
|
27
|
-
RenownProfile_Profile,
|
|
28
|
-
RenownProfile_Authorization,
|
|
29
|
-
]);
|
|
30
|
-
export { RenownProfile };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Factory methods for creating RenownProfileDocument instances
|
|
3
|
-
*/
|
|
4
|
-
import { type PHAuthState, type PHDocumentState, type PHBaseState } from "document-model";
|
|
5
|
-
import type { RenownProfileDocument, RenownProfileLocalState, RenownProfileState } from "./types.js";
|
|
6
|
-
export type RenownProfilePHState = PHBaseState & {
|
|
7
|
-
global: RenownProfileState;
|
|
8
|
-
local: RenownProfileLocalState;
|
|
9
|
-
};
|
|
10
|
-
export declare function defaultGlobalState(): RenownProfileState;
|
|
11
|
-
export declare function defaultLocalState(): RenownProfileLocalState;
|
|
12
|
-
export declare function defaultPHState(): RenownProfilePHState;
|
|
13
|
-
export declare function createGlobalState(state?: Partial<RenownProfileState>): RenownProfileState;
|
|
14
|
-
export declare function createLocalState(state?: Partial<RenownProfileLocalState>): RenownProfileLocalState;
|
|
15
|
-
export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<RenownProfileState>, localState?: Partial<RenownProfileLocalState>): RenownProfilePHState;
|
|
16
|
-
/**
|
|
17
|
-
* Creates a RenownProfileDocument with custom global and local state
|
|
18
|
-
* This properly handles the PHBaseState requirements while allowing
|
|
19
|
-
* document-specific state to be set.
|
|
20
|
-
*/
|
|
21
|
-
export declare function createRenownProfileDocument(state?: Partial<{
|
|
22
|
-
auth?: Partial<PHAuthState>;
|
|
23
|
-
document?: Partial<PHDocumentState>;
|
|
24
|
-
global?: Partial<RenownProfileState>;
|
|
25
|
-
local?: Partial<RenownProfileLocalState>;
|
|
26
|
-
}>): RenownProfileDocument;
|