@xyo-network/diviner-image-thumbnail 4.1.1 → 4.2.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.
@@ -1,142 +1,2 @@
1
- import { DivinerStageSchema, IndexingDivinerStage, IndexingDiviner } from '@xyo-network/diviner-indexing';
2
- import * as _xyo_network_diviner_model from '@xyo-network/diviner-model';
3
- import { AttachableDivinerInstance, DivinerConfig, DivinerParams } from '@xyo-network/diviner-model';
4
- import * as _xyo_network_module_model from '@xyo-network/module-model';
5
- import { Labels, StateDictionary, AnyConfigSchema, ModuleState } from '@xyo-network/module-model';
6
- import { Hex } from '@xylabs/hex';
7
- import { AbstractDiviner } from '@xyo-network/diviner-abstract';
8
- import { ImageThumbnailResultIndex, ImageThumbnailResult, ImageThumbnailDivinerSchema, SearchableStorage, ImageThumbnail } from '@xyo-network/image-thumbnail-payload-plugin';
9
- import { Schema, Payload, WithSources } from '@xyo-network/payload-model';
10
- import { PayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model';
11
- import * as _xyo_network_archivist_model from '@xyo-network/archivist-model';
12
- import { ArchivistInstance } from '@xyo-network/archivist-model';
13
- import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
14
- import { BoundWitness } from '@xyo-network/boundwitness-model';
15
- import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
16
- import { TimeStamp } from '@xyo-network/witness-timestamp';
17
-
18
- /**
19
- * Labels for Image Thumbnail Diviner components
20
- */
21
- interface ImageThumbnailDivinerLabels extends Labels {
22
- 'network.xyo.image.thumbnail': 'diviner';
23
- }
24
- /**
25
- * Labels for Image Thumbnail Diviner components
26
- */
27
- declare const ImageThumbnailDivinerLabels: ImageThumbnailDivinerLabels;
28
- /**
29
- * Labels for Image Thumbnail Diviner Stage Diviners
30
- */
31
- type ImageThumbnailDivinerStageLabels = ImageThumbnailDivinerLabels & {
32
- [key in DivinerStageSchema]: IndexingDivinerStage;
33
- };
34
-
35
- declare class ImageThumbnailDiviner extends IndexingDiviner implements AttachableDivinerInstance {
36
- static readonly labels: ImageThumbnailDivinerLabels;
37
- }
38
-
39
- type ImageThumbnailDivinerState = StateDictionary & {
40
- cursor: Hex;
41
- };
42
-
43
- /**
44
- * Transforms candidates for image thumbnail indexing into their indexed representation
45
- */
46
- declare class ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner extends AbstractDiviner {
47
- static readonly configSchemas: Schema[];
48
- static readonly defaultConfigSchema: Schema;
49
- static readonly labels: ImageThumbnailDivinerStageLabels;
50
- protected divineHandler(payloads?: Payload[]): Promise<WithSources<ImageThumbnailResultIndex>[]>;
51
- }
52
-
53
- /**
54
- * Transforms an ImageThumbnailIndex response into an ImageThumbnailResponse response
55
- */
56
- declare class ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner extends AbstractDiviner {
57
- static readonly configSchemas: Schema[];
58
- static readonly defaultConfigSchema: Schema;
59
- static readonly labels: ImageThumbnailDivinerStageLabels;
60
- protected divineHandler(payloads?: Payload[]): Promise<ImageThumbnailResult[]>;
61
- }
62
-
63
- /**
64
- * The fields that will need to be indexed on in the underlying store
65
- */
66
- type QueryableImageThumbnailResultProperties = Extract<keyof ImageThumbnailResultIndex, 'status' | 'success' | 'timestamp' | 'key'>;
67
- /**
68
- * The query that will be used to retrieve the results from the underlying store
69
- */
70
- type ImageThumbnailResultQuery = PayloadDivinerQueryPayload & Pick<ImageThumbnailResultIndex, QueryableImageThumbnailResultProperties>;
71
- /**
72
- * A type guard for ImageThumbnailResultQuery
73
- */
74
- declare const isImageThumbnailResultQuery: (x?: unknown | null) => x is ImageThumbnailResultQuery;
75
-
76
- /**
77
- * A diviner that converts ImageThumbnailDivinerQuery to ImageThumbnailResultQuery
78
- */
79
- declare class ImageThumbnailQueryToImageThumbnailIndexQueryDiviner extends AbstractDiviner {
80
- static readonly configSchemas: Schema[];
81
- static readonly defaultConfigSchema: Schema;
82
- static readonly labels: ImageThumbnailDivinerStageLabels;
83
- protected divineHandler(payloads?: Payload[]): Promise<Omit<Omit<ImageThumbnailResultQuery, 'timestamp' | 'success'> & Partial<Pick<ImageThumbnailResultQuery, 'success'>>, 'timestamp'>[]>;
84
- }
85
-
86
- type ImageThumbnailStateToIndexCandidateDivinerSchema = `${ImageThumbnailDivinerSchema}.stage.stateToIndexCandidateDiviner`;
87
- declare const ImageThumbnailStateToIndexCandidateDivinerSchema: ImageThumbnailStateToIndexCandidateDivinerSchema;
88
-
89
- type ImageThumbnailStateToIndexCandidateDivinerConfigSchema = `${ImageThumbnailStateToIndexCandidateDivinerSchema}.config`;
90
- declare const ImageThumbnailStateToIndexCandidateDivinerConfigSchema: ImageThumbnailStateToIndexCandidateDivinerConfigSchema;
91
- type ImageThumbnailStateToIndexCandidateDivinerConfig = DivinerConfig<{
92
- payloadDivinerLimit?: number;
93
- /**
94
- * Where the diviner should look for stored thumbnails
95
- */
96
- payloadStore?: SearchableStorage;
97
- schema: ImageThumbnailStateToIndexCandidateDivinerConfigSchema;
98
- }>;
99
-
100
- type ImageThumbnailStateToIndexCandidateDivinerParams = DivinerParams<AnyConfigSchema<ImageThumbnailStateToIndexCandidateDivinerConfig>>;
101
-
102
- /**
103
- * All Payload types involved in index candidates for indexing
104
- */
105
- type IndexCandidate = BoundWitness | ImageThumbnail | TimeStamp;
106
- /**
107
- * The response from the ImageThumbnailStateToIndexCandidateDiviner
108
- */
109
- type ImageThumbnailStateToIndexCandidateDivinerResponse = [
110
- /**
111
- * The next state of the diviner
112
- */
113
- nextState: ModuleState<ImageThumbnailDivinerState>,
114
- /**
115
- * The index candidates
116
- */
117
- ...IndexCandidate[]
118
- ];
119
- /**
120
- * Transforms candidates for image thumbnail indexing into their indexed representation
121
- */
122
- declare class ImageThumbnailStateToIndexCandidateDiviner<TParams extends ImageThumbnailStateToIndexCandidateDivinerParams = ImageThumbnailStateToIndexCandidateDivinerParams> extends AbstractDiviner<TParams> {
123
- static readonly configSchemas: Schema[];
124
- static readonly defaultConfigSchema: Schema;
125
- static readonly labels: ImageThumbnailDivinerStageLabels;
126
- get payloadDivinerLimit(): number;
127
- protected static getPayloadsInBoundWitness(bw: BoundWitness, archivist: ArchivistInstance): Promise<IndexCandidate[] | undefined>;
128
- protected divineHandler(payloads?: Payload[]): Promise<ImageThumbnailStateToIndexCandidateDivinerResponse>;
129
- /**
130
- * Retrieves the archivist for the payloadStore
131
- * @returns The archivist for the payloadStore
132
- */
133
- protected getArchivistForStore(): Promise<ArchivistWrapper<_xyo_network_archivist_model.ArchivistModuleInstance<_xyo_network_module_model.ModuleParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_archivist_model.ArchivistConfig>>, _xyo_network_archivist_model.ArchivistModuleEventData>>>;
134
- /**
135
- * Retrieves the BoundWitness Diviner for the payloadStore
136
- * @returns The BoundWitness Diviner for the payloadStore
137
- */
138
- protected getBoundWitnessDivinerForStore(): Promise<DivinerWrapper<_xyo_network_diviner_model.DivinerModule<_xyo_network_diviner_model.DivinerParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_diviner_model.DivinerConfig>>, _xyo_network_diviner_model.DivinerModuleEventData>, Payload, Payload>>;
139
- }
140
-
141
- export { ImageThumbnailDiviner, ImageThumbnailDivinerLabels, ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner, ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner, ImageThumbnailQueryToImageThumbnailIndexQueryDiviner, ImageThumbnailStateToIndexCandidateDiviner, ImageThumbnailStateToIndexCandidateDivinerConfigSchema, ImageThumbnailStateToIndexCandidateDivinerSchema, isImageThumbnailResultQuery };
142
- export type { ImageThumbnailDivinerStageLabels, ImageThumbnailDivinerState, ImageThumbnailResultQuery, ImageThumbnailStateToIndexCandidateDivinerConfig, ImageThumbnailStateToIndexCandidateDivinerParams, ImageThumbnailStateToIndexCandidateDivinerResponse, IndexCandidate, QueryableImageThumbnailResultProperties };
1
+ export * from './Diviner/index.ts';
2
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-image-thumbnail",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,42 +29,41 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/array": "^4.13.23",
33
- "@xylabs/assert": "^4.13.23",
34
- "@xylabs/exists": "^4.13.23",
35
- "@xylabs/hex": "^4.13.23",
36
- "@xylabs/object": "^4.13.23",
37
- "@xyo-network/archivist-model": "^4.1.7",
38
- "@xyo-network/archivist-wrapper": "^4.1.7",
39
- "@xyo-network/boundwitness-model": "^4.1.7",
40
- "@xyo-network/boundwitness-validator": "^4.1.7",
41
- "@xyo-network/diviner-abstract": "^4.1.7",
42
- "@xyo-network/diviner-indexing": "^4.1.7",
43
- "@xyo-network/diviner-model": "^4.1.7",
44
- "@xyo-network/diviner-payload-model": "^4.1.7",
45
- "@xyo-network/diviner-wrapper": "^4.1.7",
46
- "@xyo-network/image-thumbnail-payload-plugin": "^4.1.1",
47
- "@xyo-network/module-model": "^4.1.7",
48
- "@xyo-network/payload-builder": "^4.1.7",
49
- "@xyo-network/payload-model": "^4.1.7",
50
- "@xyo-network/url-payload-plugin": "^4.1.1",
51
- "@xyo-network/witness-timestamp": "^4.1.7"
32
+ "@xylabs/array": "^4.15.1",
33
+ "@xylabs/assert": "^4.15.1",
34
+ "@xylabs/exists": "^4.15.1",
35
+ "@xylabs/hex": "^4.15.1",
36
+ "@xylabs/object": "^4.15.1",
37
+ "@xyo-network/archivist-model": "^4.3.0",
38
+ "@xyo-network/archivist-wrapper": "^4.3.0",
39
+ "@xyo-network/boundwitness-model": "^4.3.0",
40
+ "@xyo-network/boundwitness-validator": "^4.3.0",
41
+ "@xyo-network/diviner-abstract": "^4.3.0",
42
+ "@xyo-network/diviner-indexing": "^4.3.0",
43
+ "@xyo-network/diviner-model": "^4.3.0",
44
+ "@xyo-network/diviner-payload-model": "^4.3.0",
45
+ "@xyo-network/diviner-wrapper": "^4.3.0",
46
+ "@xyo-network/image-thumbnail-payload-plugin": "^4.2.0",
47
+ "@xyo-network/module-model": "^4.3.0",
48
+ "@xyo-network/payload-builder": "^4.3.0",
49
+ "@xyo-network/payload-model": "^4.3.0",
50
+ "@xyo-network/url-payload-plugin": "^4.2.0",
51
+ "@xyo-network/witness-timestamp": "^4.3.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@xylabs/delay": "^4.13.23",
55
- "@xylabs/hex": "^4.13.23",
56
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.24",
57
- "@xylabs/tsconfig": "^7.0.0-rc.24",
58
- "@xylabs/vitest-extended": "^4.13.23",
59
- "@xyo-network/archivist-memory": "^4.1.7",
60
- "@xyo-network/boundwitness-builder": "^4.1.7",
61
- "@xyo-network/diviner-boundwitness-memory": "^4.1.7",
62
- "@xyo-network/diviner-payload-generic": "^4.1.7",
63
- "@xyo-network/manifest": "^4.1.7",
64
- "@xyo-network/module-factory-locator": "^4.1.7",
65
- "@xyo-network/node-memory": "^4.1.7",
66
- "@xyo-network/wallet": "^4.1.7",
67
- "knip": "^5.62.0",
54
+ "@xylabs/delay": "^4.15.1",
55
+ "@xylabs/hex": "^4.15.1",
56
+ "@xylabs/ts-scripts-yarn3": "^7.0.1",
57
+ "@xylabs/tsconfig": "^7.0.1",
58
+ "@xylabs/vitest-extended": "^4.15.1",
59
+ "@xyo-network/archivist-memory": "^4.3.0",
60
+ "@xyo-network/boundwitness-builder": "^4.3.0",
61
+ "@xyo-network/diviner-boundwitness-memory": "^4.3.0",
62
+ "@xyo-network/diviner-payload-generic": "^4.3.0",
63
+ "@xyo-network/manifest": "^4.3.0",
64
+ "@xyo-network/module-factory-locator": "^4.3.0",
65
+ "@xyo-network/node-memory": "^4.3.0",
66
+ "@xyo-network/wallet": "^4.3.0",
68
67
  "typescript": "^5.8.3",
69
68
  "vitest": "^3.2.4"
70
69
  },