Merge "Switch odlux from Biermann-RestConf to RFC8040 interface"
[ccsdk/features.git] / sdnr / wt / odlux / framework / src / models / elasticSearch.ts
1 /**\r
2  * ============LICENSE_START========================================================================\r
3  * ONAP : ccsdk feature sdnr wt odlux\r
4  * =================================================================================================\r
5  * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.\r
6  * =================================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except\r
8  * in compliance with the License. You may obtain a copy of the License at\r
9  *\r
10  * http://www.apache.org/licenses/LICENSE-2.0\r
11  *\r
12  * Unless required by applicable law or agreed to in writing, software distributed under the License\r
13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\r
14  * or implied. See the License for the specific language governing permissions and limitations under\r
15  * the License.\r
16  * ============LICENSE_END==========================================================================\r
17  */\r
18 export type Result<TSource extends {}> = {\r
19   "data-provider:output": {\r
20     pagination?: {\r
21       size: number;\r
22       page: number;\r
23       total: number;\r
24     },\r
25     data: TSource[];\r
26   }\r
27 }\r
28 \r
29 export type SingeResult<TSource extends {}> = {\r
30   "data-provider:output": TSource;\r
31 }\r
32 \r
33 \r
34 export type HitEntry<TSource extends {}> = {\r
35   _index: string;\r
36   _type: string;\r
37   _id: string;\r
38   _score: number;\r
39   _source: TSource;\r
40 }\r
41 \r
42 type ActionResponse ={\r
43   _index: string;\r
44   _type: string;\r
45   _id: string;\r
46   _shards: {\r
47     total: number,\r
48     successful: number,\r
49     failed: number\r
50     },\r
51 \r
52 }\r
53 \r
54 export type PostResponse = ActionResponse & {\r
55   created: boolean\r
56 }\r
57 \r
58 export type DeleteResponse = ActionResponse & {\r
59   found: boolean\r
60 }\r
61 \r