lemon-core 2.2.19 → 3.0.2

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.
Files changed (248) hide show
  1. package/README.md +11 -20
  2. package/dist/common/test-helper.js +1 -1
  3. package/dist/common/test-helper.js.map +1 -1
  4. package/dist/controllers/dummy-controller.js.map +1 -1
  5. package/dist/cores/api-service.js.map +1 -1
  6. package/dist/cores/aws/aws-s3-service.d.ts +24 -46
  7. package/dist/cores/aws/aws-s3-service.js +103 -223
  8. package/dist/cores/aws/aws-s3-service.js.map +1 -1
  9. package/dist/cores/aws/aws-sns-service.js +3 -3
  10. package/dist/cores/aws/aws-sns-service.js.map +1 -1
  11. package/dist/cores/cache-service.js +12 -12
  12. package/dist/cores/cache-service.js.map +1 -1
  13. package/dist/cores/core-types.d.ts +92 -2
  14. package/dist/cores/core-types.js +1 -0
  15. package/dist/cores/core-types.js.map +1 -1
  16. package/dist/cores/dynamo-service.js +2 -2
  17. package/dist/cores/dynamo-service.js.map +1 -1
  18. package/dist/cores/elastic6-query-service.d.ts +42 -9
  19. package/dist/cores/elastic6-query-service.js +144 -134
  20. package/dist/cores/elastic6-query-service.js.map +1 -1
  21. package/dist/cores/elastic6-service.d.ts +144 -57
  22. package/dist/cores/elastic6-service.js +506 -322
  23. package/dist/cores/elastic6-service.js.map +1 -1
  24. package/dist/cores/lambda/lambda-cognito-handler.js.map +1 -1
  25. package/dist/cores/lambda/lambda-cron-handler.js.map +1 -1
  26. package/dist/cores/lambda/lambda-dynamo-stream-handler.js +3 -3
  27. package/dist/cores/lambda/lambda-dynamo-stream-handler.js.map +1 -1
  28. package/dist/cores/lambda/lambda-notification-handler.js.map +1 -1
  29. package/dist/cores/lambda/lambda-sns-handler.js.map +1 -1
  30. package/dist/cores/lambda/lambda-web-handler.js +2 -4
  31. package/dist/cores/lambda/lambda-web-handler.js.map +1 -1
  32. package/dist/cores/lambda/lambda-wss-handler.js.map +1 -1
  33. package/dist/cores/protocol/protocol-service.d.ts +1 -2
  34. package/dist/cores/protocol/protocol-service.js +5 -3
  35. package/dist/cores/protocol/protocol-service.js.map +1 -1
  36. package/dist/engine/builder.d.ts +1 -0
  37. package/dist/engine/builder.js +1 -1
  38. package/dist/engine/builder.js.map +1 -1
  39. package/dist/engine/engine.js +2 -1
  40. package/dist/engine/engine.js.map +1 -1
  41. package/dist/engine/index.d.ts +0 -1
  42. package/dist/engine/index.js +2 -4
  43. package/dist/engine/index.js.map +1 -1
  44. package/dist/engine/types.d.ts +0 -4
  45. package/dist/engine/types.js.map +1 -1
  46. package/dist/engine/utilities.d.ts +5 -1
  47. package/dist/engine/utilities.js +126 -11
  48. package/dist/engine/utilities.js.map +1 -1
  49. package/dist/helpers/helpers.d.ts +266 -0
  50. package/dist/helpers/helpers.js +600 -0
  51. package/dist/helpers/helpers.js.map +1 -0
  52. package/dist/helpers/index.d.ts +10 -0
  53. package/dist/helpers/index.js +23 -0
  54. package/dist/helpers/index.js.map +1 -0
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.js +1 -0
  57. package/dist/index.js.map +1 -1
  58. package/dist/tools/express.js +0 -3
  59. package/dist/tools/express.js.map +1 -1
  60. package/dist/tools/helpers.d.ts +243 -0
  61. package/dist/tools/helpers.js +593 -0
  62. package/dist/tools/helpers.js.map +1 -0
  63. package/package.json +5 -12
  64. package/CHANGELOG.md +0 -61
  65. package/dist/docs/assets/css/main.css +0 -2321
  66. package/dist/docs/assets/images/icons.png +0 -0
  67. package/dist/docs/assets/images/icons@2x.png +0 -0
  68. package/dist/docs/assets/images/widgets.png +0 -0
  69. package/dist/docs/assets/images/widgets@2x.png +0 -0
  70. package/dist/docs/assets/js/main.js +0 -1
  71. package/dist/docs/assets/js/search.js +0 -3
  72. package/dist/docs/classes/abstractmanager.html +0 -1054
  73. package/dist/docs/classes/apiproxyclient.html +0 -509
  74. package/dist/docs/classes/apiservice.html +0 -805
  75. package/dist/docs/classes/awskmsservice.html +0 -468
  76. package/dist/docs/classes/awsmodule.html +0 -353
  77. package/dist/docs/classes/awss3service.html +0 -689
  78. package/dist/docs/classes/awssnsservice.html +0 -543
  79. package/dist/docs/classes/awssqsservice.html +0 -517
  80. package/dist/docs/classes/cacheservice.html +0 -996
  81. package/dist/docs/classes/configmodule.html +0 -311
  82. package/dist/docs/classes/dummycacheservice.html +0 -1000
  83. package/dist/docs/classes/dummycontroller.html +0 -709
  84. package/dist/docs/classes/dummydynamoservice.html +0 -915
  85. package/dist/docs/classes/dummyelastic6service.html +0 -791
  86. package/dist/docs/classes/dummyredisstorageservice.html +0 -804
  87. package/dist/docs/classes/dummystoragemaker.html +0 -383
  88. package/dist/docs/classes/dummystorageservice.html +0 -592
  89. package/dist/docs/classes/dynamoqueryservice.html +0 -413
  90. package/dist/docs/classes/dynamoscanservice.html +0 -358
  91. package/dist/docs/classes/dynamoservice.html +0 -844
  92. package/dist/docs/classes/dynamostorageservice.html +0 -623
  93. package/dist/docs/classes/elastic6queryservice.html +0 -458
  94. package/dist/docs/classes/elastic6service.html +0 -804
  95. package/dist/docs/classes/file.html +0 -579
  96. package/dist/docs/classes/generalapicontroller.html +0 -877
  97. package/dist/docs/classes/generalcontroller.html +0 -454
  98. package/dist/docs/classes/generalcontrollerlocal.html +0 -499
  99. package/dist/docs/classes/generalcontrollerlocal2.html +0 -523
  100. package/dist/docs/classes/generalkeymaker.html +0 -335
  101. package/dist/docs/classes/generalmodelfilter.html +0 -529
  102. package/dist/docs/classes/generalwebcontroller.html +0 -580
  103. package/dist/docs/classes/hangulservice.html +0 -636
  104. package/dist/docs/classes/httpstorageservice.html +0 -539
  105. package/dist/docs/classes/lambdacognitohandler.html +0 -355
  106. package/dist/docs/classes/lambdacronhandler.html +0 -390
  107. package/dist/docs/classes/lambdacronhandlerlocal.html +0 -371
  108. package/dist/docs/classes/lambdadynamostreamhandler.html +0 -472
  109. package/dist/docs/classes/lambdadynamostreamhandlerlocal.html +0 -455
  110. package/dist/docs/classes/lambdahandler.html +0 -479
  111. package/dist/docs/classes/lambdahandlerlocal.html +0 -472
  112. package/dist/docs/classes/lambdamodule.html +0 -433
  113. package/dist/docs/classes/lambdanotificationhandler.html +0 -474
  114. package/dist/docs/classes/lambdanotificationhandlerlocal.html +0 -457
  115. package/dist/docs/classes/lambdasnshandler.html +0 -394
  116. package/dist/docs/classes/lambdasnshandlerlocal.html +0 -397
  117. package/dist/docs/classes/lambdasqshandler.html +0 -394
  118. package/dist/docs/classes/lambdasqshandlerlocal.html +0 -397
  119. package/dist/docs/classes/lambdasubhandler.html +0 -305
  120. package/dist/docs/classes/lambdawebhandler.html +0 -603
  121. package/dist/docs/classes/lambdawebhandlerlocal.html +0 -581
  122. package/dist/docs/classes/lambdawsshandler.html +0 -359
  123. package/dist/docs/classes/memcachedbackend.html +0 -900
  124. package/dist/docs/classes/mocksapiservice.html +0 -691
  125. package/dist/docs/classes/modelutil.html +0 -311
  126. package/dist/docs/classes/myconfigservice.html +0 -561
  127. package/dist/docs/classes/myconfigservicetest.html +0 -527
  128. package/dist/docs/classes/myconfigservicetest2.html +0 -522
  129. package/dist/docs/classes/mydummysqsservice.html +0 -419
  130. package/dist/docs/classes/myenginemodules.html +0 -357
  131. package/dist/docs/classes/mygeneralapicontroller.html +0 -837
  132. package/dist/docs/classes/mylemonwebcontroller.html +0 -356
  133. package/dist/docs/classes/mymodelfilter.html +0 -479
  134. package/dist/docs/classes/myprotocolservice.html +0 -993
  135. package/dist/docs/classes/myprotocolservicetest.html +0 -983
  136. package/dist/docs/classes/myservice.html +0 -329
  137. package/dist/docs/classes/mystorage.html +0 -1370
  138. package/dist/docs/classes/nodecachebackend.html +0 -714
  139. package/dist/docs/classes/protocolmodule.html +0 -311
  140. package/dist/docs/classes/proxystorageservice.html +0 -1441
  141. package/dist/docs/classes/query.html +0 -850
  142. package/dist/docs/classes/redisbackend.html +0 -781
  143. package/dist/docs/classes/redisstorageservice.html +0 -867
  144. package/dist/docs/classes/scan.html +0 -685
  145. package/dist/docs/classes/snsprotocoltransformer.html +0 -334
  146. package/dist/docs/classes/sqsprotocoltransformer.html +0 -334
  147. package/dist/docs/classes/typedstorageservice.html +0 -914
  148. package/dist/docs/classes/uniquefieldmanager.html +0 -477
  149. package/dist/docs/classes/usermanager.html +0 -931
  150. package/dist/docs/classes/utilities.html +0 -1914
  151. package/dist/docs/classes/webprotocoltransformer.html +0 -330
  152. package/dist/docs/globals.html +0 -7477
  153. package/dist/docs/index.html +0 -1515
  154. package/dist/docs/interfaces/accountitem.html +0 -277
  155. package/dist/docs/interfaces/accountmodel.html +0 -306
  156. package/dist/docs/interfaces/adaptiveparam.html +0 -203
  157. package/dist/docs/interfaces/apiheaders.html +0 -183
  158. package/dist/docs/interfaces/apihttpproxy.html +0 -304
  159. package/dist/docs/interfaces/apiserviceclient.html +0 -448
  160. package/dist/docs/interfaces/autocompletesearchparam.html +0 -309
  161. package/dist/docs/interfaces/betweencondition.html +0 -226
  162. package/dist/docs/interfaces/cachebackend.html +0 -714
  163. package/dist/docs/interfaces/cacheentry.html +0 -248
  164. package/dist/docs/interfaces/cacheoptions.html +0 -267
  165. package/dist/docs/interfaces/callbackdata.html +0 -279
  166. package/dist/docs/interfaces/callbackparam.html +0 -252
  167. package/dist/docs/interfaces/comparisoncondition.html +0 -226
  168. package/dist/docs/interfaces/coreconfigservice.html +0 -342
  169. package/dist/docs/interfaces/corekey.html +0 -278
  170. package/dist/docs/interfaces/corekeymakeable.html +0 -292
  171. package/dist/docs/interfaces/corekmsservice.html +0 -311
  172. package/dist/docs/interfaces/coremodel.html +0 -499
  173. package/dist/docs/interfaces/coremodelfilterable.html +0 -281
  174. package/dist/docs/interfaces/cores3service.html +0 -485
  175. package/dist/docs/interfaces/coreservices.html +0 -232
  176. package/dist/docs/interfaces/coresnsservice.html +0 -317
  177. package/dist/docs/interfaces/corewebcontroller.html +0 -271
  178. package/dist/docs/interfaces/cronevent.html +0 -223
  179. package/dist/docs/interfaces/cronparam.html +0 -212
  180. package/dist/docs/interfaces/dynamooption.html +0 -254
  181. package/dist/docs/interfaces/dynamoqueryresult.html +0 -244
  182. package/dist/docs/interfaces/dynamoscanresult.html +0 -244
  183. package/dist/docs/interfaces/dynamosimplequeriable.html +0 -308
  184. package/dist/docs/interfaces/dynamosimplescannable.html +0 -255
  185. package/dist/docs/interfaces/dynamostreambody.html +0 -268
  186. package/dist/docs/interfaces/dynamostreamcallback.html +0 -209
  187. package/dist/docs/interfaces/dynamostreamfilter.html +0 -218
  188. package/dist/docs/interfaces/dynamostreamparam.html +0 -240
  189. package/dist/docs/interfaces/elastic6item.html +0 -221
  190. package/dist/docs/interfaces/elastic6option.html +0 -275
  191. package/dist/docs/interfaces/elastic6simplequeriable.html +0 -284
  192. package/dist/docs/interfaces/engineconsole.html +0 -292
  193. package/dist/docs/interfaces/enginecore.html +0 -344
  194. package/dist/docs/interfaces/enginemodule.html +0 -269
  195. package/dist/docs/interfaces/enginemodules.html +0 -316
  196. package/dist/docs/interfaces/engineoption.html +0 -244
  197. package/dist/docs/interfaces/enginescope.html +0 -220
  198. package/dist/docs/interfaces/existencecondition.html +0 -212
  199. package/dist/docs/interfaces/filter.html +0 -253
  200. package/dist/docs/interfaces/generalfuntion.html +0 -207
  201. package/dist/docs/interfaces/generalitem.html +0 -212
  202. package/dist/docs/interfaces/handlermap.html +0 -171
  203. package/dist/docs/interfaces/incrementable.html +0 -190
  204. package/dist/docs/interfaces/internalkey.html +0 -210
  205. package/dist/docs/interfaces/internalmodel.html +0 -226
  206. package/dist/docs/interfaces/itementry.html +0 -241
  207. package/dist/docs/interfaces/jwtcommon.html +0 -242
  208. package/dist/docs/interfaces/lambdahandlerservice.html +0 -340
  209. package/dist/docs/interfaces/lemonengine.html +0 -593
  210. package/dist/docs/interfaces/metricpostbody.html +0 -220
  211. package/dist/docs/interfaces/mygeneral.html +0 -271
  212. package/dist/docs/interfaces/mymodel.html +0 -554
  213. package/dist/docs/interfaces/myprotocolparam.html +0 -359
  214. package/dist/docs/interfaces/nextcontext.html +0 -381
  215. package/dist/docs/interfaces/nextidentity.html +0 -325
  216. package/dist/docs/interfaces/nextidentityaccess.html +0 -495
  217. package/dist/docs/interfaces/nextidentitycognito.html +0 -422
  218. package/dist/docs/interfaces/notificationbody.html +0 -171
  219. package/dist/docs/interfaces/notificationparam.html +0 -304
  220. package/dist/docs/interfaces/options.html +0 -226
  221. package/dist/docs/interfaces/parrallelcallback.html +0 -203
  222. package/dist/docs/interfaces/parrallelparam.html +0 -285
  223. package/dist/docs/interfaces/protocolbody.html +0 -183
  224. package/dist/docs/interfaces/protocolparam.html +0 -336
  225. package/dist/docs/interfaces/protocolservice.html +0 -548
  226. package/dist/docs/interfaces/protocoltransformer.html +0 -295
  227. package/dist/docs/interfaces/proxyparams.html +0 -212
  228. package/dist/docs/interfaces/putobjectresult.html +0 -282
  229. package/dist/docs/interfaces/queryresult.html +0 -272
  230. package/dist/docs/interfaces/redisoptions.html +0 -248
  231. package/dist/docs/interfaces/simplesearchparam.html +0 -351
  232. package/dist/docs/interfaces/slackaction.html +0 -240
  233. package/dist/docs/interfaces/slackattachment.html +0 -459
  234. package/dist/docs/interfaces/slackpostbody.html +0 -240
  235. package/dist/docs/interfaces/sqsattribute.html +0 -171
  236. package/dist/docs/interfaces/sqsmessage.html +0 -254
  237. package/dist/docs/interfaces/sqsrecord.html +0 -324
  238. package/dist/docs/interfaces/sqsservice.html +0 -333
  239. package/dist/docs/interfaces/sqsstatistics.html +0 -240
  240. package/dist/docs/interfaces/storagemakeable.html +0 -258
  241. package/dist/docs/interfaces/storagemodel.html +0 -285
  242. package/dist/docs/interfaces/storageservice.html +0 -497
  243. package/dist/docs/interfaces/stringcondition.html +0 -226
  244. package/dist/docs/interfaces/tagset.html +0 -171
  245. package/dist/docs/interfaces/testmodel.html +0 -334
  246. package/dist/docs/interfaces/timeout.html +0 -233
  247. package/dist/docs/interfaces/updatable.html +0 -193
  248. package/dist/docs/interfaces/user.html +0 -534
