@xyo-network/module-model 3.6.0-rc.1 → 3.6.0-rc.10

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.
Files changed (32) hide show
  1. package/dist/neutral/Config/Fields.d.ts +0 -2
  2. package/dist/neutral/Config/Fields.d.ts.map +1 -1
  3. package/dist/neutral/ModuleIdentifier.d.ts +1 -1
  4. package/dist/neutral/ModuleQueryResult.d.ts +4 -4
  5. package/dist/neutral/ModuleQueryResult.d.ts.map +1 -1
  6. package/dist/neutral/Payload/ModuleState.d.ts +22 -2
  7. package/dist/neutral/Payload/ModuleState.d.ts.map +1 -1
  8. package/dist/neutral/index.mjs +16 -10
  9. package/dist/neutral/index.mjs.map +1 -1
  10. package/dist/neutral/instance/ModuleFilter.d.ts +108 -15
  11. package/dist/neutral/instance/ModuleFilter.d.ts.map +1 -1
  12. package/dist/neutral/instance/ModuleResolver.d.ts +36 -5
  13. package/dist/neutral/instance/ModuleResolver.d.ts.map +1 -1
  14. package/dist/neutral/instance/ObjectResolver.d.ts +9 -8
  15. package/dist/neutral/instance/ObjectResolver.d.ts.map +1 -1
  16. package/dist/neutral/instance/asModuleInstance.d.ts +108 -15
  17. package/dist/neutral/instance/asModuleInstance.d.ts.map +1 -1
  18. package/dist/neutral/instance/attachable/asAttachableInstance.d.ts +108 -15
  19. package/dist/neutral/instance/attachable/asAttachableInstance.d.ts.map +1 -1
  20. package/dist/neutral/module/asModule.d.ts +108 -15
  21. package/dist/neutral/module/asModule.d.ts.map +1 -1
  22. package/dist/neutral/module/asModuleObject.d.ts +108 -15
  23. package/dist/neutral/module/asModuleObject.d.ts.map +1 -1
  24. package/dist/neutral/module/isModuleObject.d.ts +36 -5
  25. package/dist/neutral/module/isModuleObject.d.ts.map +1 -1
  26. package/dist/neutral/withModule.d.ts +72 -10
  27. package/dist/neutral/withModule.d.ts.map +1 -1
  28. package/package.json +17 -17
  29. package/src/Config/Fields.ts +0 -3
  30. package/src/ModuleQueryResult.ts +6 -4
  31. package/src/Payload/ModuleState.ts +10 -3
  32. package/src/instance/ObjectResolver.ts +10 -8
@@ -4,11 +4,42 @@ export declare const asModule: {
4
4
  addToResolvers?: boolean;
5
5
  additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("../index.ts").ArchivingModuleConfig & import("../index.ts").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
- schema: "network.xyo.module.config";
9
- }, "schema"> & {
10
- schema: string;
11
- };
7
+ config: import("@xylabs/object").DeepRestrictToStringKeys<{
8
+ schema: import("@xyo-network/payload-model").Schema;
9
+ readonly name?: import("../ModuleIdentifier.ts").ModuleName | undefined;
10
+ readonly archiving?: {
11
+ readonly archivists?: string[] | undefined;
12
+ readonly queries?: string[] | undefined;
13
+ } | undefined;
14
+ readonly allowedQueries?: string[] | undefined;
15
+ readonly archivist?: import("../ModuleIdentifier.ts").ModuleIdentifier | undefined;
16
+ readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
17
+ readonly labels?: {
18
+ [x: string]: string | undefined;
19
+ } | undefined;
20
+ readonly paging?: {
21
+ [x: string]: {
22
+ size?: number | undefined;
23
+ };
24
+ } | undefined;
25
+ readonly retry?: {
26
+ backoff?: number | undefined;
27
+ interval?: number | undefined;
28
+ retries?: number | undefined;
29
+ } | undefined;
30
+ readonly security?: {
31
+ readonly allowAnonymous?: boolean | undefined;
32
+ readonly allowed?: {
33
+ [x: string]: (Lowercase<string> | Lowercase<string>[])[];
34
+ } | undefined;
35
+ readonly disallowed?: {
36
+ [x: string]: Lowercase<string>[];
37
+ } | undefined;
38
+ } | undefined;
39
+ readonly sign?: boolean | undefined;
40
+ readonly storeQueries?: boolean | undefined;
41
+ readonly timestamp?: boolean | undefined;
42
+ }>;
12
43
  ephemeralQueryAccountEnabled?: boolean;
