lemon-core 4.2.7 → 5.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.
Files changed (167) hide show
  1. package/README.md +128 -2
  2. package/dist/common/lemon-error.d.ts +34 -0
  3. package/dist/common/lemon-error.js +52 -0
  4. package/dist/common/lemon-error.js.map +1 -0
  5. package/dist/controllers/general-api-controller.d.ts +7 -0
  6. package/dist/controllers/general-api-controller.js +7 -0
  7. package/dist/controllers/general-api-controller.js.map +1 -1
  8. package/dist/cores/api/api-service.js +10 -43
  9. package/dist/cores/api/api-service.js.map +1 -1
  10. package/dist/cores/aws/aws-kms-service.d.ts +13 -5
  11. package/dist/cores/aws/aws-kms-service.js +23 -9
  12. package/dist/cores/aws/aws-kms-service.js.map +1 -1
  13. package/dist/cores/aws/aws-s3-service.d.ts +30 -4
  14. package/dist/cores/aws/aws-s3-service.js +35 -15
  15. package/dist/cores/aws/aws-s3-service.js.map +1 -1
  16. package/dist/cores/aws/aws-sns-service.js +59 -9
  17. package/dist/cores/aws/aws-sns-service.js.map +1 -1
  18. package/dist/cores/aws/aws-sqs-service.d.ts +1 -1
  19. package/dist/cores/aws/aws-sqs-service.js +54 -12
  20. package/dist/cores/aws/aws-sqs-service.js.map +1 -1
  21. package/dist/cores/cache/cache-service.d.ts +10 -9
  22. package/dist/cores/cache/cache-service.js +9 -346
  23. package/dist/cores/cache/cache-service.js.map +1 -1
  24. package/dist/cores/config/config-service.d.ts +3 -15
  25. package/dist/cores/config/config-service.js +5 -34
  26. package/dist/cores/config/config-service.js.map +1 -1
  27. package/dist/cores/dynamo/dynamo-query-service.js +42 -2
  28. package/dist/cores/dynamo/dynamo-query-service.js.map +1 -1
  29. package/dist/cores/dynamo/dynamo-scan-service.js +42 -2
  30. package/dist/cores/dynamo/dynamo-scan-service.js.map +1 -1
  31. package/dist/cores/dynamo/dynamo-service.d.ts +45 -14
  32. package/dist/cores/dynamo/dynamo-service.js +48 -21
  33. package/dist/cores/dynamo/dynamo-service.js.map +1 -1
  34. package/dist/cores/dynamo/tools/expressions.js +32 -22
  35. package/dist/cores/dynamo/tools/expressions.js.map +1 -1
  36. package/dist/cores/dynamo/tools/lang.d.ts +30 -0
  37. package/dist/cores/dynamo/tools/lang.js +75 -0
  38. package/dist/cores/dynamo/tools/lang.js.map +1 -0
  39. package/dist/cores/dynamo/tools/query.js +20 -21
  40. package/dist/cores/dynamo/tools/query.js.map +1 -1
  41. package/dist/cores/dynamo/tools/scan.js +15 -16
  42. package/dist/cores/dynamo/tools/scan.js.map +1 -1
  43. package/dist/cores/dynamo/tools/serializer.js +40 -38
  44. package/dist/cores/dynamo/tools/serializer.js.map +1 -1
  45. package/dist/cores/dynamo/tools/utils.d.ts +6 -2
  46. package/dist/cores/dynamo/tools/utils.js +11 -8
  47. package/dist/cores/dynamo/tools/utils.js.map +1 -1
  48. package/dist/cores/elastic/elastic6-query-service.d.ts +1 -104
  49. package/dist/cores/elastic/elastic6-query-service.js +15 -489
  50. package/dist/cores/elastic/elastic6-query-service.js.map +1 -1
  51. package/dist/cores/elastic/elastic6-service.d.ts +1 -482
  52. package/dist/cores/elastic/elastic6-service.js +15 -1153
  53. package/dist/cores/elastic/elastic6-service.js.map +1 -1
  54. package/dist/cores/elastic/index.d.ts +2 -2
  55. package/dist/cores/elastic/index.js +3 -2
  56. package/dist/cores/elastic/index.js.map +1 -1
  57. package/dist/cores/elastic/os2-query-service.d.ts +104 -0
  58. package/dist/cores/elastic/os2-query-service.js +495 -0
  59. package/dist/cores/elastic/os2-query-service.js.map +1 -0
  60. package/dist/cores/elastic/os2-service.d.ts +372 -0
  61. package/dist/cores/elastic/os2-service.js +943 -0
  62. package/dist/cores/elastic/os2-service.js.map +1 -0
  63. package/dist/cores/index.d.ts +6 -1
  64. package/dist/cores/index.js +9 -2
  65. package/dist/cores/index.js.map +1 -1
  66. package/dist/cores/lambda/index.js +2 -1
  67. package/dist/cores/lambda/index.js.map +1 -1
  68. package/dist/cores/lambda/lambda-cron-handler.d.ts +1 -0
  69. package/dist/cores/lambda/lambda-cron-handler.js +5 -1
  70. package/dist/cores/lambda/lambda-cron-handler.js.map +1 -1
  71. package/dist/cores/lambda/lambda-dynamo-stream-handler.d.ts +5 -4
  72. package/dist/cores/lambda/lambda-dynamo-stream-handler.js +18 -5
  73. package/dist/cores/lambda/lambda-dynamo-stream-handler.js.map +1 -1
  74. package/dist/cores/lambda/lambda-handler.d.ts +22 -2
  75. package/dist/cores/lambda/lambda-handler.js +85 -23
  76. package/dist/cores/lambda/lambda-handler.js.map +1 -1
  77. package/dist/cores/lambda/lambda-sns-handler.d.ts +1 -0
  78. package/dist/cores/lambda/lambda-sns-handler.js +5 -0
  79. package/dist/cores/lambda/lambda-sns-handler.js.map +1 -1
  80. package/dist/cores/lambda/lambda-sqs-handler.d.ts +1 -0
  81. package/dist/cores/lambda/lambda-sqs-handler.js +20 -5
  82. package/dist/cores/lambda/lambda-sqs-handler.js.map +1 -1
  83. package/dist/cores/lambda/lambda-web-handler.d.ts +10 -0
  84. package/dist/cores/lambda/lambda-web-handler.js +107 -41
  85. package/dist/cores/lambda/lambda-web-handler.js.map +1 -1
  86. package/dist/cores/protocol/aws-lambda-helper.js +58 -11
  87. package/dist/cores/protocol/aws-lambda-helper.js.map +1 -1
  88. package/dist/cores/protocol/index.js +3 -0
  89. package/dist/cores/protocol/index.js.map +1 -1
  90. package/dist/cores/protocol/protocol-service.d.ts +26 -5
  91. package/dist/cores/protocol/protocol-service.js +42 -12
  92. package/dist/cores/protocol/protocol-service.js.map +1 -1
  93. package/dist/cores/protocol/protocol-sign.d.ts +72 -0
  94. package/dist/cores/protocol/protocol-sign.js +194 -0
  95. package/dist/cores/protocol/protocol-sign.js.map +1 -0
  96. package/dist/cores/storage/index.d.ts +0 -1
  97. package/dist/cores/storage/index.js +0 -1
  98. package/dist/cores/storage/index.js.map +1 -1
  99. package/dist/cores/storage/model-fields.d.ts +7 -0
  100. package/dist/cores/storage/model-fields.js +21 -0
  101. package/dist/cores/storage/model-fields.js.map +1 -0
  102. package/dist/cores/storage/model-manager.d.ts +3 -2
  103. package/dist/cores/storage/model-manager.js +7 -3
  104. package/dist/cores/storage/model-manager.js.map +1 -1
  105. package/dist/engine/builder.js +20 -2
  106. package/dist/engine/builder.js.map +1 -1
  107. package/dist/engine/engine.d.ts +2 -2
  108. package/dist/engine/engine.js +4 -4
  109. package/dist/engine/engine.js.map +1 -1
  110. package/dist/engine/utilities.d.ts +11 -12
  111. package/dist/engine/utilities.js +30 -82
  112. package/dist/engine/utilities.js.map +1 -1
  113. package/dist/environ.d.ts +0 -6
  114. package/dist/environ.js +1 -12
  115. package/dist/environ.js.map +1 -1
  116. package/dist/esm/index.mjs +140 -0
  117. package/dist/esm/testing.mjs +12 -0
  118. package/dist/extended/abstract-service.d.ts +48 -139
  119. package/dist/extended/abstract-service.js +46 -382
  120. package/dist/extended/abstract-service.js.map +1 -1
  121. package/dist/extended/cores/abstract-controllers.d.ts +170 -0
  122. package/dist/extended/cores/abstract-controllers.js +533 -0
  123. package/dist/extended/cores/abstract-controllers.js.map +1 -0
  124. package/dist/extended/cores/abstract-rest-apis.d.ts +142 -0
  125. package/dist/extended/cores/abstract-rest-apis.js +203 -0
  126. package/dist/extended/cores/abstract-rest-apis.js.map +1 -0
  127. package/dist/extended/cores/abstract-services.d.ts +771 -0
  128. package/dist/extended/cores/abstract-services.js +2042 -0
  129. package/dist/extended/cores/abstract-services.js.map +1 -0
  130. package/dist/extended/cores/browser-cache.d.ts +2 -0
  131. package/dist/extended/cores/browser-cache.js +34 -0
  132. package/dist/extended/cores/browser-cache.js.map +1 -0
  133. package/dist/extended/cores/commons.d.ts +20 -0
  134. package/dist/extended/cores/commons.js +31 -0
  135. package/dist/extended/cores/commons.js.map +1 -0
  136. package/dist/extended/cores/index.d.ts +15 -0
  137. package/dist/extended/cores/index.js +32 -0
  138. package/dist/extended/cores/index.js.map +1 -0
  139. package/dist/extended/cores/types.d.ts +14 -0
  140. package/dist/extended/cores/types.js +31 -0
  141. package/dist/extended/cores/types.js.map +1 -0
  142. package/dist/helpers/helpers.d.ts +10 -5
  143. package/dist/helpers/helpers.js +46 -58
  144. package/dist/helpers/helpers.js.map +1 -1
  145. package/dist/helpers/types.d.ts +22 -10
  146. package/dist/index.d.ts +4 -0
  147. package/dist/index.js +12 -1
  148. package/dist/index.js.map +1 -1
  149. package/dist/lib/http-fetch.d.ts +54 -0
  150. package/dist/lib/http-fetch.js +133 -0
  151. package/dist/lib/http-fetch.js.map +1 -0
  152. package/dist/lib/lazy.d.ts +22 -0
  153. package/dist/lib/lazy.js +54 -0
  154. package/dist/lib/lazy.js.map +1 -0
  155. package/dist/lib/perf.d.ts +35 -0
  156. package/dist/lib/perf.js +52 -0
  157. package/dist/lib/perf.js.map +1 -0
  158. package/dist/tools/tools.d.ts +15 -3
  159. package/dist/tools/tools.js +21 -4
  160. package/dist/tools/tools.js.map +1 -1
  161. package/package.json +96 -39
  162. package/dist/cores/storage/redis-storage-service.d.ts +0 -183
  163. package/dist/cores/storage/redis-storage-service.js +0 -377
  164. package/dist/cores/storage/redis-storage-service.js.map +0 -1
  165. package/dist/generated/field-registry.d.ts +0 -10
  166. package/dist/generated/field-registry.js +0 -17
  167. package/dist/generated/field-registry.js.map +0 -1