@@ -1,22 +1,49 @@
1
- /** ****************************************************************************************************************
2
- * Service Main
3
- ** ****************************************************************************************************************/
4
- import { GeneralItem, Incrementable } from './core-types';
5
- import elasticsearch from 'elasticsearch';
1
+ import { GeneralItem, Incrementable, SearchBody } from './core-types';
2
+ import elasticsearch from '@elastic/elasticsearch';
3
+ export declare type SearchType = 'query_then_fetch' | 'dfs_query_then_fetch';
4
+ export declare type SearchResponse = any;
6
5
  /**
7
6
  * options for construction.
8
7
  */
9
8
  export interface Elastic6Option {
9
+ /**
10
+ * endpoint url of ES6
11
+ */
10
12
  endpoint: string;
13
+ /**
14
+ * index-name
15
+ */
11
16
  indexName: string;
17
+ /**
18
+ * document type (default as `_doc` in ES6)
19
+ * - it must be `_doc` since ES6.x
20
+ */
12
21
  docType?: string;
22
+ /**
23
+ * id-name (optional if time-seriese)
24
+ */
13
25
  idName?: string;
26
+ /**
27
+ * is TIMESERIES data?
28
+ */
14
29
  timeSeries?: boolean;
30
+ /**
31
+ * (optional) version of engine.
32
+ * - (default) 6.8
33
+ */
34
+ version?: string;
35
+ /**
36
+ * fields to provide autocomplete(Search-as-You-Type) feature
37
+ */
15
38
  autocompleteFields?: string[];
16
39
  }
