-
Notifications
You must be signed in to change notification settings - Fork 121
/
index.d.ts
40 lines (33 loc) · 1.1 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
*/
/// <reference types="node" />
import { Credentials } from '@aws-sdk/types';
import Connection from '../Connection';
import Transport from '../Transport';
import * as http from 'http';
import { OpenSearchClientError } from '../errors';
interface AwsSigv4SignerOptions {
getCredentials?: () => Promise<Credentials>;
region: string;
service?: 'es' | 'aoss';
}
interface AwsSigv4SignerResponse {
Connection: typeof Connection;
Transport: typeof Transport;
buildSignedRequestObject(request: any): http.ClientRequestArgs;
}
declare function AwsSigv4Signer (opts: AwsSigv4SignerOptions): AwsSigv4SignerResponse;
declare class AwsSigv4SignerError extends OpenSearchClientError {
name: string;
message: string;
data: any;
constructor(message: string, data: any);
}
export { AwsSigv4Signer, AwsSigv4SignerOptions, AwsSigv4SignerResponse, AwsSigv4SignerError };