@xyo-network/archivist-model 5.3.29 → 5.4.0

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.
@@ -5,7 +5,7 @@ export type IndexDirection = -1 | 1;
5
5
  /**
6
6
  * Description of index(es) to be created on a store
7
7
  */
8
- export type IndexDescription = {
8
+ export interface IndexDescription {
9
9
  /**
10
10
  * The key(s) to index
11
11
  */
@@ -22,7 +22,7 @@ export type IndexDescription = {
22
22
  * If true, the index must enforce uniqueness on the key
23
23
  */
24
24
  unique?: boolean;
25
- };
25
+ }
26
26
  export declare const IndexSeparator = "-";
27
27
  /**
28
28
  * Given an index description, this will build the index
@@ -1 +1 @@
1
- {"version":3,"file":"IndexDescription.d.ts","sourceRoot":"","sources":["../../src/IndexDescription.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;AAEnC;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,cAAc,MAAM,CAAA;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,gBAAgB,WAK7D,CAAA"}
1
+ {"version":3,"file":"IndexDescription.d.ts","sourceRoot":"","sources":["../../src/IndexDescription.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;AAEnC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,cAAc,MAAM,CAAA;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,gBAAgB,WAK7D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ArchivistSnapshot.ts","../../src/ArchivistStats.ts","../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/All.ts","../../src/Queries/Clear.ts","../../src/Queries/Commit.ts","../../src/Queries/Delete.ts","../../src/Queries/Get.ts","../../src/Queries/Insert.ts","../../src/Queries/Next.ts","../../src/Queries/Snapshot.ts","../../src/attachable/AttachableInstance.ts","../../src/Config.ts","../../src/IndexDescription.ts","../../src/lib/getBoundWitness.ts","../../src/lib/hydrateBoundWitness.ts"],"sourcesContent":["import type { Hash } from '@xylabs/sdk-js'\nimport {\n asSchema, type Payload, type PayloadHashMap,\n} from '@xyo-network/payload-model'\n\nexport const ArchivistSnapshotPayloadSchema = asSchema('network.xyo.archivist.snapshot', true)\nexport type ArchivistSnapshotPayloadSchema = typeof ArchivistSnapshotPayloadSchema\n\nexport type ArchivistSnapshotPayload<TPayload extends Payload = Payload, TId extends string | number | symbol = Hash>\n = Payload<PayloadHashMap<TPayload, TId>, ArchivistSnapshotPayloadSchema>\n","import { asSchema, type Payload } from '@xyo-network/payload-model'\n\nexport const ArchivistStatsPayloadSchema = asSchema('network.xyo.archivist.stats', true)\nexport type ArchivistStatsPayloadSchema = typeof ArchivistStatsPayloadSchema\n\nexport type ArchivistStatsPayload\n = Payload<{ payloadCount: number }, ArchivistStatsPayloadSchema>\n","import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableArchivistInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableArchivistInstance = AsObjectFactory.create(isAttachableArchivistInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isArchivistInstance } from '../typeChecks.ts'\nimport type { AttachableArchivistInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableArchivistInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableArchivistInstance>()\n\nexport const isAttachableArchivistInstance: TypeCheck<AttachableArchivistInstance> = factory.create(requiredAttachableArchivistInstanceFunctions, [\n isArchivistInstance,\n isAttachableModuleInstance,\n])\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n // eslint-disable-next-line sonarjs/deprecation\n IsInstanceFactory, isModuleInstance, IsQueryableModuleFactory, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { ArchivistInstance } from './Instance.ts'\nimport type { ArchivistModuleInstance } from './ModuleInstance.ts'\nimport { ArchivistGetQuerySchema } from './Queries/index.ts'\n\nexport const isArchivistInstance: TypeCheck<ArchivistInstance> = new IsInstanceFactory<ArchivistInstance>().create({ get: 'function' }, [isModuleInstance])\nexport const isArchivistModule: TypeCheck<ArchivistModuleInstance> = new IsQueryableModuleFactory<ArchivistModuleInstance>().create([ArchivistGetQuerySchema])\n\nexport const asArchivistModule = AsObjectFactory.create(isArchivistModule)\nexport const asArchivistInstance = AsObjectFactory.create(isArchivistInstance)\n\n/** @deprecated use narrowing instead [ if(is) ] */\n// eslint-disable-next-line sonarjs/deprecation, @typescript-eslint/no-deprecated\nexport const withArchivistModule = WithFactory.create(isArchivistModule)\n/** @deprecated use narrowing instead [ if(is) ] */\n// eslint-disable-next-line sonarjs/deprecation, @typescript-eslint/no-deprecated\nexport const withArchivistInstance = WithFactory.create(isArchivistInstance)\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistAllQuerySchema = asSchema('network.xyo.query.archivist.all', true)\nexport type ArchivistAllQuerySchema = typeof ArchivistAllQuerySchema\n\nexport type ArchivistAllQuery = Query<{\n schema: ArchivistAllQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistClearQuerySchema = asSchema('network.xyo.query.archivist.clear', true)\nexport type ArchivistClearQuerySchema = typeof ArchivistClearQuerySchema\n\nexport type ArchivistClearQuery = Query<{\n schema: ArchivistClearQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistCommitQuerySchema = asSchema('network.xyo.query.archivist.commit', true)\nexport type ArchivistCommitQuerySchema = typeof ArchivistCommitQuerySchema\n\nexport type ArchivistCommitQuery = Query<{\n schema: ArchivistCommitQuerySchema\n}>\n","import type { Hash } from '@xylabs/sdk-js'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistDeleteQuerySchema = asSchema('network.xyo.query.archivist.delete', true)\nexport type ArchivistDeleteQuerySchema = typeof ArchivistDeleteQuerySchema\n\nexport type ArchivistDeleteQuery = Query<{\n hashes: Hash[]\n schema: ArchivistDeleteQuerySchema\n}>\n","import type { Hash } from '@xylabs/sdk-js'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistGetQuerySchema = asSchema('network.xyo.query.archivist.get', true)\nexport type ArchivistGetQuerySchema = typeof ArchivistGetQuerySchema\n\nexport type ArchivistGetQuery = Query<{\n hashes: Hash[]\n schema: ArchivistGetQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistInsertQuerySchema = asSchema('network.xyo.query.archivist.insert', true)\nexport type ArchivistInsertQuerySchema = typeof ArchivistInsertQuerySchema\n\nexport type ArchivistInsertQuery = Query<{\n schema: ArchivistInsertQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nimport type { ArchivistNextOptions } from '../NextOptions.ts'\n\nexport const ArchivistNextQuerySchema = asSchema('network.xyo.query.archivist.next', true)\nexport type ArchivistNextQuerySchema = typeof ArchivistNextQuerySchema\n\nexport type ArchivistNextQuery = Query<ArchivistNextOptions, ArchivistNextQuerySchema>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistSnapshotQuerySchema = asSchema('network.xyo.query.archivist.snapshot', true)\nexport type ArchivistSnapshotQuerySchema = typeof ArchivistSnapshotQuerySchema\n\nexport type ArchivistSnapshotQuery = Query<{\n schema: ArchivistSnapshotQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport type { ArchivistModuleEventData } from '../EventData.ts'\nimport type { ArchivistInstance, ArchivistParams } from '../Instance.ts'\nimport type { ArchivistModuleInstance } from '../ModuleInstance.ts'\n\nexport interface AttachableArchivistInstance<\n TParams extends ArchivistParams = ArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n TPayload extends Payload = Payload,\n> extends ArchivistModuleInstance<TParams, TEventData>,\n AttachableModuleInstance<TParams, TEventData>,\n ArchivistInstance<TParams, TEventData, TPayload> {}\n\nexport type AttachableArchivistInstanceTypeCheck<T extends AttachableArchivistInstance = AttachableArchivistInstance> = TypeCheck<T>\n\nexport class IsAttachableArchivistInstanceFactory<T extends AttachableArchivistInstance = AttachableArchivistInstance> extends IsObjectFactory<T> {}\n","import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'\nimport type { ModuleConfig, ModuleIdentifier } from '@xyo-network/module-model'\nimport type {\n Payload,\n Schema,\n} from '@xyo-network/payload-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nimport type { IndexDescription } from './IndexDescription.ts'\n\nexport interface ArchivistParents {\n commit?: ModuleIdentifier[]\n read?: ModuleIdentifier[]\n write?: ModuleIdentifier[]\n}\n\nexport interface ArchivistStorage {\n /** The indexes to create on the object store */\n indexes?: IndexDescription[]\n}\n\nexport interface ArchivistGetCache {\n enabled?: boolean\n maxEntries?: number\n}\n\nexport const ArchivistConfigSchema = asSchema('network.xyo.archivist.config', true)\nexport type ArchivistConfigSchema = typeof ArchivistConfigSchema\n\nexport type ArchivistConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends Schema | void = void> = ModuleConfig<\n WithAdditional<\n {\n /** @field caching configuration for get calls */\n getCache?: ArchivistGetCache\n /** @field address of one or more parent archivists to read from */\n parents?: ArchivistParents\n /** @field fail if some parents can not be resolved (true if unspecified) */\n requireAllParents?: boolean\n schema: TConfig extends Payload ? TConfig['schema'] : ArchivistConfigSchema\n /** @field storage configuration */\n storage?: ArchivistStorage\n /** @field should child store all reads from parents? */\n storeParentReads?: boolean\n },\n TConfig\n >,\n TSchema\n>\n","/**\n * The index direction (1 for ascending, -1 for descending)\n */\nexport type IndexDirection = -1 | 1\n\n/**\n * Description of index(es) to be created on a store\n */\nexport type IndexDescription = {\n /**\n * The key(s) to index\n */\n key: Record<string, IndexDirection>\n /**\n * Is the indexed value an array\n */\n multiEntry?: boolean\n /**\n * The name of the index\n */\n name?: string\n /**\n * If true, the index must enforce uniqueness on the key\n */\n unique?: boolean\n}\n\nexport const IndexSeparator = '-'\n\n/**\n * Given an index description, this will build the index\n * name in standard form\n * @param index The index description\n * @returns The index name in standard form\n */\nexport const buildStandardIndexName = (index: IndexDescription) => {\n const { key, unique } = index\n const prefix = unique ? 'UX' : 'IX'\n const indexKeys = Object.keys(key)\n return `${prefix}_${indexKeys.join(IndexSeparator)}`\n}\n","import type { Hash, IdentityFunction } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { isStorageMeta, type WithStorageMeta } from '@xyo-network/payload-model'\n\nimport type { ReadArchivist } from '../PayloadArchivist.ts'\n\nexport const tryGetTypedBoundWitnessWithStorageMeta = async <T extends BoundWitness>(archivist: ReadArchivist, hash: Hash,\n identity: IdentityFunction<WithStorageMeta<T>>): Promise<WithStorageMeta<T> | undefined> => {\n const payload = (await archivist.get([hash])).at(0)\n return identity(payload) ? payload : undefined\n}\n\nexport const getTypedBoundWitnessWithStorageMeta = async <T extends BoundWitness>(archivist: ReadArchivist, hash: Hash,\n identity: IdentityFunction<WithStorageMeta<T>>): Promise<WithStorageMeta<T>> => {\n const payload = assertEx((await archivist.get([hash])).at(0), () => `failed to locate bound witness: ${hash}`)\n return assertEx(identity(payload) ? payload : undefined, () => `located payload failed identity check: ${hash}`)\n}\n\nexport const getBoundWitnessWithStorageMeta = (archivist: ReadArchivist, hash: Hash): Promise<WithStorageMeta<BoundWitness>> => {\n return getTypedBoundWitnessWithStorageMeta<BoundWitness>(archivist, hash, x => isStorageMeta(x) && isBoundWitness(x))\n}\n","import type { Hash, IdentityFunction } from '@xylabs/sdk-js'\nimport { exists, isHash } from '@xylabs/sdk-js'\nimport type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { isStorageMeta, type WithStorageMeta } from '@xyo-network/payload-model'\n\nimport type { ReadArchivist } from '../PayloadArchivist.ts'\nimport { getTypedBoundWitnessWithStorageMeta, tryGetTypedBoundWitnessWithStorageMeta } from './getBoundWitness.ts'\nimport type { HydratedBoundWitness } from './HydratedBoundWitness.ts'\n\nexport const tryHydrateTypedBoundWitness = async <T extends BoundWitness>(archivist: ReadArchivist, hashOrBw: Hash | WithStorageMeta<T>,\n identity: IdentityFunction<WithStorageMeta<T>>): Promise<HydratedBoundWitness<T> | undefined> => {\n const bw = isHash(hashOrBw) ? await tryGetTypedBoundWitnessWithStorageMeta(archivist, hashOrBw, identity) : hashOrBw\n return bw ? [bw, (await archivist.get(bw?.payload_hashes as Hash[])).filter(exists)] : undefined\n}\n\nexport const hydrateTypedBoundWitness = async <T extends BoundWitness>(archivist: ReadArchivist, hashOrBw: Hash | WithStorageMeta<T>,\n identity: IdentityFunction<WithStorageMeta<T>>): Promise<HydratedBoundWitness<T>> => {\n const bw = isHash(hashOrBw) ? await getTypedBoundWitnessWithStorageMeta(archivist, hashOrBw, identity) : hashOrBw\n const payloads = (await archivist.get(bw?.payload_hashes as Hash[])).filter(exists)\n if (payloads.length !== bw.payload_hashes.length) {\n throw new Error(`missing payloads for ${bw._hash}`)\n }\n return [bw, payloads]\n}\n\nexport const hydrateBoundWitness = (\n archivist: ReadArchivist,\n hashOrBw: Hash | WithStorageMeta<BoundWitness>,\n): Promise<HydratedBoundWitness<BoundWitness>> => {\n const idFunction: IdentityFunction<WithStorageMeta<BoundWitness>> = x => isBoundWitness(x) && isStorageMeta(x)\n return hydrateTypedBoundWitness<BoundWitness>(archivist, hashOrBw, idFunction)\n}\n"],"mappings":";AACA;AAAA,EACE;AAAA,OACK;AAEA,IAAM,iCAAiC,SAAS,kCAAkC,IAAI;;;ACL7F,SAAS,YAAAA,iBAA8B;AAEhC,IAAM,8BAA8BA,UAAS,+BAA+B,IAAI;;;ACFvF,SAAS,mBAAAC,wBAAuB;;;ACChC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;;;ACD3C,SAAS,uBAAuB;AAChC;AAAA,EAEE;AAAA,EAAmB;AAAA,EAAkB;AAAA,EAA0B;AAAA,OAC1D;;;ACLP,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,0BAA0BA,UAAS,mCAAmC,IAAI;;;ACFvF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,4BAA4BA,UAAS,qCAAqC,IAAI;;;ACF3F,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,6BAA6BA,UAAS,sCAAsC,IAAI;;;ACD7F,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,6BAA6BA,UAAS,sCAAsC,IAAI;;;ACF7F,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,0BAA0BA,UAAS,mCAAmC,IAAI;;;ACHvF,SAAS,YA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BAAuC,WAAW,UAAU,UAAU;AAC/E;","names":["asSchema","AsObjectFactory","asSchema","asSchema","asSchema","asSchema","asSchema","asSchema","asSchema","asSchema","AsObjectFactory","IsObjectFactory","asSchema","isBoundWitness","isStorageMeta","isBoundWitness","isStorageMeta"]}
1
+ {"version":3,"sources":["../../src/ArchivistSnapshot.ts","../../src/ArchivistStats.ts","../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/All.ts","../../src/Queries/Clear.ts","../../src/Queries/Commit.ts","../../src/Queries/Delete.ts","../../src/Queries/Get.ts","../../src/Queries/Insert.ts","../../src/Queries/Next.ts","../../src/Queries/Snapshot.ts","../../src/attachable/AttachableInstance.ts","../../src/Config.ts","../../src/IndexDescription.ts","../../src/lib/getBoundWitness.ts","../../src/lib/hydrateBoundWitness.ts"],"sourcesContent":["import type { Hash } from '@xylabs/sdk-js'\nimport {\n asSchema, type Payload, type PayloadHashMap,\n} from '@xyo-network/payload-model'\n\nexport const ArchivistSnapshotPayloadSchema = asSchema('network.xyo.archivist.snapshot', true)\nexport type ArchivistSnapshotPayloadSchema = typeof ArchivistSnapshotPayloadSchema\n\nexport type ArchivistSnapshotPayload<TPayload extends Payload = Payload, TId extends string | number | symbol = Hash>\n = Payload<PayloadHashMap<TPayload, TId>, ArchivistSnapshotPayloadSchema>\n","import { asSchema, type Payload } from '@xyo-network/payload-model'\n\nexport const ArchivistStatsPayloadSchema = asSchema('network.xyo.archivist.stats', true)\nexport type ArchivistStatsPayloadSchema = typeof ArchivistStatsPayloadSchema\n\nexport type ArchivistStatsPayload\n = Payload<{ payloadCount: number }, ArchivistStatsPayloadSchema>\n","import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableArchivistInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableArchivistInstance = AsObjectFactory.create(isAttachableArchivistInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isArchivistInstance } from '../typeChecks.ts'\nimport type { AttachableArchivistInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableArchivistInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableArchivistInstance>()\n\nexport const isAttachableArchivistInstance: TypeCheck<AttachableArchivistInstance> = factory.create(requiredAttachableArchivistInstanceFunctions, [\n isArchivistInstance,\n isAttachableModuleInstance,\n])\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n IsInstanceFactory, isModuleInstance, IsQueryableModuleFactory, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { ArchivistInstance } from './Instance.ts'\nimport type { ArchivistModuleInstance } from './ModuleInstance.ts'\nimport { ArchivistGetQuerySchema } from './Queries/index.ts'\n\nexport const isArchivistInstance: TypeCheck<ArchivistInstance> = new IsInstanceFactory<ArchivistInstance>().create({ get: 'function' }, [isModuleInstance])\nexport const isArchivistModule: TypeCheck<ArchivistModuleInstance> = new IsQueryableModuleFactory<ArchivistModuleInstance>().create([ArchivistGetQuerySchema])\n\nexport const asArchivistModule = AsObjectFactory.create(isArchivistModule)\nexport const asArchivistInstance = AsObjectFactory.create(isArchivistInstance)\n\n/** @deprecated use narrowing instead [ if(is) ] */\nexport const withArchivistModule = WithFactory.create(isArchivistModule)\n/** @deprecated use narrowing instead [ if(is) ] */\nexport const withArchivistInstance = WithFactory.create(isArchivistInstance)\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistAllQuerySchema = asSchema('network.xyo.query.archivist.all', true)\nexport type ArchivistAllQuerySchema = typeof ArchivistAllQuerySchema\n\nexport type ArchivistAllQuery = Query<{\n schema: ArchivistAllQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistClearQuerySchema = asSchema('network.xyo.query.archivist.clear', true)\nexport type ArchivistClearQuerySchema = typeof ArchivistClearQuerySchema\n\nexport type ArchivistClearQuery = Query<{\n schema: ArchivistClearQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistCommitQuerySchema = asSchema('network.xyo.query.archivist.commit', true)\nexport type ArchivistCommitQuerySchema = typeof ArchivistCommitQuerySchema\n\nexport type ArchivistCommitQuery = Query<{\n schema: ArchivistCommitQuerySchema\n}>\n","import type { Hash } from '@xylabs/sdk-js'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistDeleteQuerySchema = asSchema('network.xyo.query.archivist.delete', true)\nexport type ArchivistDeleteQuerySchema = typeof ArchivistDeleteQuerySchema\n\nexport type ArchivistDeleteQuery = Query<{\n hashes: Hash[]\n schema: ArchivistDeleteQuerySchema\n}>\n","import type { Hash } from '@xylabs/sdk-js'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistGetQuerySchema = asSchema('network.xyo.query.archivist.get', true)\nexport type ArchivistGetQuerySchema = typeof ArchivistGetQuerySchema\n\nexport type ArchivistGetQuery = Query<{\n hashes: Hash[]\n schema: ArchivistGetQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistInsertQuerySchema = asSchema('network.xyo.query.archivist.insert', true)\nexport type ArchivistInsertQuerySchema = typeof ArchivistInsertQuerySchema\n\nexport type ArchivistInsertQuery = Query<{\n schema: ArchivistInsertQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nimport type { ArchivistNextOptions } from '../NextOptions.ts'\n\nexport const ArchivistNextQuerySchema = asSchema('network.xyo.query.archivist.next', true)\nexport type ArchivistNextQuerySchema = typeof ArchivistNextQuerySchema\n\nexport type ArchivistNextQuery = Query<ArchivistNextOptions, ArchivistNextQuerySchema>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const ArchivistSnapshotQuerySchema = asSchema('network.xyo.query.archivist.snapshot', true)\nexport type ArchivistSnapshotQuerySchema = typeof ArchivistSnapshotQuerySchema\n\nexport type ArchivistSnapshotQuery = Query<{\n schema: ArchivistSnapshotQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport type { ArchivistModuleEventData } from '../EventData.ts'\nimport type { ArchivistInstance, ArchivistParams } from '../Instance.ts'\nimport type { ArchivistModuleInstance } from '../ModuleInstance.ts'\n\nexport interface AttachableArchivistInstance<\n TParams extends ArchivistParams = ArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n TPayload extends Payload = Payload,\n> extends ArchivistModuleInstance<TParams, TEventData>,\n AttachableModuleInstance<TParams, TEventData>,\n ArchivistInstance<TParams, TEventData, TPayload> {}\n\nexport type AttachableArchivistInstanceTypeCheck<T extends AttachableArchivistInstance = AttachableArchivistInstance> = TypeCheck<T>\n\nexport class IsAttachableArchivistInstanceFactory<T extends AttachableArchivistInstance = AttachableArchivistInstance> extends IsObjectFactory<T> {}\n","import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'\nimport type { ModuleConfig, ModuleIdentifier } from '@xyo-network/module-model'\nimport type {\n Payload,\n Schema,\n} from '@xyo-network/payload-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nimport type { IndexDescription } from './IndexDescription.ts'\n\nexport interface ArchivistParents {\n commit?: ModuleIdentifier[]\n read?: ModuleIdentifier[]\n write?: ModuleIdentifier[]\n}\n\nexport interface ArchivistStorage {\n /** The indexes to create on the object store */\n indexes?: IndexDescription[]\n}\n\nexport interface ArchivistGetCache {\n enabled?: boolean\n maxEntries?: number\n}\n\nexport const ArchivistConfigSchema = asSchema('network.xyo.archivist.config', true)\nexport type ArchivistConfigSchema = typeof ArchivistConfigSchema\n\nexport type ArchivistConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends Schema | void = void> = ModuleConfig<\n WithAdditional<\n {\n /** @field caching configuration for get calls */\n getCache?: ArchivistGetCache\n /** @field address of one or more parent archivists to read from */\n parents?: ArchivistParents\n /** @field fail if some parents can not be resolved (true if unspecified) */\n requireAllParents?: boolean\n schema: TConfig extends Payload ? TConfig['schema'] : ArchivistConfigSchema\n /** @field storage configuration */\n storage?: ArchivistStorage\n /** @field should child store all reads from parents? */\n storeParentReads?: boolean\n },\n TConfig\n >,\n TSchema\n>\n","/**\n * The index direction (1 for ascending, -1 for descending)\n */\nexport type IndexDirection = -1 | 1\n\n/**\n * Description of index(es) to be created on a store\n */\nexport interface IndexDescription {\n /**\n * The key(s) to index\n */\n key: Record<string, IndexDirection>\n /**\n * Is the indexed value an array\n */\n multiEntry?: boolean\n /**\n * The name of the index\n */\n name?: string\n /**\n * If true, the index must enforce uniqueness on the key\n */\n unique?: boolean\n}\n\nexport const IndexSeparator = '-'\n\n/**\n * Given an index description, this will build the index\n * name in standard form\n * @param index The index description\n * @returns The index name in standard form\n */\nexport const buildStandardIndexName = (index: IndexDescription) => {\n const { key, unique } = index\n const prefix = unique ? 'UX' : 'IX'\n const indexKeys = Object.keys(key)\n return `${prefix}_${indexKeys.join(IndexSeparator)}`\n}\n","import type { Hash, IdentityFunction } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport { type BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { isStorageMeta, type WithStorageMeta } from '@xyo-network/payload-model'\n\nimport type { ReadArchivist } from '../PayloadArchivist.ts'\n\nexport const tryGetTypedBoundWitnessWithStorageMeta = async <T extends BoundWitness>(archivist: ReadArchivist, hash: Hash,\n identity: IdentityFunction<WithStorageMeta<T>>): Promise<WithStorageMeta<T> | undefined> => {\n const payload = (await archivist.get([hash])).at(0)\n return identity(payload) ? payload : undefined\n}\n\nexport const getTypedBoundWitnessWithStorageMeta = async <T extends BoundWitness>(archivist: ReadArchivist, hash: Hash,\n identity: IdentityFunction<WithStorageMeta<T>>): Promise<WithStorageMeta<T>> => {\n const payload = assertEx((await archivist.get([hash])).at(0), () => `failed to locate bound witness: ${hash}`)\n return assertEx(identity(payload) ? payload : undefined, () => `located payload failed identity check: ${hash}`)\n}\n\nexport const getBoundWitnessWithStorageMeta = (archivist: ReadArchivist, hash: Hash): Promise<WithStorageMeta<BoundWitness>> => {\n return getTypedBoundWitnessWithStorageMeta<BoundWitness>(archivist, hash, x => isStorageMeta(x) && isBoundWitness(x))\n}\n","import type { Hash, IdentityFunction } from '@xylabs/sdk-js'\nimport { exists, isHash } from '@xylabs/sdk-js'\nimport type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { isStorageMeta, type WithStorageMeta } from '@xyo-network/payload-model'\n\nimport type { ReadArchivist } from '../PayloadArchivist.ts'\nimport { getTypedBoundWitnessWithStorageMeta, tryGetTypedBoundWitnessWithStorageMeta } from './getBoundWitness.ts'\nimport type { HydratedBoundWitness } from './HydratedBoundWitness.ts'\n\nexport const tryHydrateTypedBoundWitness = async <T extends BoundWitness>(archivist: ReadArchivist, hashOrBw: Hash | WithStorageMeta<T>,\n identity: IdentityFunction<WithStorageMeta<T>>): Promise<HydratedBoundWitness<T> | undefined> => {\n const bw = isHash(hashOrBw) ? await tryGetTypedBoundWitnessWithStorageMeta(archivist, hashOrBw, identity) : hashOrBw\n return bw ? [bw, (await archivist.get(bw?.payload_hashes as Hash[])).filter(exists)] : undefined\n}\n\nexport const hydrateTypedBoundWitness = async <T extends BoundWitness>(archivist: ReadArchivist, hashOrBw: Hash | WithStorageMeta<T>,\n identity: IdentityFunction<WithStorageMeta<T>>): Promise<HydratedBoundWitness<T>> => {\n const bw = isHash(hashOrBw) ? await getTypedBoundWitnessWithStorageMeta(archivist, hashOrBw, identity) : hashOrBw\n const payloads = (await archivist.get(bw?.payload_hashes as Hash[])).filter(exists)\n if (payloads.length !== bw.payload_hashes.length) {\n throw new Error(`missing payloads for ${bw._hash}`)\n }\n return [bw, payloads]\n}\n\nexport const hydrateBoundWitness = (\n archivist: ReadArchivist,\n hashOrBw: Hash | WithStorageMeta<BoundWitness>,\n): Promise<HydratedBoundWitness<BoundWitness>> => {\n const idFunction: IdentityFunction<WithStorageMeta<BoundWitness>> = x => isBoundWitness(x) && isStorageMeta(x)\n return hydrateTypedBoundWitness<BoundWitness>(archivist, hashOrBw, idFunction)\n}\n"],"mappings":";AACA;AAAA,EACE;AAAA,OACK;AAEA,IAAM,iCAAiC,SAAS,kCAAkC,IAAI;;;ACL7F,SAAS,YAAAA,iBAA8B;AAEhC,IAAM,8BAA8BA,UAAS,+BAA+B,IAAI;;;ACFvF,SAAS,mBAAAC,wBAAuB;;;ACChC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;;;ACD3C,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAAmB;AAAA,EAAkB;AAAA,EAA0B;AAAA,OAC1D;;;ACJP,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,0BAA0BA,UAAS,mCAAmC,IAAI;;;ACFvF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,4BAA4BA,UAAS,qCAAqC,IAAI;;;ACF3F,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,6BAA6BA,UAAS,sCAAsC,IAAI;;;ACD7F,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,6BAA6BA,UAAS,sCAAsC,IAAI;;;ACF7F,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,0BAA0BA,UAAS,mCAAmC,IAAI;;;ACHvF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,6BAA6BA,UAAS,sCAAsC,IAAI;;;ACF7F,SAAS,YAAAC,iBAA4B;AAI9B,IAAM,2BAA2BA,UAAS,oCAAoC,IAAI;;;ACJzF,SAAS,YAAAC,kBAA4B;AAE9B,IAAM,+BAA+BA,WAAS,wCAAwC,IAAI;;;ARQ1F,IAAM,sBAAoD,IAA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C,GAAG,MAAM,mCAAmC,IAAI,EAAE;AAC7G,SAAO,SAAS,SAAS,OAAO,IAAI,UAAU,QAAW,MAAM,0CAA0C,IAAI,EAAE;AACjH;AAEO,IAAM,iCAAiC,CAAC,WAA0B,SAAuD;AAC9H,SAAO,oCAAkD,WAAW,MAAM,OAAK,cAAc,CAAC,KAAK,eAAe,CAAC,CAAC;AACtH;;;ACpBA,SAAS,QAAQ,cAAc;AAE/B,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,iBAAAC,sBAA2C;AAM7C,IAAM,8BAA8B,OAA+B,WAA0B,UAClG,aAAiG;AACjG,QAAM,KAAK,OAAO,QAAQ,IAAI,MAAM,uCAAuC,WAAW,UAAU,QAAQ,IAAI;AAC5G,SAAO,KAAK,CAAC,KAAK,MAAM,UAAU,IAAI,IAAI,cAAwB,GAAG,OAAO,MAAM,CAAC,IAAI;AACzF;AAEO,IAAM,2BAA2B,OAA+B,WAA0B,UAC/F,aAAqF;AACrF,QAAM,KAAK,OAAO,QAAQ,IAAI,MAAM,oCAAoC,WAAW,UAAU,QAAQ,IAAI;AACzG,QAAM,YAAY,MAAM,UAAU,IAAI,IAAI,cAAwB,GAAG,OAAO,MAAM;AAClF,MAAI,SAAS,WAAW,GAAG,eAAe,QAAQ;AAChD,UAAM,IAAI,MAAM,wBAAwB,GAAG,KAAK,EAAE;AAAA,EACpD;AACA,SAAO,CAAC,IAAI,QAAQ;AACtB;AAEO,IAAM,sBAAsB,CACjC,WACA,aACgD;AAChD,QAAM,aAA8D,OAAKC,gBAAe,CAAC,KAAKC,eAAc,CAAC;AAC7G,SAAO,yBAAuC,WAAW,UAAU,UAAU;AAC/E;","names":["asSchema","AsObjectFactory","asSchema","asSchema","asSchema","asSchema","asSchema","asSchema","asSchema","asSchema","AsObjectFactory","IsObjectFactory","asSchema","isBoundWitness","isStorageMeta","isBoundWitness","isStorageMeta"]}
@@ -1 +1 @@
1
- {"version":3,"file":"typeChecks.d.ts","sourceRoot":"","sources":["../../src/typeChecks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAO/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,eAAO,MAAM,mBAAmB,EAAE,SAAS,CAAC,iBAAiB,CAA8F,CAAA;AAC3J,eAAO,MAAM,iBAAiB,EAAE,SAAS,CAAC,uBAAuB,CAA6F,CAAA;AAE9J,eAAO,MAAM,iBAAiB,4QAA4C,CAAA;AAC1E,eAAO,MAAM,mBAAmB,kSAA8C,CAAA;AAE9E,mDAAmD;AAEnD,eAAO,MAAM,mBAAmB,wRAAwC,CAAA;AACxE,mDAAmD;AAEnD,eAAO,MAAM,qBAAqB,8SAA0C,CAAA"}
1
+ {"version":3,"file":"typeChecks.d.ts","sourceRoot":"","sources":["../../src/typeChecks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAM/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,eAAO,MAAM,mBAAmB,EAAE,SAAS,CAAC,iBAAiB,CAA8F,CAAA;AAC3J,eAAO,MAAM,iBAAiB,EAAE,SAAS,CAAC,uBAAuB,CAA6F,CAAA;AAE9J,eAAO,MAAM,iBAAiB,4QAA4C,CAAA;AAC1E,eAAO,MAAM,mBAAmB,kSAA8C,CAAA;AAE9E,mDAAmD;AACnD,eAAO,MAAM,mBAAmB,wRAAwC,CAAA;AACxE,mDAAmD;AACnD,eAAO,MAAM,qBAAqB,8SAA0C,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/archivist-model",
3
- "version": "5.3.29",
3
+ "version": "5.4.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -22,12 +22,10 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./dist/neutral/index.d.ts",
25
- "import": "./dist/neutral/index.mjs",
26
25
  "default": "./dist/neutral/index.mjs"
27
26
  },
28
27
  "./package.json": "./package.json"
29
28
  },
30
- "types": "dist/neutral/index.d.ts",
31
29
  "files": [
32
30
  "dist",
33
31
  "!**/*.bench.*",
@@ -36,28 +34,26 @@
36
34
  "README.md"
37
35
  ],
38
36
  "dependencies": {
39
- "@xyo-network/boundwitness-model": "~5.3.29",
40
- "@xyo-network/payload-model": "~5.3.29"
37
+ "@xyo-network/boundwitness-model": "~5.4.0",
38
+ "@xyo-network/payload-model": "~5.4.0"
41
39
  },
42
40
  "devDependencies": {
43
41
  "@opentelemetry/api": "^1.9.1",
44
- "@xylabs/sdk-js": "^5.0.95",
45
- "@xylabs/ts-scripts-common": "~7.8.4",
46
- "@xylabs/ts-scripts-pnpm": "~7.8.4",
47
- "@xylabs/tsconfig": "~7.8.4",
48
- "axios": "^1.14.0",
42
+ "@xylabs/sdk-js": "^5.0.97",
43
+ "@xylabs/toolchain": "~7.10.8",
44
+ "@xylabs/tsconfig": "~7.10.8",
49
45
  "pako": "~2.1.0",
50
46
  "typescript": "~5.9.3",
51
47
  "zod": "^4.3.6",
52
- "@xyo-network/account-model": "~5.3.29",
53
- "@xyo-network/manifest-model": "~5.3.29",
54
- "@xyo-network/module-model": "~5.3.29",
55
- "@xyo-network/previous-hash-store-model": "~5.3.29"
48
+ "@xyo-network/account-model": "~5.4.0",
49
+ "@xyo-network/manifest-model": "~5.4.0",
50
+ "@xyo-network/module-model": "~5.4.0",
51
+ "@xyo-network/previous-hash-store-model": "~5.4.0"
56
52
  },
57
53
  "peerDependencies": {
58
- "@xylabs/sdk-js": "^5",
59
- "@xyo-network/account-model": "~5.3.29",
60
- "@xyo-network/module-model": "~5.3.29"
54
+ "@xylabs/sdk-js": "^5.0.97",
55
+ "@xyo-network/account-model": "~5.4",
56
+ "@xyo-network/module-model": "~5.4"
61
57
  },
62
58
  "publishConfig": {
63
59
  "access": "public"