40
+ /**
41
+ * common type of item
42
+ */
17
43
  export interface Elastic6Item extends GeneralItem {
18
44
  _id?: string;
19
45
  _version?: number;
46
+ _score?: number;
20
47
  }
21
48
  /**
22
49
  * class: `Elastic6Service`
@@ -25,14 +52,15 @@ export interface Elastic6Item extends GeneralItem {
25
52
  export declare class Elastic6Service<T extends Elastic6Item = any> {
26
53
  static readonly DECOMPOSED_FIELD = "_decomposed";
27
54
  static readonly QWERTY_FIELD = "_qwerty";
28
- protected options: Elastic6Option;
29
- constructor(options: Elastic6Option);
30
- /**
31
- * say hello of identity.
32
- */
33
- hello: () => string;
55
+ protected _options: Elastic6Option;
56
+ readonly _client: elasticsearch.Client;
34
57
  /**
35
58
  * simple instance maker.
59
+ *
60
+ * ```js
61
+ * const { client } = Elastic6Service.instance(endpoint);
62
+ * ```
63
+ *
36
64
  * @param endpoint service-url
37
65
  * @param version Elasticsearch version (default: '6.8')
38
66
  * @see https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/16.x/configuration.html
@@ -40,16 +68,74 @@ export declare class Elastic6Service<T extends Elastic6Item = any> {
40
68
  static instance(endpoint: string): {
41
69
  client: elasticsearch.Client;
42
70
  };
71
+ /**
72
+ * default constuctor w/ options.
73
+ * @param options { endpoint, indexName } is required.
74
+ */
75
+ constructor(options: Elastic6Option);
76
+ /**
77
+ * say hello of identity.
78
+ */
79
+ hello: () => string;
80
+ /**
81
+ * get the client instance.
82
+ */
83
+ get client(): elasticsearch.Client;
84
+ /**
85
+ * get the current options.
86
+ */
87
+ get options(): Elastic6Option;
88
+ get version(): number;
89
+ /**
90
+ * list of index
91
+ */
92
+ listIndices(): Promise<{
93
+ list: {
94
+ pri: number;
95
+ rep: number;
96
+ docsCount: number;
97
+ docsDeleted: number;
98
+ health: string;
99
+ index: string;
100
+ status: string;
101
+ uuid: string;
102
+ priStoreSize: string;
103
+ storeSize: string;
104
+ }[];
105
+ }>;
106
+ /**
107
+ * find the index by name
108
+ */
109
+ findIndex(indexName?: string): Promise<{
110
+ pri: number;
111
+ rep: number;
112
+ docsCount: number;
113
+ docsDeleted: number;
114
+ health: string;
115
+ index: string;
116
+ status: string;
117
+ uuid: string;
118
+ priStoreSize: string;
119
+ storeSize: string;
120
+ }>;
43
121
  /**
44
122
  * create index by name
45
123
  *
46
124
  * @param settings creating settings
47
125
  */
