@xyo-network/archivist-model 3.9.0 → 3.9.2
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/neutral/index.d.ts +18 -10
- package/package.json +8 -8
- package/src/Params.ts +14 -3
package/dist/neutral/index.d.ts
CHANGED
|
@@ -110,7 +110,15 @@ type ArchivistConfig<TConfig extends Payload | EmptyObject | void = void, TSchem
|
|
|
110
110
|
interface ArchivistModuleInstance<TParams extends ModuleParams<AnyConfigSchema<ArchivistConfig>> = ModuleParams<AnyConfigSchema<ArchivistConfig>>, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends Module<TParams, TEventData> {
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
interface ArchivistParentInstances {
|
|
114
|
+
commit?: ArchivistInstance[];
|
|
115
|
+
read?: ArchivistInstance[];
|
|
116
|
+
write?: ArchivistInstance[];
|
|
117
|
+
}
|
|
118
|
+
interface ArchivistParamFields {
|
|
119
|
+
parents?: ArchivistParentInstances;
|
|
120
|
+
}
|
|
121
|
+
type ArchivistParams<TConfig extends AnyConfigSchema<ArchivistConfig> = AnyConfigSchema<ArchivistConfig>, TAdditionalParams extends EmptyObject = EmptyObject> = ModuleParams<TConfig, WithAdditional<ArchivistParamFields & TAdditionalParams>>;
|
|
114
122
|
|
|
115
123
|
interface ArchivistRawQueryFunctions {
|
|
116
124
|
allQuery(account?: AccountInstance): Promisable<ModuleQueryResult>;
|
|
@@ -192,7 +200,7 @@ declare const asAttachableArchivistInstance: {
|
|
|
192
200
|
}>;
|
|
193
201
|
ephemeralQueryAccountEnabled?: boolean;
|
|
194
202
|
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
195
|
-
}, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
203
|
+
} & ArchivistParamFields & object, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
196
204
|
schema: _xyo_network_payload_model.Schema;
|
|
197
205
|
}>>>(value: _xylabs_promise.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
198
206
|
<TType extends AttachableArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
@@ -255,7 +263,7 @@ declare const asAttachableArchivistInstance: {
|
|
|
255
263
|
}>;
|
|
256
264
|
ephemeralQueryAccountEnabled?: boolean;
|
|
257
265
|
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
258
|
-
}, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
266
|
+
} & ArchivistParamFields & object, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
259
267
|
schema: _xyo_network_payload_model.Schema;
|
|
260
268
|
}>>>(value: _xylabs_promise.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<AttachableArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
261
269
|
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
@@ -317,7 +325,7 @@ declare const asAttachableArchivistInstance: {
|
|
|
317
325
|
}>;
|
|
318
326
|
ephemeralQueryAccountEnabled?: boolean;
|
|
319
327
|
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
320
|
-
}, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
328
|
+
} & ArchivistParamFields & object, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
321
329
|
schema: _xyo_network_payload_model.Schema;
|
|
322
330
|
}>>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
323
331
|
};
|
|
@@ -446,7 +454,7 @@ declare const isArchivistInstance: _xylabs_object.TypeCheck<ArchivistInstance<_x
|
|
|
446
454
|
}>;
|
|
447
455
|
ephemeralQueryAccountEnabled?: boolean;
|
|
448
456
|
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
449
|
-
}, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
457
|
+
} & ArchivistParamFields & object, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
450
458
|
schema: _xyo_network_payload_model.Schema;
|
|
451
459
|
}>>>;
|
|
452
460
|
declare const isArchivistModule: _xyo_network_module_model.ModuleTypeCheck<ArchivistModuleInstance<_xylabs_object.BaseParamsFields & {
|
|
@@ -755,7 +763,7 @@ declare const asArchivistInstance: {
|
|
|
755
763
|
}>;
|
|
756
764
|
ephemeralQueryAccountEnabled?: boolean;
|
|
757
765
|
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
758
|
-
}, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
766
|
+
} & ArchivistParamFields & object, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
759
767
|
schema: _xyo_network_payload_model.Schema;
|
|
760
768
|
}>>>(value: _xylabs_promise.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
761
769
|
<TType extends ArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
@@ -818,7 +826,7 @@ declare const asArchivistInstance: {
|
|
|
818
826
|
}>;
|
|
819
827
|
ephemeralQueryAccountEnabled?: boolean;
|
|
820
828
|
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
821
|
-
}, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
829
|
+
} & ArchivistParamFields & object, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
822
830
|
schema: _xyo_network_payload_model.Schema;
|
|
823
831
|
}>>>(value: _xylabs_promise.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<ArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
824
832
|
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
@@ -880,7 +888,7 @@ declare const asArchivistInstance: {
|
|
|
880
888
|
}>;
|
|
881
889
|
ephemeralQueryAccountEnabled?: boolean;
|
|
882
890
|
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
883
|
-
}, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
891
|
+
} & ArchivistParamFields & object, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
884
892
|
schema: _xyo_network_payload_model.Schema;
|
|
885
893
|
}>>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
886
894
|
};
|
|
@@ -1005,8 +1013,8 @@ declare const withArchivistInstance: <R>(mod: any, closure: (mod: ArchivistInsta
|
|
|
1005
1013
|
}>;
|
|
1006
1014
|
ephemeralQueryAccountEnabled?: boolean;
|
|
1007
1015
|
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
1008
|
-
}, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
1016
|
+
} & ArchivistParamFields & object, ArchivistModuleEventData, _xylabs_object.DeepRestrictToStringKeys<{
|
|
1009
1017
|
schema: _xyo_network_payload_model.Schema;
|
|
1010
1018
|
}>>) => R) => R | undefined;
|
|
1011
1019
|
|
|
1012
|
-
export { type AllArchivist, type AllArchivistFunctions, type Archivist, type ArchivistAllQuery, ArchivistAllQuerySchema, type ArchivistClearQuery, ArchivistClearQuerySchema, type ArchivistCommitQuery, ArchivistCommitQuerySchema, type ArchivistConfig, ArchivistConfigSchema, type ArchivistDeleteQuery, ArchivistDeleteQuerySchema, type ArchivistGetQuery, ArchivistGetQuerySchema, type ArchivistInsertQuery, ArchivistInsertQuerySchema, type ArchivistInstance, type ArchivistLabels, type ArchivistModuleEventData, type ArchivistModuleInstance, type ArchivistModuleQueries, type ArchivistNextOptions, type ArchivistNextQuery, ArchivistNextQuerySchema, type ArchivistParams, type ArchivistParents, type ArchivistQueries, type ArchivistRawQueryFunctions, type ArchivistStorage, type AttachableArchivistInstance, type AttachableArchivistInstanceTypeCheck, type FullArchivist, type HydratedBoundWitness, type IdentityFunction, type IndexDescription, type IndexDirection, IndexSeparator, IsAttachableArchivistInstanceFactory, type NextOptions, type ReadArchivist, type ReadArchivistFunctions, type ReadWriteArchivist, type StashArchivist, type StashArchivistFunctions, type WriteArchivist, type WriteArchivistFunctions, asArchivistInstance, asArchivistModule, asAttachableArchivistInstance, buildStandardIndexName, getBoundWitness, getTypedBoundWitness, hydrateBoundWitness, hydrateTypedBoundWitness, isArchivistInstance, isArchivistModule, isAttachableArchivistInstance, requiredAttachableArchivistInstanceFunctions, tryGetTypedBoundWitness, tryHydrateTypedBoundWitness, withArchivistInstance, withArchivistModule };
|
|
1020
|
+
export { type AllArchivist, type AllArchivistFunctions, type Archivist, type ArchivistAllQuery, ArchivistAllQuerySchema, type ArchivistClearQuery, ArchivistClearQuerySchema, type ArchivistCommitQuery, ArchivistCommitQuerySchema, type ArchivistConfig, ArchivistConfigSchema, type ArchivistDeleteQuery, ArchivistDeleteQuerySchema, type ArchivistGetQuery, ArchivistGetQuerySchema, type ArchivistInsertQuery, ArchivistInsertQuerySchema, type ArchivistInstance, type ArchivistLabels, type ArchivistModuleEventData, type ArchivistModuleInstance, type ArchivistModuleQueries, type ArchivistNextOptions, type ArchivistNextQuery, ArchivistNextQuerySchema, type ArchivistParamFields, type ArchivistParams, type ArchivistParentInstances, type ArchivistParents, type ArchivistQueries, type ArchivistRawQueryFunctions, type ArchivistStorage, type AttachableArchivistInstance, type AttachableArchivistInstanceTypeCheck, type FullArchivist, type HydratedBoundWitness, type IdentityFunction, type IndexDescription, type IndexDirection, IndexSeparator, IsAttachableArchivistInstanceFactory, type NextOptions, type ReadArchivist, type ReadArchivistFunctions, type ReadWriteArchivist, type StashArchivist, type StashArchivistFunctions, type WriteArchivist, type WriteArchivistFunctions, asArchivistInstance, asArchivistModule, asAttachableArchivistInstance, buildStandardIndexName, getBoundWitness, getTypedBoundWitness, hydrateBoundWitness, hydrateTypedBoundWitness, isArchivistInstance, isArchivistModule, isAttachableArchivistInstance, requiredAttachableArchivistInstanceFunctions, tryGetTypedBoundWitness, tryHydrateTypedBoundWitness, withArchivistInstance, withArchivistModule };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/archivist-model",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"@xylabs/object": "^4.5.1",
|
|
36
36
|
"@xylabs/promise": "^4.5.1",
|
|
37
37
|
"@xylabs/typeof": "^4.5.1",
|
|
38
|
-
"@xyo-network/account-model": "^3.9.
|
|
39
|
-
"@xyo-network/boundwitness-model": "^3.9.
|
|
40
|
-
"@xyo-network/module-events": "^3.9.
|
|
41
|
-
"@xyo-network/module-model": "^3.9.
|
|
42
|
-
"@xyo-network/payload-model": "^3.9.
|
|
38
|
+
"@xyo-network/account-model": "^3.9.2",
|
|
39
|
+
"@xyo-network/boundwitness-model": "^3.9.2",
|
|
40
|
+
"@xyo-network/module-events": "^3.9.2",
|
|
41
|
+
"@xyo-network/module-model": "^3.9.2",
|
|
42
|
+
"@xyo-network/payload-model": "^3.9.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@xylabs/ts-scripts-yarn3": "^5.0.
|
|
46
|
-
"@xylabs/tsconfig": "^5.0.
|
|
45
|
+
"@xylabs/ts-scripts-yarn3": "^5.0.24",
|
|
46
|
+
"@xylabs/tsconfig": "^5.0.24",
|
|
47
47
|
"typescript": "^5.7.3"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
package/src/Params.ts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import type { EmptyObject } from '@xylabs/object'
|
|
1
|
+
import type { EmptyObject, WithAdditional } from '@xylabs/object'
|
|
2
2
|
import type { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model'
|
|
3
3
|
|
|
4
4
|
import type { ArchivistConfig } from './Config.ts'
|
|
5
|
+
import type { ArchivistInstance } from './Instance.ts'
|
|
6
|
+
|
|
7
|
+
export interface ArchivistParentInstances {
|
|
8
|
+
commit?: ArchivistInstance[]
|
|
9
|
+
read?: ArchivistInstance[]
|
|
10
|
+
write?: ArchivistInstance[]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ArchivistParamFields {
|
|
14
|
+
parents?: ArchivistParentInstances
|
|
15
|
+
}
|
|
5
16
|
|
|
6
17
|
export type ArchivistParams<
|
|
7
18
|
TConfig extends AnyConfigSchema<ArchivistConfig> = AnyConfigSchema<ArchivistConfig>,
|
|
8
|
-
TAdditionalParams extends EmptyObject
|
|
9
|
-
> = ModuleParams<TConfig, TAdditionalParams
|
|
19
|
+
TAdditionalParams extends EmptyObject = EmptyObject,
|
|
20
|
+
> = ModuleParams<TConfig, WithAdditional<ArchivistParamFields & TAdditionalParams>>
|