@xyo-network/image-thumbnail-plugin 2.75.5 → 2.75.6
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/docs.json +5065 -5089
- package/dist/node/Diviner/Config.d.cts +23 -0
- package/dist/node/Diviner/Config.d.cts.map +1 -1
- package/dist/node/Diviner/Config.d.mts +23 -0
- package/dist/node/Diviner/Config.d.mts.map +1 -1
- package/dist/node/Diviner/Config.d.ts +23 -0
- package/dist/node/Diviner/Config.d.ts.map +1 -1
- package/dist/node/Diviner/Config.js.map +1 -1
- package/dist/node/Diviner/Config.mjs.map +1 -1
- package/dist/node/Diviner/Diviner.d.cts +37 -20
- package/dist/node/Diviner/Diviner.d.cts.map +1 -1
- package/dist/node/Diviner/Diviner.d.mts +37 -20
- package/dist/node/Diviner/Diviner.d.mts.map +1 -1
- package/dist/node/Diviner/Diviner.d.ts +37 -20
- package/dist/node/Diviner/Diviner.d.ts.map +1 -1
- package/dist/node/Diviner/Diviner.js +158 -138
- package/dist/node/Diviner/Diviner.js.map +1 -1
- package/dist/node/Diviner/Diviner.mjs +156 -136
- package/dist/node/Diviner/Diviner.mjs.map +1 -1
- package/dist/node/Diviner/index.js +158 -138
- package/dist/node/Diviner/index.js.map +1 -1
- package/dist/node/Diviner/index.mjs +156 -136
- package/dist/node/Diviner/index.mjs.map +1 -1
- package/dist/node/Plugin.d.cts +3 -0
- package/dist/node/Plugin.d.cts.map +1 -1
- package/dist/node/Plugin.d.mts +3 -0
- package/dist/node/Plugin.d.mts.map +1 -1
- package/dist/node/Plugin.d.ts +3 -0
- package/dist/node/Plugin.d.ts.map +1 -1
- package/dist/node/Plugin.js +163 -143
- package/dist/node/Plugin.js.map +1 -1
- package/dist/node/Plugin.mjs +161 -141
- package/dist/node/Plugin.mjs.map +1 -1
- package/dist/node/index.js +163 -143
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +161 -141
- package/dist/node/index.mjs.map +1 -1
- package/package.json +22 -16
- package/src/Diviner/Config.ts +24 -0
- package/src/Diviner/Diviner.ts +223 -157
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import { DivinerConfig } from '@xyo-network/diviner-model';
|
|
2
2
|
export declare const ImageThumbnailDivinerConfigSchema: "network.xyo.image.thumbnail.diviner.config";
|
|
3
3
|
export type ImageThumbnailDivinerConfigSchema = typeof ImageThumbnailDivinerConfigSchema;
|
|
4
|
+
/**
|
|
5
|
+
* Describes an Archivist/Diviner combination
|
|
6
|
+
* that enables searching signed payloads
|
|
7
|
+
*/
|
|
8
|
+
export interface SearchableStorage {
|
|
9
|
+
archivist: string;
|
|
10
|
+
boundWitnessDiviner: string;
|
|
11
|
+
payloadDiviner: string;
|
|
12
|
+
}
|
|
4
13
|
export type ImageThumbnailDivinerConfig = DivinerConfig<{
|
|
14
|
+
/** @deprecated Use appropriate Storage */
|
|
5
15
|
archivist?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Where the diviner should store it's index
|
|
18
|
+
*/
|
|
19
|
+
indexStore?: SearchableStorage;
|
|
20
|
+
/** @deprecated Use appropriate Storage */
|
|
6
21
|
payloadDiviner?: string;
|
|
7
22
|
payloadDivinerLimit?: number;
|
|
8
23
|
pollFrequency?: number;
|
|
9
24
|
schema: ImageThumbnailDivinerConfigSchema;
|
|
25
|
+
/**
|
|
26
|
+
* Where the diviner should persist its internal state
|
|
27
|
+
*/
|
|
28
|
+
stateStore?: SearchableStorage;
|
|
29
|
+
/**
|
|
30
|
+
* Where the diviner should look for stored thumbnails
|
|
31
|
+
*/
|
|
32
|
+
thumbnailStore?: SearchableStorage;
|
|
10
33
|
}>;
|
|
11
34
|
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,eAAO,MAAM,iCAAiC,8CAAoD,CAAA;AAClG,MAAM,MAAM,iCAAiC,GAAG,OAAO,iCAAiC,CAAA;AAExF,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,eAAO,MAAM,iCAAiC,8CAAoD,CAAA;AAClG,MAAM,MAAM,iCAAiC,GAAG,OAAO,iCAAiC,CAAA;AAExF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,0CAA0C;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,iCAAiC,CAAA;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAA;CACnC,CAAC,CAAA"}
|
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import { DivinerConfig } from '@xyo-network/diviner-model';
|
|
2
2
|
export declare const ImageThumbnailDivinerConfigSchema: "network.xyo.image.thumbnail.diviner.config";
|
|
3
3
|
export type ImageThumbnailDivinerConfigSchema = typeof ImageThumbnailDivinerConfigSchema;
|
|
4
|
+
/**
|
|
5
|
+
* Describes an Archivist/Diviner combination
|
|
6
|
+
* that enables searching signed payloads
|
|
7
|
+
*/
|
|
8
|
+
export interface SearchableStorage {
|
|
9
|
+
archivist: string;
|
|
10
|
+
boundWitnessDiviner: string;
|
|
11
|
+
payloadDiviner: string;
|
|
12
|
+
}
|
|
4
13
|
export type ImageThumbnailDivinerConfig = DivinerConfig<{
|
|
14
|
+
/** @deprecated Use appropriate Storage */
|
|
5
15
|
archivist?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Where the diviner should store it's index
|
|
18
|
+
*/
|
|
19
|
+
indexStore?: SearchableStorage;
|
|
20
|
+
/** @deprecated Use appropriate Storage */
|
|
6
21
|
payloadDiviner?: string;
|
|
7
22
|
payloadDivinerLimit?: number;
|
|
8
23
|
pollFrequency?: number;
|
|
9
24
|
schema: ImageThumbnailDivinerConfigSchema;
|
|
25
|
+
/**
|
|
26
|
+
* Where the diviner should persist its internal state
|
|
27
|
+
*/
|
|
28
|
+
stateStore?: SearchableStorage;
|
|
29
|
+
/**
|
|
30
|
+
* Where the diviner should look for stored thumbnails
|
|
31
|
+
*/
|
|
32
|
+
thumbnailStore?: SearchableStorage;
|
|
10
33
|
}>;
|
|
11
34
|
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,eAAO,MAAM,iCAAiC,8CAAoD,CAAA;AAClG,MAAM,MAAM,iCAAiC,GAAG,OAAO,iCAAiC,CAAA;AAExF,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,eAAO,MAAM,iCAAiC,8CAAoD,CAAA;AAClG,MAAM,MAAM,iCAAiC,GAAG,OAAO,iCAAiC,CAAA;AAExF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,0CAA0C;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,iCAAiC,CAAA;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAA;CACnC,CAAC,CAAA"}
|
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import { DivinerConfig } from '@xyo-network/diviner-model';
|
|
2
2
|
export declare const ImageThumbnailDivinerConfigSchema: "network.xyo.image.thumbnail.diviner.config";
|
|
3
3
|
export type ImageThumbnailDivinerConfigSchema = typeof ImageThumbnailDivinerConfigSchema;
|
|
4
|
+
/**
|
|
5
|
+
* Describes an Archivist/Diviner combination
|
|
6
|
+
* that enables searching signed payloads
|
|
7
|
+
*/
|
|
8
|
+
export interface SearchableStorage {
|
|
9
|
+
archivist: string;
|
|
10
|
+
boundWitnessDiviner: string;
|
|
11
|
+
payloadDiviner: string;
|
|
12
|
+
}
|
|
4
13
|
export type ImageThumbnailDivinerConfig = DivinerConfig<{
|
|
14
|
+
/** @deprecated Use appropriate Storage */
|
|
5
15
|
archivist?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Where the diviner should store it's index
|
|
18
|
+
*/
|
|
19
|
+
indexStore?: SearchableStorage;
|
|
20
|
+
/** @deprecated Use appropriate Storage */
|
|
6
21
|
payloadDiviner?: string;
|
|
7
22
|
payloadDivinerLimit?: number;
|
|
8
23
|
pollFrequency?: number;
|
|
9
24
|
schema: ImageThumbnailDivinerConfigSchema;
|
|
25
|
+
/**
|
|
26
|
+
* Where the diviner should persist its internal state
|
|
27
|
+
*/
|
|
28
|
+
stateStore?: SearchableStorage;
|
|
29
|
+
/**
|
|
30
|
+
* Where the diviner should look for stored thumbnails
|
|
31
|
+
*/
|
|
32
|
+
thumbnailStore?: SearchableStorage;
|
|
10
33
|
}>;
|
|
11
34
|
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,eAAO,MAAM,iCAAiC,8CAAoD,CAAA;AAClG,MAAM,MAAM,iCAAiC,GAAG,OAAO,iCAAiC,CAAA;AAExF,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,eAAO,MAAM,iCAAiC,8CAAoD,CAAA;AAClG,MAAM,MAAM,iCAAiC,GAAG,OAAO,iCAAiC,CAAA;AAExF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,0CAA0C;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,iCAAiC,CAAA;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAA;CACnC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Diviner/Config.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { ImageThumbnailSchema } from '@xyo-network/image-thumbnail-payload-plugin'\n\nexport const ImageThumbnailDivinerConfigSchema = `${ImageThumbnailSchema}.diviner.config` as const\nexport type ImageThumbnailDivinerConfigSchema = typeof ImageThumbnailDivinerConfigSchema\n\nexport type ImageThumbnailDivinerConfig = DivinerConfig<{\n archivist?: string\n payloadDiviner?: string\n payloadDivinerLimit?: number\n pollFrequency?: number\n schema: ImageThumbnailDivinerConfigSchema\n}>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4CAAqC;AAE9B,IAAM,oCAAoC,GAAG,0DAAoB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/Diviner/Config.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { ImageThumbnailSchema } from '@xyo-network/image-thumbnail-payload-plugin'\n\nexport const ImageThumbnailDivinerConfigSchema = `${ImageThumbnailSchema}.diviner.config` as const\nexport type ImageThumbnailDivinerConfigSchema = typeof ImageThumbnailDivinerConfigSchema\n\n/**\n * Describes an Archivist/Diviner combination\n * that enables searching signed payloads\n */\nexport interface SearchableStorage {\n archivist: string\n boundWitnessDiviner: string\n payloadDiviner: string\n}\n\nexport type ImageThumbnailDivinerConfig = DivinerConfig<{\n /** @deprecated Use appropriate Storage */\n archivist?: string\n /**\n * Where the diviner should store it's index\n */\n indexStore?: SearchableStorage\n /** @deprecated Use appropriate Storage */\n payloadDiviner?: string\n payloadDivinerLimit?: number\n pollFrequency?: number\n schema: ImageThumbnailDivinerConfigSchema\n /**\n * Where the diviner should persist its internal state\n */\n stateStore?: SearchableStorage\n /**\n * Where the diviner should look for stored thumbnails\n */\n thumbnailStore?: SearchableStorage\n}>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4CAAqC;AAE9B,IAAM,oCAAoC,GAAG,0DAAoB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Diviner/Config.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { ImageThumbnailSchema } from '@xyo-network/image-thumbnail-payload-plugin'\n\nexport const ImageThumbnailDivinerConfigSchema = `${ImageThumbnailSchema}.diviner.config` as const\nexport type ImageThumbnailDivinerConfigSchema = typeof ImageThumbnailDivinerConfigSchema\n\nexport type ImageThumbnailDivinerConfig = DivinerConfig<{\n archivist?: string\n payloadDiviner?: string\n payloadDivinerLimit?: number\n pollFrequency?: number\n schema: ImageThumbnailDivinerConfigSchema\n}>\n"],"mappings":";AACA,SAAS,4BAA4B;AAE9B,IAAM,oCAAoC,GAAG,oBAAoB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/Diviner/Config.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { ImageThumbnailSchema } from '@xyo-network/image-thumbnail-payload-plugin'\n\nexport const ImageThumbnailDivinerConfigSchema = `${ImageThumbnailSchema}.diviner.config` as const\nexport type ImageThumbnailDivinerConfigSchema = typeof ImageThumbnailDivinerConfigSchema\n\n/**\n * Describes an Archivist/Diviner combination\n * that enables searching signed payloads\n */\nexport interface SearchableStorage {\n archivist: string\n boundWitnessDiviner: string\n payloadDiviner: string\n}\n\nexport type ImageThumbnailDivinerConfig = DivinerConfig<{\n /** @deprecated Use appropriate Storage */\n archivist?: string\n /**\n * Where the diviner should store it's index\n */\n indexStore?: SearchableStorage\n /** @deprecated Use appropriate Storage */\n payloadDiviner?: string\n payloadDivinerLimit?: number\n pollFrequency?: number\n schema: ImageThumbnailDivinerConfigSchema\n /**\n * Where the diviner should persist its internal state\n */\n stateStore?: SearchableStorage\n /**\n * Where the diviner should look for stored thumbnails\n */\n thumbnailStore?: SearchableStorage\n}>\n"],"mappings":";AACA,SAAS,4BAA4B;AAE9B,IAAM,oCAAoC,GAAG,oBAAoB;","names":[]}
|
|
@@ -1,30 +1,47 @@
|
|
|
1
1
|
import { AbstractDiviner } from '@xyo-network/abstract-diviner';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
|
|
3
|
+
import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
|
|
4
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
5
|
+
import { ImageThumbnailDivinerConfig } from './Config';
|
|
6
6
|
import { ImageThumbnailDivinerParams } from './Params';
|
|
7
|
+
interface ImageThumbnailDivinerState {
|
|
8
|
+
offset: number;
|
|
9
|
+
}
|
|
10
|
+
type ConfigStoreKey = 'indexStore' | 'stateStore' | 'thumbnailStore';
|
|
11
|
+
type ConfigStore = Extract<keyof ImageThumbnailDivinerConfig, ConfigStoreKey>;
|
|
12
|
+
declare const ImageThumbnailResultIndexSchema: "network.xyo.image.thumbnail.index";
|
|
13
|
+
type ImageThumbnailResultIndexSchema = typeof ImageThumbnailResultIndexSchema;
|
|
14
|
+
interface ImageThumbnailResultInfo {
|
|
15
|
+
sources: string[];
|
|
16
|
+
status: number;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
type ImageThumbnailResult = Payload<ImageThumbnailResultInfo, ImageThumbnailResultIndexSchema>;
|
|
7
21
|
export declare class ImageThumbnailDiviner<TParams extends ImageThumbnailDivinerParams = ImageThumbnailDivinerParams> extends AbstractDiviner<TParams> {
|
|
8
22
|
static configSchemas: ("network.xyo.image.thumbnail.diviner.config" | "network.xyo.diviner.config")[];
|
|
9
|
-
private _archivistInstance;
|
|
10
|
-
private _initializeArchivistConnectionIfNeededPromise;
|
|
11
|
-
private _map;
|
|
12
|
-
private _payloadDivinerInstance;
|
|
13
23
|
private _pollId?;
|
|
14
|
-
get archivist(): (import("@xyo-network/module-model").ArchivistModuleConfig & (import("@xyo-network/module-model").ArchivistModuleConfig & string)) | undefined;
|
|
15
|
-
get payloadDiviner(): string | undefined;
|
|
16
24
|
get payloadDivinerLimit(): number;
|
|
17
|
-
get pollFrequency(): number
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
get pollFrequency(): number;
|
|
26
|
+
protected backgroundDivine: () => Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Commit the internal state of the Diviner process. This is similar
|
|
29
|
+
* to a transaction completion in a database and should only be called
|
|
30
|
+
* when results have been successfully persisted to the appropriate
|
|
31
|
+
* external stores.
|
|
32
|
+
*/
|
|
33
|
+
protected commitState(state: ImageThumbnailDivinerState): Promise<void>;
|
|
34
|
+
protected divineHandler(payloads?: Payload[]): Promise<ImageThumbnailResult[]>;
|
|
35
|
+
protected getArchivistForStore(store: ConfigStore, wrap?: boolean): Promise<import("@xyo-network/archivist-model").ArchivistInstance | ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule>>;
|
|
36
|
+
protected getBoundWitnessDivinerForStore(store: ConfigStore, wrap?: boolean): Promise<import("@xyo-network/diviner-model").DivinerInstance | DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule>>;
|
|
37
|
+
protected getPayloadDivinerForStore(store: ConfigStore, wrap?: boolean): Promise<import("@xyo-network/diviner-model").DivinerInstance | DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule>>;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves the last state of the Diviner process. Used to recover state after
|
|
40
|
+
* preemptions, reboots, etc.
|
|
41
|
+
*/
|
|
42
|
+
protected retrieveState(): Promise<ImageThumbnailDivinerState | undefined>;
|
|
25
43
|
protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
|
|
26
|
-
private attachArchivistEvents;
|
|
27
|
-
private getSafeMap;
|
|
28
44
|
private poll;
|
|
29
45
|
}
|
|
46
|
+
export {};
|
|
30
47
|
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAMjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAG7D,OAAO,EAAyB,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAI3E,OAAO,EAAE,2BAA2B,EAAqC,MAAM,UAAU,CAAA;AACz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B,GAAG,SAAS,CAAC;cA8CvD,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;YAQvE,IAAI;CASnB"}
|
|
@@ -1,30 +1,47 @@
|
|
|
1
1
|
import { AbstractDiviner } from '@xyo-network/abstract-diviner';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
|
|
3
|
+
import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
|
|
4
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
5
|
+
import { ImageThumbnailDivinerConfig } from './Config';
|
|
6
6
|
import { ImageThumbnailDivinerParams } from './Params';
|
|
7
|
+
interface ImageThumbnailDivinerState {
|
|
8
|
+
offset: number;
|
|
9
|
+
}
|
|
10
|
+
type ConfigStoreKey = 'indexStore' | 'stateStore' | 'thumbnailStore';
|
|
11
|
+
type ConfigStore = Extract<keyof ImageThumbnailDivinerConfig, ConfigStoreKey>;
|
|
12
|
+
declare const ImageThumbnailResultIndexSchema: "network.xyo.image.thumbnail.index";
|
|
13
|
+
type ImageThumbnailResultIndexSchema = typeof ImageThumbnailResultIndexSchema;
|
|
14
|
+
interface ImageThumbnailResultInfo {
|
|
15
|
+
sources: string[];
|
|
16
|
+
status: number;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
type ImageThumbnailResult = Payload<ImageThumbnailResultInfo, ImageThumbnailResultIndexSchema>;
|
|
7
21
|
export declare class ImageThumbnailDiviner<TParams extends ImageThumbnailDivinerParams = ImageThumbnailDivinerParams> extends AbstractDiviner<TParams> {
|
|
8
22
|
static configSchemas: ("network.xyo.image.thumbnail.diviner.config" | "network.xyo.diviner.config")[];
|
|
9
|
-
private _archivistInstance;
|
|
10
|
-
private _initializeArchivistConnectionIfNeededPromise;
|
|
11
|
-
private _map;
|
|
12
|
-
private _payloadDivinerInstance;
|
|
13
23
|
private _pollId?;
|
|
14
|
-
get archivist(): (import("@xyo-network/module-model").ArchivistModuleConfig & (import("@xyo-network/module-model").ArchivistModuleConfig & string)) | undefined;
|
|
15
|
-
get payloadDiviner(): string | undefined;
|
|
16
24
|
get payloadDivinerLimit(): number;
|
|
17
|
-
get pollFrequency(): number
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
get pollFrequency(): number;
|
|
26
|
+
protected backgroundDivine: () => Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Commit the internal state of the Diviner process. This is similar
|
|
29
|
+
* to a transaction completion in a database and should only be called
|
|
30
|
+
* when results have been successfully persisted to the appropriate
|
|
31
|
+
* external stores.
|
|
32
|
+
*/
|
|
33
|
+
protected commitState(state: ImageThumbnailDivinerState): Promise<void>;
|
|
34
|
+
protected divineHandler(payloads?: Payload[]): Promise<ImageThumbnailResult[]>;
|
|
35
|
+
protected getArchivistForStore(store: ConfigStore, wrap?: boolean): Promise<import("@xyo-network/archivist-model").ArchivistInstance | ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule>>;
|
|
36
|
+
protected getBoundWitnessDivinerForStore(store: ConfigStore, wrap?: boolean): Promise<import("@xyo-network/diviner-model").DivinerInstance | DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule>>;
|
|
37
|
+
protected getPayloadDivinerForStore(store: ConfigStore, wrap?: boolean): Promise<import("@xyo-network/diviner-model").DivinerInstance | DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule>>;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves the last state of the Diviner process. Used to recover state after
|
|
40
|
+
* preemptions, reboots, etc.
|
|
41
|
+
*/
|
|
42
|
+
protected retrieveState(): Promise<ImageThumbnailDivinerState | undefined>;
|
|
25
43
|
protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
|
|
26
|
-
private attachArchivistEvents;
|
|
27
|
-
private getSafeMap;
|
|
28
44
|
private poll;
|
|
29
45
|
}
|
|
46
|
+
export {};
|
|
30
47
|
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAMjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAG7D,OAAO,EAAyB,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAI3E,OAAO,EAAE,2BAA2B,EAAqC,MAAM,UAAU,CAAA;AACzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAUtD,UAAU,0BAA0B;IAClC,MAAM,EAAE,MAAM,CAAA;CACf;AASD,KAAK,cAAc,GAAG,YAAY,GAAG,YAAY,GAAG,gBAAgB,CAAA;AAEpE,KAAK,WAAW,GAAG,OAAO,CAAC,MAAM,2BAA2B,EAAE,cAAc,CAAC,CAAA;AAE7E,QAAA,MAAM,+BAA+B,qCAA2C,CAAA;AAChF,KAAK,+BAA+B,GAAG,OAAO,+BAA+B,CAAA;AAE7E,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAA;IAEjB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,KAAK,oBAAoB,GAAG,OAAO,CAAC,wBAAwB,EAAE,+BAA+B,CAAC,CAAA;AAmB9F,qBAAa,qBAAqB,CAAC,OAAO,SAAS,2BAA2B,GAAG,2BAA2B,CAAE,SAAQ,eAAe,CAAC,OAAO,CAAC;IAC5I,OAAgB,aAAa,kFAA2D;IAExF,OAAO,CAAC,OAAO,CAAC,CAAkC;IAElD,IAAI,mBAAmB,WAEtB;IAED,IAAI,aAAa,WAEhB;IAED,SAAS,CAAC,gBAAgB,QAAa,QAAQ,IAAI,CAAC,CA0DnD;IAED;;;;;OAKG;cACa,WAAW,CAAC,KAAK,EAAE,0BAA0B;cAUpC,aAAa,CAAC,QAAQ,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;cAmBjF,oBAAoB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,OAAO;cAQvD,8BAA8B,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,OAAO;cAQjE,yBAAyB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,OAAO;IAM5E;;;OAGG;cACa,aAAa,IAAI,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC;cA8CvD,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;YAQvE,IAAI;CASnB"}
|
|
@@ -1,30 +1,47 @@
|
|
|
1
1
|
import { AbstractDiviner } from '@xyo-network/abstract-diviner';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
|
|
3
|
+
import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
|
|
4
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
5
|
+
import { ImageThumbnailDivinerConfig } from './Config';
|
|
6
6
|
import { ImageThumbnailDivinerParams } from './Params';
|
|
7
|
+
interface ImageThumbnailDivinerState {
|
|
8
|
+
offset: number;
|
|
9
|
+
}
|
|
10
|
+
type ConfigStoreKey = 'indexStore' | 'stateStore' | 'thumbnailStore';
|
|
11
|
+
type ConfigStore = Extract<keyof ImageThumbnailDivinerConfig, ConfigStoreKey>;
|
|
12
|
+
declare const ImageThumbnailResultIndexSchema: "network.xyo.image.thumbnail.index";
|
|
13
|
+
type ImageThumbnailResultIndexSchema = typeof ImageThumbnailResultIndexSchema;
|
|
14
|
+
interface ImageThumbnailResultInfo {
|
|
15
|
+
sources: string[];
|
|
16
|
+
status: number;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
type ImageThumbnailResult = Payload<ImageThumbnailResultInfo, ImageThumbnailResultIndexSchema>;
|
|
7
21
|
export declare class ImageThumbnailDiviner<TParams extends ImageThumbnailDivinerParams = ImageThumbnailDivinerParams> extends AbstractDiviner<TParams> {
|
|
8
22
|
static configSchemas: ("network.xyo.image.thumbnail.diviner.config" | "network.xyo.diviner.config")[];
|
|
9
|
-
private _archivistInstance;
|
|
10
|
-
private _initializeArchivistConnectionIfNeededPromise;
|
|
11
|
-
private _map;
|
|
12
|
-
private _payloadDivinerInstance;
|
|
13
23
|
private _pollId?;
|
|
14
|
-
get archivist(): (import("@xyo-network/module-model").ArchivistModuleConfig & (import("@xyo-network/module-model").ArchivistModuleConfig & string)) | undefined;
|
|
15
|
-
get payloadDiviner(): string | undefined;
|
|
16
24
|
get payloadDivinerLimit(): number;
|
|
17
|
-
get pollFrequency(): number
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
get pollFrequency(): number;
|
|
26
|
+
protected backgroundDivine: () => Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Commit the internal state of the Diviner process. This is similar
|
|
29
|
+
* to a transaction completion in a database and should only be called
|
|
30
|
+
* when results have been successfully persisted to the appropriate
|
|
31
|
+
* external stores.
|
|
32
|
+
*/
|
|
33
|
+
protected commitState(state: ImageThumbnailDivinerState): Promise<void>;
|
|
34
|
+
protected divineHandler(payloads?: Payload[]): Promise<ImageThumbnailResult[]>;
|
|
35
|
+
protected getArchivistForStore(store: ConfigStore, wrap?: boolean): Promise<import("@xyo-network/archivist-model").ArchivistInstance | ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule>>;
|
|
36
|
+
protected getBoundWitnessDivinerForStore(store: ConfigStore, wrap?: boolean): Promise<import("@xyo-network/diviner-model").DivinerInstance | DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule>>;
|
|
37
|
+
protected getPayloadDivinerForStore(store: ConfigStore, wrap?: boolean): Promise<import("@xyo-network/diviner-model").DivinerInstance | DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule>>;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves the last state of the Diviner process. Used to recover state after
|
|
40
|
+
* preemptions, reboots, etc.
|
|
41
|
+
*/
|
|
42
|
+
protected retrieveState(): Promise<ImageThumbnailDivinerState | undefined>;
|
|
25
43
|
protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
|
|
26
|
-
private attachArchivistEvents;
|
|
27
|
-
private getSafeMap;
|
|
28
44
|
private poll;
|
|
29
45
|
}
|
|
46
|
+
export {};
|
|
30
47
|
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAMjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAG7D,OAAO,EAAyB,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAI3E,OAAO,EAAE,2BAA2B,EAAqC,MAAM,UAAU,CAAA;AACzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAUtD,UAAU,0BAA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