@xyo-network/module-model 2.67.0 → 2.69.0-rc.1
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/cjs/ModuleQueryHandlerResult.js +3 -0
- package/dist/cjs/ModuleQueryHandlerResult.js.map +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/ModuleQueryHandlerResult.js +2 -0
- package/dist/esm/ModuleQueryHandlerResult.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/types/Config.d.ts +11 -30
- package/dist/types/Config.d.ts.map +1 -1
- package/dist/types/ModuleQueryHandlerResult.d.ts +3 -0
- package/dist/types/ModuleQueryHandlerResult.d.ts.map +1 -0
- package/dist/types/ModuleQueryResult.d.ts +2 -2
- package/dist/types/ModuleQueryResult.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +14 -13
- package/src/Config.ts +12 -30
- package/src/ModuleQueryHandlerResult.ts +3 -0
- package/src/ModuleQueryResult.ts +2 -2
- package/src/index.ts +1 -0
- package/dist/docs.json +0 -44019
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModuleQueryHandlerResult.js","sourceRoot":"","sources":["../../src/ModuleQueryHandlerResult.ts"],"names":[],"mappings":""}
|
package/dist/cjs/index.js
CHANGED
|
@@ -11,6 +11,7 @@ tslib_1.__exportStar(require("./module"), exports);
|
|
|
11
11
|
tslib_1.__exportStar(require("./ModuleDescription"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("./ModuleFactory"), exports);
|
|
13
13
|
tslib_1.__exportStar(require("./ModuleParams"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./ModuleQueryHandlerResult"), exports);
|
|
14
15
|
tslib_1.__exportStar(require("./ModuleQueryResult"), exports);
|
|
15
16
|
tslib_1.__exportStar(require("./Queries"), exports);
|
|
16
17
|
tslib_1.__exportStar(require("./withModule"), exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,mDAAwB;AACxB,4DAAiC;AACjC,sEAA2C;AAC3C,mDAAwB;AACxB,qDAA0B;AAC1B,gDAAqB;AACrB,mDAAwB;AACxB,8DAAmC;AACnC,0DAA+B;AAC/B,yDAA8B;AAC9B,8DAAmC;AACnC,oDAAyB;AACzB,uDAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,mDAAwB;AACxB,4DAAiC;AACjC,sEAA2C;AAC3C,mDAAwB;AACxB,qDAA0B;AAC1B,gDAAqB;AACrB,mDAAwB;AACxB,8DAAmC;AACnC,0DAA+B;AAC/B,yDAA8B;AAC9B,qEAA0C;AAC1C,8DAAmC;AACnC,oDAAyB;AACzB,uDAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModuleQueryHandlerResult.js","sourceRoot":"","sources":["../../src/ModuleQueryHandlerResult.ts"],"names":[],"mappings":""}
|
package/dist/esm/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export * from './module';
|
|
|
8
8
|
export * from './ModuleDescription';
|
|
9
9
|
export * from './ModuleFactory';
|
|
10
10
|
export * from './ModuleParams';
|
|
11
|
+
export * from './ModuleQueryHandlerResult';
|
|
11
12
|
export * from './ModuleQueryResult';
|
|
12
13
|
export * from './Queries';
|
|
13
14
|
export * from './withModule';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
|
package/dist/types/Config.d.ts
CHANGED
|
@@ -13,47 +13,28 @@ export interface IndividualArchivistConfig {
|
|
|
13
13
|
}
|
|
14
14
|
export type ArchivistModuleConfig = NameOrAddress | IndividualArchivistConfig;
|
|
15
15
|
export type ModuleConfigBase<TConfig extends Payload | undefined = undefined> = Payload<WithAdditional<{
|
|
16
|
-
/**
|
|
17
|
-
* The name/address of the Archivist to use for this module
|
|
18
|
-
*/
|
|
16
|
+
/** @field The name/address of the Archivist to use for this module */
|
|
19
17
|
readonly archivist?: ArchivistModuleConfig;
|
|
20
|
-
/**
|
|
21
|
-
* Friendly name of module (not collision resistent). Can be used to resolve module
|
|
22
|
-
* when registered/attached to Node.
|
|
23
|
-
*/
|
|
18
|
+
/** @field Friendly name of module (not collision resistent). Can be used to resolve module when registered/attached to Node. */
|
|
24
19
|
readonly name?: string;
|
|
25
|
-
/**
|
|
26
|
-
* paging settings for queries
|
|
27
|
-
*/
|
|
20
|
+
/** @field paging settings for queries */
|
|
28
21
|
readonly paging?: Record<string, {
|
|
29
22
|
size?: number;
|
|
30
23
|
}>;
|
|
31
|
-
/**
|
|
32
|
-
* The config schema for the module
|
|
33
|
-
*/
|
|
24
|
+
/** @field The config schema for the module */
|
|
34
25
|
readonly schema: TConfig extends Payload ? TConfig['schema'] : ModuleConfigSchema;
|
|
35
|
-
/**
|
|
36
|
-
* The query schemas and allowed/disallowed addresses which are allowed to issue them
|
|
37
|
-
* against the module. If both allowed and disallowed is specified, then disallowed
|
|
38
|
-
* takes priority
|
|
39
|
-
*/
|
|
26
|
+
/** @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. */
|
|
40
27
|
readonly security?: {
|
|
41
|
-
/**
|
|
42
|
-
* Will the module process queries that have unsigned BoundWitness in query tuples
|
|
43
|
-
*/
|
|
28
|
+
/** @field Will the module process queries that have unsigned BoundWitness in query tuples */
|
|
44
29
|
readonly allowAnonymous?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* If schema in record, then only these address sets can access query
|
|
47
|
-
*/
|
|
30
|
+
/** @field If schema in record, then only these address sets can access query */
|
|
48
31
|
readonly allowed?: Record<SchemaString, (AddressString | CosigningAddressSet)[]>;
|
|
49
|
-
/**
|
|
50
|
-
* If schema in record, then anyone except these addresses can access query
|
|
51
|
-
*/
|
|
32
|
+
/** @field If schema in record, then anyone except these addresses can access query */
|
|
52
33
|
readonly disallowed?: Record<SchemaString, AddressString[]>;
|
|
53
34
|
};
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
|
|
35
|
+
/** @field sign every */
|
|
36
|
+
readonly sign?: boolean;
|
|
37
|
+
/** @field Store the queries made to the module in an archivist if possible */
|
|
57
38
|
readonly storeQueries?: boolean;
|
|
58
39
|
}, Omit<TConfig, 'schema'>>>;
|
|
59
40
|
export type ModuleConfig<TConfig extends Payload | undefined = undefined> = ModuleConfigBase<TConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAA;AAC5D,eAAO,MAAM,kBAAkB,EAAE,kBAAgD,CAAA;AAEjF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAClC,MAAM,MAAM,mBAAmB,GAAG,MAAM,EAAE,CAAA;AAC1C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAA;AAEjC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAElC,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAA;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAC/B;AAED,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,yBAAyB,CAAA;AAE7E,MAAM,MAAM,gBAAgB,CAAC,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,IAAI,OAAO,CACrF,cAAc,CACZ;IACE
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAA;AAC5D,eAAO,MAAM,kBAAkB,EAAE,kBAAgD,CAAA;AAEjF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAClC,MAAM,MAAM,mBAAmB,GAAG,MAAM,EAAE,CAAA;AAC1C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAA;AAEjC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAElC,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAA;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAC/B;AAED,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,yBAAyB,CAAA;AAE7E,MAAM,MAAM,gBAAgB,CAAC,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,IAAI,OAAO,CACrF,cAAc,CACZ;IACE,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,qBAAqB,CAAA;IAE1C,gIAAgI;IAChI,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IAEtB,yCAAyC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAEnD,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,kBAAkB,CAAA;IAEjF,iMAAiM;IACjM,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,6FAA6F;QAC7F,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;QAEjC,gFAAgF;QAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,aAAa,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAA;QAEhF,sFAAsF;QACtF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,EAAE,CAAC,CAAA;KAC5D,CAAA;IAED,yBAAyB;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IAEvB,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAChC,EACD,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CACxB,CACF,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAErG,MAAM,MAAM,eAAe,CAAC,OAAO,SAAS,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,IAC/I,YAAY,CACV,cAAc,CACZ,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,EACvB;IACE,MAAM,EAAE,MAAM,CAAA;CACf,CACF,CACF,CAAA;AAEH,MAAM,MAAM,oBAAoB,CAAC,OAAO,SAAS,eAAe,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG;IAC1I,MAAM,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,YAAY,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModuleQueryHandlerResult.d.ts","sourceRoot":"","sources":["../../src/ModuleQueryHandlerResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,MAAM,MAAM,wBAAwB,GAAG,OAAO,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BoundWitness } from '@xyo-network/boundwitness-model';
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
export type ModuleQueryResult
|
|
2
|
+
import { ModuleError, Payload } from '@xyo-network/payload-model';
|
|
3
|
+
export type ModuleQueryResult = [BoundWitness, Payload[], ModuleError[]];
|
|
4
4
|
//# sourceMappingURL=ModuleQueryResult.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleQueryResult.d.ts","sourceRoot":"","sources":["../../src/ModuleQueryResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"ModuleQueryResult.d.ts","sourceRoot":"","sources":["../../src/ModuleQueryResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEjE,MAAM,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './module';
|
|
|
8
8
|
export * from './ModuleDescription';
|
|
9
9
|
export * from './ModuleFactory';
|
|
10
10
|
export * from './ModuleParams';
|
|
11
|
+
export * from './ModuleQueryHandlerResult';
|
|
11
12
|
export * from './ModuleQueryResult';
|
|
12
13
|
export * from './Queries';
|
|
13
14
|
export * from './withModule';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
|
package/package.json
CHANGED
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xyo-network/account-model": "~2.
|
|
14
|
-
"@xyo-network/address-payload-plugin": "~2.
|
|
15
|
-
"@xyo-network/boundwitness-builder": "~2.
|
|
16
|
-
"@xyo-network/boundwitness-model": "~2.
|
|
17
|
-
"@xyo-network/core": "~2.
|
|
18
|
-
"@xyo-network/logger": "~2.
|
|
19
|
-
"@xyo-network/manifest-model": "~2.
|
|
20
|
-
"@xyo-network/module-events": "~2.
|
|
21
|
-
"@xyo-network/object-identity": "~2.
|
|
22
|
-
"@xyo-network/payload-model": "~2.
|
|
23
|
-
"@xyo-network/promise": "~2.
|
|
24
|
-
"@xyo-network/wallet-model": "~2.
|
|
13
|
+
"@xyo-network/account-model": "~2.69.0-rc.1",
|
|
14
|
+
"@xyo-network/address-payload-plugin": "~2.69.0-rc.1",
|
|
15
|
+
"@xyo-network/boundwitness-builder": "~2.69.0-rc.1",
|
|
16
|
+
"@xyo-network/boundwitness-model": "~2.69.0-rc.1",
|
|
17
|
+
"@xyo-network/core": "~2.69.0-rc.1",
|
|
18
|
+
"@xyo-network/logger": "~2.69.0-rc.1",
|
|
19
|
+
"@xyo-network/manifest-model": "~2.69.0-rc.1",
|
|
20
|
+
"@xyo-network/module-events": "~2.69.0-rc.1",
|
|
21
|
+
"@xyo-network/object-identity": "~2.69.0-rc.1",
|
|
22
|
+
"@xyo-network/payload-model": "~2.69.0-rc.1",
|
|
23
|
+
"@xyo-network/promise": "~2.69.0-rc.1",
|
|
24
|
+
"@xyo-network/wallet-model": "~2.69.0-rc.1",
|
|
25
25
|
"lodash": "^4.17.21"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -62,5 +62,6 @@
|
|
|
62
62
|
},
|
|
63
63
|
"sideEffects": false,
|
|
64
64
|
"types": "dist/types/index.d.ts",
|
|
65
|
-
"version": "2.
|
|
65
|
+
"version": "2.69.0-rc.1",
|
|
66
|
+
"stableVersion": "2.68.0"
|
|
66
67
|
}
|
package/src/Config.ts
CHANGED
|
@@ -21,52 +21,34 @@ export type ArchivistModuleConfig = NameOrAddress | IndividualArchivistConfig
|
|
|
21
21
|
export type ModuleConfigBase<TConfig extends Payload | undefined = undefined> = Payload<
|
|
22
22
|
WithAdditional<
|
|
23
23
|
{
|
|
24
|
-
/**
|
|
25
|
-
* The name/address of the Archivist to use for this module
|
|
26
|
-
*/
|
|
24
|
+
/** @field The name/address of the Archivist to use for this module */
|
|
27
25
|
readonly archivist?: ArchivistModuleConfig
|
|
28
26
|
|
|
29
|
-
/**
|
|
30
|
-
* Friendly name of module (not collision resistent). Can be used to resolve module
|
|
31
|
-
* when registered/attached to Node.
|
|
32
|
-
*/
|
|
27
|
+
/** @field Friendly name of module (not collision resistent). Can be used to resolve module when registered/attached to Node. */
|
|
33
28
|
readonly name?: string
|
|
34
29
|
|
|
35
|
-
/**
|
|
36
|
-
* paging settings for queries
|
|
37
|
-
*/
|
|
30
|
+
/** @field paging settings for queries */
|
|
38
31
|
readonly paging?: Record<string, { size?: number }>
|
|
39
32
|
|
|
40
|
-
/**
|
|
41
|
-
* The config schema for the module
|
|
42
|
-
*/
|
|
33
|
+
/** @field The config schema for the module */
|
|
43
34
|
readonly schema: TConfig extends Payload ? TConfig['schema'] : ModuleConfigSchema
|
|
44
35
|
|
|
45
|
-
/**
|
|
46
|
-
* The query schemas and allowed/disallowed addresses which are allowed to issue them
|
|
47
|
-
* against the module. If both allowed and disallowed is specified, then disallowed
|
|
48
|
-
* takes priority
|
|
49
|
-
*/
|
|
36
|
+
/** @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. */
|
|
50
37
|
readonly security?: {
|
|
51
|
-
/**
|
|
52
|
-
* Will the module process queries that have unsigned BoundWitness in query tuples
|
|
53
|
-
*/
|
|
38
|
+
/** @field Will the module process queries that have unsigned BoundWitness in query tuples */
|
|
54
39
|
readonly allowAnonymous?: boolean
|
|
55
40
|
|
|
56
|
-
/**
|
|
57
|
-
* If schema in record, then only these address sets can access query
|
|
58
|
-
*/
|
|
41
|
+
/** @field If schema in record, then only these address sets can access query */
|
|
59
42
|
readonly allowed?: Record<SchemaString, (AddressString | CosigningAddressSet)[]>
|
|
60
43
|
|
|
61
|
-
/**
|
|
62
|
-
* If schema in record, then anyone except these addresses can access query
|
|
63
|
-
*/
|
|
44
|
+
/** @field If schema in record, then anyone except these addresses can access query */
|
|
64
45
|
readonly disallowed?: Record<SchemaString, AddressString[]>
|
|
65
46
|
}
|
|
66
47
|
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
|
|
48
|
+
/** @field sign every */
|
|
49
|
+
readonly sign?: boolean
|
|
50
|
+
|
|
51
|
+
/** @field Store the queries made to the module in an archivist if possible */
|
|
70
52
|
readonly storeQueries?: boolean
|
|
71
53
|
},
|
|
72
54
|
Omit<TConfig, 'schema'>
|
package/src/ModuleQueryResult.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BoundWitness } from '@xyo-network/boundwitness-model'
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model'
|
|
2
|
+
import { ModuleError, Payload } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
export type ModuleQueryResult
|
|
4
|
+
export type ModuleQueryResult = [BoundWitness, Payload[], ModuleError[]]
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './module'
|
|
|
8
8
|
export * from './ModuleDescription'
|
|
9
9
|
export * from './ModuleFactory'
|
|
10
10
|
export * from './ModuleParams'
|
|
11
|
+
export * from './ModuleQueryHandlerResult'
|
|
11
12
|
export * from './ModuleQueryResult'
|
|
12
13
|
export * from './Queries'
|
|
13
14
|
export * from './withModule'
|