48
- createIndex(settings?: any): Promise<any>;
126
+ createIndex(settings?: any): Promise<{
127
+ status: any;
128
+ index: string;
129
+ acknowledged: any;
130
+ }>;
49
131
  /**
50
132
  * destroy search index
51
133
  */
52
- destroyIndex(): Promise<any>;
134
+ destroyIndex(): Promise<{
135
+ status: any;
136
+ index: string;
137
+ acknowledged: any;
138
+ }>;
53
139
  /**
54
140
  * refresh search index - refresh index to make all items searchable
55
141
  */
@@ -99,6 +185,19 @@ export declare class Elastic6Service<T extends Elastic6Item = any> {
99
185
  * @param item item to update
100
186
  */
101
187
  updateItem(id: string, item: T, increments?: Incrementable): Promise<T>;
188
+ /**
189
+ * run search and get the raw response.
190
+ */
191
+ searchRaw(body: SearchBody, searchType?: SearchType): Promise<SearchResponse>;
192
+ /**
193
+ * run search, and get the formatmted response.
194
+ */
195
+ search(body: SearchBody, searchType?: SearchType): Promise<{
196
+ total: any;
197
+ list: any;
198
+ last: any;
199
+ aggregations: any;
200
+ }>;
102
201
  /**
103
202
  * prepare default setting
104
203
  * - migrated from engine-v2.
@@ -109,60 +208,47 @@ export declare class Elastic6Service<T extends Elastic6Item = any> {
109
208
  * @param replicas number of replicas (default 1)
110
209
  * @param timeSeries flag of TIMESERIES (default false)
111
210
  */
112
- static prepareSettings(docType: string, idName: string, timeSeries?: boolean, shards?: number, replicas?: number): any;
211
+ static prepareSettings(params: {
212
+ docType: string;
213
+ idName: string;
214
+ version?: string;
215
+ timeSeries?: boolean;
216
+ shards?: number;
217
+ replicas?: number;
218
+ }): any;
113
219
  /**
114
220
  * generate autocomplete fields into the item body to be indexed
115
221
  * @param body item body to be saved into ES6 index
116
222
  * @private
117
223
  */
118
- private prepareAutocompleteFields;
224
+ private popullateAutocompleteFields;
225
+ }
226
+ interface ErrorReasonDetail {
227
+ status: number;
228
+ type: string;
229
+ reason?: string;
230
+ cause?: any;
231
+ }
232
+ interface ErrorReason {
233
+ status: number;
234
+ message: string;
235
+ reason: ErrorReasonDetail;
119
236
  }
