@xyo-network/diviner-temporal-indexing-model 2.80.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.
Files changed (142) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +13 -0
  3. package/dist/browser/Config.d.cts +27 -0
  4. package/dist/browser/Config.d.cts.map +1 -0
  5. package/dist/browser/Config.d.mts +27 -0
  6. package/dist/browser/Config.d.mts.map +1 -0
  7. package/dist/browser/Config.d.ts +27 -0
  8. package/dist/browser/Config.d.ts.map +1 -0
  9. package/dist/browser/Params.d.cts +6 -0
  10. package/dist/browser/Params.d.cts.map +1 -0
  11. package/dist/browser/Params.d.mts +6 -0
  12. package/dist/browser/Params.d.mts.map +1 -0
  13. package/dist/browser/Params.d.ts +6 -0
  14. package/dist/browser/Params.d.ts.map +1 -0
  15. package/dist/browser/Result/Payload.d.cts +15 -0
  16. package/dist/browser/Result/Payload.d.cts.map +1 -0
  17. package/dist/browser/Result/Payload.d.mts +15 -0
  18. package/dist/browser/Result/Payload.d.mts.map +1 -0
  19. package/dist/browser/Result/Payload.d.ts +15 -0
  20. package/dist/browser/Result/Payload.d.ts.map +1 -0
  21. package/dist/browser/Result/Schema.d.cts +3 -0
  22. package/dist/browser/Result/Schema.d.cts.map +1 -0
  23. package/dist/browser/Result/Schema.d.mts +3 -0
  24. package/dist/browser/Result/Schema.d.mts.map +1 -0
  25. package/dist/browser/Result/Schema.d.ts +3 -0
  26. package/dist/browser/Result/Schema.d.ts.map +1 -0
  27. package/dist/browser/Result/index.d.cts +3 -0
  28. package/dist/browser/Result/index.d.cts.map +1 -0
  29. package/dist/browser/Result/index.d.mts +3 -0
  30. package/dist/browser/Result/index.d.mts.map +1 -0
  31. package/dist/browser/Result/index.d.ts +3 -0
  32. package/dist/browser/Result/index.d.ts.map +1 -0
  33. package/dist/browser/ResultIndex/Payload.d.cts +15 -0
  34. package/dist/browser/ResultIndex/Payload.d.cts.map +1 -0
  35. package/dist/browser/ResultIndex/Payload.d.mts +15 -0
  36. package/dist/browser/ResultIndex/Payload.d.mts.map +1 -0
  37. package/dist/browser/ResultIndex/Payload.d.ts +15 -0
  38. package/dist/browser/ResultIndex/Payload.d.ts.map +1 -0
  39. package/dist/browser/ResultIndex/Schema.d.cts +3 -0
  40. package/dist/browser/ResultIndex/Schema.d.cts.map +1 -0
  41. package/dist/browser/ResultIndex/Schema.d.mts +3 -0
  42. package/dist/browser/ResultIndex/Schema.d.mts.map +1 -0
  43. package/dist/browser/ResultIndex/Schema.d.ts +3 -0
  44. package/dist/browser/ResultIndex/Schema.d.ts.map +1 -0
  45. package/dist/browser/ResultIndex/index.d.cts +3 -0
  46. package/dist/browser/ResultIndex/index.d.cts.map +1 -0
  47. package/dist/browser/ResultIndex/index.d.mts +3 -0
  48. package/dist/browser/ResultIndex/index.d.mts.map +1 -0
  49. package/dist/browser/ResultIndex/index.d.ts +3 -0
  50. package/dist/browser/ResultIndex/index.d.ts.map +1 -0
  51. package/dist/browser/Schema.d.cts +3 -0
  52. package/dist/browser/Schema.d.cts.map +1 -0
  53. package/dist/browser/Schema.d.mts +3 -0
  54. package/dist/browser/Schema.d.mts.map +1 -0
  55. package/dist/browser/Schema.d.ts +3 -0
  56. package/dist/browser/Schema.d.ts.map +1 -0
  57. package/dist/browser/index.cjs +58 -0
  58. package/dist/browser/index.cjs.map +1 -0
  59. package/dist/browser/index.d.cts +6 -0
  60. package/dist/browser/index.d.cts.map +1 -0
  61. package/dist/browser/index.d.mts +6 -0
  62. package/dist/browser/index.d.mts.map +1 -0
  63. package/dist/browser/index.d.ts +6 -0
  64. package/dist/browser/index.d.ts.map +1 -0
  65. package/dist/browser/index.js +35 -0
  66. package/dist/browser/index.js.map +1 -0
  67. package/dist/node/Config.d.cts +27 -0
  68. package/dist/node/Config.d.cts.map +1 -0
  69. package/dist/node/Config.d.mts +27 -0
  70. package/dist/node/Config.d.mts.map +1 -0
  71. package/dist/node/Config.d.ts +27 -0
  72. package/dist/node/Config.d.ts.map +1 -0
  73. package/dist/node/Params.d.cts +6 -0
  74. package/dist/node/Params.d.cts.map +1 -0
  75. package/dist/node/Params.d.mts +6 -0
  76. package/dist/node/Params.d.mts.map +1 -0
  77. package/dist/node/Params.d.ts +6 -0
  78. package/dist/node/Params.d.ts.map +1 -0
  79. package/dist/node/Result/Payload.d.cts +15 -0
  80. package/dist/node/Result/Payload.d.cts.map +1 -0
  81. package/dist/node/Result/Payload.d.mts +15 -0
  82. package/dist/node/Result/Payload.d.mts.map +1 -0
  83. package/dist/node/Result/Payload.d.ts +15 -0
  84. package/dist/node/Result/Payload.d.ts.map +1 -0
  85. package/dist/node/Result/Schema.d.cts +3 -0
  86. package/dist/node/Result/Schema.d.cts.map +1 -0
  87. package/dist/node/Result/Schema.d.mts +3 -0
  88. package/dist/node/Result/Schema.d.mts.map +1 -0
  89. package/dist/node/Result/Schema.d.ts +3 -0
  90. package/dist/node/Result/Schema.d.ts.map +1 -0
  91. package/dist/node/Result/index.d.cts +3 -0
  92. package/dist/node/Result/index.d.cts.map +1 -0
  93. package/dist/node/Result/index.d.mts +3 -0
  94. package/dist/node/Result/index.d.mts.map +1 -0
  95. package/dist/node/Result/index.d.ts +3 -0
  96. package/dist/node/Result/index.d.ts.map +1 -0
  97. package/dist/node/ResultIndex/Payload.d.cts +15 -0
  98. package/dist/node/ResultIndex/Payload.d.cts.map +1 -0
  99. package/dist/node/ResultIndex/Payload.d.mts +15 -0
  100. package/dist/node/ResultIndex/Payload.d.mts.map +1 -0
  101. package/dist/node/ResultIndex/Payload.d.ts +15 -0
  102. package/dist/node/ResultIndex/Payload.d.ts.map +1 -0
  103. package/dist/node/ResultIndex/Schema.d.cts +3 -0
  104. package/dist/node/ResultIndex/Schema.d.cts.map +1 -0
  105. package/dist/node/ResultIndex/Schema.d.mts +3 -0
  106. package/dist/node/ResultIndex/Schema.d.mts.map +1 -0
  107. package/dist/node/ResultIndex/Schema.d.ts +3 -0
  108. package/dist/node/ResultIndex/Schema.d.ts.map +1 -0
  109. package/dist/node/ResultIndex/index.d.cts +3 -0
  110. package/dist/node/ResultIndex/index.d.cts.map +1 -0
  111. package/dist/node/ResultIndex/index.d.mts +3 -0
  112. package/dist/node/ResultIndex/index.d.mts.map +1 -0
  113. package/dist/node/ResultIndex/index.d.ts +3 -0
  114. package/dist/node/ResultIndex/index.d.ts.map +1 -0
  115. package/dist/node/Schema.d.cts +3 -0
  116. package/dist/node/Schema.d.cts.map +1 -0
  117. package/dist/node/Schema.d.mts +3 -0
  118. package/dist/node/Schema.d.mts.map +1 -0
  119. package/dist/node/Schema.d.ts +3 -0
  120. package/dist/node/Schema.d.ts.map +1 -0
  121. package/dist/node/index.d.cts +6 -0
  122. package/dist/node/index.d.cts.map +1 -0
  123. package/dist/node/index.d.mts +6 -0
  124. package/dist/node/index.d.mts.map +1 -0
  125. package/dist/node/index.d.ts +6 -0
  126. package/dist/node/index.d.ts.map +1 -0
  127. package/dist/node/index.js +67 -0
  128. package/dist/node/index.js.map +1 -0
  129. package/dist/node/index.mjs +35 -0
  130. package/dist/node/index.mjs.map +1 -0
  131. package/package.json +65 -0
  132. package/src/Config.ts +31 -0
  133. package/src/Params.ts +8 -0
  134. package/src/Result/Payload.ts +12 -0
  135. package/src/Result/Schema.ts +4 -0
  136. package/src/Result/index.ts +2 -0
  137. package/src/ResultIndex/Payload.ts +14 -0
  138. package/src/ResultIndex/Schema.ts +4 -0
  139. package/src/ResultIndex/index.ts +2 -0
  140. package/src/Schema.ts +4 -0
  141. package/src/index.ts +5 -0
  142. package/typedoc.json +5 -0