@@ -6,19 +6,21 @@
6
6
  * @date 2021-02-23 initial version
7
7
  * @author Steve <steve@lemoncloud.io>
8
8
  * @date 2022-02-18 optimized search w/ ES6.8
9
- * @date 2022-02-22 optimized w/ `lemon-core#3.0` and `@elastic/elasticsearch`
9
+ * @date 2022-02-22 optimized w/ `lemon-core#3.0` and the elastic client
10
10
  * @date 2022-02-24 use `$id` in elastic-search as `_id` in dynamo-table.
11
11
  * @date 2022-03-15 optimized w/ `AbstractProxy`
12
12
  * @date 2022-03-17 optimized w/ `lemon-core#3.0.2` and use `env.ES6_DOCTYPE`
13
13
  * @date 2022-03-31 optimized w/ unit test spec.
14
14
  * @date 2022-05-19 optimized `CacheService` w/ typed key.
15
+ * @date 2026-10-27 v5 B2-b: `OS2Synchronizer`/`AbstractOS2Instance`; the L1 search instance, its factory and proxy are removed.
16
+ * @date 2026-10-28 v5 B4: `CoreManager` `fields` may be a model class.
15
17
  *
16
18
  * @origin see `lemon-accounts-api/src/service/core-service.ts`
17
19
  * @copyright (C) 2021 LemonCloud Co Ltd. - All Rights Reserved.