120
237
  /**
121
238
  * error samples
122
239
  */
123
240
  export declare const $ERROR: {
124
- handler: (name: string, cb?: (e: Error) => any) => (e: any) => any;
125
- index_not_found_exception: {
126
- msg: string;
127
- path: string;
128
- query: {};
129
- statusCode: number;
130
- response: string;
131
- };
132
- resource_already_exists_exception: {
133
- msg: string;
134
- path: string;
135
- query: {};
136
- body: string;
137
- statusCode: number;
138
- response: string;
139
- };
140
- not_found: {
141
- msg: string;
142
- path: string;
143
- query: {};
144
- statusCode: number;
145
- response: string;
146
- };
147
- action_request_validation_exception: {
148
- msg: string;
149
- path: string;
150
- query: {};
151
- statusCode: number;
152
- response: string;
153
- };
154
- remote_transport_exception: {
155
- msg: string;
156
- path: string;
157
- query: {};
158
- body: string;
159
- statusCode: number;
160
- response: string;
161
- };
162
- version_conflict_engine_exception: {
163
- '!': string;
164
- msg: string;
165
- };
241
+ asJson: (e: any) => any;
242
+ throwAsJson: (e: any) => never;
243
+ parseMeta: <T extends {
244
+ [key: string]: any;
245
+ type?: string;
246
+ value?: any;
247
+ error?: string;
248
+ list?: any[];
249
+ }>(meta: any) => T;
250
+ asError: (e: any) => ErrorReason;
251
+ handler: (name: string, cb?: (e: Error, E?: ErrorReason) => any) => (e: any) => any;
166
252
  };
167
253
  /** ****************************************************************************************************************
168
254
  * Dummy Elastic6 Service
@@ -184,3 +270,4 @@ export declare class DummyElastic6Service<T extends GeneralItem> extends Elastic
184
270
  deleteItem(id: string, sort?: string | number): Promise<T>;
185
271
  updateItem(id: string, updates: T, increments?: Incrementable): Promise<T>;
186
272
  }
273
+ export {};