kuzzle-device-manager-types 2.8.0-dev.4 → 2.8.0-dev.5

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.
@@ -4,5 +4,6 @@ export declare class AssetModule extends Module {
4
4
  private assetHistoryService;
5
5
  private assetController;
6
6
  private assetGroupsController;
7
+ private assetsGroupsService;
7
8
  init(): Promise<void>;
8
9
  }
@@ -1,10 +1,12 @@
1
1
  import { ControllerDefinition, KuzzleRequest } from "kuzzle";
2
2
  import { DeviceManagerPlugin } from "../plugin";
3
3
  import { ApiGroupAddAssetsResult, ApiGroupCreateResult, ApiGroupDeleteResult, ApiGroupGetResult, ApiGroupRemoveAssetsResult, ApiGroupSearchResult, ApiGroupUpdateResult, AssetsGroupsBodyRequest } from "./types/AssetGroupsApi";
4
+ import { AssetsGroupsService } from "./AssetsGroupsService";
4
5
  export declare class AssetsGroupsController {
5
6
  private plugin;
7
+ private assetsGroupsService;
6
8
  definition: ControllerDefinition;
7
- constructor(plugin: DeviceManagerPlugin);
9
+ constructor(plugin: DeviceManagerPlugin, assetsGroupsService: AssetsGroupsService);
8
10
  private get sdk();
9
11
  private get as();
10
12
  checkParent(engineId: string, parent: AssetsGroupsBodyRequest["parent"]): Promise<void>;
@@ -0,0 +1,47 @@
1
+ import { JSONObject, KDocument } from "kuzzle-sdk";
2
+ import { DeviceManagerPlugin } from "../plugin";
3
+ import { BaseService, SearchParams } from "../shared";
4
+ import { KuzzleRequest } from "kuzzle";
5
+ import { AssetsGroupContent } from "./types/AssetGroupContent";
6
+ export declare class AssetsGroupsService extends BaseService {
7
+ constructor(plugin: DeviceManagerPlugin);
8
+ create(_id: string, engineId: string, metadata: JSONObject, model: string, name: string, parent: string | null, request: KuzzleRequest): Promise<KDocument<AssetsGroupContent>>;
9
+ get(engineId: string, _id: string, request: KuzzleRequest): Promise<KDocument<AssetsGroupContent>>;
10
+ update(request: KuzzleRequest, _id: string, engineId: string, updateContent: JSONObject): Promise<KDocument<AssetsGroupContent>>;
11
+ delete(_id: string, engineId: string, request: KuzzleRequest): Promise<{
12
+ _id: string;
13
+ }>;
14
+ search(engineId: string, searchParams: SearchParams, request: KuzzleRequest): Promise<import("kuzzle-sdk").SearchResult<import("kuzzle-sdk").KHit<AssetsGroupContent>>>;
15
+ addAsset(engineId: string, _id: string, assetIds: string[], request: KuzzleRequest): Promise<{
16
+ assetsGroups: KDocument<AssetsGroupContent>;
17
+ successes: {
18
+ _id: string;
19
+ _source: JSONObject;
20
+ _version: number;
21
+ }[];
22
+ errors: {
23
+ document: {
24
+ _id: string;
25
+ _source: JSONObject;
26
+ };
27
+ status: number;
28
+ reason: string;
29
+ }[];
30
+ }>;
31
+ removeAsset(engineId: string, _id: string, assetIds: string[], request: KuzzleRequest): Promise<{
32
+ assetsGroups: KDocument<AssetsGroupContent>;
33
+ successes: {
34
+ _id: string;
35
+ _source: JSONObject;
36
+ _version: number;
37
+ }[];
38
+ errors: {
39
+ document: {
40
+ _id: string;
41
+ _source: JSONObject;
42
+ };
43
+ status: number;
44
+ reason: string;
45
+ }[];
46
+ }>;
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kuzzle-device-manager-types",
3
- "version": "2.8.0-dev.4",
3
+ "version": "2.8.0-dev.5",
4
4
  "description": "Shared types for Kuzzle Device Manager",
5
5
  "author": "The Kuzzle Team (support@kuzzle.io)",
6
6
  "main": "index.js",