@powerhousedao/vetra-builder-package 0.0.17 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/document-models/builder-account/gen/document-model.js +1 -1
- package/dist/document-models/builder-account/gen/profile/actions.d.ts +5 -5
- package/dist/document-models/builder-account/gen/profile/creators.d.ts +3 -3
- package/dist/document-models/builder-account/gen/profile/creators.js +1 -1
- package/dist/document-models/builder-account/gen/profile/object.d.ts +2 -2
- package/dist/document-models/builder-account/gen/profile/object.js +3 -3
- package/dist/document-models/builder-account/gen/profile/operations.d.ts +2 -2
- package/dist/document-models/builder-account/gen/reducer.js +3 -3
- package/dist/document-models/builder-account/gen/schema/types.d.ts +1 -1
- package/dist/document-models/builder-account/gen/schema/zod.js +1 -1
- package/dist/document-models/builder-account/index.d.ts +1 -1
- package/dist/document-models/builder-account/src/reducers/profile.js +4 -0
- package/dist/document-models/builder-team/gen/actions.d.ts +9 -0
- package/dist/document-models/builder-team/gen/actions.js +4 -0
- package/dist/document-models/builder-team/gen/creators.d.ts +4 -0
- package/dist/document-models/builder-team/gen/creators.js +4 -0
- package/dist/document-models/builder-team/gen/document-model.d.ts +2 -0
- package/dist/document-models/builder-team/gen/document-model.js +212 -0
- package/dist/document-models/builder-team/gen/index.d.ts +7 -0
- package/dist/document-models/builder-team/gen/index.js +6 -0
- package/dist/document-models/builder-team/gen/member/actions.d.ts +15 -0
- package/dist/document-models/builder-team/gen/member/actions.js +1 -0
- package/dist/document-models/builder-team/gen/member/creators.d.ts +5 -0
- package/dist/document-models/builder-team/gen/member/creators.js +5 -0
- package/dist/document-models/builder-team/gen/member/error.d.ts +1 -0
- package/dist/document-models/builder-team/gen/member/error.js +1 -0
- package/dist/document-models/builder-team/gen/member/object.d.ts +8 -0
- package/dist/document-models/builder-team/gen/member/object.js +13 -0
- package/dist/document-models/builder-team/gen/member/operations.d.ts +8 -0
- package/dist/document-models/builder-team/gen/member/operations.js +1 -0
- package/dist/document-models/builder-team/gen/object.d.ts +20 -0
- package/dist/document-models/builder-team/gen/object.js +36 -0
- package/dist/document-models/builder-team/gen/packages/actions.d.ts +15 -0
- package/dist/document-models/builder-team/gen/packages/actions.js +1 -0
- package/dist/document-models/builder-team/gen/packages/creators.d.ts +5 -0
- package/dist/document-models/builder-team/gen/packages/creators.js +5 -0
- package/dist/document-models/builder-team/gen/packages/error.d.ts +1 -0
- package/dist/document-models/builder-team/gen/packages/error.js +1 -0
- package/dist/document-models/builder-team/gen/packages/object.d.ts +8 -0
- package/dist/document-models/builder-team/gen/packages/object.js +13 -0
- package/dist/document-models/builder-team/gen/packages/operations.d.ts +8 -0
- package/dist/document-models/builder-team/gen/packages/operations.js +1 -0
- package/dist/document-models/builder-team/gen/ph-factories.d.ts +26 -0
- package/dist/document-models/builder-team/gen/ph-factories.js +62 -0
- package/dist/document-models/builder-team/gen/profile/actions.d.ts +23 -0
- package/dist/document-models/builder-team/gen/profile/actions.js +1 -0
- package/dist/document-models/builder-team/gen/profile/creators.d.ts +7 -0
- package/dist/document-models/builder-team/gen/profile/creators.js +7 -0
- package/dist/document-models/builder-team/gen/profile/error.d.ts +1 -0
- package/dist/document-models/builder-team/gen/profile/error.js +1 -0
- package/dist/document-models/builder-team/gen/profile/object.d.ts +10 -0
- package/dist/document-models/builder-team/gen/profile/object.js +19 -0
- package/dist/document-models/builder-team/gen/profile/operations.d.ts +10 -0
- package/dist/document-models/builder-team/gen/profile/operations.js +1 -0
- package/dist/document-models/builder-team/gen/reducer.d.ts +4 -0
- package/dist/document-models/builder-team/gen/reducer.js +75 -0
- package/dist/document-models/builder-team/gen/schema/index.d.ts +2 -0
- package/dist/document-models/builder-team/gen/schema/index.js +2 -0
- package/dist/document-models/builder-team/gen/schema/types.d.ts +247 -0
- package/dist/document-models/builder-team/gen/schema/types.js +1 -0
- package/dist/document-models/builder-team/gen/schema/zod.d.ts +29 -0
- package/dist/document-models/builder-team/gen/schema/zod.js +148 -0
- package/dist/document-models/builder-team/gen/spaces/actions.d.ts +15 -0
- package/dist/document-models/builder-team/gen/spaces/actions.js +1 -0
- package/dist/document-models/builder-team/gen/spaces/creators.d.ts +5 -0
- package/dist/document-models/builder-team/gen/spaces/creators.js +5 -0
- package/dist/document-models/builder-team/gen/spaces/error.d.ts +1 -0
- package/dist/document-models/builder-team/gen/spaces/error.js +1 -0
- package/dist/document-models/builder-team/gen/spaces/object.d.ts +8 -0
- package/dist/document-models/builder-team/gen/spaces/object.js +13 -0
- package/dist/document-models/builder-team/gen/spaces/operations.d.ts +8 -0
- package/dist/document-models/builder-team/gen/spaces/operations.js +1 -0
- package/dist/document-models/builder-team/gen/types.d.ts +9 -0
- package/dist/document-models/builder-team/gen/types.js +1 -0
- package/dist/document-models/builder-team/gen/utils.d.ts +21 -0
- package/dist/document-models/builder-team/gen/utils.js +54 -0
- package/dist/document-models/builder-team/index.d.ts +37 -0
- package/dist/document-models/builder-team/index.js +21 -0
- package/dist/document-models/builder-team/src/reducers/member.d.ts +2 -0
- package/dist/document-models/builder-team/src/reducers/member.js +30 -0
- package/dist/document-models/builder-team/src/reducers/packages.d.ts +2 -0
- package/dist/document-models/builder-team/src/reducers/packages.js +40 -0
- package/dist/document-models/builder-team/src/reducers/profile.d.ts +2 -0
- package/dist/document-models/builder-team/src/reducers/profile.js +26 -0
- package/dist/document-models/builder-team/src/reducers/spaces.d.ts +2 -0
- package/dist/document-models/builder-team/src/reducers/spaces.js +34 -0
- package/dist/document-models/builder-team/src/tests/document-model.test.d.ts +5 -0
- package/dist/document-models/builder-team/src/tests/document-model.test.js +18 -0
- package/dist/document-models/builder-team/src/tests/member.test.d.ts +5 -0
- package/dist/document-models/builder-team/src/tests/member.test.js +40 -0
- package/dist/document-models/builder-team/src/tests/packages.test.d.ts +5 -0
- package/dist/document-models/builder-team/src/tests/packages.test.js +40 -0
- package/dist/document-models/builder-team/src/tests/profile.test.d.ts +5 -0
- package/dist/document-models/builder-team/src/tests/profile.test.js +56 -0
- package/dist/document-models/builder-team/src/tests/spaces.test.d.ts +5 -0
- package/dist/document-models/builder-team/src/tests/spaces.test.js +40 -0
- package/dist/document-models/builder-team/src/utils.d.ts +1 -0
- package/dist/document-models/builder-team/src/utils.js +1 -0
- package/dist/document-models/index.d.ts +1 -1
- package/dist/document-models/index.js +1 -1
- package/dist/editors/builder-team-editor/components/Header.d.ts +8 -0
- package/dist/editors/builder-team-editor/components/Header.js +5 -0
- package/dist/editors/builder-team-editor/components/MembersSection.d.ts +14 -0
- package/dist/editors/builder-team-editor/components/MembersSection.js +152 -0
- package/dist/editors/builder-team-editor/components/PackageForm.d.ts +8 -0
- package/dist/editors/builder-team-editor/components/PackageForm.js +92 -0
- package/dist/editors/builder-team-editor/components/PackageItem.d.ts +11 -0
- package/dist/editors/builder-team-editor/components/PackageItem.js +99 -0
- package/dist/editors/builder-team-editor/components/ProfileSection.d.ts +17 -0
- package/dist/editors/builder-team-editor/components/ProfileSection.js +5 -0
- package/dist/editors/builder-team-editor/components/QuickStats.d.ts +7 -0
- package/dist/editors/builder-team-editor/components/QuickStats.js +5 -0
- package/dist/editors/builder-team-editor/components/SpaceForm.d.ts +9 -0
- package/dist/editors/builder-team-editor/components/SpaceForm.js +11 -0
- package/dist/editors/builder-team-editor/components/SpaceItem.d.ts +21 -0
- package/dist/editors/builder-team-editor/components/SpaceItem.js +12 -0
- package/dist/editors/builder-team-editor/components/SpacesSection.d.ts +22 -0
- package/dist/editors/builder-team-editor/components/SpacesSection.js +14 -0
- package/dist/editors/builder-team-editor/config.d.ts +6 -0
- package/dist/editors/builder-team-editor/config.js +11 -0
- package/dist/editors/builder-team-editor/editor.d.ts +3 -0
- package/dist/editors/builder-team-editor/editor.js +73 -0
- package/dist/editors/builder-team-editor/hooks/useMemberHandlers.d.ts +12 -0
- package/dist/editors/builder-team-editor/hooks/useMemberHandlers.js +27 -0
- package/dist/editors/builder-team-editor/hooks/usePackageHandlers.d.ts +11 -0
- package/dist/editors/builder-team-editor/hooks/usePackageHandlers.js +49 -0
- package/dist/editors/builder-team-editor/hooks/useProfileHandlers.d.ts +14 -0
- package/dist/editors/builder-team-editor/hooks/useProfileHandlers.js +38 -0
- package/dist/editors/builder-team-editor/hooks/useSpaceHandlers.d.ts +15 -0
- package/dist/editors/builder-team-editor/hooks/useSpaceHandlers.js +82 -0
- package/dist/editors/builder-team-editor/index.d.ts +2 -0
- package/dist/editors/builder-team-editor/index.js +11 -0
- package/dist/editors/hooks/useBuilderTeamDocument.d.ts +3 -0
- package/dist/editors/hooks/useBuilderTeamDocument.js +8 -0
- package/dist/editors/index.d.ts +1 -1
- package/dist/editors/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/powerhouse.manifest.json +21 -6
- package/dist/processors/factory.d.ts +0 -4
- package/dist/processors/factory.js +3 -3
- package/dist/processors/index.d.ts +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/processors/old_vetra-builder-relational-db-processor/factory.d.ts +3 -0
- package/dist/processors/old_vetra-builder-relational-db-processor/factory.js +22 -0
- package/dist/processors/old_vetra-builder-relational-db-processor/index.d.ts +9 -0
- package/dist/processors/old_vetra-builder-relational-db-processor/index.js +32 -0
- package/dist/processors/old_vetra-builder-relational-db-processor/migrations.d.ts +3 -0
- package/dist/processors/old_vetra-builder-relational-db-processor/migrations.js +14 -0
- package/dist/processors/old_vetra-builder-relational-db-processor/schema.d.ts +7 -0
- package/dist/processors/old_vetra-builder-relational-db-processor/schema.js +1 -0
- package/dist/processors/vetra-builder-relational-db-processor/builder-team-handlers.d.ts +22 -0
- package/dist/processors/vetra-builder-relational-db-processor/builder-team-handlers.js +261 -0
- package/dist/processors/vetra-builder-relational-db-processor/database-helpers.d.ts +39 -0
- package/dist/processors/vetra-builder-relational-db-processor/database-helpers.js +144 -0
- package/dist/processors/vetra-builder-relational-db-processor/factory.d.ts +3 -0
- package/dist/processors/vetra-builder-relational-db-processor/factory.js +23 -0
- package/dist/processors/vetra-builder-relational-db-processor/index.d.ts +13 -0
- package/dist/processors/vetra-builder-relational-db-processor/index.js +53 -0
- package/dist/processors/vetra-builder-relational-db-processor/migrations.d.ts +3 -0
- package/dist/processors/vetra-builder-relational-db-processor/migrations.js +155 -0
- package/dist/processors/vetra-builder-relational-db-processor/schema.d.ts +66 -0
- package/dist/processors/vetra-builder-relational-db-processor/schema.js +1 -0
- package/dist/processors/vetra-builder-relational-db-processor/types.d.ts +32 -0
- package/dist/processors/vetra-builder-relational-db-processor/types.js +1 -0
- package/dist/style.css +36 -28
- package/dist/subgraphs/builder-account/resolvers.js +3 -3
- package/dist/subgraphs/builder-account/schema.js +4 -4
- package/dist/subgraphs/builder-team/index.d.ts +10 -0
- package/dist/subgraphs/builder-team/index.js +11 -0
- package/dist/subgraphs/builder-team/resolvers.d.ts +2 -0
- package/dist/subgraphs/builder-team/resolvers.js +240 -0
- package/dist/subgraphs/builder-team/schema.d.ts +2 -0
- package/dist/subgraphs/builder-team/schema.js +228 -0
- package/dist/subgraphs/index.d.ts +2 -2
- package/dist/subgraphs/index.js +3 -2
- package/dist/subgraphs/vetra-builders/index.d.ts +10 -0
- package/dist/subgraphs/vetra-builders/index.js +11 -0
- package/dist/subgraphs/vetra-builders/resolvers.d.ts +2 -0
- package/dist/subgraphs/vetra-builders/resolvers.js +144 -0
- package/dist/subgraphs/vetra-builders/schema.d.ts +2 -0
- package/dist/subgraphs/vetra-builders/schema.js +79 -0
- package/dist/subgraphs/vetra-builders-bkp/index.d.ts +10 -0
- package/dist/subgraphs/vetra-builders-bkp/index.js +11 -0
- package/dist/subgraphs/vetra-builders-bkp/resolvers.d.ts +2 -0
- package/dist/subgraphs/vetra-builders-bkp/resolvers.js +10 -0
- package/dist/subgraphs/vetra-builders-bkp/schema.d.ts +2 -0
- package/dist/subgraphs/vetra-builders-bkp/schema.js +9 -0
- package/dist/utils/nano-id.d.ts +1 -0
- package/dist/utils/nano-id.js +4 -0
- package/package.json +4 -2
|
@@ -21,7 +21,7 @@ export const documentModel = {
|
|
|
21
21
|
errors: [],
|
|
22
22
|
examples: [],
|
|
23
23
|
id: "1da0a31b-fcab-4a65-829b-8c510fcbdb80",
|
|
24
|
-
name: "
|
|
24
|
+
name: "SET_LOGOOOO",
|
|
25
25
|
reducer: "",
|
|
26
26
|
schema: 'input SetLogoInput {\n "Add your inputs here"\n logoUrl: String!\n}',
|
|
27
27
|
scope: "global",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Action } from "document-model";
|
|
2
|
-
import type {
|
|
3
|
-
export type
|
|
4
|
-
type: "
|
|
5
|
-
input:
|
|
2
|
+
import type { SetLogooooInput, SetProfileNameInput, SetSlugInput, SetProfileDescriptionInput, UpdateSocialsInput } from "../types.js";
|
|
3
|
+
export type SetLogooooAction = Action & {
|
|
4
|
+
type: "SET_LOGOOOO";
|
|
5
|
+
input: SetLogooooInput;
|
|
6
6
|
};
|
|
7
7
|
export type SetProfileNameAction = Action & {
|
|
8
8
|
type: "SET_PROFILE_NAME";
|
|
@@ -20,4 +20,4 @@ export type UpdateSocialsAction = Action & {
|
|
|
20
20
|
type: "UPDATE_SOCIALS";
|
|
21
21
|
input: UpdateSocialsInput;
|
|
22
22
|
};
|
|
23
|
-
export type BuilderAccountProfileAction =
|
|
23
|
+
export type BuilderAccountProfileAction = SetLogooooAction | SetProfileNameAction | SetSlugAction | SetProfileDescriptionAction | UpdateSocialsAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
3
|
-
export declare const
|
|
1
|
+
import { type SetLogooooInput, type SetProfileNameInput, type SetSlugInput, type SetProfileDescriptionInput, type UpdateSocialsInput } from "../types.js";
|
|
2
|
+
import { type SetLogooooAction, type SetProfileNameAction, type SetSlugAction, type SetProfileDescriptionAction, type UpdateSocialsAction } from "./actions.js";
|
|
3
|
+
export declare const setLogoooo: (input: SetLogooooInput) => SetLogooooAction;
|
|
4
4
|
export declare const setProfileName: (input: SetProfileNameInput) => SetProfileNameAction;
|
|
5
5
|
export declare const setSlug: (input: SetSlugInput) => SetSlugAction;
|
|
6
6
|
export declare const setProfileDescription: (input: SetProfileDescriptionInput) => SetProfileDescriptionAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAction } from "document-model";
|
|
2
2
|
import { z, } from "../types.js";
|
|
3
|
-
export const
|
|
3
|
+
export const setLogoooo = (input) => createAction("SET_LOGOOOO", { ...input }, undefined, z.SetLogooooInputSchema, "global");
|
|
4
4
|
export const setProfileName = (input) => createAction("SET_PROFILE_NAME", { ...input }, undefined, z.SetProfileNameInputSchema, "global");
|
|
5
5
|
export const setSlug = (input) => createAction("SET_SLUG", { ...input }, undefined, z.SetSlugInputSchema, "global");
|
|
6
6
|
export const setProfileDescription = (input) => createAction("SET_PROFILE_DESCRIPTION", { ...input }, undefined, z.SetProfileDescriptionInputSchema, "global");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseDocumentClass } from "document-model";
|
|
2
2
|
import { BuilderAccountPHState } from "../ph-factories.js";
|
|
3
|
-
import { type
|
|
3
|
+
import { type SetLogooooInput, type SetProfileNameInput, type SetSlugInput, type SetProfileDescriptionInput, type UpdateSocialsInput } from "../types.js";
|
|
4
4
|
export default class BuilderAccount_Profile extends BaseDocumentClass<BuilderAccountPHState> {
|
|
5
|
-
|
|
5
|
+
setLogoooo(input: SetLogooooInput): this;
|
|
6
6
|
setProfileName(input: SetProfileNameInput): this;
|
|
7
7
|
setSlug(input: SetSlugInput): this;
|
|
8
8
|
setProfileDescription(input: SetProfileDescriptionInput): this;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseDocumentClass } from "document-model";
|
|
2
|
-
import {
|
|
2
|
+
import { setLogoooo, setProfileName, setSlug, setProfileDescription, updateSocials, } from "./creators.js";
|
|
3
3
|
export default class BuilderAccount_Profile extends BaseDocumentClass {
|
|
4
|
-
|
|
5
|
-
return this.dispatch(
|
|
4
|
+
setLogoooo(input) {
|
|
5
|
+
return this.dispatch(setLogoooo(input));
|
|
6
6
|
}
|
|
7
7
|
setProfileName(input) {
|
|
8
8
|
return this.dispatch(setProfileName(input));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type SignalDispatch } from "document-model";
|
|
2
|
-
import { type
|
|
2
|
+
import { type SetLogooooAction, type SetProfileNameAction, type SetSlugAction, type SetProfileDescriptionAction, type UpdateSocialsAction } from "./actions.js";
|
|
3
3
|
import { type BuilderAccountState } from "../types.js";
|
|
4
4
|
export interface BuilderAccountProfileOperations {
|
|
5
|
-
|
|
5
|
+
setLogooooOperation: (state: BuilderAccountState, action: SetLogooooAction, dispatch?: SignalDispatch) => void;
|
|
6
6
|
setProfileNameOperation: (state: BuilderAccountState, action: SetProfileNameAction, dispatch?: SignalDispatch) => void;
|
|
7
7
|
setSlugOperation: (state: BuilderAccountState, action: SetSlugAction, dispatch?: SignalDispatch) => void;
|
|
8
8
|
setProfileDescriptionOperation: (state: BuilderAccountState, action: SetProfileDescriptionAction, dispatch?: SignalDispatch) => void;
|
|
@@ -12,9 +12,9 @@ export const stateReducer = (state, action, dispatch) => {
|
|
|
12
12
|
return state;
|
|
13
13
|
}
|
|
14
14
|
switch (action.type) {
|
|
15
|
-
case "
|
|
16
|
-
z.
|
|
17
|
-
ProfileReducer.
|
|
15
|
+
case "SET_LOGOOOO":
|
|
16
|
+
z.SetLogooooInputSchema().parse(action.input);
|
|
17
|
+
ProfileReducer.setLogooooOperation(state[action.scope], action, dispatch);
|
|
18
18
|
break;
|
|
19
19
|
case "SET_PROFILE_NAME":
|
|
20
20
|
z.SetProfileNameInputSchema().parse(action.input);
|
|
@@ -235,7 +235,7 @@ export type VetraBuilderPackage = {
|
|
|
235
235
|
category: Maybe<Scalars["String"]["output"]>;
|
|
236
236
|
description: Maybe<Scalars["String"]["output"]>;
|
|
237
237
|
github: Maybe<Scalars["URL"]["output"]>;
|
|
238
|
-
id:
|
|
238
|
+
id: Scalars["OID"]["output"];
|
|
239
239
|
keywords: Array<VetraBuilderPackageKeyword>;
|
|
240
240
|
name: Scalars["String"]["output"];
|
|
241
241
|
npm: Maybe<Scalars["URL"]["output"]>;
|
|
@@ -142,7 +142,7 @@ export function VetraBuilderPackageSchema() {
|
|
|
142
142
|
category: z.string().nullable(),
|
|
143
143
|
description: z.string().nullable(),
|
|
144
144
|
github: z.string().url().nullable(),
|
|
145
|
-
id: z.string()
|
|
145
|
+
id: z.string(),
|
|
146
146
|
keywords: z.array(VetraBuilderPackageKeywordSchema()),
|
|
147
147
|
name: z.string(),
|
|
148
148
|
npm: z.string().url().nullable(),
|
|
@@ -16,7 +16,7 @@ declare const utils: {
|
|
|
16
16
|
loadFromInput: import("document-model").LoadFromInput<BuilderAccountPHState>;
|
|
17
17
|
};
|
|
18
18
|
declare const actions: {
|
|
19
|
-
|
|
19
|
+
setLogoooo: (input: SetLogooooInput) => import("./gen/actions.js").SetLogooooAction;
|
|
20
20
|
setProfileName: (input: import("./index.js").SetProfileNameInput) => import("./gen/actions.js").SetProfileNameAction;
|
|
21
21
|
setSlug: (input: import("./index.js").SetSlugInput) => import("./gen/actions.js").SetSlugAction;
|
|
22
22
|
setProfileDescription: (input: import("./index.js").SetProfileDescriptionInput) => import("./gen/actions.js").SetProfileDescriptionAction;
|
|
@@ -36,4 +36,8 @@ export const reducer = {
|
|
|
36
36
|
xProfile: x ?? state.profile.socials.xProfile,
|
|
37
37
|
};
|
|
38
38
|
},
|
|
39
|
+
setLogooooOperation(state, action, dispatch) {
|
|
40
|
+
// TODO: Implement "setLogooooOperation" reducer
|
|
41
|
+
throw new Error('Reducer "setLogooooOperation" not yet implemented');
|
|
42
|
+
}
|
|
39
43
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BuilderTeamProfileAction } from "./profile/actions.js";
|
|
2
|
+
import type { BuilderTeamMemberAction } from "./member/actions.js";
|
|
3
|
+
import type { BuilderTeamSpacesAction } from "./spaces/actions.js";
|
|
4
|
+
import type { BuilderTeamPackagesAction } from "./packages/actions.js";
|
|
5
|
+
export * from "./profile/actions.js";
|
|
6
|
+
export * from "./member/actions.js";
|
|
7
|
+
export * from "./spaces/actions.js";
|
|
8
|
+
export * from "./packages/actions.js";
|
|
9
|
+
export type BuilderTeamAction = BuilderTeamProfileAction | BuilderTeamMemberAction | BuilderTeamSpacesAction | BuilderTeamPackagesAction;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
export const documentModel = {
|
|
2
|
+
author: {
|
|
3
|
+
name: "Powerhouse Inc.",
|
|
4
|
+
website: "https://www.powerhouse.inc",
|
|
5
|
+
},
|
|
6
|
+
description: "A builder account contains a builder profile information as well as managed spaces with linked packages.",
|
|
7
|
+
extension: "phvba",
|
|
8
|
+
id: "powerhouse/builder-team",
|
|
9
|
+
name: "BuilderTeam",
|
|
10
|
+
specifications: [
|
|
11
|
+
{
|
|
12
|
+
changeLog: [],
|
|
13
|
+
modules: [
|
|
14
|
+
{
|
|
15
|
+
description: "",
|
|
16
|
+
id: "84f613e9-80e1-4ee5-bf56-b916e1780845",
|
|
17
|
+
name: "profile",
|
|
18
|
+
operations: [
|
|
19
|
+
{
|
|
20
|
+
description: "",
|
|
21
|
+
errors: [],
|
|
22
|
+
examples: [],
|
|
23
|
+
id: "edbdc847-a0d0-40cb-a7cb-c057039e05da",
|
|
24
|
+
name: "SET_LOGO",
|
|
25
|
+
reducer: "",
|
|
26
|
+
schema: 'input SetLogoInput {\n "Add your inputs here"\n logo: String\n}',
|
|
27
|
+
scope: "global",
|
|
28
|
+
template: "",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
description: "",
|
|
32
|
+
errors: [],
|
|
33
|
+
examples: [],
|
|
34
|
+
id: "6e0cb4ac-7e9a-4bd7-9310-556a171e2ec0",
|
|
35
|
+
name: "SET_TEAM_NAME",
|
|
36
|
+
reducer: "",
|
|
37
|
+
schema: 'input SetTeamNameInput {\n "Add your inputs here"\n name: String!\n}',
|
|
38
|
+
scope: "global",
|
|
39
|
+
template: "",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
description: "",
|
|
43
|
+
errors: [],
|
|
44
|
+
examples: [],
|
|
45
|
+
id: "41bc16d9-0d52-4329-b6ca-2d9378c167fb",
|
|
46
|
+
name: "SET_SLUG",
|
|
47
|
+
reducer: "",
|
|
48
|
+
schema: 'input SetSlugInput {\n "Add your inputs here"\n slug: String!\n}',
|
|
49
|
+
scope: "global",
|
|
50
|
+
template: "",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: "",
|
|
54
|
+
errors: [],
|
|
55
|
+
examples: [],
|
|
56
|
+
id: "a4ca6f24-1f77-48dc-a8c4-8d9782aaf05f",
|
|
57
|
+
name: "SET_DESCRIPTION",
|
|
58
|
+
reducer: "",
|
|
59
|
+
schema: 'input SetDescriptionInput {\n "Add your inputs here"\n description: String\n}',
|
|
60
|
+
scope: "global",
|
|
61
|
+
template: "",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
description: "",
|
|
65
|
+
errors: [],
|
|
66
|
+
examples: [],
|
|
67
|
+
id: "6389d9b4-2738-4831-9cdb-4ac6f8c32c5f",
|
|
68
|
+
name: "SET_SOCIALS",
|
|
69
|
+
reducer: "",
|
|
70
|
+
schema: 'input SetSocialsInput {\n "Add your inputs here"\n xProfile: String\n github: String\n website: String\n \n}',
|
|
71
|
+
scope: "global",
|
|
72
|
+
template: "",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
description: "",
|
|
78
|
+
id: "46f730e9-506a-4e3e-b9af-d5715882e0b9",
|
|
79
|
+
name: "member",
|
|
80
|
+
operations: [
|
|
81
|
+
{
|
|
82
|
+
description: "",
|
|
83
|
+
errors: [],
|
|
84
|
+
examples: [],
|
|
85
|
+
id: "029cb62f-d647-427b-9334-64d96e5eb407",
|
|
86
|
+
name: "ADD_MEMBER",
|
|
87
|
+
reducer: "",
|
|
88
|
+
schema: 'input AddMemberInput {\n "Add your inputs here"\n id: OID!\n}',
|
|
89
|
+
scope: "global",
|
|
90
|
+
template: "",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
description: "",
|
|
94
|
+
errors: [],
|
|
95
|
+
examples: [],
|
|
96
|
+
id: "696fe1ed-4570-4e99-9c4a-34a21d909035",
|
|
97
|
+
name: "UPDATE_MEMBER_INFO",
|
|
98
|
+
reducer: "",
|
|
99
|
+
schema: 'input UpdateMemberInfoInput {\n "Add your inputs here"\n id: OID!\n phid: PHID\n ethAddress: String\n name: String\n profileImage: String\n}',
|
|
100
|
+
scope: "global",
|
|
101
|
+
template: "",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
description: "",
|
|
105
|
+
errors: [],
|
|
106
|
+
examples: [],
|
|
107
|
+
id: "30ba9a40-a80c-4c4d-8190-5a67ff9dcf95",
|
|
108
|
+
name: "REMOVE_MEMBER",
|
|
109
|
+
reducer: "",
|
|
110
|
+
schema: 'input RemoveMemberInput {\n "Add your inputs here"\n id: OID!\n}',
|
|
111
|
+
scope: "global",
|
|
112
|
+
template: "",
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
description: "",
|
|
118
|
+
id: "d3d7b51b-6ca4-4f16-a421-a744e81e7f42",
|
|
119
|
+
name: "spaces",
|
|
120
|
+
operations: [
|
|
121
|
+
{
|
|
122
|
+
description: "",
|
|
123
|
+
errors: [],
|
|
124
|
+
examples: [],
|
|
125
|
+
id: "9c5d57ab-bf7d-43d9-bb6d-3d29a59ee70c",
|
|
126
|
+
name: "ADD_SPACE",
|
|
127
|
+
reducer: "",
|
|
128
|
+
schema: 'input AddSpaceInput {\n "Add your inputs here"\n id: OID!\n}',
|
|
129
|
+
scope: "global",
|
|
130
|
+
template: "",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
description: "",
|
|
134
|
+
errors: [],
|
|
135
|
+
examples: [],
|
|
136
|
+
id: "7a19ff1c-7d41-4d6c-9cdb-2a300a523cd0",
|
|
137
|
+
name: "UPDATE_SPACE_INFO",
|
|
138
|
+
reducer: "",
|
|
139
|
+
schema: 'input UpdateSpaceInfoInput {\n "Add your inputs here"\n id: OID!\n title: String\n description: String\n}',
|
|
140
|
+
scope: "global",
|
|
141
|
+
template: "",
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
description: "",
|
|
145
|
+
errors: [],
|
|
146
|
+
examples: [],
|
|
147
|
+
id: "2bea7ddb-ce86-46df-a76b-69d8283ff810",
|
|
148
|
+
name: "REMOVE_SPACE",
|
|
149
|
+
reducer: "",
|
|
150
|
+
schema: 'input RemoveSpaceInput {\n "Add your inputs here"\n id: OID!\n}',
|
|
151
|
+
scope: "global",
|
|
152
|
+
template: "",
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
description: "",
|
|
158
|
+
id: "a42429b5-bf95-4948-b730-dd644bdae5cb",
|
|
159
|
+
name: "packages",
|
|
160
|
+
operations: [
|
|
161
|
+
{
|
|
162
|
+
description: "",
|
|
163
|
+
errors: [],
|
|
164
|
+
examples: [],
|
|
165
|
+
id: "a9a26a27-0774-4858-8fc6-750fbf11648a",
|
|
166
|
+
name: "ADD_PACKAGE",
|
|
167
|
+
reducer: "",
|
|
168
|
+
schema: 'input AddPackageInput {\n "Add your inputs here"\n id: OID!\n spaceId: OID!\n}',
|
|
169
|
+
scope: "global",
|
|
170
|
+
template: "",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
description: "",
|
|
174
|
+
errors: [],
|
|
175
|
+
examples: [],
|
|
176
|
+
id: "327caf73-0e96-47da-aa58-7d90b89c38b6",
|
|
177
|
+
name: "UPDATE_PACKAGE_INFO",
|
|
178
|
+
reducer: "",
|
|
179
|
+
schema: 'input UpdatePackageInfoInput {\n "Add your inputs here"\n id: OID!\n spaceId: OID\n phid: PHID\n title: String\n description: String\n github: String\n npm: String\n vetraDriveUrl: URL\n}',
|
|
180
|
+
scope: "global",
|
|
181
|
+
template: "",
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
description: "",
|
|
185
|
+
errors: [],
|
|
186
|
+
examples: [],
|
|
187
|
+
id: "ff08908f-3754-4154-acdd-0f280129f07d",
|
|
188
|
+
name: "REMOVE_PACKAGE",
|
|
189
|
+
reducer: "",
|
|
190
|
+
schema: 'input RemovePackageInput {\n "Add your inputs here"\n id: OID!\n}',
|
|
191
|
+
scope: "global",
|
|
192
|
+
template: "",
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
state: {
|
|
198
|
+
global: {
|
|
199
|
+
examples: [],
|
|
200
|
+
initialValue: '"{\\n \\"profile\\": {\\n \\"logo\\": null,\\n \\"name\\": \\"\\",\\n \\"slug\\": \\"\\",\\n \\"description\\": null,\\n \\"socials\\": {\\n \\"xProfile\\": null,\\n \\"github\\": null,\\n \\"website\\": null\\n }\\n },\\n \\"members\\": [],\\n \\"spaces\\": []\\n}"',
|
|
201
|
+
schema: "type BuilderTeamState {\n profile: VetraBuilderProfile!\n members: [RenownProfileInfo!]!\n spaces: [VetraBuilderSpace!]!\n}\n\ntype RenownProfileInfo { \n id: OID!\n phid: PHID\n ethAddress: String\n name: String\n profileImage: String\n}\n\ntype VetraBuilderProfile {\n logo: URL\n name: String!\n slug: String!\n description: String\n socials: VetraBuilderSocials!\n}\n\ntype VetraBuilderSocials {\n xProfile: URL\n github: URL \n website: URL\n}\n\ntype VetraBuilderSpace {\n id: OID!\n title: String!\n description: String\n packages: [VetraPackageInfo!]!\n}\n\ntype VetraPackageInfo { \n id: OID!\n phid: PHID\n title: String\n description: String\n github: String\n npm: String\n vetraDriveUrl: URL\n}",
|
|
202
|
+
},
|
|
203
|
+
local: {
|
|
204
|
+
examples: [],
|
|
205
|
+
initialValue: '""',
|
|
206
|
+
schema: "",
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
version: 1,
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
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 { BuilderTeamPHState } from "./ph-factories.js";
|
|
7
|
+
export { createBuilderTeamDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
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 { createBuilderTeamDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Action } from "document-model";
|
|
2
|
+
import type { AddMemberInput, UpdateMemberInfoInput, RemoveMemberInput } from "../types.js";
|
|
3
|
+
export type AddMemberAction = Action & {
|
|
4
|
+
type: "ADD_MEMBER";
|
|
5
|
+
input: AddMemberInput;
|
|
6
|
+
};
|
|
7
|
+
export type UpdateMemberInfoAction = Action & {
|
|
8
|
+
type: "UPDATE_MEMBER_INFO";
|
|
9
|
+
input: UpdateMemberInfoInput;
|
|
10
|
+
};
|
|
11
|
+
export type RemoveMemberAction = Action & {
|
|
12
|
+
type: "REMOVE_MEMBER";
|
|
13
|
+
input: RemoveMemberInput;
|
|
14
|
+
};
|
|
15
|
+
export type BuilderTeamMemberAction = AddMemberAction | UpdateMemberInfoAction | RemoveMemberAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type AddMemberInput, type UpdateMemberInfoInput, type RemoveMemberInput } from "../types.js";
|
|
2
|
+
import { type AddMemberAction, type UpdateMemberInfoAction, type RemoveMemberAction } from "./actions.js";
|
|
3
|
+
export declare const addMember: (input: AddMemberInput) => AddMemberAction;
|
|
4
|
+
export declare const updateMemberInfo: (input: UpdateMemberInfoInput) => UpdateMemberInfoAction;
|
|
5
|
+
export declare const removeMember: (input: RemoveMemberInput) => RemoveMemberAction;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createAction } from "document-model";
|
|
2
|
+
import { z, } from "../types.js";
|
|
3
|
+
export const addMember = (input) => createAction("ADD_MEMBER", { ...input }, undefined, z.AddMemberInputSchema, "global");
|
|
4
|
+
export const updateMemberInfo = (input) => createAction("UPDATE_MEMBER_INFO", { ...input }, undefined, z.UpdateMemberInfoInputSchema, "global");
|
|
5
|
+
export const removeMember = (input) => createAction("REMOVE_MEMBER", { ...input }, undefined, z.RemoveMemberInputSchema, "global");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const errors: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const errors = {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseDocumentClass } from "document-model";
|
|
2
|
+
import { type BuilderTeamPHState } from "../ph-factories.js";
|
|
3
|
+
import { type AddMemberInput, type UpdateMemberInfoInput, type RemoveMemberInput } from "../types.js";
|
|
4
|
+
export default class BuilderTeam_Member extends BaseDocumentClass<BuilderTeamPHState> {
|
|
5
|
+
addMember(input: AddMemberInput): this;
|
|
6
|
+
updateMemberInfo(input: UpdateMemberInfoInput): this;
|
|
7
|
+
removeMember(input: RemoveMemberInput): this;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseDocumentClass } from "document-model";
|
|
2
|
+
import { addMember, updateMemberInfo, removeMember } from "./creators.js";
|
|
3
|
+
export default class BuilderTeam_Member extends BaseDocumentClass {
|
|
4
|
+
addMember(input) {
|
|
5
|
+
return this.dispatch(addMember(input));
|
|
6
|
+
}
|
|
7
|
+
updateMemberInfo(input) {
|
|
8
|
+
return this.dispatch(updateMemberInfo(input));
|
|
9
|
+
}
|
|
10
|
+
removeMember(input) {
|
|
11
|
+
return this.dispatch(removeMember(input));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type SignalDispatch } from "document-model";
|
|
2
|
+
import { type AddMemberAction, type UpdateMemberInfoAction, type RemoveMemberAction } from "./actions.js";
|
|
3
|
+
import { type BuilderTeamState } from "../types.js";
|
|
4
|
+
export interface BuilderTeamMemberOperations {
|
|
5
|
+
addMemberOperation: (state: BuilderTeamState, action: AddMemberAction, dispatch?: SignalDispatch) => void;
|
|
6
|
+
updateMemberInfoOperation: (state: BuilderTeamState, action: UpdateMemberInfoAction, dispatch?: SignalDispatch) => void;
|
|
7
|
+
removeMemberOperation: (state: BuilderTeamState, action: RemoveMemberAction, dispatch?: SignalDispatch) => void;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseDocumentClass, type SignalDispatch } from "document-model";
|
|
2
|
+
import { type BuilderTeamPHState } from "./ph-factories.js";
|
|
3
|
+
import BuilderTeam_Profile from "./profile/object.js";
|
|
4
|
+
import BuilderTeam_Member from "./member/object.js";
|
|
5
|
+
import BuilderTeam_Spaces from "./spaces/object.js";
|
|
6
|
+
import BuilderTeam_Packages from "./packages/object.js";
|
|
7
|
+
export * from "./profile/object.js";
|
|
8
|
+
export * from "./member/object.js";
|
|
9
|
+
export * from "./spaces/object.js";
|
|
10
|
+
export * from "./packages/object.js";
|
|
11
|
+
interface BuilderTeam extends BuilderTeam_Profile, BuilderTeam_Member, BuilderTeam_Spaces, BuilderTeam_Packages {
|
|
12
|
+
}
|
|
13
|
+
declare class BuilderTeam extends BaseDocumentClass<BuilderTeamPHState> {
|
|
14
|
+
static fileExtension: string;
|
|
15
|
+
constructor(initialState?: Partial<BuilderTeamPHState>, dispatch?: SignalDispatch);
|
|
16
|
+
saveToFile(path: string, name?: string): Promise<string>;
|
|
17
|
+
loadFromFile(path: string): Promise<void>;
|
|
18
|
+
static fromFile(path: string): Promise<BuilderTeam>;
|
|
19
|
+
}
|
|
20
|
+
export { BuilderTeam };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BaseDocumentClass, applyMixins, } from "document-model";
|
|
2
|
+
import { reducer } from "./reducer.js";
|
|
3
|
+
import { createDocument } from "./utils.js";
|
|
4
|
+
import BuilderTeam_Profile from "./profile/object.js";
|
|
5
|
+
import BuilderTeam_Member from "./member/object.js";
|
|
6
|
+
import BuilderTeam_Spaces from "./spaces/object.js";
|
|
7
|
+
import BuilderTeam_Packages from "./packages/object.js";
|
|
8
|
+
export * from "./profile/object.js";
|
|
9
|
+
export * from "./member/object.js";
|
|
10
|
+
export * from "./spaces/object.js";
|
|
11
|
+
export * from "./packages/object.js";
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
|
13
|
+
class BuilderTeam extends BaseDocumentClass {
|
|
14
|
+
static fileExtension = "phvba";
|
|
15
|
+
constructor(initialState, dispatch) {
|
|
16
|
+
super(reducer, createDocument(initialState), dispatch);
|
|
17
|
+
}
|
|
18
|
+
saveToFile(path, name) {
|
|
19
|
+
return super.saveToFile(path, BuilderTeam.fileExtension, name);
|
|
20
|
+
}
|
|
21
|
+
loadFromFile(path) {
|
|
22
|
+
return super.loadFromFile(path);
|
|
23
|
+
}
|
|
24
|
+
static async fromFile(path) {
|
|
25
|
+
const document = new this();
|
|
26
|
+
await document.loadFromFile(path);
|
|
27
|
+
return document;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
applyMixins(BuilderTeam, [
|
|
31
|
+
BuilderTeam_Profile,
|
|
32
|
+
BuilderTeam_Member,
|
|
33
|
+
BuilderTeam_Spaces,
|
|
34
|
+
BuilderTeam_Packages,
|
|
35
|
+
]);
|
|
36
|
+
export { BuilderTeam };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Action } from "document-model";
|
|
2
|
+
import type { AddPackageInput, UpdatePackageInfoInput, RemovePackageInput } from "../types.js";
|
|
3
|
+
export type AddPackageAction = Action & {
|
|
4
|
+
type: "ADD_PACKAGE";
|
|
5
|
+
input: AddPackageInput;
|
|
6
|
+
};
|
|
7
|
+
export type UpdatePackageInfoAction = Action & {
|
|
8
|
+
type: "UPDATE_PACKAGE_INFO";
|
|
9
|
+
input: UpdatePackageInfoInput;
|
|
10
|
+
};
|
|
11
|
+
export type RemovePackageAction = Action & {
|
|
12
|
+
type: "REMOVE_PACKAGE";
|
|
13
|
+
input: RemovePackageInput;
|
|
14
|
+
};
|
|
15
|
+
export type BuilderTeamPackagesAction = AddPackageAction | UpdatePackageInfoAction | RemovePackageAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type AddPackageInput, type UpdatePackageInfoInput, type RemovePackageInput } from "../types.js";
|
|
2
|
+
import { type AddPackageAction, type UpdatePackageInfoAction, type RemovePackageAction } from "./actions.js";
|
|
3
|
+
export declare const addPackage: (input: AddPackageInput) => AddPackageAction;
|
|
4
|
+
export declare const updatePackageInfo: (input: UpdatePackageInfoInput) => UpdatePackageInfoAction;
|
|
5
|
+
export declare const removePackage: (input: RemovePackageInput) => RemovePackageAction;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createAction } from "document-model";
|
|
2
|
+
import { z, } from "../types.js";
|
|
3
|
+
export const addPackage = (input) => createAction("ADD_PACKAGE", { ...input }, undefined, z.AddPackageInputSchema, "global");
|
|
4
|
+
export const updatePackageInfo = (input) => createAction("UPDATE_PACKAGE_INFO", { ...input }, undefined, z.UpdatePackageInfoInputSchema, "global");
|
|
5
|
+
export const removePackage = (input) => createAction("REMOVE_PACKAGE", { ...input }, undefined, z.RemovePackageInputSchema, "global");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const errors: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const errors = {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseDocumentClass } from "document-model";
|
|
2
|
+
import { type BuilderTeamPHState } from "../ph-factories.js";
|
|
3
|
+
import { type AddPackageInput, type UpdatePackageInfoInput, type RemovePackageInput } from "../types.js";
|
|
4
|
+
export default class BuilderTeam_Packages extends BaseDocumentClass<BuilderTeamPHState> {
|
|
5
|
+
addPackage(input: AddPackageInput): this;
|
|
6
|
+
updatePackageInfo(input: UpdatePackageInfoInput): this;
|
|
7
|
+
removePackage(input: RemovePackageInput): this;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseDocumentClass } from "document-model";
|
|
2
|
+
import { addPackage, updatePackageInfo, removePackage } from "./creators.js";
|
|
3
|
+
export default class BuilderTeam_Packages extends BaseDocumentClass {
|
|
4
|
+
addPackage(input) {
|
|
5
|
+
return this.dispatch(addPackage(input));
|
|
6
|
+
}
|
|
7
|
+
updatePackageInfo(input) {
|
|
8
|
+
return this.dispatch(updatePackageInfo(input));
|
|
9
|
+
}
|
|
10
|
+
removePackage(input) {
|
|
11
|
+
return this.dispatch(removePackage(input));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type SignalDispatch } from "document-model";
|
|
2
|
+
import { type AddPackageAction, type UpdatePackageInfoAction, type RemovePackageAction } from "./actions.js";
|
|
3
|
+
import { type BuilderTeamState } from "../types.js";
|
|
4
|
+
export interface BuilderTeamPackagesOperations {
|
|
5
|
+
addPackageOperation: (state: BuilderTeamState, action: AddPackageAction, dispatch?: SignalDispatch) => void;
|
|
6
|
+
updatePackageInfoOperation: (state: BuilderTeamState, action: UpdatePackageInfoAction, dispatch?: SignalDispatch) => void;
|
|
7
|
+
removePackageOperation: (state: BuilderTeamState, action: RemovePackageAction, dispatch?: SignalDispatch) => void;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|