13
44
  moduleIdentifierTransformers?: import("../ModuleIdentifierTransformer.ts").ModuleIdentifierTransformer[];
14
45
  }, import("../index.ts").ModuleEventData<object>>>(value: import("@xylabs/promise").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
@@ -17,11 +48,42 @@ export declare const asModule: {
17
48
  addToResolvers?: boolean;
18
49
  additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
19
50
  allowNameResolution?: boolean;
20
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("../index.ts").ArchivingModuleConfig & import("../index.ts").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
21
- schema: "network.xyo.module.config";
22
- }, "schema"> & {
23
- schema: string;
24
- };
51
+ config: import("@xylabs/object").DeepRestrictToStringKeys<{
52
+ schema: import("@xyo-network/payload-model").Schema;
53
+ readonly name?: import("../ModuleIdentifier.ts").ModuleName | undefined;
54
+ readonly archiving?: {
55
+ readonly archivists?: string[] | undefined;
56
+ readonly queries?: string[] | undefined;
57
+ } | undefined;
58
+ readonly allowedQueries?: string[] | undefined;
59
+ readonly archivist?: import("../ModuleIdentifier.ts").ModuleIdentifier | undefined;
60
+ readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
61
+ readonly labels?: {
62
+ [x: string]: string | undefined;
63
+ } | undefined;
64
+ readonly paging?: {
65
+ [x: string]: {
66
+ size?: number | undefined;
67
+ };
68
+ } | undefined;
69
+ readonly retry?: {
70
+ backoff?: number | undefined;
71
+ interval?: number | undefined;
72
+ retries?: number | undefined;
73
+ } | undefined;
74
+ readonly security?: {
75
+ readonly allowAnonymous?: boolean | undefined;
76
+ readonly allowed?: {
77
+ [x: string]: (Lowercase<string> | Lowercase<string>[])[];
78
+ } | undefined;
79
+ readonly disallowed?: {
80
+ [x: string]: Lowercase<string>[];
81
+ } | undefined;
82
+ } | undefined;
83
+ readonly sign?: boolean | undefined;
84
+ readonly storeQueries?: boolean | undefined;
85
+ readonly timestamp?: boolean | undefined;
86
+ }>;
25
87
  ephemeralQueryAccountEnabled?: boolean;
26
88
  moduleIdentifierTransformers?: import("../ModuleIdentifierTransformer.ts").ModuleIdentifierTransformer[];
27
89
  }, import("../index.ts").ModuleEventData<object>>>(value: import("@xylabs/promise").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("./Module.ts").Module<import("@xylabs/object").BaseParamsFields & {
@@ -29,11 +91,42 @@ export declare const asModule: {
29
91
  addToResolvers?: boolean;
30
92
  additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
31
93
  allowNameResolution?: boolean;
32
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("../index.ts").ArchivingModuleConfig & import("../index.ts").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
33
- schema: "network.xyo.module.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
94
+ config: import("@xylabs/object").DeepRestrictToStringKeys<{
95
+ schema: import("@xyo-network/payload-model").Schema;
96
+ readonly name?: import("../ModuleIdentifier.ts").ModuleName | undefined;
97
+ readonly archiving?: {
98
+ readonly archivists?: string[] | undefined;
99
+ readonly queries?: string[] | undefined;
100
+ } | undefined;
101
+ readonly allowedQueries?: string[] | undefined;
102
+ readonly archivist?: import("../ModuleIdentifier.ts").ModuleIdentifier | undefined;
103
+ readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
104
+ readonly labels?: {
105
+ [x: string]: string | undefined;
106
+ } | undefined;
107
+ readonly paging?: {
108
+ [x: string]: {
109
+ size?: number | undefined;
110
+ };
111
+ } | undefined;
112
+ readonly retry?: {
113
+ backoff?: number | undefined;
114
+ interval?: number | undefined;
115
+ retries?: number | undefined;
116
+ } | undefined;
117
+ readonly security?: {
118
+ readonly allowAnonymous?: boolean | undefined;
119
+ readonly allowed?: {
120
+ [x: string]: (Lowercase<string> | Lowercase<string>[])[];
121
+ } | undefined;
122
+ readonly disallowed?: {
123
+ [x: string]: Lowercase<string>[];
124
+ } | undefined;
125
+ } | undefined;
126
+ readonly sign?: boolean | undefined;
127
+ readonly storeQueries?: boolean | undefined;
128
+ readonly timestamp?: boolean | undefined;
129
+ }>;
37
130
  ephemeralQueryAccountEnabled?: boolean;
38
131
  moduleIdentifierTransformers?: import("../ModuleIdentifierTransformer.ts").ModuleIdentifierTransformer[];
39
132
  }, import("../index.ts").ModuleEventData<object>>>, config?: import("@xylabs/object").TypeCheckConfig): TType;
@@ -1 +1 @@
1
- {"version":3,"file":"asModule.d.ts","sourceRoot":"","sources":["../../../src/module/asModule.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;qEACiF,iBAAiB,iCAAiC,gBAAoB;;;;;;;;;;;;;qEAA+E,iBAAiB;;;;;;;;;;;;wEAAgG,gBAAoB;CADxU,CAAA"}
1
+ {"version":3,"file":"asModule.d.ts","sourceRoot":"","sources":["../../../src/module/asModule.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEACgF,iBAAiB,iCAAiC,gBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAA+E,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEAAgG,gBAAoB;CADvU,CAAA"}
@@ -4,11 +4,42 @@ export declare const asModuleObject: {
4
4
  addToResolvers?: boolean;
5
5
  additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("../index.ts").ArchivingModuleConfig & import("../index.ts").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
- schema: "network.xyo.module.config";
9
- }, "schema"> & {
10
- schema: string;
11
- };
7
+ config: import("@xylabs/object").DeepRestrictToStringKeys<{
8
+ schema: import("@xyo-network/payload-model").Schema;
9
+ readonly name?: import("../ModuleIdentifier.ts").ModuleName | undefined;
10
+ readonly archiving?: {
11
+ readonly archivists?: string[] | undefined;
12
+ readonly queries?: string[] | undefined;
13
+ } | undefined;
14
+ readonly allowedQueries?: string[] | undefined;
15
+ readonly archivist?: import("../ModuleIdentifier.ts").ModuleIdentifier | undefined;
16
+ readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
17
+ readonly labels?: {
18
+ [x: string]: string | undefined;
19
+ } | undefined;
20
+ readonly paging?: {
21
+ [x: string]: {
22
+ size?: number | undefined;
23
+ };
24
+ } | undefined;
25
+ readonly retry?: {
26
+ backoff?: number | undefined;
27
+ interval?: number | undefined;
28
+ retries?: number | undefined;
29
+ } | undefined;
30
+ readonly security?: {
31
+ readonly allowAnonymous?: boolean | undefined;
32
+ readonly allowed?: {
33
+ [x: string]: (Lowercase<string> | Lowercase<string>[])[];
34
+ } | undefined;
35
+ readonly disallowed?: {
36
+ [x: string]: Lowercase<string>[];
37
+ } | undefined;
38
+ } | undefined;
39
+ readonly sign?: boolean | undefined;
40
+ readonly storeQueries?: boolean | undefined;
41
+ readonly timestamp?: boolean | undefined;
42
+ }>;
12
43
  ephemeralQueryAccountEnabled?: boolean;
13
44
  moduleIdentifierTransformers?: import("../ModuleIdentifierTransformer.ts").ModuleIdentifierTransformer[];
14
45
  }, import("../index.ts").ModuleEventData<object>>>(value: import("@xylabs/promise").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
@@ -17,11 +48,42 @@ export declare const asModuleObject: {
17
48
  addToResolvers?: boolean;
18
49
  additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
19
50
  allowNameResolution?: boolean;
20
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("../index.ts").ArchivingModuleConfig & import("../index.ts").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
21
- schema: "network.xyo.module.config";
22
- }, "schema"> & {
23
- schema: string;
24
- };
51
+ config: import("@xylabs/object").DeepRestrictToStringKeys<{
52
+ schema: import("@xyo-network/payload-model").Schema;
53
+ readonly name?: import("../ModuleIdentifier.ts").ModuleName | undefined;
54
+ readonly archiving?: {
55
+ readonly archivists?: string[] | undefined;
56
+ readonly queries?: string[] | undefined;
57
+ } | undefined;
58
+ readonly allowedQueries?: string[] | undefined;
59
+ readonly archivist?: import("../ModuleIdentifier.ts").ModuleIdentifier | undefined;
60
+ readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
61
+ readonly labels?: {
62
+ [x: string]: string | undefined;
63
+ } | undefined;
64
+ readonly paging?: {
65
+ [x: string]: {
66
+ size?: number | undefined;
67
+ };
68
+ } | undefined;
69
+ readonly retry?: {
70
+ backoff?: number | undefined;
71
+ interval?: number | undefined;
72
+ retries?: number | undefined;
73
+ } | undefined;
74
+ readonly security?: {
75
+ readonly allowAnonymous?: boolean | undefined;
76
+ readonly allowed?: {
77
+ [x: string]: (Lowercase<string> | Lowercase<string>[])[];
78
+ } | undefined;
79
+ readonly disallowed?: {
80
+ [x: string]: Lowercase<string>[];
81
+ } | undefined;
82
+ } | undefined;
83
+ readonly sign?: boolean | undefined;
84
+ readonly storeQueries?: boolean | undefined;
85
+ readonly timestamp?: boolean | undefined;
86
+ }>;
25
87
  ephemeralQueryAccountEnabled?: boolean;
26
88
  moduleIdentifierTransformers?: import("../ModuleIdentifierTransformer.ts").ModuleIdentifierTransformer[];
27
89
  }, import("../index.ts").ModuleEventData<object>>>(value: import("@xylabs/promise").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("./Module.ts").Module<import("@xylabs/object").BaseParamsFields & {
@@ -29,11 +91,42 @@ export declare const asModuleObject: {
29
91
  addToResolvers?: boolean;
30
92
  additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
31
93
  allowNameResolution?: boolean;
32
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("../index.ts").ArchivingModuleConfig & import("../index.ts").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
33
- schema: "network.xyo.module.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
94
+ config: import("@xylabs/object").DeepRestrictToStringKeys<{
95
+ schema: import("@xyo-network/payload-model").Schema;
96
+ readonly name?: import("../ModuleIdentifier.ts").ModuleName | undefined;
97
+ readonly archiving?: {
98
+ readonly archivists?: string[] | undefined;
99
+ readonly queries?: string[] | undefined;
100
+ } | undefined;
101
+ readonly allowedQueries?: string[] | undefined;
102
+ readonly archivist?: import("../ModuleIdentifier.ts").ModuleIdentifier | undefined;
103
+ readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
104
+ readonly labels?: {
105
+ [x: string]: string | undefined;
106
+ } | undefined;
107
+ readonly paging?: {
108
+ [x: string]: {
109
+ size?: number | undefined;
110
+ };
111
+ } | undefined;
112
+ readonly retry?: {
113
+ backoff?: number | undefined;
114
+ interval?: number | undefined;
115
+ retries?: number | undefined;
116
+ } | undefined;
117
+ readonly security?: {
118
+ readonly allowAnonymous?: boolean | undefined;
119
+ readonly allowed?: {
120
+ [x: string]: (Lowercase<string> | Lowercase<string>[])[];
121
+ } | undefined;
122
+ readonly disallowed?: {
123
+ [x: string]: Lowercase<string>[];
124
+ } | undefined;
125
+ } | undefined;
126
+ readonly sign?: boolean | undefined;
127
+ readonly storeQueries?: boolean | undefined;
128
+ readonly timestamp?: boolean | undefined;
129
+ }>;
37
130
  ephemeralQueryAccountEnabled?: boolean;
38
131
  moduleIdentifierTransformers?: import("../ModuleIdentifierTransformer.ts").ModuleIdentifierTransformer[];
39
132
  }, import("../index.ts").ModuleEventData<object>>>, config?: import("@xylabs/object").TypeCheckConfig): TType;
@@ -1 +1 @@
1
- {"version":3,"file":"asModuleObject.d.ts","sourceRoot":"","sources":["../../../src/module/asModuleObject.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;qEACmD,iBAAiB,iCAAiC,gBAAoB;;;;;;;;;;;;;qEAA+E,iBAAiB;;;;;;;;;;;;wEAAgG,gBAAoB;CADpS,CAAA"}
1
+ {"version":3,"file":"asModuleObject.d.ts","sourceRoot":"","sources":["../../../src/module/asModuleObject.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEACkD,iBAAiB,iCAAiC,gBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAA+E,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEAAgG,gBAAoB;CADnS,CAAA"}
@@ -6,11 +6,42 @@ export declare const isModuleObject: import("@xylabs/object").TypeCheck<Module<i
6
6
  addToResolvers?: boolean;
7
7
  additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
8
8
  allowNameResolution?: boolean;
9
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("../index.ts").ArchivingModuleConfig & import("../index.ts").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
10
- schema: "network.xyo.module.config";
11
- }, "schema"> & {
12
- schema: string;
13
- };
9
+ config: import("@xylabs/object").DeepRestrictToStringKeys<{
10
+ schema: import("@xyo-network/payload-model").Schema;
11
+ readonly name?: import("../ModuleIdentifier.ts").ModuleName | undefined;
12
+ readonly archiving?: {
13
+ readonly archivists?: string[] | undefined;
14
+ readonly queries?: string[] | undefined;
15
+ } | undefined;
16
+ readonly allowedQueries?: string[] | undefined;
17
+ readonly archivist?: import("../ModuleIdentifier.ts").ModuleIdentifier | undefined;
18
+ readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
19
+ readonly labels?: {
20
+ [x: string]: string | undefined;
21
+ } | undefined;
22
+ readonly paging?: {
23
+ [x: string]: {
24
+ size?: number | undefined;
25
+ };
26
+ } | undefined;
27
+ readonly retry?: {
28
+ backoff?: number | undefined;
29
+ interval?: number | undefined;
30
+ retries?: number | undefined;
31
+ } | undefined;
32
+ readonly security?: {
33
+ readonly allowAnonymous?: boolean | undefined;
34
+ readonly allowed?: {
35
+ [x: string]: (Lowercase<string> | Lowercase<string>[])[];
36
+ } | undefined;
37
+ readonly disallowed?: {
38
+ [x: string]: Lowercase<string>[];
39
+ } | undefined;
40
+ } | undefined;
41
+ readonly sign?: boolean | undefined;
42
+ readonly storeQueries?: boolean | undefined;
43
+ readonly timestamp?: boolean | undefined;
44
+ }>;
14
45
  ephemeralQueryAccountEnabled?: boolean;
15
46
  moduleIdentifierTransformers?: import("../ModuleIdentifierTransformer.ts").ModuleIdentifierTransformer[];
16
47
  }, import("../index.ts").ModuleEventData<object>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"isModuleObject.d.ts","sourceRoot":"","sources":["../../../src/module/isModuleObject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,eAAO,MAAM,mBAAmB,EAAE,eAIjC,CAAA;AAID,eAAO,MAAM,cAAc;;;;;;;;;;;;kDAAsC,CAAA"}
1
+ {"version":3,"file":"isModuleObject.d.ts","sourceRoot":"","sources":["../../../src/module/isModuleObject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,eAAO,MAAM,mBAAmB,EAAE,eAIjC,CAAA;AAID,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAAsC,CAAA"}
@@ -7,11 +7,42 @@ export declare const withModule: <R>(mod: any, closure: (mod: import("./module/M
7
7
  addToResolvers?: boolean;
8
8
  additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
9
9
  allowNameResolution?: boolean;
10
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("./index.ts").ArchivingModuleConfig & import("./index.ts").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
11
- schema: "network.xyo.module.config";
12
- }, "schema"> & {
13
- schema: string;
14
- };
10
+ config: import("@xylabs/object").DeepRestrictToStringKeys<{
11
+ schema: import("@xyo-network/payload-model").Schema;
12
+ readonly name?: import("./ModuleIdentifier.ts").ModuleName | undefined;
13
+ readonly archiving?: {
14
+ readonly archivists?: string[] | undefined;
15
+ readonly queries?: string[] | undefined;
16
+ } | undefined;
17
+ readonly allowedQueries?: string[] | undefined;
18
+ readonly archivist?: import("./ModuleIdentifier.ts").ModuleIdentifier | undefined;
19
+ readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
20
+ readonly labels?: {
21
+ [x: string]: string | undefined;
22
+ } | undefined;
23
+ readonly paging?: {
24
+ [x: string]: {
25
+ size?: number | undefined;
26
+ };
27
+ } | undefined;
28
+ readonly retry?: {
29
+ backoff?: number | undefined;
30
+ interval?: number | undefined;
31
+ retries?: number | undefined;
32
+ } | undefined;
33
+ readonly security?: {
34
+ readonly allowAnonymous?: boolean | undefined;
35
+ readonly allowed?: {
36
+ [x: string]: (Lowercase<string> | Lowercase<string>[])[];
37
+ } | undefined;
38
+ readonly disallowed?: {
39
+ [x: string]: Lowercase<string>[];
40
+ } | undefined;
41
+ } | undefined;
42
+ readonly sign?: boolean | undefined;
43
+ readonly storeQueries?: boolean | undefined;
44
+ readonly timestamp?: boolean | undefined;
45
+ }>;
15
46
  ephemeralQueryAccountEnabled?: boolean;
16
47
  moduleIdentifierTransformers?: import("./ModuleIdentifierTransformer.ts").ModuleIdentifierTransformer[];
17
48
  }, import("./index.ts").ModuleEventData<object>>) => R) => R | undefined;
@@ -20,11 +51,42 @@ export declare const withModuleInstance: <R>(mod: any, closure: (mod: import("./
20
51
  addToResolvers?: boolean;
21
52
  additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
22
53
  allowNameResolution?: boolean;
23
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("./index.ts").ArchivingModuleConfig & import("./index.ts").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
24
- schema: "network.xyo.module.config";
25
- }, "schema"> & {
26
- schema: string;
27
- };
54
+ config: import("@xylabs/object").DeepRestrictToStringKeys<{
55
+ schema: import("@xyo-network/payload-model").Schema;
56
+ readonly name?: import("./ModuleIdentifier.ts").ModuleName | undefined;
57
+ readonly archiving?: {
58
+ readonly archivists?: string[] | undefined;
59
+ readonly queries?: string[] | undefined;
60
+ } | undefined;
61
+ readonly allowedQueries?: string[] | undefined;
62
+ readonly archivist?: import("./ModuleIdentifier.ts").ModuleIdentifier | undefined;
63
+ readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
64
+ readonly labels?: {
65
+ [x: string]: string | undefined;
66
+ } | undefined;
67
+ readonly paging?: {
68
+ [x: string]: {
69
+ size?: number | undefined;
70
+ };
71
+ } | undefined;
72
+ readonly retry?: {
73
+ backoff?: number | undefined;
74
+ interval?: number | undefined;
75
+ retries?: number | undefined;
76
+ } | undefined;
77
+ readonly security?: {
78
+ readonly allowAnonymous?: boolean | undefined;
79
+ readonly allowed?: {
80
+ [x: string]: (Lowercase<string> | Lowercase<string>[])[];
81
+ } | undefined;
82
+ readonly disallowed?: {
83
+ [x: string]: Lowercase<string>[];
84
+ } | undefined;
85
+ } | undefined;
86
+ readonly sign?: boolean | undefined;
87
+ readonly storeQueries?: boolean | undefined;
88
+ readonly timestamp?: boolean | undefined;
89
+ }>;
28
90
  ephemeralQueryAccountEnabled?: boolean;
29
91
  moduleIdentifierTransformers?: import("./ModuleIdentifierTransformer.ts").ModuleIdentifierTransformer[];
30
92
  }, import("./index.ts").ModuleEventData<object>>) => R) => R | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"withModule.d.ts","sourceRoot":"","sources":["../../src/withModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAK/C,eAAO,MAAM,WAAW;aACb,CAAC,SAAS,MAAM,aAAa,SAAS,CAAC,CAAC,CAAC,MACxC,CAAC,OAEF,GAAG,WAEC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KACrB,CAAC,GAAG,SAAS;CAInB,CAAA;AAED,eAAO,MAAM,UAAU,GAXX,CAAC,OAEF,GAAG;;;;;;;;;;;;wEASwC,CAAA;AACtD,eAAO,MAAM,kBAAkB,GAZnB,CAAC,OAEF,GAAG;;;;;;;;;;;;wEAUwD,CAAA"}
1
+ {"version":3,"file":"withModule.d.ts","sourceRoot":"","sources":["../../src/withModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAK/C,eAAO,MAAM,WAAW;aACb,CAAC,SAAS,MAAM,aAAa,SAAS,CAAC,CAAC,CAAC,MACxC,CAAC,OAEF,GAAG,WAEC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KACrB,CAAC,GAAG,SAAS;CAInB,CAAA;AAED,eAAO,MAAM,UAAU,GAXX,CAAC,OAEF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEASwC,CAAA;AACtD,eAAO,MAAM,kBAAkB,GAZnB,CAAC,OAEF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEAUwD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/module-model",
3
- "version": "3.6.0-rc.1",
3
+ "version": "3.6.0-rc.10",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,24 +29,24 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/assert": "^4.4.12",
33
- "@xylabs/exists": "^4.4.12",
34
- "@xylabs/hex": "^4.4.12",
35
- "@xylabs/logger": "^4.4.12",
36
- "@xylabs/object": "^4.4.12",
37
- "@xylabs/promise": "^4.4.12",
38
- "@xylabs/retry": "^4.4.12",
39
- "@xylabs/typeof": "^4.4.12",
40
- "@xyo-network/account-model": "^3.6.0-rc.1",
41
- "@xyo-network/boundwitness-model": "^3.6.0-rc.1",
42
- "@xyo-network/manifest-model": "^3.6.0-rc.1",
43
- "@xyo-network/module-events": "^3.6.0-rc.1",
44
- "@xyo-network/payload-model": "^3.6.0-rc.1"
32
+ "@xylabs/assert": "^4.4.21",
33
+ "@xylabs/exists": "^4.4.21",
34
+ "@xylabs/hex": "^4.4.21",
35
+ "@xylabs/logger": "^4.4.21",
36
+ "@xylabs/object": "^4.4.21",
37
+ "@xylabs/promise": "^4.4.21",
38
+ "@xylabs/retry": "^4.4.21",
39
+ "@xylabs/typeof": "^4.4.21",
40
+ "@xyo-network/account-model": "^3.6.0-rc.10",
41
+ "@xyo-network/boundwitness-model": "^3.6.0-rc.10",
42
+ "@xyo-network/manifest-model": "^3.6.0-rc.10",
43
+ "@xyo-network/module-events": "^3.6.0-rc.10",
44
+ "@xyo-network/payload-model": "^3.6.0-rc.10"
45
45
  },
46
46
  "devDependencies": {
47
- "@xylabs/ts-scripts-yarn3": "^4.2.4",
48
- "@xylabs/tsconfig": "^4.2.4",
49
- "@xylabs/vitest-extended": "^4.4.12",
47
+ "@xylabs/ts-scripts-yarn3": "^4.2.6",
48
+ "@xylabs/tsconfig": "^4.2.6",
49
+ "@xylabs/vitest-extended": "^4.4.21",
50
50
  "typescript": "^5.7.2",
51
51
  "vitest": "^2.1.8"
52
52
  },
@@ -13,9 +13,6 @@ export interface ModuleConfigFields {
13
13
  /** @field The name/address of the Archivist to use for this module */
14
14
  readonly archivist?: ModuleIdentifier
15
15
 
16
- /** @field Enable certifying parent node identity in each query */
17
- readonly certify?: boolean
18
-
19
16
  readonly consoleLogger?: LogLevel
20
17
 
21
18
  /**
@@ -1,8 +1,10 @@
1
1
  import type { BoundWitness } from '@xyo-network/boundwitness-model'
2
- import type { ModuleError, Payload } from '@xyo-network/payload-model'
2
+ import type {
3
+ ModuleError, Payload, WithoutPrivateStorageMeta,
4
+ } from '@xyo-network/payload-model'
3
5
 
4
6
  export type ModuleQueryResult<P extends Payload = Payload, E extends ModuleError = ModuleError, B extends BoundWitness = BoundWitness> = [
5
- B,
6
- P[],
7
- E[],
7
+ WithoutPrivateStorageMeta<B>,
8
+ WithoutPrivateStorageMeta<P>[],
9
+ WithoutPrivateStorageMeta<E>[],
8
10
  ]
@@ -1,5 +1,6 @@
1
- import type { Payload } from '@xyo-network/payload-model'
2
- import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
1
+ import { AsObjectFactory } from '@xylabs/object'
2
+ import type { Payload, WithSources } from '@xyo-network/payload-model'
3
+ import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'
3
4
 
4
5
  export interface StateDictionary {
5
6
  [key: string]: string | number | undefined
@@ -13,6 +14,12 @@ export type ModuleStateSchema = typeof ModuleStateSchema
13
14
 
14
15
  export type ModuleState<T extends StateDictionary = StateDictionary> = Payload<State<T>, ModuleStateSchema>
15
16
 
16
- export const isModuleState = <T extends StateDictionary = StateDictionary>(payload?: Payload | null): payload is ModuleState<T> => {
17
+ export const isModuleState = <T extends StateDictionary = StateDictionary>(payload?: unknown): payload is ModuleState<T> => {
17
18
  return isPayloadOfSchemaType<ModuleState<T>>(ModuleStateSchema)(payload)
18
19
  }
20
+
21
+ export const isModuleStateWithSources = <T extends StateDictionary = StateDictionary>(payload?: unknown): payload is WithSources<ModuleState<T>> => {
22
+ return isPayloadOfSchemaTypeWithSources<ModuleState<T>>(ModuleStateSchema)(payload)
23
+ }
24
+
25
+ export const asModuleState = AsObjectFactory.create<ModuleState<StateDictionary>>(isModuleState)
@@ -8,14 +8,16 @@ export const isObjectResolver = <T extends EmptyObject = AnyObject>(value?: unkn
8
8
  return typeof (value as Partial<ObjectResolver<T>>).resolve === 'function'
9
9
  }
10
10
 
11
- export enum ObjectResolverPriority {
12
- Disabled = -1,
13
- VeryLow = 0,
14
- Low = 1,
15
- Normal = 2,
16
- High = 3,
17
- VeryHigh = 4,
18
- }
11
+ export const ObjectResolverPriority = {
12
+ Disabled: -1,
13
+ VeryLow: 0,
14
+ Low: 1,
15
+ Normal: 2,
16
+ High: 3,
17
+ VeryHigh: 4,
18
+ } as const
19
+
20
+ export type ObjectResolverPriority = typeof ObjectResolverPriority[keyof typeof ObjectResolverPriority]
19
21
 
20
22
  export interface ObjectResolver<TResult extends EmptyObject> {
21
23
  priority: ObjectResolverPriority