18
20
  */
19
- import { AbstractManager, APIHeaders, ApiHttpProxy, CacheService, CoreModel, CoreModelFilterable, DynamoOption, DynamoStreamEvent, Elastic6Option, Elastic6QueryService, Elastic6Service, GeneralKeyMaker, NextContext, NextIdentityAccess, SearchBody, StorageMakeable, TypedStorageService } from '../cores/';
20
- import { CrendentialForAWS } from '../environ';
21
- import elasticsearch from '@elastic/elasticsearch';
21
+ import { AbstractManager, CacheService, CoreModel, CoreModelFilterable, DynamoOption, DynamoStreamEvent, OS2BaseOption, OS2QueryService, OS2CoreService, GeneralKeyMaker, NextContext, NextIdentityAccess, SearchBody, StorageMakeable, TypedStorageService } from '../cores/';
22
+ import { ModelClass } from '../cores/storage/model-fields';
23
+ import type { Client } from '@opensearch-project/opensearch';
22
24
  /**
23
25
  * authentication helper - get identity-id from context
24
26
  * @param context the current request context.
@@ -102,7 +104,7 @@ export declare abstract class CoreManager<Model extends CoreModel<ModelType>, Mo
102
104
  * constructor
103
105
  * @protected
104
106
  */
105
- protected constructor(type: ModelType, parent: Service, fields: string[], uniqueField?: string);
107
+ protected constructor(type: ModelType, parent: Service, fields: string[] | ModelClass, uniqueField?: string);
106
108
  /**
107
109
  * say hello()
108
110
  */