@@ -0,0 +1,35 @@
1
+ // src/Schema.ts
2
+ import { IndexingDivinerSchema } from "@xyo-network/diviner-indexing-model";
3
+ var TemporalIndexingDivinerSchema = `${IndexingDivinerSchema}.temporal`;
4
+
5
+ // src/Config.ts
6
+ var TemporalIndexingDivinerConfigSchema = `${TemporalIndexingDivinerSchema}.config`;
7
+
8
+ // src/Result/Payload.ts
9
+ import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
10
+
11
+ // src/Result/Schema.ts
12
+ var TemporalIndexingDivinerResultSchema = `${TemporalIndexingDivinerSchema}.result`;
13
+
14
+ // src/Result/Payload.ts
15
+ var isTemporalIndexingDivinerResult = isPayloadOfSchemaType(TemporalIndexingDivinerResultSchema);
16
+
17
+ // src/ResultIndex/Payload.ts
18
+ import { isPayloadOfSchemaType as isPayloadOfSchemaType2 } from "@xyo-network/payload-model";
19
+
20
+ // src/ResultIndex/Schema.ts
21
+ var TemporalIndexingDivinerResultIndexSchema = `${TemporalIndexingDivinerResultSchema}.index`;
22
+
23
+ // src/ResultIndex/Payload.ts
24
+ var isTemporalIndexingDivinerResultIndex = isPayloadOfSchemaType2(
25
+ TemporalIndexingDivinerResultIndexSchema
26
+ );
27
+ export {
28
+ TemporalIndexingDivinerConfigSchema,
29
+ TemporalIndexingDivinerResultIndexSchema,
30
+ TemporalIndexingDivinerResultSchema,
31
+ TemporalIndexingDivinerSchema,
32
+ isTemporalIndexingDivinerResult,
33
+ isTemporalIndexingDivinerResultIndex
34
+ };
35
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/Schema.ts","../../src/Config.ts","../../src/Result/Payload.ts","../../src/Result/Schema.ts","../../src/ResultIndex/Payload.ts","../../src/ResultIndex/Schema.ts"],"sourcesContent":["import { IndexingDivinerSchema } from '@xyo-network/diviner-indexing-model'\n\nexport const TemporalIndexingDivinerSchema = `${IndexingDivinerSchema}.temporal` as const\nexport type TemporalIndexingDivinerSchema = typeof TemporalIndexingDivinerSchema\n","import { SearchableStorage } from '@xyo-network/diviner-indexing-model'\nimport { DivinerConfig } from '@xyo-network/diviner-model'\n\nimport { TemporalIndexingDivinerSchema } from './Schema'\n\nexport const TemporalIndexingDivinerConfigSchema = `${TemporalIndexingDivinerSchema}.config` as const\nexport type TemporalIndexingDivinerConfigSchema = typeof TemporalIndexingDivinerConfigSchema\n\n// TODO: Extend indexing diviner config and just remove fields that are not needed?\nexport type TemporalIndexingDivinerConfig = DivinerConfig<{\n /**\n * Where the diviner should store it's index\n */\n indexStore?: SearchableStorage\n /**\n * The maximum number of payloads to index at a time\n */\n payloadDivinerLimit?: number\n /**\n * How often to poll for new payloads to index\n */\n pollFrequency?: number\n /**\n * The schema for the Diviner config\n */\n schema: TemporalIndexingDivinerConfigSchema\n /**\n * Where the diviner should persist its internal state\n */\n stateStore?: SearchableStorage\n}>\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { TemporalIndexingDivinerResultSchema } from './Schema'\n\nexport type TemporalIndexingDivinerResult = Payload<\n {\n sources: string[]\n timestamp: string\n },\n TemporalIndexingDivinerResultSchema\n>\nexport const isTemporalIndexingDivinerResult = isPayloadOfSchemaType<TemporalIndexingDivinerResult>(TemporalIndexingDivinerResultSchema)\n","import { TemporalIndexingDivinerSchema } from '../Schema'\n\nexport const TemporalIndexingDivinerResultSchema = `${TemporalIndexingDivinerSchema}.result` as const\nexport type TemporalIndexingDivinerResultSchema = typeof TemporalIndexingDivinerResultSchema\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { TemporalIndexingDivinerResultIndexSchema } from './Schema'\n\nexport type TemporalIndexingDivinerResultIndex = Payload<\n {\n sources: string[]\n timestamp: string\n },\n TemporalIndexingDivinerResultIndexSchema\n>\nexport const isTemporalIndexingDivinerResultIndex = isPayloadOfSchemaType<TemporalIndexingDivinerResultIndex>(\n TemporalIndexingDivinerResultIndexSchema,\n)\n","import { TemporalIndexingDivinerResultSchema } from '../Result'\n\nexport const TemporalIndexingDivinerResultIndexSchema = `${TemporalIndexingDivinerResultSchema}.index` as const\nexport type TemporalIndexingDivinerResultIndexSchema = typeof TemporalIndexingDivinerResultIndexSchema\n"],"mappings":";AAAA,SAAS,6BAA6B;AAE/B,IAAM,gCAAgC,GAAG,qBAAqB;;;ACG9D,IAAM,sCAAsC,GAAG,6BAA6B;;;ACLnF,SAAS,6BAAsC;;;ACExC,IAAM,sCAAsC,GAAG,6BAA6B;;;ADS5E,IAAM,kCAAkC,sBAAqD,mCAAmC;;;AEXvI,SAAS,yBAAAA,8BAAsC;;;ACExC,IAAM,2CAA2C,GAAG,mCAAmC;;;ADSvF,IAAM,uCAAuCC;AAAA,EAClD;AACF;","names":["isPayloadOfSchemaType","isPayloadOfSchemaType"]}
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@xyo-network/diviner-temporal-indexing-model",
3
+ "author": {
4
+ "email": "support@xyo.network",
5
+ "name": "XYO Development Team",
6
+ "url": "https://xyo.network"
7
+ },
8
+ "bugs": {
9
+ "email": "support@xyo.network",
10
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
11
+ },
12
+ "dependencies": {
13
+ "@xyo-network/diviner-indexing-model": "~2.81.0-rc.1",
14
+ "@xyo-network/diviner-model": "~2.81.0-rc.1",
15
+ "@xyo-network/module-model": "~2.81.0-rc.1",
16
+ "@xyo-network/payload-model": "~2.81.0-rc.1"
17
+ },
18
+ "devDependencies": {
19
+ "@xylabs/ts-scripts-yarn3": "^3.2.2",
20
+ "@xylabs/tsconfig": "^3.2.2",
21
+ "typescript": "^5.2.2"
22
+ },
23
+ "description": "Primary SDK for using XYO Protocol 2.0",
24
+ "docs": "dist/docs.json",
25
+ "types": "dist/node/index.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "browser": {
29
+ "require": {
30
+ "types": "./dist/browser/index.d.cts",
31
+ "default": "./dist/browser/index.cjs"
32
+ },
33
+ "import": {
34
+ "types": "./dist/browser/index.d.mts",
35
+ "default": "./dist/browser/index.js"
36
+ }
37
+ },
38
+ "node": {
39
+ "require": {
40
+ "types": "./dist/node/index.d.ts",
41
+ "default": "./dist/node/index.js"
42
+ },
43
+ "import": {
44
+ "types": "./dist/node/index.d.mts",
45
+ "default": "./dist/node/index.mjs"
46
+ }
47
+ }
48
+ },
49
+ "./package.json": "./package.json"
50
+ },
51
+ "main": "dist/node/index.js",
52
+ "module": "dist/node/index.mjs",
53
+ "homepage": "https://xyo.network",
54
+ "license": "LGPL-3.0-only",
55
+ "publishConfig": {
56
+ "access": "public"
57
+ },
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
61
+ },
62
+ "sideEffects": false,
63
+ "version": "2.80.0-rc.1",
64
+ "stableVersion": "2.79.7"
65
+ }
package/src/Config.ts ADDED
@@ -0,0 +1,31 @@
1
+ import { SearchableStorage } from '@xyo-network/diviner-indexing-model'
2
+ import { DivinerConfig } from '@xyo-network/diviner-model'
3
+
4
+ import { TemporalIndexingDivinerSchema } from './Schema'
5
+
6
+ export const TemporalIndexingDivinerConfigSchema = `${TemporalIndexingDivinerSchema}.config` as const
7
+ export type TemporalIndexingDivinerConfigSchema = typeof TemporalIndexingDivinerConfigSchema
8
+
9
+ // TODO: Extend indexing diviner config and just remove fields that are not needed?
10
+ export type TemporalIndexingDivinerConfig = DivinerConfig<{
11
+ /**
12
+ * Where the diviner should store it's index
13
+ */
14
+ indexStore?: SearchableStorage
15
+ /**
16
+ * The maximum number of payloads to index at a time
17
+ */
18
+ payloadDivinerLimit?: number
19
+ /**
20
+ * How often to poll for new payloads to index
21
+ */
22
+ pollFrequency?: number
23
+ /**
24
+ * The schema for the Diviner config
25
+ */
26
+ schema: TemporalIndexingDivinerConfigSchema
27
+ /**
28
+ * Where the diviner should persist its internal state
29
+ */
30
+ stateStore?: SearchableStorage
31
+ }>
package/src/Params.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { IndexingDivinerParams } from '@xyo-network/diviner-indexing-model'
2
+ import { DivinerParams } from '@xyo-network/diviner-model'
3
+ import { AnyConfigSchema } from '@xyo-network/module-model'
4
+
5
+ import { TemporalIndexingDivinerConfig } from './Config'
6
+
7
+ // TODO: Extend indexing diviner params and just remove fields that are not needed?
8
+ export type TemporalIndexingDivinerParams = IndexingDivinerParams & DivinerParams<AnyConfigSchema<TemporalIndexingDivinerConfig>>
@@ -0,0 +1,12 @@
1
+ import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'
2
+
3
+ import { TemporalIndexingDivinerResultSchema } from './Schema'
4
+
5
+ export type TemporalIndexingDivinerResult = Payload<
6
+ {
7
+ sources: string[]
8
+ timestamp: string
9
+ },
10
+ TemporalIndexingDivinerResultSchema
11
+ >
12
+ export const isTemporalIndexingDivinerResult = isPayloadOfSchemaType<TemporalIndexingDivinerResult>(TemporalIndexingDivinerResultSchema)
@@ -0,0 +1,4 @@
1
+ import { TemporalIndexingDivinerSchema } from '../Schema'
2
+
3
+ export const TemporalIndexingDivinerResultSchema = `${TemporalIndexingDivinerSchema}.result` as const
4
+ export type TemporalIndexingDivinerResultSchema = typeof TemporalIndexingDivinerResultSchema
@@ -0,0 +1,2 @@
1
+ export * from './Payload'
2
+ export * from './Schema'
@@ -0,0 +1,14 @@
1
+ import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'
2
+
3
+ import { TemporalIndexingDivinerResultIndexSchema } from './Schema'
4
+
5
+ export type TemporalIndexingDivinerResultIndex = Payload<
6
+ {
7
+ sources: string[]
8
+ timestamp: string
9
+ },
10
+ TemporalIndexingDivinerResultIndexSchema
11
+ >
12
+ export const isTemporalIndexingDivinerResultIndex = isPayloadOfSchemaType<TemporalIndexingDivinerResultIndex>(
13
+ TemporalIndexingDivinerResultIndexSchema,
14
+ )
@@ -0,0 +1,4 @@
1
+ import { TemporalIndexingDivinerResultSchema } from '../Result'
2
+
3
+ export const TemporalIndexingDivinerResultIndexSchema = `${TemporalIndexingDivinerResultSchema}.index` as const
4
+ export type TemporalIndexingDivinerResultIndexSchema = typeof TemporalIndexingDivinerResultIndexSchema
@@ -0,0 +1,2 @@
1
+ export * from './Payload'
2
+ export * from './Schema'
package/src/Schema.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { IndexingDivinerSchema } from '@xyo-network/diviner-indexing-model'
2
+
3
+ export const TemporalIndexingDivinerSchema = `${IndexingDivinerSchema}.temporal` as const
4
+ export type TemporalIndexingDivinerSchema = typeof TemporalIndexingDivinerSchema
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * from './Config'
2
+ export * from './Params'
3
+ export * from './Result'
4
+ export * from './ResultIndex'
5
+ export * from './Schema'
package/typedoc.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://typedoc.org/schema.json",
3
+ "entryPoints": ["src/index.ts"],
4
+ "tsconfig": "./tsconfig.typedoc.json"
5
+ }