@powerhousedao/network-admin 0.0.25 → 0.0.26
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-profile/gen/actions.d.ts +4 -0
- package/dist/document-models/builder-profile/gen/actions.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/actions.js +1 -0
- package/dist/document-models/builder-profile/gen/builder/actions.d.ts +8 -0
- package/dist/document-models/builder-profile/gen/builder/actions.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/builder/actions.js +1 -0
- package/dist/document-models/builder-profile/gen/builder/creators.d.ts +4 -0
- package/dist/document-models/builder-profile/gen/builder/creators.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/builder/creators.js +3 -0
- package/dist/document-models/builder-profile/gen/builder/error.d.ts +2 -0
- package/dist/document-models/builder-profile/gen/builder/error.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/builder/error.js +1 -0
- package/dist/document-models/builder-profile/gen/builder/object.d.ts +7 -0
- package/dist/document-models/builder-profile/gen/builder/object.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/builder/object.js +7 -0
- package/dist/document-models/builder-profile/gen/builder/operations.d.ts +7 -0
- package/dist/document-models/builder-profile/gen/builder/operations.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/builder/operations.js +1 -0
- package/dist/document-models/builder-profile/gen/creators.d.ts +2 -0
- package/dist/document-models/builder-profile/gen/creators.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/creators.js +1 -0
- package/dist/document-models/builder-profile/gen/document-model.d.ts +3 -0
- package/dist/document-models/builder-profile/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/document-model.js +48 -0
- package/dist/document-models/builder-profile/gen/index.d.ts +8 -0
- package/dist/document-models/builder-profile/gen/index.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/index.js +6 -0
- package/dist/document-models/builder-profile/gen/object.d.ts +15 -0
- package/dist/document-models/builder-profile/gen/object.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/object.js +25 -0
- package/dist/document-models/builder-profile/gen/ph-factories.d.ts +27 -0
- package/dist/document-models/builder-profile/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/ph-factories.js +54 -0
- package/dist/document-models/builder-profile/gen/reducer.d.ts +5 -0
- package/dist/document-models/builder-profile/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/reducer.js +20 -0
- package/dist/document-models/builder-profile/gen/schema/index.d.ts +3 -0
- package/dist/document-models/builder-profile/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/schema/index.js +2 -0
- package/dist/document-models/builder-profile/gen/schema/types.d.ts +151 -0
- package/dist/document-models/builder-profile/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/schema/types.js +1 -0
- package/dist/document-models/builder-profile/gen/schema/zod.d.ts +12 -0
- package/dist/document-models/builder-profile/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/schema/zod.js +24 -0
- package/dist/document-models/builder-profile/gen/types.d.ts +10 -0
- package/dist/document-models/builder-profile/gen/types.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/types.js +1 -0
- package/dist/document-models/builder-profile/gen/utils.d.ts +22 -0
- package/dist/document-models/builder-profile/gen/utils.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/utils.js +46 -0
- package/dist/document-models/builder-profile/index.d.ts +25 -0
- package/dist/document-models/builder-profile/index.d.ts.map +1 -0
- package/dist/document-models/builder-profile/index.js +21 -0
- package/dist/document-models/builder-profile/src/reducers/builder.d.ts +3 -0
- package/dist/document-models/builder-profile/src/reducers/builder.d.ts.map +1 -0
- package/dist/document-models/builder-profile/src/reducers/builder.js +9 -0
- package/dist/document-models/builder-profile/src/tests/builder.test.d.ts +2 -0
- package/dist/document-models/builder-profile/src/tests/builder.test.d.ts.map +1 -0
- package/dist/document-models/builder-profile/src/tests/builder.test.js +116 -0
- package/dist/document-models/builder-profile/src/tests/document-model.test.d.ts +6 -0
- package/dist/document-models/builder-profile/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/builder-profile/src/tests/document-model.test.js +18 -0
- package/dist/document-models/builder-profile/src/utils.d.ts +2 -0
- package/dist/document-models/builder-profile/src/utils.d.ts.map +1 -0
- package/dist/document-models/builder-profile/src/utils.js +1 -0
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/editors/builder-profile/editor.d.ts +4 -0
- package/dist/editors/builder-profile/editor.d.ts.map +1 -0
- package/dist/editors/builder-profile/editor.js +101 -0
- package/dist/editors/builder-profile/index.d.ts +3 -0
- package/dist/editors/builder-profile/index.d.ts.map +1 -0
- package/dist/editors/builder-profile/index.js +11 -0
- package/dist/editors/hooks/useBuilderProfileDocument.d.ts +3 -0
- package/dist/editors/hooks/useBuilderProfileDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useBuilderProfileDocument.js +8 -0
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/powerhouse.manifest.json +7 -3
- package/dist/style.css +5371 -0
- package/dist/subgraphs/builder-profile/index.d.ts +11 -0
- package/dist/subgraphs/builder-profile/index.d.ts.map +1 -0
- package/dist/subgraphs/builder-profile/index.js +11 -0
- package/dist/subgraphs/builder-profile/resolvers.d.ts +3 -0
- package/dist/subgraphs/builder-profile/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/builder-profile/resolvers.js +84 -0
- package/dist/subgraphs/builder-profile/schema.d.ts +3 -0
- package/dist/subgraphs/builder-profile/schema.d.ts.map +1 -0
- package/dist/subgraphs/builder-profile/schema.js +49 -0
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAExE,cAAc,sBAAsB,CAAC;AAErC,MAAM,MAAM,oBAAoB,GAAG,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./builder/actions.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Action } from "document-model";
|
|
2
|
+
import type { UpdateProfileInput } from "../types.js";
|
|
3
|
+
export type UpdateProfileAction = Action & {
|
|
4
|
+
type: "UPDATE_PROFILE";
|
|
5
|
+
input: UpdateProfileInput;
|
|
6
|
+
};
|
|
7
|
+
export type BuilderProfileBuilderAction = UpdateProfileAction;
|
|
8
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG;IACzC,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,kBAAkB,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/creators.ts"],"names":[],"mappings":"AACA,OAAO,EAAK,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,wBAOpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/error.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,IAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const errors = {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseDocumentClass } from "document-model";
|
|
2
|
+
import { BuilderProfilePHState } from "../ph-factories.js";
|
|
3
|
+
import { type UpdateProfileInput } from "../types.js";
|
|
4
|
+
export default class BuilderProfile_Builder extends BaseDocumentClass<BuilderProfilePHState> {
|
|
5
|
+
updateProfile(input: UpdateProfileInput): this;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,iBAAiB,CAAC,qBAAqB,CAAC;IACnF,aAAa,CAAC,KAAK,EAAE,kBAAkB;CAG/C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SignalDispatch } from "document-model";
|
|
2
|
+
import { type UpdateProfileAction } from "./actions.js";
|
|
3
|
+
import { type BuilderProfileState } from "../types.js";
|
|
4
|
+
export interface BuilderProfileBuilderOperations {
|
|
5
|
+
updateProfileOperation: (state: BuilderProfileState, action: UpdateProfileAction, dispatch?: SignalDispatch) => void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,+BAA+B;IAC9C,sBAAsB,EAAE,CACtB,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;CACX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./builder/creators.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAE,kBAkD3B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export const documentModel = {
|
|
2
|
+
author: {
|
|
3
|
+
name: "Powerhouse",
|
|
4
|
+
website: "https://powerhouse.inc/",
|
|
5
|
+
},
|
|
6
|
+
description: "A builder profile document",
|
|
7
|
+
extension: ".phdm",
|
|
8
|
+
id: "powerhouse/builder-profile",
|
|
9
|
+
name: "Builder Profile",
|
|
10
|
+
specifications: [
|
|
11
|
+
{
|
|
12
|
+
changeLog: [],
|
|
13
|
+
modules: [
|
|
14
|
+
{
|
|
15
|
+
description: "",
|
|
16
|
+
id: "09f6c21b-cd1a-4218-8f2f-448c947c79bd",
|
|
17
|
+
name: "builder",
|
|
18
|
+
operations: [
|
|
19
|
+
{
|
|
20
|
+
description: "",
|
|
21
|
+
errors: [],
|
|
22
|
+
examples: [],
|
|
23
|
+
id: "ee51a588-dd04-4819-beeb-a0cbdd598c81",
|
|
24
|
+
name: "UPDATE_PROFILE",
|
|
25
|
+
reducer: "",
|
|
26
|
+
schema: "input UpdateProfileInput {\n id: PHID\n slug: String\n name: String\n icon: URL\n description: String\n}",
|
|
27
|
+
scope: "global",
|
|
28
|
+
template: "",
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
state: {
|
|
34
|
+
global: {
|
|
35
|
+
examples: [],
|
|
36
|
+
initialValue: '"{\\n \\"id\\": null,\\n \\"slug\\": null,\\n \\"name\\": null,\\n \\"icon\\": null,\\n \\"description\\": null\\n}"',
|
|
37
|
+
schema: "type BuilderProfileState {\n id: PHID\n slug: String\n name: String\n icon: URL\n description: String\n}",
|
|
38
|
+
},
|
|
39
|
+
local: {
|
|
40
|
+
examples: [],
|
|
41
|
+
initialValue: '""',
|
|
42
|
+
schema: "",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
version: 1,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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 { BuilderProfilePHState } from "./ph-factories.js";
|
|
7
|
+
export { createBuilderProfileDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC"}
|
|
@@ -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 { createBuilderProfileDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseDocumentClass, type SignalDispatch } from "document-model";
|
|
2
|
+
import { BuilderProfilePHState } from "./ph-factories.js";
|
|
3
|
+
import BuilderProfile_Builder from "./builder/object.js";
|
|
4
|
+
export * from "./builder/object.js";
|
|
5
|
+
interface BuilderProfile extends BuilderProfile_Builder {
|
|
6
|
+
}
|
|
7
|
+
declare class BuilderProfile extends BaseDocumentClass<BuilderProfilePHState> {
|
|
8
|
+
static fileExtension: string;
|
|
9
|
+
constructor(initialState?: Partial<BuilderProfilePHState>, dispatch?: SignalDispatch);
|
|
10
|
+
saveToFile(path: string, name?: string): Promise<string>;
|
|
11
|
+
loadFromFile(path: string): Promise<void>;
|
|
12
|
+
static fromFile(path: string): Promise<BuilderProfile>;
|
|
13
|
+
}
|
|
14
|
+
export { BuilderProfile };
|
|
15
|
+
//# sourceMappingURL=object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/object.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,sBAAsB,MAAM,qBAAqB,CAAC;AAEzD,cAAc,qBAAqB,CAAC;AAGpC,UAAU,cAAe,SAAQ,sBAAsB;CAAG;AAG1D,cAAM,cAAe,SAAQ,iBAAiB,CAAC,qBAAqB,CAAC;IACnE,MAAM,CAAC,aAAa,SAAW;gBAG7B,YAAY,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,EAC7C,QAAQ,CAAC,EAAE,cAAc;IAKpB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IAItC,YAAY,CAAC,IAAI,EAAE,MAAM;WAInB,QAAQ,CAAC,IAAI,EAAE,MAAM;CAKnC;AAID,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseDocumentClass, applyMixins, } from "document-model";
|
|
2
|
+
import { reducer } from "./reducer.js";
|
|
3
|
+
import { createDocument } from "./utils.js";
|
|
4
|
+
import BuilderProfile_Builder from "./builder/object.js";
|
|
5
|
+
export * from "./builder/object.js";
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
|
7
|
+
class BuilderProfile extends BaseDocumentClass {
|
|
8
|
+
static fileExtension = ".phdm";
|
|
9
|
+
constructor(initialState, dispatch) {
|
|
10
|
+
super(reducer, createDocument(initialState), dispatch);
|
|
11
|
+
}
|
|
12
|
+
saveToFile(path, name) {
|
|
13
|
+
return super.saveToFile(path, BuilderProfile.fileExtension, name);
|
|
14
|
+
}
|
|
15
|
+
loadFromFile(path) {
|
|
16
|
+
return super.loadFromFile(path);
|
|
17
|
+
}
|
|
18
|
+
static async fromFile(path) {
|
|
19
|
+
const document = new this();
|
|
20
|
+
await document.loadFromFile(path);
|
|
21
|
+
return document;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
applyMixins(BuilderProfile, [BuilderProfile_Builder]);
|
|
25
|
+
export { BuilderProfile };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory methods for creating BuilderProfileDocument instances
|
|
3
|
+
*/
|
|
4
|
+
import { type PHAuthState, type PHDocumentState, type PHBaseState } from "document-model";
|
|
5
|
+
import type { BuilderProfileDocument, BuilderProfileLocalState, BuilderProfileState } from "./types.js";
|
|
6
|
+
export type BuilderProfilePHState = PHBaseState & {
|
|
7
|
+
global: BuilderProfileState;
|
|
8
|
+
local: BuilderProfileLocalState;
|
|
9
|
+
};
|
|
10
|
+
export declare function defaultGlobalState(): BuilderProfileState;
|
|
11
|
+
export declare function defaultLocalState(): BuilderProfileLocalState;
|
|
12
|
+
export declare function defaultPHState(): BuilderProfilePHState;
|
|
13
|
+
export declare function createGlobalState(state?: Partial<BuilderProfileState>): BuilderProfileState;
|
|
14
|
+
export declare function createLocalState(state?: Partial<BuilderProfileLocalState>): BuilderProfileLocalState;
|
|
15
|
+
export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<BuilderProfileState>, localState?: Partial<BuilderProfileLocalState>): BuilderProfilePHState;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a BuilderProfileDocument 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 createBuilderProfileDocument(state?: Partial<{
|
|
22
|
+
auth?: Partial<PHAuthState>;
|
|
23
|
+
document?: Partial<PHDocumentState>;
|
|
24
|
+
global?: Partial<BuilderProfileState>;
|
|
25
|
+
local?: Partial<BuilderProfileLocalState>;
|
|
26
|
+
}>): BuilderProfileDocument;
|
|
27
|
+
//# sourceMappingURL=ph-factories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ph-factories.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/ph-factories.ts"],"names":[],"mappings":"AAAA;;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
|
3
|
+
*/
|
|
4
|
+
import { createBaseState, defaultBaseState, } from "document-model";
|
|
5
|
+
import { createDocument } from "./utils.js";
|
|
6
|
+
export function defaultGlobalState() {
|
|
7
|
+
return {
|
|
8
|
+
id: null,
|
|
9
|
+
slug: null,
|
|
10
|
+
name: null,
|
|
11
|
+
icon: null,
|
|
12
|
+
description: null,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export function defaultLocalState() {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
export function defaultPHState() {
|
|
19
|
+
return {
|
|
20
|
+
...defaultBaseState(),
|
|
21
|
+
global: defaultGlobalState(),
|
|
22
|
+
local: defaultLocalState(),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function createGlobalState(state) {
|
|
26
|
+
return {
|
|
27
|
+
...defaultGlobalState(),
|
|
28
|
+
...(state || {}),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function createLocalState(state) {
|
|
32
|
+
return {
|
|
33
|
+
...defaultLocalState(),
|
|
34
|
+
...(state || {}),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function createState(baseState, globalState, localState) {
|
|
38
|
+
return {
|
|
39
|
+
...createBaseState(baseState?.auth, baseState?.document),
|
|
40
|
+
global: createGlobalState(globalState),
|
|
41
|
+
local: createLocalState(localState),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a BuilderProfileDocument with custom global and local state
|
|
46
|
+
* This properly handles the PHBaseState requirements while allowing
|
|
47
|
+
* document-specific state to be set.
|
|
48
|
+
*/
|
|
49
|
+
export function createBuilderProfileDocument(state) {
|
|
50
|
+
const document = createDocument(state
|
|
51
|
+
? createState(createBaseState(state.auth, state.document), state.global, state.local)
|
|
52
|
+
: undefined);
|
|
53
|
+
return document;
|
|
54
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type StateReducer } from "document-model";
|
|
2
|
+
import { BuilderProfilePHState } from "./ph-factories.js";
|
|
3
|
+
export declare const stateReducer: StateReducer<BuilderProfilePHState>;
|
|
4
|
+
export declare const reducer: import("document-model").Reducer<BuilderProfilePHState>;
|
|
5
|
+
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/reducer.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAK1D,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,qBAAqB,CAsB5D,CAAC;AAEF,eAAO,MAAM,OAAO,yDAAqD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// TODO: remove eslint-disable rules once refactor is done
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
4
|
+
import { isDocumentAction, createReducer, } from "document-model";
|
|
5
|
+
import { z } from "./types.js";
|
|
6
|
+
import { reducer as BuilderReducer } from "../src/reducers/builder.js";
|
|
7
|
+
export const stateReducer = (state, action, dispatch) => {
|
|
8
|
+
if (isDocumentAction(action)) {
|
|
9
|
+
return state;
|
|
10
|
+
}
|
|
11
|
+
switch (action.type) {
|
|
12
|
+
case "UPDATE_PROFILE":
|
|
13
|
+
z.UpdateProfileInputSchema().parse(action.input);
|
|
14
|
+
BuilderReducer.updateProfileOperation(state[action.scope], action, dispatch);
|
|
15
|
+
break;
|
|
16
|
+
default:
|
|
17
|
+
return state;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export const reducer = createReducer(stateReducer);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
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 BuilderProfileState = {
|
|
138
|
+
description: Maybe<Scalars["String"]["output"]>;
|
|
139
|
+
icon: Maybe<Scalars["URL"]["output"]>;
|
|
140
|
+
id: Maybe<Scalars["PHID"]["output"]>;
|
|
141
|
+
name: Maybe<Scalars["String"]["output"]>;
|
|
142
|
+
slug: Maybe<Scalars["String"]["output"]>;
|
|
143
|
+
};
|
|
144
|
+
export type UpdateProfileInput = {
|
|
145
|
+
description?: InputMaybe<Scalars["String"]["input"]>;
|
|
146
|
+
icon?: InputMaybe<Scalars["URL"]["input"]>;
|
|
147
|
+
id?: InputMaybe<Scalars["PHID"]["input"]>;
|
|
148
|
+
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
149
|
+
slug?: InputMaybe<Scalars["String"]["input"]>;
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/schema/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAChC,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACjD,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,IAAI;KACvD,CAAC,IAAI,M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AAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,EAAE,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9C,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;CAC/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { BuilderProfileState, UpdateProfileInput } 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 BuilderProfileStateSchema(): z.ZodObject<Properties<BuilderProfileState>>;
|
|
10
|
+
export declare function UpdateProfileInputSchema(): z.ZodObject<Properties<UpdateProfileInput>>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/schema/zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE1E,KAAK,UAAU,CAAC,CAAC,IAAI,QAAQ,CAAC;KAC3B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3C,CAAC,CAAC;AAEH,KAAK,iBAAiB,GAAG,EAAE,CAAC;AAE5B,eAAO,MAAM,mBAAmB,GAAI,GAAG,GAAG,KAAG,CAAC,IAAI,iBACnB,CAAC;AAEhC,eAAO,MAAM,uBAAuB,gDAEI,CAAC;AAEzC,wBAAgB,yBAAyB,IAAI,CAAC,CAAC,SAAS,CACtD,UAAU,CAAC,mBAAmB,CAAC,CAChC,CASA;AAED,wBAAgB,wBAAwB,IAAI,CAAC,CAAC,SAAS,CACrD,UAAU,CAAC,kBAAkB,CAAC,CAC/B,CAQA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 BuilderProfileStateSchema() {
|
|
7
|
+
return z.object({
|
|
8
|
+
__typename: z.literal("BuilderProfileState").optional(),
|
|
9
|
+
description: z.string().nullable(),
|
|
10
|
+
icon: z.string().url().nullable(),
|
|
11
|
+
id: z.string().nullable(),
|
|
12
|
+
name: z.string().nullable(),
|
|
13
|
+
slug: z.string().nullable(),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export function UpdateProfileInputSchema() {
|
|
17
|
+
return z.object({
|
|
18
|
+
description: z.string().nullish(),
|
|
19
|
+
icon: z.string().url().nullish(),
|
|
20
|
+
id: z.string().nullish(),
|
|
21
|
+
name: z.string().nullish(),
|
|
22
|
+
slug: z.string().nullish(),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PHDocument } from "document-model";
|
|
2
|
+
import type { BuilderProfileAction } from "./actions.js";
|
|
3
|
+
import type { BuilderProfilePHState } from "./ph-factories.js";
|
|
4
|
+
import type { BuilderProfileState } from "./schema/types.js";
|
|
5
|
+
export { z } from "./schema/index.js";
|
|
6
|
+
export type * from "./schema/types.js";
|
|
7
|
+
type BuilderProfileLocalState = Record<PropertyKey, never>;
|
|
8
|
+
export type BuilderProfileDocument = PHDocument<BuilderProfilePHState>;
|
|
9
|
+
export type { BuilderProfileState, BuilderProfileLocalState, BuilderProfileAction, };
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,mBAAmB,mBAAmB,CAAC;AACvC,KAAK,wBAAwB,GAAG,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAC3D,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;AACvE,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,GACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { z } from "./schema/index.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CreateDocument, type CreateState, type LoadFromFile, type LoadFromInput } from "document-model";
|
|
2
|
+
import { type BuilderProfileState, type BuilderProfileLocalState } from "./types.js";
|
|
3
|
+
import { BuilderProfilePHState } from "./ph-factories.js";
|
|
4
|
+
export declare const initialGlobalState: BuilderProfileState;
|
|
5
|
+
export declare const initialLocalState: BuilderProfileLocalState;
|
|
6
|
+
export declare const createState: CreateState<BuilderProfilePHState>;
|
|
7
|
+
export declare const createDocument: CreateDocument<BuilderProfilePHState>;
|
|
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<BuilderProfilePHState>;
|
|
11
|
+
export declare const loadFromInput: LoadFromInput<BuilderProfilePHState>;
|
|
12
|
+
declare const utils: {
|
|
13
|
+
fileExtension: string;
|
|
14
|
+
createState: CreateState<BuilderProfilePHState>;
|
|
15
|
+
createDocument: CreateDocument<BuilderProfilePHState>;
|
|
16
|
+
saveToFile: (document: any, path: string, name?: string) => Promise<string>;
|
|
17
|
+
saveToFileHandle: (document: any, input: any) => Promise<void>;
|
|
18
|
+
loadFromFile: LoadFromFile<BuilderProfilePHState>;
|
|
19
|
+
loadFromInput: LoadFromInput<BuilderProfilePHState>;
|
|
20
|
+
};
|
|
21
|
+
export default utils;
|
|
22
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,aAAa,EAQnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,eAAO,MAAM,kBAAkB,EAAE,mBAMhC,CAAC;AACF,eAAO,MAAM,iBAAiB,EAAE,wBAA6B,CAAC;AAE9D,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,qBAAqB,CAM1D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,qBAAqB,CAQhE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,UAAU,GAAG,EAAE,MAAM,MAAM,EAAE,OAAO,MAAM,oBAEpE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,UAAU,GAAG,EAAE,OAAO,GAAG,kBAEzD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,qBAAqB,CAE5D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,qBAAqB,CAE9D,CAAC;AAEF,QAAA,MAAM,KAAK;;;;2BAhB0B,GAAG,QAAQ,MAAM,SAAS,MAAM;iCAI1B,GAAG,SAAS,GAAG;;;CAoBzD,CAAC;AAEF,eAAe,KAAK,CAAC"}
|