@xyo-network/archivist-model 3.2.0 → 3.3.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.
@@ -9,15 +9,20 @@ export interface ArchivistParents {
9
9
  write?: Address[];
10
10
  }
11
11
  export interface ArchivistStorage {
12
+ /** The indexes to create on the object store */
12
13
  indexes?: IndexDescription[];
13
14
  }
14
15
  export declare const ArchivistConfigSchema: "network.xyo.archivist.config";
15
16
  export type ArchivistConfigSchema = typeof ArchivistConfigSchema;
16
17
  export type ArchivistConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
18
+ /** @field address of one or more parent archivists to read from */
17
19
  parents?: ArchivistParents;
20
+ /** @field fail if some parents can not be resolved (true if unspecified) */
18
21
  requireAllParents?: boolean;
19
22
  schema: TConfig extends Payload ? TConfig['schema'] : ArchivistConfigSchema;
23
+ /** @field storage configuration */
20
24
  storage?: ArchivistStorage;
25
+ /** @field should child store all reads from parents? */
21
26
  storeParentReads?: boolean;
22
27
  }, TConfig>, TSchema>;
23
28
  //# sourceMappingURL=Config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA;IAChB,KAAK,CAAC,EAAE,OA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CAAC,EAAE,gBAAgB,EAAE,CAAA;CAC7B;AAED,eAAO,MAAM,qBAAqB,gCAA0C,CAAA;AAC5E,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE,MAAM,MAAM,eAAe,CAAC,OAAO,SAAS,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACnI,cAAc,CACZ;IACE,mEAAmE;IACnE,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,qBAAqB,CAAA;IAC3E,mCAAmC;IACnC,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
@@ -1,12 +1,36 @@
1
+ /**
2
+ * The index direction (1 for ascending, -1 for descending)
3
+ */
1
4
  export type IndexDirection = -1 | 1;
5
+ /**
6
+ * Description of index(es) to be created on a store
7
+ */
2
8
  export type IndexDescription = {
9
+ /**
10
+ * The key(s) to index
11
+ */
3
12
  key: {
4
13
  [key: string]: IndexDirection;
5
14
  } | Map<string, IndexDirection>;
15
+ /**
16
+ * Is the indexed value an array
17
+ */
6
18
  multiEntry?: boolean;
19
+ /**
20
+ * The name of the index
21
+ */
7
22
  name?: string;
23
+ /**
24
+ * If true, the index must enforce uniqueness on the key
25
+ */
8
26
  unique?: boolean;
9
27
  };
10
28
  export declare const IndexSeparator = "-";
29
+ /**
30
+ * Given an index description, this will build the index
31
+ * name in standard form
32
+ * @param index The index description
33
+ * @returns The index name in standard form
34
+ */
11
35
  export declare const buildStandardIndexName: (index: IndexDescription) => string;
12
36
  //# sourceMappingURL=IndexDescription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IndexDescription.d.ts","sourceRoot":"","sources":["../../src/IndexDescription.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;AAKnC,MAAM,MAAM,gBAAgB,GAAG;IAI7B,GAAG,EACC;QACA,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;KAC9B,GACC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAI/B,UAAU,CAAC,EAAE,OAAO,CAAA;IAIpB,IAAI,CAAC,EAAE,MAAM,CAAA;IAIb,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,cAAc,MAAM,CAAA;AAQjC,eAAO,MAAM,sBAAsB,UAAW,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,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,GAAG,EACC;QACA,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;KAC9B,GACC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC/B;;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,UAAW,gBAAgB,WAK7D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/archivist-model",
3
- "version": "3.2.0",
3
+ "version": "3.3.1",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,18 +29,18 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/hex": "^4.1.0",
33
- "@xylabs/object": "^4.1.0",
34
- "@xylabs/promise": "^4.1.0",
35
- "@xyo-network/account-model": "^3.2.0",
36
- "@xyo-network/module-events": "^3.2.0",
37
- "@xyo-network/module-model": "^3.2.0",
38
- "@xyo-network/payload-model": "^3.2.0"
32
+ "@xylabs/hex": "^4.3.2",
33
+ "@xylabs/object": "^4.3.2",
34
+ "@xylabs/promise": "^4.3.2",
35
+ "@xyo-network/account-model": "^3.3.1",
36
+ "@xyo-network/module-events": "^3.3.1",
37
+ "@xyo-network/module-model": "^3.3.1",
38
+ "@xyo-network/payload-model": "^3.3.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@xylabs/ts-scripts-yarn3": "^4.1.0",
42
- "@xylabs/tsconfig": "^4.1.0",
43
- "typescript": "^5.6.2"
41
+ "@xylabs/ts-scripts-yarn3": "^4.2.3",
42
+ "@xylabs/tsconfig": "^4.2.3",
43
+ "typescript": "^5.6.3"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"