@xyo-network/module-model 2.84.14 → 2.84.16
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/browser/Config.d.cts +3 -5
- package/dist/browser/Config.d.cts.map +1 -1
- package/dist/browser/Config.d.mts +3 -5
- package/dist/browser/Config.d.mts.map +1 -1
- package/dist/browser/Config.d.ts +3 -5
- package/dist/browser/Config.d.ts.map +1 -1
- package/dist/browser/Payload/ModuleState.d.cts +2 -8
- package/dist/browser/Payload/ModuleState.d.cts.map +1 -1
- package/dist/browser/Payload/ModuleState.d.mts +2 -8
- package/dist/browser/Payload/ModuleState.d.mts.map +1 -1
- package/dist/browser/Payload/ModuleState.d.ts +2 -8
- package/dist/browser/Payload/ModuleState.d.ts.map +1 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/node/Config.d.cts +3 -5
- package/dist/node/Config.d.cts.map +1 -1
- package/dist/node/Config.d.mts +3 -5
- package/dist/node/Config.d.mts.map +1 -1
- package/dist/node/Config.d.ts +3 -5
- package/dist/node/Config.d.ts.map +1 -1
- package/dist/node/Payload/ModuleState.d.cts +2 -8
- package/dist/node/Payload/ModuleState.d.cts.map +1 -1
- package/dist/node/Payload/ModuleState.d.mts +2 -8
- package/dist/node/Payload/ModuleState.d.mts.map +1 -1
- package/dist/node/Payload/ModuleState.d.ts +2 -8
- package/dist/node/Payload/ModuleState.d.ts.map +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +9 -9
- package/src/Config.ts +44 -56
package/src/Config.ts
CHANGED
|
@@ -28,68 +28,56 @@ export interface ArchivingModuleConfig {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export type ModuleConfig<
|
|
32
|
-
TConfig extends Payload | void = void,
|
|
33
|
-
TAdditionalParams extends EmptyObject | void = void,
|
|
34
|
-
TSchema extends Schema | void = void,
|
|
35
|
-
> = Payload<
|
|
31
|
+
export type ModuleConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends Schema | void = void> = Payload<
|
|
36
32
|
WithAdditional<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
TConfig
|
|
80
|
-
>,
|
|
81
|
-
TAdditionalParams
|
|
33
|
+
{
|
|
34
|
+
/** @field The path to use when creating the account */
|
|
35
|
+
accountDerivationPath?: string
|
|
36
|
+
|
|
37
|
+
/** @field The name/address of the Archivist to use for this module */
|
|
38
|
+
readonly archivist?: ArchivistModuleConfig
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @field The labels used for this module. If a label is specified, then the
|
|
42
|
+
* ModuleFactoryLocator will attempt to find a ModuleFactory with the corresponding
|
|
43
|
+
* labels to construct this module.
|
|
44
|
+
*/
|
|
45
|
+
readonly labels?: Labels
|
|
46
|
+
|
|
47
|
+
/** @field Friendly name of module (not collision resistent). Can be used to resolve module when registered/attached to Node. */
|
|
48
|
+
readonly name?: string
|
|
49
|
+
|
|
50
|
+
/** @field paging settings for queries */
|
|
51
|
+
readonly paging?: Record<string, { size?: number }>
|
|
52
|
+
|
|
53
|
+
/** @field The query schemas and allowed/disallowed addresses which are allowed to issue them against the module. If both allowed and disallowed is specified, then disallowed takes priority. */
|
|
54
|
+
readonly security?: {
|
|
55
|
+
/** @field Will the module process queries that have unsigned BoundWitness in query tuples */
|
|
56
|
+
readonly allowAnonymous?: boolean
|
|
57
|
+
|
|
58
|
+
/** @field If schema in record, then only these address sets can access query */
|
|
59
|
+
readonly allowed?: Record<SchemaString, (Address | CosigningAddressSet)[]>
|
|
60
|
+
|
|
61
|
+
/** @field If schema in record, then anyone except these addresses can access query */
|
|
62
|
+
readonly disallowed?: Record<SchemaString, Address[]>
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** @field sign every query */
|
|
66
|
+
readonly sign?: boolean
|
|
67
|
+
|
|
68
|
+
/** @field Store the queries made to the module in an archivist if possible */
|
|
69
|
+
readonly storeQueries?: boolean
|
|
70
|
+
|
|
71
|
+
/** @field add a timestamp payload to every query */
|
|
72
|
+
readonly timestamp?: boolean
|
|
73
|
+
} & ArchivingModuleConfig,
|
|
74
|
+
TConfig
|
|
82
75
|
>,
|
|
83
76
|
TSchema extends Schema ? TSchema : TConfig extends Payload ? TConfig['schema'] : ModuleConfigSchema
|
|
84
77
|
>
|
|
85
78
|
|
|
86
79
|
export type AnyConfigSchema<TConfig extends Omit<ModuleConfig, 'schema'> & { schema: string } = Omit<ModuleConfig, 'schema'> & { schema: string }> =
|
|
87
|
-
ModuleConfig<
|
|
88
|
-
{
|
|
89
|
-
schema: string
|
|
90
|
-
},
|
|
91
|
-
Omit<TConfig, 'schema'>
|
|
92
|
-
>
|
|
80
|
+
ModuleConfig<TConfig, string>
|
|
93
81
|
|
|
94
82
|
export type OptionalConfigSchema<TConfig extends AnyConfigSchema<ModuleConfig> = AnyConfigSchema<ModuleConfig>> = Omit<TConfig, 'schema'> & {
|
|
95
83
|
schema?: TConfig['schema']
|