@@ -291,13 +293,13 @@ export declare abstract class AbstractProxy<U extends string, T extends CoreServ
291
293
  readonly context: NextContext;
292
294
  /** (internal) backend-service */
293
295
  readonly service: T;
294
- /** (internal) cache service instance */
296
+ /** (internal) cache service instance (v5: no longer created from `CACHE_ENDPOINT`, so `undefined` unless a subclass sets it) */
295
297
  readonly cache?: CacheService;
296
298
  /**
297
299
  * constructor of proxy.
298
300
  * @param service user service instance
299
301
  * @param parrallel parrallel count (default 2)
300
- * @param cacheScope prefix of cache-key (like `lemon:SS:` or `lemon:SS:user`)
302
+ * @param cacheScope prefix of cache-key (like `lemon:SS:` or `lemon:SS:user`). v5: kept for signature compat, unused.
301
303
  */
302
304
  constructor(context: NextContext, service: T, parrallel?: number, cacheScope?: string);
303
305
  /**
@@ -369,12 +371,6 @@ export declare abstract class AbstractProxy<U extends string, T extends CoreServ
369
371
  * get current identity-id
370
372
  */
371
373
  getCurrentIdentityId(throwable?: boolean): Promise<string>;
372
- /**
373
- * get the current identity object (or throw access-error)
374
- *
375
- * @deprecated useless anymore since 3.2.10
376
- */
377
- getCurrentIdentity$(throwable?: boolean): Promise<NextIdentityAccess>;
378
374
  }
379
375
  /**
380
376
  * type `SearchResult`
@@ -398,10 +394,10 @@ export interface SearchResult<T, U = any> {
398
394
  aggregations?: U;
399
395
  }
400
396
  /**
401
- * class `Elastic6Synchronizer`
402
- * - listen DynamoDBStream events and index into Elasticsearch
397
+ * class `OS2Synchronizer`
398
+ * - listen DynamoDBStream events and index into OpenSearch
403
399
  */
