lemon-core 2.2.17 → 3.0.0
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/README.md +3 -1
- package/dist/common/test-helper.js +1 -1
- package/dist/common/test-helper.js.map +1 -1
- package/dist/controllers/dummy-controller.js.map +1 -1
- package/dist/cores/api-service.js.map +1 -1
- package/dist/cores/aws/aws-s3-service.d.ts +24 -46
- package/dist/cores/aws/aws-s3-service.js +103 -223
- package/dist/cores/aws/aws-s3-service.js.map +1 -1
- package/dist/cores/aws/aws-sns-service.js +3 -3
- package/dist/cores/aws/aws-sns-service.js.map +1 -1
- package/dist/cores/core-types.d.ts +98 -2
- package/dist/cores/core-types.js +1 -0
- package/dist/cores/core-types.js.map +1 -1
- package/dist/cores/dynamo-service.js +2 -2
- package/dist/cores/dynamo-service.js.map +1 -1
- package/dist/cores/elastic6-query-service.d.ts +42 -9
- package/dist/cores/elastic6-query-service.js +144 -127
- package/dist/cores/elastic6-query-service.js.map +1 -1
- package/dist/cores/elastic6-service.d.ts +144 -57
- package/dist/cores/elastic6-service.js +506 -321
- package/dist/cores/elastic6-service.js.map +1 -1
- package/dist/cores/lambda/lambda-cognito-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-cron-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-dynamo-stream-handler.js +3 -3
- package/dist/cores/lambda/lambda-dynamo-stream-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-notification-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-sns-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-web-handler.js +2 -4
- package/dist/cores/lambda/lambda-web-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-wss-handler.js.map +1 -1
- package/dist/cores/model-manager.d.ts +4 -1
- package/dist/cores/model-manager.js +9 -4
- package/dist/cores/model-manager.js.map +1 -1
- package/dist/cores/protocol/protocol-service.d.ts +1 -2
- package/dist/cores/protocol/protocol-service.js +5 -3
- package/dist/cores/protocol/protocol-service.js.map +1 -1
- package/dist/engine/builder.d.ts +1 -0
- package/dist/engine/builder.js +1 -1
- package/dist/engine/builder.js.map +1 -1
- package/dist/engine/engine.js +2 -1
- package/dist/engine/engine.js.map +1 -1
- package/dist/engine/index.d.ts +0 -1
- package/dist/engine/index.js +2 -4
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/types.d.ts +0 -4
- package/dist/engine/types.js.map +1 -1
- package/dist/engine/utilities.d.ts +5 -1
- package/dist/engine/utilities.js +126 -11
- package/dist/engine/utilities.js.map +1 -1
- package/dist/tools/express.js +0 -3
- package/dist/tools/express.js.map +1 -1
- package/package.json +7 -13
- package/CHANGELOG.md +0 -61
- package/dist/docs/assets/css/main.css +0 -2321
- package/dist/docs/assets/images/icons.png +0 -0
- package/dist/docs/assets/images/icons@2x.png +0 -0
- package/dist/docs/assets/images/widgets.png +0 -0
- package/dist/docs/assets/images/widgets@2x.png +0 -0
- package/dist/docs/assets/js/main.js +0 -1
- package/dist/docs/assets/js/search.js +0 -3
- package/dist/docs/classes/abstractmanager.html +0 -1034
- package/dist/docs/classes/apiproxyclient.html +0 -509
- package/dist/docs/classes/apiservice.html +0 -805
- package/dist/docs/classes/awskmsservice.html +0 -468
- package/dist/docs/classes/awsmodule.html +0 -353
- package/dist/docs/classes/awss3service.html +0 -689
- package/dist/docs/classes/awssnsservice.html +0 -543
- package/dist/docs/classes/awssqsservice.html +0 -517
- package/dist/docs/classes/cacheservice.html +0 -996
- package/dist/docs/classes/configmodule.html +0 -311
- package/dist/docs/classes/dummycacheservice.html +0 -1000
- package/dist/docs/classes/dummycontroller.html +0 -709
- package/dist/docs/classes/dummydynamoservice.html +0 -915
- package/dist/docs/classes/dummyelastic6service.html +0 -791
- package/dist/docs/classes/dummyredisstorageservice.html +0 -804
- package/dist/docs/classes/dummystoragemaker.html +0 -383
- package/dist/docs/classes/dummystorageservice.html +0 -592
- package/dist/docs/classes/dynamoqueryservice.html +0 -413
- package/dist/docs/classes/dynamoscanservice.html +0 -358
- package/dist/docs/classes/dynamoservice.html +0 -844
- package/dist/docs/classes/dynamostorageservice.html +0 -623
- package/dist/docs/classes/elastic6queryservice.html +0 -458
- package/dist/docs/classes/elastic6service.html +0 -804
- package/dist/docs/classes/file.html +0 -579
- package/dist/docs/classes/generalapicontroller.html +0 -877
- package/dist/docs/classes/generalcontroller.html +0 -454
- package/dist/docs/classes/generalcontrollerlocal.html +0 -499
- package/dist/docs/classes/generalcontrollerlocal2.html +0 -523
- package/dist/docs/classes/generalkeymaker.html +0 -335
- package/dist/docs/classes/generalmodelfilter.html +0 -529
- package/dist/docs/classes/generalwebcontroller.html +0 -580
- package/dist/docs/classes/hangulservice.html +0 -636
- package/dist/docs/classes/httpstorageservice.html +0 -539
- package/dist/docs/classes/lambdacognitohandler.html +0 -355
- package/dist/docs/classes/lambdacronhandler.html +0 -390
- package/dist/docs/classes/lambdacronhandlerlocal.html +0 -371
- package/dist/docs/classes/lambdadynamostreamhandler.html +0 -472
- package/dist/docs/classes/lambdadynamostreamhandlerlocal.html +0 -455
- package/dist/docs/classes/lambdahandler.html +0 -479
- package/dist/docs/classes/lambdahandlerlocal.html +0 -472
- package/dist/docs/classes/lambdamodule.html +0 -433
- package/dist/docs/classes/lambdanotificationhandler.html +0 -474
- package/dist/docs/classes/lambdanotificationhandlerlocal.html +0 -457
- package/dist/docs/classes/lambdasnshandler.html +0 -394
- package/dist/docs/classes/lambdasnshandlerlocal.html +0 -397
- package/dist/docs/classes/lambdasqshandler.html +0 -394
- package/dist/docs/classes/lambdasqshandlerlocal.html +0 -397
- package/dist/docs/classes/lambdasubhandler.html +0 -305
- package/dist/docs/classes/lambdawebhandler.html +0 -603
- package/dist/docs/classes/lambdawebhandlerlocal.html +0 -581
- package/dist/docs/classes/lambdawsshandler.html +0 -359
- package/dist/docs/classes/memcachedbackend.html +0 -900
- package/dist/docs/classes/mocksapiservice.html +0 -691
- package/dist/docs/classes/modelutil.html +0 -311
- package/dist/docs/classes/myconfigservice.html +0 -561
- package/dist/docs/classes/myconfigservicetest.html +0 -527
- package/dist/docs/classes/myconfigservicetest2.html +0 -522
- package/dist/docs/classes/mydummysqsservice.html +0 -419
- package/dist/docs/classes/myenginemodules.html +0 -357
- package/dist/docs/classes/mygeneralapicontroller.html +0 -837
- package/dist/docs/classes/mylemonwebcontroller.html +0 -356
- package/dist/docs/classes/mymodelfilter.html +0 -479
- package/dist/docs/classes/myprotocolservice.html +0 -993
- package/dist/docs/classes/myprotocolservicetest.html +0 -983
- package/dist/docs/classes/myservice.html +0 -329
- package/dist/docs/classes/mystorage.html +0 -1370
- package/dist/docs/classes/nodecachebackend.html +0 -714
- package/dist/docs/classes/protocolmodule.html +0 -311
- package/dist/docs/classes/proxystorageservice.html +0 -1441
- package/dist/docs/classes/query.html +0 -850
- package/dist/docs/classes/redisbackend.html +0 -781
- package/dist/docs/classes/redisstorageservice.html +0 -867
- package/dist/docs/classes/scan.html +0 -685
- package/dist/docs/classes/snsprotocoltransformer.html +0 -334
- package/dist/docs/classes/sqsprotocoltransformer.html +0 -334
- package/dist/docs/classes/typedstorageservice.html +0 -914
- package/dist/docs/classes/uniquefieldmanager.html +0 -477
- package/dist/docs/classes/usermanager.html +0 -919
- package/dist/docs/classes/utilities.html +0 -1914
- package/dist/docs/classes/webprotocoltransformer.html +0 -330
- package/dist/docs/globals.html +0 -7477
- package/dist/docs/index.html +0 -1511
- package/dist/docs/interfaces/accountitem.html +0 -277
- package/dist/docs/interfaces/accountmodel.html +0 -306
- package/dist/docs/interfaces/adaptiveparam.html +0 -203
- package/dist/docs/interfaces/apiheaders.html +0 -183
- package/dist/docs/interfaces/apihttpproxy.html +0 -304
- package/dist/docs/interfaces/apiserviceclient.html +0 -448
- package/dist/docs/interfaces/autocompletesearchparam.html +0 -282
- package/dist/docs/interfaces/betweencondition.html +0 -226
- package/dist/docs/interfaces/cachebackend.html +0 -714
- package/dist/docs/interfaces/cacheentry.html +0 -248
- package/dist/docs/interfaces/cacheoptions.html +0 -267
- package/dist/docs/interfaces/callbackdata.html +0 -279
- package/dist/docs/interfaces/callbackparam.html +0 -252
- package/dist/docs/interfaces/comparisoncondition.html +0 -226
- package/dist/docs/interfaces/coreconfigservice.html +0 -342
- package/dist/docs/interfaces/corekey.html +0 -278
- package/dist/docs/interfaces/corekeymakeable.html +0 -292
- package/dist/docs/interfaces/corekmsservice.html +0 -311
- package/dist/docs/interfaces/coremodel.html +0 -499
- package/dist/docs/interfaces/coremodelfilterable.html +0 -281
- package/dist/docs/interfaces/cores3service.html +0 -485
- package/dist/docs/interfaces/coreservices.html +0 -232
- package/dist/docs/interfaces/coresnsservice.html +0 -317
- package/dist/docs/interfaces/corewebcontroller.html +0 -271
- package/dist/docs/interfaces/cronevent.html +0 -223
- package/dist/docs/interfaces/cronparam.html +0 -212
- package/dist/docs/interfaces/dynamooption.html +0 -254
- package/dist/docs/interfaces/dynamoqueryresult.html +0 -244
- package/dist/docs/interfaces/dynamoscanresult.html +0 -244
- package/dist/docs/interfaces/dynamosimplequeriable.html +0 -308
- package/dist/docs/interfaces/dynamosimplescannable.html +0 -255
- package/dist/docs/interfaces/dynamostreambody.html +0 -268
- package/dist/docs/interfaces/dynamostreamcallback.html +0 -209
- package/dist/docs/interfaces/dynamostreamfilter.html +0 -218
- package/dist/docs/interfaces/dynamostreamparam.html +0 -240
- package/dist/docs/interfaces/elastic6item.html +0 -221
- package/dist/docs/interfaces/elastic6option.html +0 -275
- package/dist/docs/interfaces/elastic6simplequeriable.html +0 -284
- package/dist/docs/interfaces/engineconsole.html +0 -292
- package/dist/docs/interfaces/enginecore.html +0 -344
- package/dist/docs/interfaces/enginemodule.html +0 -269
- package/dist/docs/interfaces/enginemodules.html +0 -316
- package/dist/docs/interfaces/engineoption.html +0 -244
- package/dist/docs/interfaces/enginescope.html +0 -220
- package/dist/docs/interfaces/existencecondition.html +0 -212
- package/dist/docs/interfaces/filter.html +0 -253
- package/dist/docs/interfaces/generalfuntion.html +0 -207
- package/dist/docs/interfaces/generalitem.html +0 -212
- package/dist/docs/interfaces/handlermap.html +0 -171
- package/dist/docs/interfaces/incrementable.html +0 -190
- package/dist/docs/interfaces/internalkey.html +0 -210
- package/dist/docs/interfaces/internalmodel.html +0 -226
- package/dist/docs/interfaces/itementry.html +0 -241
- package/dist/docs/interfaces/jwtcommon.html +0 -242
- package/dist/docs/interfaces/lambdahandlerservice.html +0 -340
- package/dist/docs/interfaces/lemonengine.html +0 -593
- package/dist/docs/interfaces/metricpostbody.html +0 -220
- package/dist/docs/interfaces/mygeneral.html +0 -271
- package/dist/docs/interfaces/mymodel.html +0 -554
- package/dist/docs/interfaces/myprotocolparam.html +0 -359
- package/dist/docs/interfaces/nextcontext.html +0 -381
- package/dist/docs/interfaces/nextidentity.html +0 -325
- package/dist/docs/interfaces/nextidentityaccess.html +0 -495
- package/dist/docs/interfaces/nextidentitycognito.html +0 -422
- package/dist/docs/interfaces/notificationbody.html +0 -171
- package/dist/docs/interfaces/notificationparam.html +0 -304
- package/dist/docs/interfaces/options.html +0 -226
- package/dist/docs/interfaces/parrallelcallback.html +0 -203
- package/dist/docs/interfaces/parrallelparam.html +0 -285
- package/dist/docs/interfaces/protocolbody.html +0 -183
- package/dist/docs/interfaces/protocolparam.html +0 -336
- package/dist/docs/interfaces/protocolservice.html +0 -548
- package/dist/docs/interfaces/protocoltransformer.html +0 -295
- package/dist/docs/interfaces/proxyparams.html +0 -212
- package/dist/docs/interfaces/putobjectresult.html +0 -282
- package/dist/docs/interfaces/queryresult.html +0 -272
- package/dist/docs/interfaces/redisoptions.html +0 -248
- package/dist/docs/interfaces/simplesearchparam.html +0 -351
- package/dist/docs/interfaces/slackaction.html +0 -240
- package/dist/docs/interfaces/slackattachment.html +0 -459
- package/dist/docs/interfaces/slackpostbody.html +0 -240
- package/dist/docs/interfaces/sqsattribute.html +0 -171
- package/dist/docs/interfaces/sqsmessage.html +0 -254
- package/dist/docs/interfaces/sqsrecord.html +0 -324
- package/dist/docs/interfaces/sqsservice.html +0 -333
- package/dist/docs/interfaces/sqsstatistics.html +0 -240
- package/dist/docs/interfaces/storagemakeable.html +0 -258
- package/dist/docs/interfaces/storagemodel.html +0 -285
- package/dist/docs/interfaces/storageservice.html +0 -497
- package/dist/docs/interfaces/stringcondition.html +0 -226
- package/dist/docs/interfaces/tagset.html +0 -171
- package/dist/docs/interfaces/testmodel.html +0 -334
- package/dist/docs/interfaces/timeout.html +0 -233
- package/dist/docs/interfaces/updatable.html +0 -193
- package/dist/docs/interfaces/user.html +0 -534
|
@@ -1,22 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
29
|
-
|
|
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<
|
|
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<
|
|
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(
|
|
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
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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 {};
|