kuzzle-device-manager-types 2.4.0-beta.6 → 2.4.0-beta.8
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/lib/modules/asset/AssetHistoryService.d.ts +2 -4
- package/dist/lib/modules/asset/AssetService.d.ts +8 -25
- package/dist/lib/modules/asset/types/AssetContent.d.ts +1 -1
- package/dist/lib/modules/decoder/PayloadService.d.ts +2 -5
- package/dist/lib/modules/device/DeviceService.d.ts +19 -44
- package/dist/lib/modules/device/collections/deviceMappings.d.ts +2 -46
- package/dist/lib/modules/measure/MeasureService.d.ts +2 -6
- package/dist/lib/modules/measure/collections/measuresMappings.d.ts +15 -0
- package/dist/lib/modules/model/ModelService.d.ts +2 -4
- package/dist/lib/modules/plugin/exports.d.ts +1 -1
- package/dist/lib/modules/plugin/index.d.ts +1 -2
- package/dist/lib/modules/plugin/types/DeviceManagerConfiguration.d.ts +9 -1
- package/dist/lib/modules/plugin/types/Pipes.d.ts +17 -0
- package/dist/lib/modules/plugin/types/exports.d.ts +1 -0
- package/dist/lib/modules/plugin/types/index.d.ts +3 -0
- package/dist/lib/modules/shared/services/BaseService.d.ts +69 -0
- package/dist/lib/modules/shared/services/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { DeviceManagerPlugin } from "../plugin";
|
|
2
|
+
import { BaseService } from "../shared";
|
|
2
3
|
import { AssetHistoryContent, AssetHistoryEvent } from "./types/AssetHistoryContent";
|
|
3
|
-
export declare class AssetHistoryService {
|
|
4
|
-
private context;
|
|
5
|
-
private config;
|
|
6
|
-
private get sdk();
|
|
4
|
+
export declare class AssetHistoryService extends BaseService {
|
|
7
5
|
constructor(plugin: DeviceManagerPlugin);
|
|
8
6
|
add<TAssetHistoryEvent extends AssetHistoryEvent>(engineId: string, histories: AssetHistoryContent[]): Promise<void>;
|
|
9
7
|
}
|
|
@@ -1,39 +1,22 @@
|
|
|
1
|
-
import { User } from "kuzzle";
|
|
1
|
+
import { KuzzleRequest, User } from "kuzzle";
|
|
2
2
|
import { JSONObject, KDocument, KHit, SearchResult, mReplaceResponse } from "kuzzle-sdk";
|
|
3
3
|
import { DeviceManagerPlugin } from "../plugin";
|
|
4
|
-
import { Metadata } from "../shared";
|
|
4
|
+
import { Metadata, BaseService, SearchParams } from "../shared";
|
|
5
5
|
import { AssetHistoryService } from "./AssetHistoryService";
|
|
6
6
|
import { AssetContent } from "./types/AssetContent";
|
|
7
7
|
import { ApiAssetMigrateTenantResult } from "./types/AssetApi";
|
|
8
|
-
export declare class AssetService {
|
|
9
|
-
private context;
|
|
10
|
-
private config;
|
|
8
|
+
export declare class AssetService extends BaseService {
|
|
11
9
|
private assetHistoryService;
|
|
12
|
-
private get sdk();
|
|
13
|
-
private get app();
|
|
14
|
-
private get impersonatedSdk();
|
|
15
10
|
constructor(plugin: DeviceManagerPlugin, assetHistoryService: AssetHistoryService);
|
|
16
11
|
registerAskEvents(): void;
|
|
17
|
-
get(engineId: string, assetId: string): Promise<KDocument<AssetContent>>;
|
|
12
|
+
get(engineId: string, assetId: string, request: KuzzleRequest): Promise<KDocument<AssetContent>>;
|
|
18
13
|
/**
|
|
19
14
|
* Updates an asset metadata
|
|
20
15
|
*/
|
|
21
|
-
update(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
refresh: any;
|
|
26
|
-
}): Promise<KDocument<AssetContent>>;
|
|
27
|
-
delete(user: User, engineId: string, assetId: string, { refresh, strict }: {
|
|
28
|
-
refresh: any;
|
|
29
|
-
strict: boolean;
|
|
30
|
-
}): Promise<void>;
|
|
31
|
-
search(engineId: string, searchBody: JSONObject, { from, size, scroll, lang, }: {
|
|
32
|
-
from?: number;
|
|
33
|
-
size?: number;
|
|
34
|
-
scroll?: string;
|
|
35
|
-
lang?: string;
|
|
36
|
-
}): Promise<SearchResult<KHit<AssetContent>>>;
|
|
16
|
+
update(engineId: string, assetId: string, metadata: Metadata, request: KuzzleRequest): Promise<KDocument<AssetContent>>;
|
|
17
|
+
create(engineId: string, model: string, reference: string, metadata: JSONObject, request: KuzzleRequest): Promise<KDocument<AssetContent>>;
|
|
18
|
+
delete(engineId: string, assetId: string, request: KuzzleRequest): Promise<void>;
|
|
19
|
+
search(engineId: string, searchParams: SearchParams, request: KuzzleRequest): Promise<SearchResult<KHit<AssetContent>>>;
|
|
37
20
|
migrateTenant(user: User, assetsList: string[], engineId: string, newEngineId: string): Promise<ApiAssetMigrateTenantResult>;
|
|
38
21
|
/**
|
|
39
22
|
* Replace an asset metadata
|
|
@@ -49,4 +49,4 @@ export type AssetMeasureContext<TMetadata extends Metadata = Metadata> = {
|
|
|
49
49
|
* Name of the measure for the Asset
|
|
50
50
|
*/
|
|
51
51
|
measureName: string;
|
|
52
|
-
} & Pick<AssetContent<JSONObject, TMetadata>, "model" | "reference" | "metadata">;
|
|
52
|
+
} & Pick<AssetContent<JSONObject, TMetadata>, "model" | "reference" | "metadata" | "groups">;
|
|
@@ -3,12 +3,9 @@ import { JSONObject, KDocument } from "kuzzle-sdk";
|
|
|
3
3
|
import { DeviceManagerPlugin } from "../plugin";
|
|
4
4
|
import { DeviceContent } from "../device";
|
|
5
5
|
import { DecodedMeasurement } from "../measure";
|
|
6
|
+
import { BaseService } from "../shared";
|
|
6
7
|
import { Decoder } from "./Decoder";
|
|
7
|
-
export declare class PayloadService {
|
|
8
|
-
private config;
|
|
9
|
-
private context;
|
|
10
|
-
private get sdk();
|
|
11
|
-
private get app();
|
|
8
|
+
export declare class PayloadService extends BaseService {
|
|
12
9
|
constructor(plugin: DeviceManagerPlugin);
|
|
13
10
|
/**
|
|
14
11
|
* Process a payload by validating and decode it with the `decoder` associated
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KuzzleRequest } from "kuzzle";
|
|
2
2
|
import { JSONObject, KDocument, KHit, SearchResult } from "kuzzle-sdk";
|
|
3
3
|
import { AssetContent } from "./../asset";
|
|
4
|
-
import {
|
|
4
|
+
import { DeviceManagerPlugin } from "../plugin";
|
|
5
|
+
import { Metadata, BaseService, SearchParams } from "../shared";
|
|
5
6
|
import { DecodedMeasurement } from "../measure";
|
|
6
7
|
import { DeviceContent } from "./types/DeviceContent";
|
|
7
8
|
import { ApiDeviceLinkAssetRequest } from "./types/DeviceApi";
|
|
8
|
-
export declare class DeviceService {
|
|
9
|
-
|
|
10
|
-
private context;
|
|
11
|
-
private get sdk();
|
|
12
|
-
private get app();
|
|
13
|
-
private get impersonatedSdk();
|
|
14
|
-
constructor(plugin: Plugin);
|
|
9
|
+
export declare class DeviceService extends BaseService {
|
|
10
|
+
constructor(plugin: DeviceManagerPlugin);
|
|
15
11
|
registerAskEvents(): void;
|
|
16
12
|
/**
|
|
17
13
|
* Create a new device.
|
|
@@ -20,23 +16,11 @@ export declare class DeviceService {
|
|
|
20
16
|
* method since in this case "engineId" is not really an engine ID but still
|
|
21
17
|
* required as an argument (in part to check the tenant rights)
|
|
22
18
|
*/
|
|
23
|
-
create(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
update(user: User, engineId: string, deviceId: string, metadata: Metadata, { refresh }: {
|
|
29
|
-
refresh: any;
|
|
30
|
-
}): Promise<KDocument<DeviceContent>>;
|
|
31
|
-
delete(user: User, engineId: string, deviceId: string, { refresh }: {
|
|
32
|
-
refresh: any;
|
|
33
|
-
}): Promise<void>;
|
|
34
|
-
search(engineId: string, searchBody: JSONObject, { from, size, scroll, lang, }: {
|
|
35
|
-
from?: number;
|
|
36
|
-
size?: number;
|
|
37
|
-
scroll?: string;
|
|
38
|
-
lang?: string;
|
|
39
|
-
}): Promise<SearchResult<KHit<DeviceContent>>>;
|
|
19
|
+
create(model: string, reference: string, metadata: JSONObject, request: KuzzleRequest): Promise<KDocument<DeviceContent>>;
|
|
20
|
+
get(engineId: string, deviceId: string, request: KuzzleRequest): Promise<KDocument<DeviceContent>>;
|
|
21
|
+
update(engineId: string, deviceId: string, metadata: Metadata, request: KuzzleRequest): Promise<KDocument<DeviceContent>>;
|
|
22
|
+
delete(engineId: string, deviceId: string, request: KuzzleRequest): Promise<void>;
|
|
23
|
+
search(engineId: string, searchParams: SearchParams, request: KuzzleRequest): Promise<SearchResult<KHit<DeviceContent>>>;
|
|
40
24
|
/**
|
|
41
25
|
* Attach the device to an engine
|
|
42
26
|
*
|
|
@@ -45,29 +29,22 @@ export declare class DeviceService {
|
|
|
45
29
|
* @param options.refresh Wait for ES indexation
|
|
46
30
|
* @param options.strict If true, throw if an operation isn't possible
|
|
47
31
|
*/
|
|
48
|
-
attachEngine(
|
|
49
|
-
refresh?: any;
|
|
50
|
-
}): Promise<KDocument<DeviceContent>>;
|
|
32
|
+
attachEngine(engineId: string, deviceId: string, request: KuzzleRequest): Promise<KDocument<DeviceContent>>;
|
|
51
33
|
/**
|
|
52
34
|
* Detach a device from its attached engine
|
|
53
35
|
*
|
|
54
|
-
* @param deviceId
|
|
55
|
-
* @param
|
|
36
|
+
* @param {string} deviceId Id of the device
|
|
37
|
+
* @param {KuzzleRequest} request kuzzle request
|
|
56
38
|
*/
|
|
57
|
-
detachEngine(
|
|
58
|
-
refresh?: any;
|
|
59
|
-
}): Promise<KDocument<DeviceContent>>;
|
|
39
|
+
detachEngine(deviceId: string, request: KuzzleRequest): Promise<KDocument<DeviceContent>>;
|
|
60
40
|
/**
|
|
61
41
|
* Link a device to an asset.
|
|
62
42
|
*/
|
|
63
|
-
linkAsset(
|
|
64
|
-
refresh?: any;
|
|
65
|
-
implicitMeasuresLinking?: boolean;
|
|
66
|
-
}): Promise<{
|
|
43
|
+
linkAsset(engineId: string, deviceId: string, assetId: string, measureNames: ApiDeviceLinkAssetRequest["body"]["measureNames"], implicitMeasuresLinking: boolean, request: KuzzleRequest): Promise<{
|
|
67
44
|
asset: KDocument<AssetContent>;
|
|
68
45
|
device: KDocument<DeviceContent>;
|
|
69
46
|
}>;
|
|
70
|
-
receiveMeasures(engineId: string, deviceId: string, measures: DecodedMeasurement[], payloadUuids: string[]): Promise<void>;
|
|
47
|
+
receiveMeasures(engineId: string, deviceId: string, measures: DecodedMeasurement[], payloadUuids: string[], request: KuzzleRequest): Promise<void>;
|
|
71
48
|
/**
|
|
72
49
|
* Checks if the asset does not already have a linked device using one of the
|
|
73
50
|
* requested measure names.
|
|
@@ -83,12 +60,10 @@ export declare class DeviceService {
|
|
|
83
60
|
/**
|
|
84
61
|
* Unlink a device of an asset
|
|
85
62
|
*
|
|
86
|
-
* @param deviceId Id of the device
|
|
87
|
-
* @param
|
|
63
|
+
* @param {string} deviceId Id of the device
|
|
64
|
+
* @param {KuzzleRequest} request kuzzle request
|
|
88
65
|
*/
|
|
89
|
-
unlinkAsset(
|
|
90
|
-
refresh?: any;
|
|
91
|
-
}): Promise<{
|
|
66
|
+
unlinkAsset(deviceId: string, request: KuzzleRequest): Promise<{
|
|
92
67
|
asset: KDocument<AssetContent>;
|
|
93
68
|
device: KDocument<DeviceContent>;
|
|
94
69
|
}>;
|
|
@@ -1,51 +1,7 @@
|
|
|
1
|
+
import { CollectionMappings } from "kuzzle";
|
|
1
2
|
/**
|
|
2
3
|
* Base mappings for the "devices" collection.
|
|
3
4
|
*
|
|
4
5
|
* Those mappings does not contains the `measures` and `metadata` mappings.
|
|
5
6
|
*/
|
|
6
|
-
export declare const devicesMappings:
|
|
7
|
-
dynamic: string;
|
|
8
|
-
properties: {
|
|
9
|
-
model: {
|
|
10
|
-
type: string;
|
|
11
|
-
fields: {
|
|
12
|
-
text: {
|
|
13
|
-
type: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
reference: {
|
|
18
|
-
type: string;
|
|
19
|
-
fields: {
|
|
20
|
-
text: {
|
|
21
|
-
type: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
assetId: {
|
|
26
|
-
type: string;
|
|
27
|
-
fields: {
|
|
28
|
-
text: {
|
|
29
|
-
type: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
engineId: {
|
|
34
|
-
type: string;
|
|
35
|
-
fields: {
|
|
36
|
-
text: {
|
|
37
|
-
type: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
metadata: {
|
|
42
|
-
properties: {};
|
|
43
|
-
};
|
|
44
|
-
measures: {
|
|
45
|
-
properties: {};
|
|
46
|
-
};
|
|
47
|
-
lastMeasuredAt: {
|
|
48
|
-
type: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
7
|
+
export declare const devicesMappings: CollectionMappings;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { JSONObject, KDocument } from "kuzzle";
|
|
2
2
|
import { DeviceContent } from "../device";
|
|
3
3
|
import { DeviceManagerPlugin } from "../plugin";
|
|
4
|
-
import { Metadata } from "../shared";
|
|
4
|
+
import { BaseService, Metadata } from "../shared";
|
|
5
5
|
import { DecodedMeasurement } from "./types/MeasureContent";
|
|
6
|
-
export declare class MeasureService {
|
|
7
|
-
private config;
|
|
8
|
-
private context;
|
|
9
|
-
private get sdk();
|
|
10
|
-
private get app();
|
|
6
|
+
export declare class MeasureService extends BaseService {
|
|
11
7
|
constructor(plugin: DeviceManagerPlugin);
|
|
12
8
|
/**
|
|
13
9
|
* Register new measures from a device, updates :
|
|
@@ -35,6 +35,21 @@ export declare const measuresMappings: {
|
|
|
35
35
|
metadata: {
|
|
36
36
|
properties: {};
|
|
37
37
|
};
|
|
38
|
+
groups: {
|
|
39
|
+
properties: {
|
|
40
|
+
id: {
|
|
41
|
+
type: string;
|
|
42
|
+
fields: {
|
|
43
|
+
text: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
date: {
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
38
53
|
};
|
|
39
54
|
};
|
|
40
55
|
/**
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { JSONObject, KDocument } from "kuzzle-sdk";
|
|
2
2
|
import { DeviceManagerPlugin } from "../plugin";
|
|
3
|
+
import { BaseService } from "../shared";
|
|
3
4
|
import { AssetModelContent, DeviceModelContent, MeasureModelContent } from "./types/ModelContent";
|
|
4
|
-
export declare class ModelService {
|
|
5
|
-
private config;
|
|
6
|
-
private context;
|
|
7
|
-
private get sdk();
|
|
5
|
+
export declare class ModelService extends BaseService {
|
|
8
6
|
constructor(plugin: DeviceManagerPlugin);
|
|
9
7
|
registerAskEvents(): void;
|
|
10
8
|
writeAsset(engineGroup: string, model: string, metadataMappings: JSONObject, defaultMetadata: JSONObject, measures: AssetModelContent["asset"]["measures"]): Promise<KDocument<AssetModelContent>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./types/
|
|
1
|
+
export * from "./types/exports";
|
|
2
2
|
export * from "./DeviceManagerPlugin";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSONObject } from "kuzzle-sdk";
|
|
1
|
+
import { CollectionMappings, JSONObject } from "kuzzle-sdk";
|
|
2
2
|
export type DeviceManagerConfiguration = {
|
|
3
3
|
/**
|
|
4
4
|
* Ignore errors at startup such as wrong mappings update.
|
|
@@ -45,5 +45,13 @@ export type DeviceManagerConfiguration = {
|
|
|
45
45
|
mappings: JSONObject;
|
|
46
46
|
settings: JSONObject;
|
|
47
47
|
};
|
|
48
|
+
asset: {
|
|
49
|
+
name: string;
|
|
50
|
+
mappings: CollectionMappings;
|
|
51
|
+
};
|
|
52
|
+
device: {
|
|
53
|
+
name: string;
|
|
54
|
+
mappings: CollectionMappings;
|
|
55
|
+
};
|
|
48
56
|
};
|
|
49
57
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JSONObject, KDocumentContent, KHit, KuzzleRequest } from "kuzzle";
|
|
2
|
+
export interface SearchQueryResult<T extends KDocumentContent> {
|
|
3
|
+
aggregations?: JSONObject;
|
|
4
|
+
hits: Array<KHit<T>>;
|
|
5
|
+
remaining: unknown;
|
|
6
|
+
scrollId: string;
|
|
7
|
+
suggest: JSONObject;
|
|
8
|
+
total: number;
|
|
9
|
+
}
|
|
10
|
+
export type EventGenericDocumentBeforeSearch = {
|
|
11
|
+
name: `generic:document:beforeSearch`;
|
|
12
|
+
args: [JSONObject, KuzzleRequest];
|
|
13
|
+
};
|
|
14
|
+
export type EventGenericDocumentAfterSearch<T extends KDocumentContent = KDocumentContent> = {
|
|
15
|
+
name: `generic:document:afterSearch`;
|
|
16
|
+
args: [SearchQueryResult<T>, KuzzleRequest];
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DeviceManagerConfiguration";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ArgsDocumentControllerCreate, ArgsDocumentControllerDelete, ArgsDocumentControllerUpdate, Backend, EmbeddedSDK, KDocument, KDocumentContent, KHit, KuzzleRequest, SearchResult, User } from "kuzzle";
|
|
2
|
+
import { DeviceManagerPlugin, DeviceManagerConfiguration, InternalCollection } from "../../plugin";
|
|
3
|
+
interface PayloadRequest {
|
|
4
|
+
collection: InternalCollection;
|
|
5
|
+
engineId: string;
|
|
6
|
+
}
|
|
7
|
+
export type SearchParams = ReturnType<KuzzleRequest["getSearchParams"]>;
|
|
8
|
+
export declare abstract class BaseService {
|
|
9
|
+
private plugin;
|
|
10
|
+
constructor(plugin: DeviceManagerPlugin);
|
|
11
|
+
protected get app(): Backend;
|
|
12
|
+
protected get sdk(): EmbeddedSDK;
|
|
13
|
+
protected get config(): DeviceManagerConfiguration;
|
|
14
|
+
protected get impersonatedSdk(): (user: User) => EmbeddedSDK;
|
|
15
|
+
protected normalizeKuzzleRequest(request: KuzzleRequest, { collection, engineId }: PayloadRequest): KuzzleRequest;
|
|
16
|
+
/**
|
|
17
|
+
* Wrapper to SDK create method with trigger generic:document events
|
|
18
|
+
*
|
|
19
|
+
* @param {KuzzleRequest} request
|
|
20
|
+
* @param {KDocument} documentId
|
|
21
|
+
* @param {PayloadRequest} payload
|
|
22
|
+
* @param {ArgsDocumentControllerCreate} [options]
|
|
23
|
+
* @returns {Promise<KDocument>}
|
|
24
|
+
*/
|
|
25
|
+
protected getDocument<T extends KDocumentContent = KDocumentContent>(request: KuzzleRequest, documentId: string, { collection, engineId }: PayloadRequest, options?: ArgsDocumentControllerCreate): Promise<KDocument<T>>;
|
|
26
|
+
/**
|
|
27
|
+
* Wrapper to SDK create method with trigger generic:document events
|
|
28
|
+
*
|
|
29
|
+
* @param {KuzzleRequest} request
|
|
30
|
+
* @param {KDocument} document
|
|
31
|
+
* @param {PayloadRequest} payload
|
|
32
|
+
* @param {ArgsDocumentControllerCreate} [options]
|
|
33
|
+
* @returns {Promise<KDocument>}
|
|
34
|
+
*/
|
|
35
|
+
protected createDocument<T extends KDocumentContent = KDocumentContent>(request: KuzzleRequest, document: KDocument<T>, { collection, engineId }: PayloadRequest, options?: ArgsDocumentControllerCreate): Promise<KDocument<T>>;
|
|
36
|
+
/**
|
|
37
|
+
* Wrapper to SDK update method with trigger generic:document events
|
|
38
|
+
*
|
|
39
|
+
* @param {KuzzleRequest} request
|
|
40
|
+
* @param {KDocument} document
|
|
41
|
+
* @param {PayloadRequest} payload
|
|
42
|
+
* @param {ArgsDocumentControllerUpdate} [options]
|
|
43
|
+
* @returns {Promise<KDocument>}
|
|
44
|
+
*/
|
|
45
|
+
protected updateDocument<T extends KDocumentContent = KDocumentContent>(request: KuzzleRequest, document: KDocument<Partial<T>>, { collection, engineId }: PayloadRequest, options?: ArgsDocumentControllerUpdate): Promise<KDocument<T>>;
|
|
46
|
+
/**
|
|
47
|
+
* Wrapper to SDK delete method with trigger generic:document events
|
|
48
|
+
*
|
|
49
|
+
* @param {KuzzleRequest} request
|
|
50
|
+
* @param {string} documentId
|
|
51
|
+
* @param {PayloadRequest} payload
|
|
52
|
+
* @param {ArgsDocumentControllerUpdate} [options]
|
|
53
|
+
* @returns {Promise<{ _id: string }>}
|
|
54
|
+
*/
|
|
55
|
+
protected deleteDocument(request: KuzzleRequest, documentId: string, { collection, engineId }: PayloadRequest, options?: ArgsDocumentControllerDelete): Promise<{
|
|
56
|
+
_id: string;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Wrapper to SDK search method with trigger generic:document events
|
|
60
|
+
* ! Caution the pipes are not applied on next()
|
|
61
|
+
*
|
|
62
|
+
* @param {KuzzleRequest} request
|
|
63
|
+
* @param {ArgsDocumentControllerUpdate} [options]
|
|
64
|
+
* @param {PayloadRequest} payload
|
|
65
|
+
* @returns {Promise<SearchResult<KHit>>}
|
|
66
|
+
*/
|
|
67
|
+
protected searchDocument<T extends KDocumentContent = KDocumentContent>(request: KuzzleRequest, { from, size, scrollTTL: scroll }: SearchParams, { collection, engineId }: PayloadRequest): Promise<SearchResult<KHit<T>>>;
|
|
68
|
+
}
|
|
69
|
+
export {};
|