404
- export declare class Elastic6Synchronizer {
400
+ export declare class OS2Synchronizer {
405
401
  /**
406
402
  * model synchronizer map
407
403
  * @private
@@ -413,11 +409,11 @@ export declare class Elastic6Synchronizer {
413
409
  */
414
410
  private readonly defModelSynchronizer;
415
411
  /**
416
- * constructor
417
- * @param elastic (optional) elastic6-service instance
412
+ * constructor (registers one dynamo-stream listener)
413
+ * @param elastic (optional) OS2CoreService instance
418
414
  * @param dynamoOptions (optional) dynamo config options
419
415
  */
420
- constructor(elastic?: Elastic6Service, dynamoOptions?: DynamoOption | {
416
+ constructor(elastic?: OS2CoreService, dynamoOptions?: DynamoOption | {
421
417
  tableName: string;
422
418
  });
423
419
  /**
@@ -443,71 +439,68 @@ export declare class Elastic6Synchronizer {
443
439
  private onAfterSync;
444
440
  }
445
441
  /**
446
- * type: `Elastic6ContructParams`
447
- * - params for `new Elastic6Instance()`
442
+ * type: `OS2ConstructParams`
443
+ * - params for `new OS2Instance()` (v5: no engine version, no doc-type)
448
444
  */
449
- export interface Elastic6ContructParams {
445
+ export interface OS2ConstructParams {
450
446
  /** url endpoint */
451
447
  endpoint: string;
452
448
  /** name of index */
453
449
  indexName: string;
454
- /** ES engine version(6.2 ~ 7.x) */
455
- esVersion: string;
456
- /** doc-type (only valid under 6.2) */
457
- esDocType: string;
458
450
  /** dynamo table-name to synchronize */
459
451
  tableName: string;
460
452
  /** (optional) field to make auto-complele */
461
453
  autocompleteFields?: string[];
462
454
  }
463
455
  /**
464
- * type: `Elastic6SearchParams`
456
+ * type: `OS2SearchParams`
465
457
  */
466
- export interface Elastic6SearchParams {
458
+ export interface OS2SearchParams {
467
459
  /** index-name */
468
460
  indexName?: string;
469
- /** search-type */
461
+ /** search-type (sent as `search_type`) */
470
462
  searchType?: 'query_then_fetch' | 'dfs_query_then_fetch';
471
463
  /** (optional) signature to check the request */
472
464
  signature?: string;
473
465
  }
474
466
  /**
475
- * class `AbstractElastic6Instance`
476
- * - to manipulate the shared Elasticsearch resources.
467
+ * class `AbstractOS2Instance`
468
+ * - to manipulate the shared OpenSearch resources.
469
+ * - the constructor builds nothing; the subclass (`OS2Instance`) builds one service set.
477
470
  */
478
- export declare abstract class AbstractElastic6Instance {
471
+ export declare abstract class AbstractOS2Instance {
479
472
  /**
480
- * Elasticsearch client
473
+ * OS2CoreService instance
481
474
  */
482
- readonly client?: elasticsearch.Client;
475
+ readonly elastic?: OS2CoreService;
483
476
  /**
484
- * Elastic6Service instance
477
+ * OS2QueryService instance
485
478
  */
486
- readonly elastic?: Elastic6Service;
479
+ readonly query?: OS2QueryService<any>;
487
480
  /**
488
- * Elastic6QueryService instance
481
+ * OS2Synchronizer instance
489
482
  */
490
- readonly query?: Elastic6QueryService<any>;
483
+ readonly synchronizer?: OS2Synchronizer;
491
484
  /**
492
- * Elastic6Synchronizer instance
485
+ * default constructor (empty: no service, no client, no listener)
493
486
  */
494
- readonly synchronizer?: Elastic6Synchronizer;
495
- /**
496
- * default constructor
497
- */
498
- constructor({ endpoint, indexName, esVersion, esDocType, tableName, autocompleteFields, }: Elastic6ContructParams);
487
+ constructor();
499
488
  /** say hello */
500
489
  abstract hello(): string;
501
490
  /**
502
- * read the current elastic6-option.
491
+ * the OpenSearch client of `elastic` (created on first access).
503
492
  */
504
- get options(): Elastic6Option;
493
+ get client(): Client;
505
494
  /**
506
- * create Elasticsearch index w/ custom settings
495
+ * read the current option.
496
+ */
497
+ get options(): OS2BaseOption;
498
+ /**
499
+ * create the index w/ the default typeless settings (one implementation for every instance)
507
500
  */
508
501
  createIndex(): Promise<any>;
509
502
  /**
510
- * destroy Elasticsearch index
503
+ * destroy the index
511
504
  */
512
505
  destroyIndex(): Promise<any>;
513
506
  /**
@@ -515,87 +508,23 @@ export declare abstract class AbstractElastic6Instance {
515
508
  */
516
509
  describeIndex(): Promise<any>;
517
510
  /**
518
- * multi get
511
+ * multi get (typeless: index + docs only)
519
512
  * @param _ids _id list
520
513
  */
521
514
  mget<T>(_ids: string[]): Promise<(T | null)[]>;
522
515
  /**
523
516
  * search raw query
524
- * @param body Elasticsearch Query DSL
525
- * @param params see 'search_type' in Elasticsearch documentation
517
+ * @param body OpenSearch Query DSL
518
+ * @param params see 'search_type' in OpenSearch documentation
526
519
  */
527
- search<T>(body: any, params?: Elastic6SearchParams): Promise<SearchResult<T>>;
520
+ search<T>(body: any, params?: OS2SearchParams): Promise<SearchResult<T>>;
528
521
  /**
529
522
  * create async generator that yields items queried until last
530
- * @param body Elasticsearch Query DSL
531
- * @param searchType see 'search_type' in Elasticsearch documentation
523
+ * @param body OpenSearch Query DSL
524
+ * @param searchType see 'search_type' in OpenSearch documentation
532
525
  */
533
526
  generateSearchResult<T>(body: any, searchType?: 'query_then_fetch' | 'dfs_query_then_fetch'): AsyncGenerator<T[], void, unknown>;
534
527
  }
535
- /**
536
- * class: `Elastic6Instance`
537
- * - default agent to handle search.
538
- */
539
- export declare class Elastic6Instance extends AbstractElastic6Instance {
540
- constructor(params: Elastic6ContructParams);
541
- hello(): string;
542
- /**
543
- * expose the internal helpers. (ONLY for debugging)
544
- */
545
- get $X(): {
546
- /**
547
- * describe (or parse) the endpoint url
548
- * - it detects if endpoint is the proxied search.
549
- * - it detects if endpoint needs the tunneling.
550
- *
551
- * @param url
552
- */
553
- describeEndpointUrl: (url: string, options?: {
554
- throwable?: boolean;
555
- errScope?: string;
556
- }) => {
557
- /** protocol */
558
- protocol: string;
559
- /** host name */
560
- host: string;
561
- /** port number */
562
- port: number;
563
- /** region in cloud */
564
- region: string;
565
- /** flag to use tunneling w/ ssh */
566
- isTunnel: boolean;
567
- /** flag to use proxy */
568
- isProxy: boolean;
569
- };
570
- /**
571
- * create http-web-proxy agent which using endpoint as proxy server.
572
- * - originally refer to `createHttpWebProxy()`
573
- *
574
- * # as cases.
575
- * as proxy agent: GET <endpoint>/<host?>/<path?>
576
- * as direct agent: GET <endpoint>/<id?>/<cmd?>
577
- *
578
- * @param endpoint service url (ex: `https://xyz.execute-api.~/dev/search/0/proxy`)
579
- * @param options optionals parameters.
580
- */
581
- createHttpSearchProxy: (endpoint: string, options?: {
582
- /** client-name (default `env.NAME`) */
583
- name?: string;
584
- /** headers */
585
- headers?: APIHeaders;
586
- /** path encoder (default encodeURIComponent) */
587
- encoder?: (name: string, path: string) => string;
588
- /** relay-key in headers for proxy. */
589
- relayHeaderKey?: string;
590
- /** resultKey in response */
591
- resultKey?: string;
592
- /** credentials to load */
593
- credentials?: CrendentialForAWS;
594
- /** region */
595
- region?: string;
596
- }) => ApiHttpProxy;
597
- };
598
- }
599
528
  /**
600
529
  * from Elasticsearch document to model item
601
530
  * - replace the elastic's `$id` field to `_id` of dynamo-table.
@@ -613,28 +542,8 @@ export interface SearchProxyBody {
613
542
  body: SearchBody;
614
543
  /** service-name of request (ex: `lemon-sandbox-api`) */
615
544
  service?: string;
616
- /** index name to search via proxy (must be same as `env.ES6_INDEX`) */
545
+ /** index name to search via proxy (must be same as `env.OS2_INDEX`) */
617
546
  index?: string;
618
547
  /** (optional) signature to validate this request. */
619
548
  signature?: string;
620
549
  }
621
- /**
622
- * (internal) factory function for `$ES6`
623
- *
624
- * @param options (optional) for debugging
625
- */
626
- export declare const _ES6: (options?: {
627
- /** endpoint url */
628
- endpoint?: string;
629
- /** index-name */
630
- indexName?: string;
631
- /** flag to use search-proxy */
632
- useProxy?: boolean;
633
- /** (optional) aws:credentials to sign request in proxy */
634
- credentials?: CrendentialForAWS;
635
- }) => Elastic6Instance;
636
- /**
637
- * const `$ES6`
638
- * - default instance as a singleton by env configuration.
639
- */
640
- export declare const $ES6: Elastic6Instance;