mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
Clone only the needed parts of aws-sdk@2 (#64111)
* Clone only the needed parts of aws-sdk@2 aws-sdk@2 is one huge package that has since been broken into multiple packages in the @aws-sdk scope starting with version 3. Unfortunately, dtslint-runner often runs out of memory compiling dependents of aws-sdk@2 because it's so large. This despite the fact that dependents of aws-sdk@2 on DT about 5 parts of the SDK. This PR copies aws-sdk@2.1303.0. It includes the top-level of lib/ and a few subdirectories. From clients/ it includes - dynamodb - rdsdataservice - s3 - ses - sqs - ssm Then it updates the following packages to use aws-sdk2-types instead of aws-sdk: - amazon-dax-client - data-api-client - lesgo - nodemailer-ses-transport - s3-streams - aws-param-store - dynogels - s3-download-stream - s3-upload-stream These packages go from requiring 800+ MB to compile to 200 MB. Compilation speed is much faster too. If the types need to be updated the required files can be copied from aws-sdk again. * Add tests for aws-sdk2-types
This commit is contained in:
committed by
GitHub
parent
c72820414a
commit
be1c9dd44f
2
types/amazon-dax-client/index.d.ts
vendored
2
types/amazon-dax-client/index.d.ts
vendored
@@ -4,7 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node"/>
|
||||
import * as AWS from 'aws-sdk';
|
||||
import * as AWS from 'aws-sdk2-types';
|
||||
|
||||
declare class AmazonDaxClient {
|
||||
constructor(options: AmazonDaxClientOptions);
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.814.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SSM } from 'aws-sdk';
|
||||
import { SSM } from 'aws-sdk2-types';
|
||||
import {
|
||||
ParameterQuery,
|
||||
parameterQuery,
|
||||
|
||||
2
types/aws-param-store/index.d.ts
vendored
2
types/aws-param-store/index.d.ts
vendored
@@ -4,7 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
import { SSM } from 'aws-sdk';
|
||||
import { SSM } from 'aws-sdk2-types';
|
||||
|
||||
export function getParameter(
|
||||
name: SSM.Types.PSParameterName,
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.814.0"
|
||||
}
|
||||
}
|
||||
19
types/aws-sdk2-types/aws-sdk2-types-tests.ts
Normal file
19
types/aws-sdk2-types/aws-sdk2-types-tests.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import * as AWS from 'aws-sdk2-types';
|
||||
function ssm(filter: AWS.SSM.Types.ParameterStringFilter) {
|
||||
return filter.Key === "Stroustrup";
|
||||
}
|
||||
function rds(config: AWS.RDSDataService.ClientConfiguration) {
|
||||
return config.region === "us-east-1" && !!config.computeChecksums;
|
||||
}
|
||||
function dyn(u: AWS.DynamoDB.Update, doc: AWS.DynamoDB.DocumentClient) {
|
||||
if (u?.ExpressionAttributeNames) {
|
||||
u.ExpressionAttributeNames["#n"] = "name";
|
||||
}
|
||||
doc.batchWrite({ RequestItems: { table: [{ PutRequest: { Item: { name: "Copilot" } } }] } });
|
||||
}
|
||||
function s3(loc: AWS.S3.S3Location) {
|
||||
return loc.StorageClass === "STANDARD";
|
||||
}
|
||||
function sqs(x: AWS.SQS.QueueAttributeMap) {
|
||||
return x["VisibilityTimeout"] === "30";
|
||||
}
|
||||
6
types/aws-sdk2-types/clients/all.d.ts
vendored
Normal file
6
types/aws-sdk2-types/clients/all.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export import DynamoDB = require('./dynamodb');
|
||||
export import RDSDataService = require('./rdsdataservice');
|
||||
export import S3 = require('./s3');
|
||||
export import SES = require('./ses');
|
||||
export import SQS = require('./sqs');
|
||||
export import SSM = require('./ssm');
|
||||
3862
types/aws-sdk2-types/clients/dynamodb.d.ts
vendored
Normal file
3862
types/aws-sdk2-types/clients/dynamodb.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
537
types/aws-sdk2-types/clients/rdsdataservice.d.ts
vendored
Normal file
537
types/aws-sdk2-types/clients/rdsdataservice.d.ts
vendored
Normal file
@@ -0,0 +1,537 @@
|
||||
import {Request} from '../lib/request';
|
||||
import {Response} from '../lib/response';
|
||||
import {AWSError} from '../lib/error';
|
||||
import {Service} from '../lib/service';
|
||||
import {ServiceConfigurationOptions} from '../lib/service';
|
||||
import {ConfigBase as Config} from '../lib/config-base';
|
||||
interface Blob {}
|
||||
declare class RDSDataService extends Service {
|
||||
/**
|
||||
* Constructs a service object. This object has one method for each API operation.
|
||||
*/
|
||||
constructor(options?: RDSDataService.Types.ClientConfiguration)
|
||||
config: Config & RDSDataService.Types.ClientConfiguration;
|
||||
/**
|
||||
* Runs a batch SQL statement over an array of data. You can run bulk update and insert operations for multiple records using a DML statement with different parameter sets. Bulk operations can provide a significant performance improvement over individual insert and update operations. If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically. There isn't a fixed upper limit on the number of parameter sets. However, the maximum size of the HTTP request submitted through the Data API is 4 MiB. If the request exceeds this limit, the Data API returns an error and doesn't process the request. This 4-MiB limit includes the size of the HTTP headers and the JSON notation in the request. Thus, the number of parameter sets that you can include depends on a combination of factors, such as the size of the SQL statement and the size of each parameter set. The response size limit is 1 MiB. If the call returns more than 1 MiB of response data, the call is terminated.
|
||||
*/
|
||||
batchExecuteStatement(params: RDSDataService.Types.BatchExecuteStatementRequest, callback?: (err: AWSError, data: RDSDataService.Types.BatchExecuteStatementResponse) => void): Request<RDSDataService.Types.BatchExecuteStatementResponse, AWSError>;
|
||||
/**
|
||||
* Runs a batch SQL statement over an array of data. You can run bulk update and insert operations for multiple records using a DML statement with different parameter sets. Bulk operations can provide a significant performance improvement over individual insert and update operations. If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically. There isn't a fixed upper limit on the number of parameter sets. However, the maximum size of the HTTP request submitted through the Data API is 4 MiB. If the request exceeds this limit, the Data API returns an error and doesn't process the request. This 4-MiB limit includes the size of the HTTP headers and the JSON notation in the request. Thus, the number of parameter sets that you can include depends on a combination of factors, such as the size of the SQL statement and the size of each parameter set. The response size limit is 1 MiB. If the call returns more than 1 MiB of response data, the call is terminated.
|
||||
*/
|
||||
batchExecuteStatement(callback?: (err: AWSError, data: RDSDataService.Types.BatchExecuteStatementResponse) => void): Request<RDSDataService.Types.BatchExecuteStatementResponse, AWSError>;
|
||||
/**
|
||||
* Starts a SQL transaction. A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours. A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's committed, it's rolled back automatically. DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate ExecuteStatement call with continueAfterTimeout enabled.
|
||||
*/
|
||||
beginTransaction(params: RDSDataService.Types.BeginTransactionRequest, callback?: (err: AWSError, data: RDSDataService.Types.BeginTransactionResponse) => void): Request<RDSDataService.Types.BeginTransactionResponse, AWSError>;
|
||||
/**
|
||||
* Starts a SQL transaction. A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours. A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's committed, it's rolled back automatically. DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate ExecuteStatement call with continueAfterTimeout enabled.
|
||||
*/
|
||||
beginTransaction(callback?: (err: AWSError, data: RDSDataService.Types.BeginTransactionResponse) => void): Request<RDSDataService.Types.BeginTransactionResponse, AWSError>;
|
||||
/**
|
||||
* Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
|
||||
*/
|
||||
commitTransaction(params: RDSDataService.Types.CommitTransactionRequest, callback?: (err: AWSError, data: RDSDataService.Types.CommitTransactionResponse) => void): Request<RDSDataService.Types.CommitTransactionResponse, AWSError>;
|
||||
/**
|
||||
* Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
|
||||
*/
|
||||
commitTransaction(callback?: (err: AWSError, data: RDSDataService.Types.CommitTransactionResponse) => void): Request<RDSDataService.Types.CommitTransactionResponse, AWSError>;
|
||||
/**
|
||||
* Runs one or more SQL statements. This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation.
|
||||
*/
|
||||
executeSql(params: RDSDataService.Types.ExecuteSqlRequest, callback?: (err: AWSError, data: RDSDataService.Types.ExecuteSqlResponse) => void): Request<RDSDataService.Types.ExecuteSqlResponse, AWSError>;
|
||||
/**
|
||||
* Runs one or more SQL statements. This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation.
|
||||
*/
|
||||
executeSql(callback?: (err: AWSError, data: RDSDataService.Types.ExecuteSqlResponse) => void): Request<RDSDataService.Types.ExecuteSqlResponse, AWSError>;
|
||||
/**
|
||||
* Runs a SQL statement against a database. If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically. If the binary response data from the database is more than 1 MB, the call is terminated.
|
||||
*/
|
||||
executeStatement(params: RDSDataService.Types.ExecuteStatementRequest, callback?: (err: AWSError, data: RDSDataService.Types.ExecuteStatementResponse) => void): Request<RDSDataService.Types.ExecuteStatementResponse, AWSError>;
|
||||
/**
|
||||
* Runs a SQL statement against a database. If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically. If the binary response data from the database is more than 1 MB, the call is terminated.
|
||||
*/
|
||||
executeStatement(callback?: (err: AWSError, data: RDSDataService.Types.ExecuteStatementResponse) => void): Request<RDSDataService.Types.ExecuteStatementResponse, AWSError>;
|
||||
/**
|
||||
* Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
|
||||
*/
|
||||
rollbackTransaction(params: RDSDataService.Types.RollbackTransactionRequest, callback?: (err: AWSError, data: RDSDataService.Types.RollbackTransactionResponse) => void): Request<RDSDataService.Types.RollbackTransactionResponse, AWSError>;
|
||||
/**
|
||||
* Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
|
||||
*/
|
||||
rollbackTransaction(callback?: (err: AWSError, data: RDSDataService.Types.RollbackTransactionResponse) => void): Request<RDSDataService.Types.RollbackTransactionResponse, AWSError>;
|
||||
}
|
||||
declare namespace RDSDataService {
|
||||
export type Arn = string;
|
||||
export type ArrayOfArray = ArrayValue[];
|
||||
export interface ArrayValue {
|
||||
/**
|
||||
* An array of Boolean values.
|
||||
*/
|
||||
booleanValues?: BooleanArray;
|
||||
/**
|
||||
* An array of integers.
|
||||
*/
|
||||
longValues?: LongArray;
|
||||
/**
|
||||
* An array of floating-point numbers.
|
||||
*/
|
||||
doubleValues?: DoubleArray;
|
||||
/**
|
||||
* An array of strings.
|
||||
*/
|
||||
stringValues?: StringArray;
|
||||
/**
|
||||
* An array of arrays.
|
||||
*/
|
||||
arrayValues?: ArrayOfArray;
|
||||
}
|
||||
export type ArrayValueList = Value[];
|
||||
export interface BatchExecuteStatementRequest {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
|
||||
*/
|
||||
resourceArn: Arn;
|
||||
/**
|
||||
* The ARN of the secret that enables access to the DB cluster. Enter the database user name and password for the credentials in the secret. For information about creating the secret, see Create a database secret.
|
||||
*/
|
||||
secretArn: Arn;
|
||||
/**
|
||||
* The SQL statement to run. Don't include a semicolon (;) at the end of the SQL statement.
|
||||
*/
|
||||
sql: SqlStatement;
|
||||
/**
|
||||
* The name of the database.
|
||||
*/
|
||||
database?: DbName;
|
||||
/**
|
||||
* The name of the database schema. Currently, the schema parameter isn't supported.
|
||||
*/
|
||||
schema?: DbName;
|
||||
/**
|
||||
* The parameter set for the batch operation. The SQL statement is executed as many times as the number of parameter sets provided. To execute a SQL statement with no parameters, use one of the following options: Specify one or more empty parameter sets. Use the ExecuteStatement operation instead of the BatchExecuteStatement operation. Array parameters are not supported.
|
||||
*/
|
||||
parameterSets?: SqlParameterSets;
|
||||
/**
|
||||
* The identifier of a transaction that was started by using the BeginTransaction operation. Specify the transaction ID of the transaction that you want to include the SQL statement in. If the SQL statement is not part of a transaction, don't set this parameter.
|
||||
*/
|
||||
transactionId?: Id;
|
||||
}
|
||||
export interface BatchExecuteStatementResponse {
|
||||
/**
|
||||
* The execution results of each batch entry.
|
||||
*/
|
||||
updateResults?: UpdateResults;
|
||||
}
|
||||
export interface BeginTransactionRequest {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
|
||||
*/
|
||||
resourceArn: Arn;
|
||||
/**
|
||||
* The name or ARN of the secret that enables access to the DB cluster.
|
||||
*/
|
||||
secretArn: Arn;
|
||||
/**
|
||||
* The name of the database.
|
||||
*/
|
||||
database?: DbName;
|
||||
/**
|
||||
* The name of the database schema.
|
||||
*/
|
||||
schema?: DbName;
|
||||
}
|
||||
export interface BeginTransactionResponse {
|
||||
/**
|
||||
* The transaction ID of the transaction started by the call.
|
||||
*/
|
||||
transactionId?: Id;
|
||||
}
|
||||
export type _Blob = Buffer|Uint8Array|Blob|string;
|
||||
export type Boolean = boolean;
|
||||
export type BooleanArray = BoxedBoolean[];
|
||||
export type BoxedBoolean = boolean;
|
||||
export type BoxedDouble = number;
|
||||
export type BoxedFloat = number;
|
||||
export type BoxedInteger = number;
|
||||
export type BoxedLong = number;
|
||||
export interface ColumnMetadata {
|
||||
/**
|
||||
* The name of the column.
|
||||
*/
|
||||
name?: String;
|
||||
/**
|
||||
* The type of the column.
|
||||
*/
|
||||
type?: Integer;
|
||||
/**
|
||||
* The database-specific data type of the column.
|
||||
*/
|
||||
typeName?: String;
|
||||
/**
|
||||
* The label for the column.
|
||||
*/
|
||||
label?: String;
|
||||
/**
|
||||
* The name of the schema that owns the table that includes the column.
|
||||
*/
|
||||
schemaName?: String;
|
||||
/**
|
||||
* The name of the table that includes the column.
|
||||
*/
|
||||
tableName?: String;
|
||||
/**
|
||||
* A value that indicates whether the column increments automatically.
|
||||
*/
|
||||
isAutoIncrement?: Boolean;
|
||||
/**
|
||||
* A value that indicates whether an integer column is signed.
|
||||
*/
|
||||
isSigned?: Boolean;
|
||||
/**
|
||||
* A value that indicates whether the column contains currency values.
|
||||
*/
|
||||
isCurrency?: Boolean;
|
||||
/**
|
||||
* A value that indicates whether the column is case-sensitive.
|
||||
*/
|
||||
isCaseSensitive?: Boolean;
|
||||
/**
|
||||
* A value that indicates whether the column is nullable.
|
||||
*/
|
||||
nullable?: Integer;
|
||||
/**
|
||||
* The precision value of a decimal number column.
|
||||
*/
|
||||
precision?: Integer;
|
||||
/**
|
||||
* The scale value of a decimal number column.
|
||||
*/
|
||||
scale?: Integer;
|
||||
/**
|
||||
* The type of the column.
|
||||
*/
|
||||
arrayBaseColumnType?: Integer;
|
||||
}
|
||||
export interface CommitTransactionRequest {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
|
||||
*/
|
||||
resourceArn: Arn;
|
||||
/**
|
||||
* The name or ARN of the secret that enables access to the DB cluster.
|
||||
*/
|
||||
secretArn: Arn;
|
||||
/**
|
||||
* The identifier of the transaction to end and commit.
|
||||
*/
|
||||
transactionId: Id;
|
||||
}
|
||||
export interface CommitTransactionResponse {
|
||||
/**
|
||||
* The status of the commit operation.
|
||||
*/
|
||||
transactionStatus?: TransactionStatus;
|
||||
}
|
||||
export type DbName = string;
|
||||
export type DecimalReturnType = "STRING"|"DOUBLE_OR_LONG"|string;
|
||||
export type DoubleArray = BoxedDouble[];
|
||||
export interface ExecuteSqlRequest {
|
||||
/**
|
||||
* The ARN of the Aurora Serverless DB cluster.
|
||||
*/
|
||||
dbClusterOrInstanceArn: Arn;
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the secret that enables access to the DB cluster. Enter the database user name and password for the credentials in the secret. For information about creating the secret, see Create a database secret.
|
||||
*/
|
||||
awsSecretStoreArn: Arn;
|
||||
/**
|
||||
* One or more SQL statements to run on the DB cluster. You can separate SQL statements from each other with a semicolon (;). Any valid SQL statement is permitted, including data definition, data manipulation, and commit statements.
|
||||
*/
|
||||
sqlStatements: SqlStatement;
|
||||
/**
|
||||
* The name of the database.
|
||||
*/
|
||||
database?: DbName;
|
||||
/**
|
||||
* The name of the database schema.
|
||||
*/
|
||||
schema?: DbName;
|
||||
}
|
||||
export interface ExecuteSqlResponse {
|
||||
/**
|
||||
* The results of the SQL statement or statements.
|
||||
*/
|
||||
sqlStatementResults?: SqlStatementResults;
|
||||
}
|
||||
export interface ExecuteStatementRequest {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
|
||||
*/
|
||||
resourceArn: Arn;
|
||||
/**
|
||||
* The ARN of the secret that enables access to the DB cluster. Enter the database user name and password for the credentials in the secret. For information about creating the secret, see Create a database secret.
|
||||
*/
|
||||
secretArn: Arn;
|
||||
/**
|
||||
* The SQL statement to run.
|
||||
*/
|
||||
sql: SqlStatement;
|
||||
/**
|
||||
* The name of the database.
|
||||
*/
|
||||
database?: DbName;
|
||||
/**
|
||||
* The name of the database schema. Currently, the schema parameter isn't supported.
|
||||
*/
|
||||
schema?: DbName;
|
||||
/**
|
||||
* The parameters for the SQL statement. Array parameters are not supported.
|
||||
*/
|
||||
parameters?: SqlParametersList;
|
||||
/**
|
||||
* The identifier of a transaction that was started by using the BeginTransaction operation. Specify the transaction ID of the transaction that you want to include the SQL statement in. If the SQL statement is not part of a transaction, don't set this parameter.
|
||||
*/
|
||||
transactionId?: Id;
|
||||
/**
|
||||
* A value that indicates whether to include metadata in the results.
|
||||
*/
|
||||
includeResultMetadata?: Boolean;
|
||||
/**
|
||||
* A value that indicates whether to continue running the statement after the call times out. By default, the statement stops running when the call times out. For DDL statements, we recommend continuing to run the statement after the call times out. When a DDL statement terminates before it is finished running, it can result in errors and possibly corrupted data structures.
|
||||
*/
|
||||
continueAfterTimeout?: Boolean;
|
||||
/**
|
||||
* Options that control how the result set is returned.
|
||||
*/
|
||||
resultSetOptions?: ResultSetOptions;
|
||||
/**
|
||||
* A value that indicates whether to format the result set as a single JSON string. This parameter only applies to SELECT statements and is ignored for other types of statements. Allowed values are NONE and JSON. The default value is NONE. The result is returned in the formattedRecords field. For usage information about the JSON format for result sets, see Using the Data API in the Amazon Aurora User Guide.
|
||||
*/
|
||||
formatRecordsAs?: RecordsFormatType;
|
||||
}
|
||||
export interface ExecuteStatementResponse {
|
||||
/**
|
||||
* The records returned by the SQL statement. This field is blank if the formatRecordsAs parameter is set to JSON.
|
||||
*/
|
||||
records?: SqlRecords;
|
||||
/**
|
||||
* Metadata for the columns included in the results. This field is blank if the formatRecordsAs parameter is set to JSON.
|
||||
*/
|
||||
columnMetadata?: Metadata;
|
||||
/**
|
||||
* The number of records updated by the request.
|
||||
*/
|
||||
numberOfRecordsUpdated?: RecordsUpdated;
|
||||
/**
|
||||
* Values for fields generated during a DML request. <note> <p>The <code>generatedFields</code> data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the <code>RETURNING</code> clause. For more information, see <a href="https://www.postgresql.org/docs/10/dml-returning.html">Returning Data From Modified Rows</a> in the PostgreSQL documentation.</p> </note>
|
||||
*/
|
||||
generatedFields?: FieldList;
|
||||
/**
|
||||
* A string value that represents the result set of a SELECT statement in JSON format. This value is only present when the formatRecordsAs parameter is set to JSON. The size limit for this field is currently 10 MB. If the JSON-formatted string representing the result set requires more than 10 MB, the call returns an error.
|
||||
*/
|
||||
formattedRecords?: FormattedSqlRecords;
|
||||
}
|
||||
export interface Field {
|
||||
/**
|
||||
* A NULL value.
|
||||
*/
|
||||
isNull?: BoxedBoolean;
|
||||
/**
|
||||
* A value of Boolean data type.
|
||||
*/
|
||||
booleanValue?: BoxedBoolean;
|
||||
/**
|
||||
* A value of long data type.
|
||||
*/
|
||||
longValue?: BoxedLong;
|
||||
/**
|
||||
* A value of double data type.
|
||||
*/
|
||||
doubleValue?: BoxedDouble;
|
||||
/**
|
||||
* A value of string data type.
|
||||
*/
|
||||
stringValue?: String;
|
||||
/**
|
||||
* A value of BLOB data type.
|
||||
*/
|
||||
blobValue?: _Blob;
|
||||
/**
|
||||
* An array of values.
|
||||
*/
|
||||
arrayValue?: ArrayValue;
|
||||
}
|
||||
export type FieldList = Field[];
|
||||
export type FormattedSqlRecords = string;
|
||||
export type Id = string;
|
||||
export type Integer = number;
|
||||
export type Long = number;
|
||||
export type LongArray = BoxedLong[];
|
||||
export type LongReturnType = "STRING"|"LONG"|string;
|
||||
export type Metadata = ColumnMetadata[];
|
||||
export type ParameterName = string;
|
||||
export interface Record {
|
||||
/**
|
||||
* The values returned in the record.
|
||||
*/
|
||||
values?: Row;
|
||||
}
|
||||
export type Records = Record[];
|
||||
export type RecordsFormatType = "NONE"|"JSON"|string;
|
||||
export type RecordsUpdated = number;
|
||||
export interface ResultFrame {
|
||||
/**
|
||||
* The result-set metadata in the result set.
|
||||
*/
|
||||
resultSetMetadata?: ResultSetMetadata;
|
||||
/**
|
||||
* The records in the result set.
|
||||
*/
|
||||
records?: Records;
|
||||
}
|
||||
export interface ResultSetMetadata {
|
||||
/**
|
||||
* The number of columns in the result set.
|
||||
*/
|
||||
columnCount?: Long;
|
||||
/**
|
||||
* The metadata of the columns in the result set.
|
||||
*/
|
||||
columnMetadata?: Metadata;
|
||||
}
|
||||
export interface ResultSetOptions {
|
||||
/**
|
||||
* A value that indicates how a field of DECIMAL type is represented in the response. The value of STRING, the default, specifies that it is converted to a String value. The value of DOUBLE_OR_LONG specifies that it is converted to a Long value if its scale is 0, or to a Double value otherwise. Conversion to Double or Long can result in roundoff errors due to precision loss. We recommend converting to String, especially when working with currency values.
|
||||
*/
|
||||
decimalReturnType?: DecimalReturnType;
|
||||
/**
|
||||
* A value that indicates how a field of LONG type is represented. Allowed values are LONG and STRING. The default is LONG. Specify STRING if the length or precision of numeric values might cause truncation or rounding errors.
|
||||
*/
|
||||
longReturnType?: LongReturnType;
|
||||
}
|
||||
export interface RollbackTransactionRequest {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
|
||||
*/
|
||||
resourceArn: Arn;
|
||||
/**
|
||||
* The name or ARN of the secret that enables access to the DB cluster.
|
||||
*/
|
||||
secretArn: Arn;
|
||||
/**
|
||||
* The identifier of the transaction to roll back.
|
||||
*/
|
||||
transactionId: Id;
|
||||
}
|
||||
export interface RollbackTransactionResponse {
|
||||
/**
|
||||
* The status of the rollback operation.
|
||||
*/
|
||||
transactionStatus?: TransactionStatus;
|
||||
}
|
||||
export type Row = Value[];
|
||||
export interface SqlParameter {
|
||||
/**
|
||||
* The name of the parameter.
|
||||
*/
|
||||
name?: ParameterName;
|
||||
/**
|
||||
* The value of the parameter.
|
||||
*/
|
||||
value?: Field;
|
||||
/**
|
||||
* A hint that specifies the correct object type for data type mapping. Possible values are as follows: DATE - The corresponding String parameter value is sent as an object of DATE type to the database. The accepted format is YYYY-MM-DD. DECIMAL - The corresponding String parameter value is sent as an object of DECIMAL type to the database. JSON - The corresponding String parameter value is sent as an object of JSON type to the database. TIME - The corresponding String parameter value is sent as an object of TIME type to the database. The accepted format is HH:MM:SS[.FFF]. TIMESTAMP - The corresponding String parameter value is sent as an object of TIMESTAMP type to the database. The accepted format is YYYY-MM-DD HH:MM:SS[.FFF]. UUID - The corresponding String parameter value is sent as an object of UUID type to the database.
|
||||
*/
|
||||
typeHint?: TypeHint;
|
||||
}
|
||||
export type SqlParameterSets = SqlParametersList[];
|
||||
export type SqlParametersList = SqlParameter[];
|
||||
export type SqlRecords = FieldList[];
|
||||
export type SqlStatement = string;
|
||||
export interface SqlStatementResult {
|
||||
/**
|
||||
* The result set of the SQL statement.
|
||||
*/
|
||||
resultFrame?: ResultFrame;
|
||||
/**
|
||||
* The number of records updated by a SQL statement.
|
||||
*/
|
||||
numberOfRecordsUpdated?: RecordsUpdated;
|
||||
}
|
||||
export type SqlStatementResults = SqlStatementResult[];
|
||||
export type String = string;
|
||||
export type StringArray = String[];
|
||||
export interface StructValue {
|
||||
/**
|
||||
* The attributes returned in the record.
|
||||
*/
|
||||
attributes?: ArrayValueList;
|
||||
}
|
||||
export type TransactionStatus = string;
|
||||
export type TypeHint = "JSON"|"UUID"|"TIMESTAMP"|"DATE"|"TIME"|"DECIMAL"|string;
|
||||
export interface UpdateResult {
|
||||
/**
|
||||
* Values for fields generated during the request.
|
||||
*/
|
||||
generatedFields?: FieldList;
|
||||
}
|
||||
export type UpdateResults = UpdateResult[];
|
||||
export interface Value {
|
||||
/**
|
||||
* A NULL value.
|
||||
*/
|
||||
isNull?: BoxedBoolean;
|
||||
/**
|
||||
* A value for a column of BIT data type.
|
||||
*/
|
||||
bitValue?: BoxedBoolean;
|
||||
/**
|
||||
* A value for a column of big integer data type.
|
||||
*/
|
||||
bigIntValue?: BoxedLong;
|
||||
/**
|
||||
* A value for a column of integer data type.
|
||||
*/
|
||||
intValue?: BoxedInteger;
|
||||
/**
|
||||
* A value for a column of double data type.
|
||||
*/
|
||||
doubleValue?: BoxedDouble;
|
||||
/**
|
||||
* A value for a column of real data type.
|
||||
*/
|
||||
realValue?: BoxedFloat;
|
||||
/**
|
||||
* A value for a column of string data type.
|
||||
*/
|
||||
stringValue?: String;
|
||||
/**
|
||||
* A value for a column of BLOB data type.
|
||||
*/
|
||||
blobValue?: _Blob;
|
||||
/**
|
||||
* An array of column values.
|
||||
*/
|
||||
arrayValues?: ArrayValueList;
|
||||
/**
|
||||
* A value for a column of STRUCT data type.
|
||||
*/
|
||||
structValue?: StructValue;
|
||||
}
|
||||
/**
|
||||
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
|
||||
*/
|
||||
export type apiVersion = "2018-08-01"|"latest"|string;
|
||||
export interface ClientApiVersions {
|
||||
/**
|
||||
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
|
||||
*/
|
||||
apiVersion?: apiVersion;
|
||||
}
|
||||
export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
|
||||
/**
|
||||
* Contains interfaces for use with the RDSDataService client.
|
||||
*/
|
||||
export import Types = RDSDataService;
|
||||
}
|
||||
export = RDSDataService;
|
||||
6550
types/aws-sdk2-types/clients/s3.d.ts
vendored
Normal file
6550
types/aws-sdk2-types/clients/s3.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
2324
types/aws-sdk2-types/clients/ses.d.ts
vendored
Normal file
2324
types/aws-sdk2-types/clients/ses.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
763
types/aws-sdk2-types/clients/sqs.d.ts
vendored
Normal file
763
types/aws-sdk2-types/clients/sqs.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
10082
types/aws-sdk2-types/clients/ssm.d.ts
vendored
Normal file
10082
types/aws-sdk2-types/clients/ssm.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
15
types/aws-sdk2-types/index.d.ts
vendored
Normal file
15
types/aws-sdk2-types/index.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// Type definitions for non-npm package aws-sdk2-types 0.0
|
||||
// Project: https://aws.amazon.com/blogs/developer/why-and-how-you-should-use-aws-sdk-for-javascript-v3-on-node-js-18
|
||||
// Definitions by: Amazon.com, Inc. or its affiliates <https://github.com/aws>
|
||||
// Nathan Shively-Sanders <https://github.com/sandersn>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import {GlobalConfigInstance} from './lib/config';
|
||||
|
||||
export * from './lib/core';
|
||||
export * from './clients/all';
|
||||
export var config: GlobalConfigInstance
|
||||
|
||||
export as namespace AWS;
|
||||
293
types/aws-sdk2-types/lib/config-base.d.ts
vendored
Normal file
293
types/aws-sdk2-types/lib/config-base.d.ts
vendored
Normal file
@@ -0,0 +1,293 @@
|
||||
import {Agent as httpAgent} from 'http';
|
||||
import {Agent as httpsAgent} from 'https';
|
||||
import {AWSError} from './error';
|
||||
import {Credentials, CredentialsOptions} from './credentials';
|
||||
import {CredentialProviderChain} from './credentials/credential_provider_chain';
|
||||
import {Token} from './token';
|
||||
import {TokenProviderChain} from './token/token_provider_chain';
|
||||
|
||||
export class ConfigBase extends ConfigurationOptions{
|
||||
constructor(options?: ConfigurationOptions);
|
||||
/**
|
||||
* Loads credentials from the configuration object.
|
||||
*/
|
||||
getCredentials(callback: (err: AWSError|null, credentials: Credentials|CredentialsOptions|null) => void): void;
|
||||
/**
|
||||
* Loads token from the token object.
|
||||
*/
|
||||
getToken(callback: (err: AWSError|null, token: Token|null) => void): void;
|
||||
/**
|
||||
* Loads configuration data from a JSON file into this config object.
|
||||
* Loading configuration will reset all existing configuration on the object.
|
||||
* This feature is not supported in the browser environment of the SDK.
|
||||
*
|
||||
* @param {string} path - the path relative to your process's current working directory to load configuration from.
|
||||
*/
|
||||
loadFromPath(path: string): ConfigBase;
|
||||
/**
|
||||
* Updates the current configuration object with new options.
|
||||
*
|
||||
* @param {ConfigurationOptions} options - a map of option keys and values.
|
||||
* @param {boolean} allowUnknownKeys - Whether unknown keys can be set on the configuration object.
|
||||
*/
|
||||
update(options: ConfigurationOptions & {[key: string]: any}, allowUnknownKeys: true): void;
|
||||
/**
|
||||
* Updates the current configuration object with new options.
|
||||
*
|
||||
* @param {ConfigurationOptions} options - a map of option keys and values.
|
||||
* @param {boolean} allowUnknownKeys - Defaults to false. Whether unknown keys can be set on the configuration object.
|
||||
*/
|
||||
update(options: ConfigurationOptions, allowUnknownKeys?: false): void;
|
||||
/**
|
||||
* Gets the promise dependency the SDK will use wherever Promises are returned.
|
||||
*/
|
||||
getPromisesDependency(): typeof Promise | void;
|
||||
/**
|
||||
* Sets the promise dependency the SDK will use wherever Promises are returned.
|
||||
* @param {function} dep - a reference to a Promise constructor
|
||||
*/
|
||||
setPromisesDependency(dep: any): void;
|
||||
}
|
||||
|
||||
export interface HTTPOptions {
|
||||
/**
|
||||
* the URL to proxy requests through.
|
||||
*/
|
||||
proxy?: string;
|
||||
/**
|
||||
* the Agent object to perform HTTP requests with.
|
||||
* Used for connection pooling.
|
||||
* Defaults to the global agent (http.globalAgent) for non-SSL connections.
|
||||
*/
|
||||
agent?: httpAgent | httpsAgent;
|
||||
/**
|
||||
* The maximum time in milliseconds that the connection phase of the request
|
||||
* should be allowed to take. This only limits the connection phase and has
|
||||
* no impact once the socket has established a connection.
|
||||
* Used in node.js environments only.
|
||||
*/
|
||||
connectTimeout?: number;
|
||||
/**
|
||||
* The number of milliseconds a request can take before automatically being terminated.
|
||||
* Defaults to two minutes (120000).
|
||||
*/
|
||||
timeout?: number;
|
||||
/**
|
||||
* Whether the SDK will send asynchronous HTTP requests.
|
||||
* Used in the browser environment only.
|
||||
* Set to false to send requests synchronously.
|
||||
* Defaults to true (async on).
|
||||
*/
|
||||
xhrAsync?: boolean;
|
||||
/**
|
||||
* Sets the 'withCredentials' property of an XMLHttpRequest object.
|
||||
* Used in the browser environment only.
|
||||
* Defaults to false.
|
||||
*/
|
||||
xhrWithCredentials?: boolean;
|
||||
}
|
||||
export interface Logger {
|
||||
write?: (chunk: any, encoding?: string, callback?: () => void) => void
|
||||
log?: (...messages: any[]) => void;
|
||||
warn?: (...message: any[]) => void;
|
||||
}
|
||||
export interface ParamValidation {
|
||||
/**
|
||||
* Validates that a value meets the min constraint.
|
||||
* This is enabled by default when paramValidation is set to true.
|
||||
*/
|
||||
min?: boolean
|
||||
/**
|
||||
* Validates that a value meets the max constraint.
|
||||
*/
|
||||
max?: boolean
|
||||
/**
|
||||
* Validates that a string value matches a regular expression.
|
||||
*/
|
||||
pattern?: boolean
|
||||
/**
|
||||
* Validates that a string value matches one of the allowable enum values.
|
||||
*/
|
||||
enum?: boolean
|
||||
}
|
||||
export interface RetryDelayOptions {
|
||||
/**
|
||||
* The base number of milliseconds to use in the exponential backoff for operation retries.
|
||||
* Defaults to 100 ms.
|
||||
*/
|
||||
base?: number
|
||||
/**
|
||||
* A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made.
|
||||
* The base option will be ignored if this option is supplied.
|
||||
*/
|
||||
customBackoff?: (retryCount: number, err?: Error) => number
|
||||
}
|
||||
|
||||
/**
|
||||
* Common configuration entries to construct a service client.
|
||||
*/
|
||||
export abstract class ConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Whether to compute checksums for payload bodies when the service accepts it.
|
||||
* Currently supported in S3 only.
|
||||
*/
|
||||
computeChecksums?: boolean
|
||||
/**
|
||||
* Whether types are converted when parsing response data.
|
||||
*/
|
||||
convertResponseTypes?: boolean
|
||||
/**
|
||||
* Whether to apply a clock skew correction and retry requests that fail because of an skewed client clock.
|
||||
*/
|
||||
correctClockSkew?: boolean
|
||||
/**
|
||||
* Sets a custom User-Agent string.
|
||||
* In node environments this will set the User-Agent header, but
|
||||
* browser environments this will set the X-Amz-User-Agent header.
|
||||
*/
|
||||
customUserAgent?: string
|
||||
/**
|
||||
* The AWS credentials to sign requests with.
|
||||
*/
|
||||
credentials?: Credentials|CredentialsOptions|null
|
||||
/**
|
||||
* The provider chain used to resolve credentials if no static credentials property is set.
|
||||
*/
|
||||
credentialProvider?: CredentialProviderChain
|
||||
/**
|
||||
* The Token to authenticate requests with.
|
||||
*/
|
||||
token?: Token|null
|
||||
/**
|
||||
* The provider chain used to resolve token if no static token property is set.
|
||||
*/
|
||||
tokenProvider?: TokenProviderChain
|
||||
/**
|
||||
* AWS access key ID.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
accessKeyId?: string
|
||||
/**
|
||||
* AWS secret access key.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
secretAccessKey?: string
|
||||
/**
|
||||
* AWS session token.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
sessionToken?: string
|
||||
/**
|
||||
* A set of options to pass to the low-level HTTP request.
|
||||
*/
|
||||
httpOptions?: HTTPOptions
|
||||
/**
|
||||
* An object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests.
|
||||
*/
|
||||
logger?: Logger
|
||||
/**
|
||||
* The maximum amount of redirects to follow for a service request.
|
||||
*/
|
||||
maxRedirects?: number
|
||||
/**
|
||||
* The maximum amount of retries to perform for a service request.
|
||||
*/
|
||||
maxRetries?: number
|
||||
/**
|
||||
* Returns whether input parameters should be validated against the operation description before sending the request.
|
||||
* Defaults to true.
|
||||
* Pass a map to enable any of the following specific validation features: min|max|pattern|enum
|
||||
*/
|
||||
paramValidation?: ParamValidation|boolean
|
||||
/**
|
||||
* The region to send service requests to.
|
||||
*/
|
||||
region?: string
|
||||
/**
|
||||
* Returns A set of options to configure the retry delay on retryable errors.
|
||||
*/
|
||||
retryDelayOptions?: RetryDelayOptions
|
||||
/**
|
||||
* Whether the provided endpoint addresses an individual bucket.
|
||||
* false if it addresses the root API endpoint.
|
||||
*/
|
||||
s3BucketEndpoint?: boolean
|
||||
/**
|
||||
* Whether to disable S3 body signing when using signature version v4.
|
||||
*/
|
||||
s3DisableBodySigning?: boolean
|
||||
/**
|
||||
* Whether to force path style URLs for S3 objects.
|
||||
*/
|
||||
s3ForcePathStyle?: boolean
|
||||
/**
|
||||
* When region is set to 'us-east-1', whether to send s3 request to global endpoints
|
||||
* or 'us-east-1' regional endpoints. This config is only applicable to S3 client;
|
||||
* Defaults to 'legacy'
|
||||
*/
|
||||
s3UsEast1RegionalEndpoint?: "regional"|"legacy"
|
||||
/**
|
||||
* Whether to override the request region with the region inferred
|
||||
* from requested resource's ARN. Only available for S3 buckets
|
||||
* Defaults to `true`
|
||||
*/
|
||||
s3UseArnRegion?: boolean
|
||||
/**
|
||||
* Whether the signature to sign requests with (overriding the API configuration) is cached.
|
||||
*/
|
||||
signatureCache?: boolean
|
||||
/**
|
||||
* The signature version to sign requests with (overriding the API configuration).
|
||||
* Possible values: 'v2'|'v3'|'v4'
|
||||
*/
|
||||
signatureVersion?: "v2"|"v3"|"v4"|string
|
||||
/**
|
||||
* Whether SSL is enabled for requests.
|
||||
*/
|
||||
sslEnabled?: boolean
|
||||
/**
|
||||
* An offset value in milliseconds to apply to all signing times.
|
||||
*/
|
||||
systemClockOffset?: number
|
||||
/**
|
||||
* Whether to use the Accelerate endpoint with the S3 service.
|
||||
*/
|
||||
useAccelerateEndpoint?: boolean
|
||||
/**
|
||||
* Whether to validate the CRC32 checksum of HTTP response bodies returned
|
||||
* by DynamoDB.
|
||||
*/
|
||||
dynamoDbCrc32?: boolean;
|
||||
/**
|
||||
* Whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by
|
||||
* the service.
|
||||
*/
|
||||
endpointDiscoveryEnabled?: boolean;
|
||||
/**
|
||||
* The size of the global cache storing endpoints from endpoint
|
||||
* discovery operations. Once endpoint cache is created, updating this setting
|
||||
* cannot change existing cache size.
|
||||
*/
|
||||
endpointCacheSize?: number;
|
||||
/**
|
||||
* Whether to marshal request parameters to the prefix of hostname.
|
||||
*/
|
||||
hostPrefixEnabled?: boolean;
|
||||
/**
|
||||
* Whether to send sts request to global endpoints or
|
||||
* regional endpoints.
|
||||
*/
|
||||
stsRegionalEndpoints?: "legacy"|"regional";
|
||||
/**
|
||||
* Enables FIPS compatible endpoints.
|
||||
*/
|
||||
useFipsEndpoint?: boolean;
|
||||
/**
|
||||
* Enables IPv6 dualstack endpoint.
|
||||
*/
|
||||
useDualstackEndpoint?: boolean;
|
||||
}
|
||||
49
types/aws-sdk2-types/lib/config.d.ts
vendored
Normal file
49
types/aws-sdk2-types/lib/config.d.ts
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import {ConfigurationServicePlaceholders, ConfigurationServiceApiVersions} from './config_service_placeholders';
|
||||
import {ConfigBase, ConfigurationOptions} from './config-base';
|
||||
|
||||
export class Config extends ConfigBase {
|
||||
/**
|
||||
* Creates a new configuration object.
|
||||
* This is the object that passes option data along to service requests, including credentials, security, region information, and some service specific settings.
|
||||
*/
|
||||
constructor(options?: ConfigurationOptions & ConfigurationServicePlaceholders & APIVersions);
|
||||
/**
|
||||
* Loads configuration data from a JSON file into this config object.
|
||||
* Loading configuration will reset all existing configuration on the object.
|
||||
* This feature is not supported in the browser environment of the SDK.
|
||||
*
|
||||
* @param {string} path - the path relative to your process's current working directory to load configuration from.
|
||||
*/
|
||||
loadFromPath(path: string): Config & ConfigurationServicePlaceholders & APIVersions;
|
||||
/**
|
||||
* Updates the current configuration object with new options.
|
||||
*
|
||||
* @param {ConfigurationOptions} options - a map of option keys and values.
|
||||
* @param {boolean} allowUnknownKeys - Whether unknown keys can be set on the configuration object.
|
||||
*/
|
||||
update(options: ConfigurationOptions & ConfigurationServicePlaceholders & APIVersions & {[key: string]: any}, allowUnknownKeys: true): void;
|
||||
/**
|
||||
* Updates the current configuration object with new options.
|
||||
*
|
||||
* @param {ConfigurationOptions} options - a map of option keys and values.
|
||||
* @param {boolean} allowUnknownKeys - Defaults to false. Whether unknown keys can be set on the configuration object.
|
||||
*/
|
||||
update(options: ConfigurationOptions & ConfigurationServicePlaceholders & APIVersions, allowUnknownKeys?: false): void;
|
||||
}
|
||||
|
||||
export type GlobalConfigInstance = Config & ConfigurationServicePlaceholders & APIVersions;
|
||||
|
||||
|
||||
export interface APIVersions {
|
||||
/**
|
||||
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify \'latest\' to use the latest possible version.
|
||||
*/
|
||||
apiVersion?: "latest"|string;
|
||||
/**
|
||||
* A map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.
|
||||
*/
|
||||
apiVersions?: ConfigurationServiceApiVersions;
|
||||
}
|
||||
|
||||
// for backwards compatible client generation
|
||||
export { ConfigBase } from "./config-base";
|
||||
15
types/aws-sdk2-types/lib/config_service_placeholders.d.ts
vendored
Normal file
15
types/aws-sdk2-types/lib/config_service_placeholders.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as AWS from '../clients/all';
|
||||
export abstract class ConfigurationServicePlaceholders {
|
||||
dynamodb?: AWS.DynamoDB.Types.ClientConfiguration;
|
||||
rdsdataservice?: AWS.RDSDataService.Types.ClientConfiguration;
|
||||
s3?: AWS.S3.Types.ClientConfiguration;
|
||||
ses?: AWS.SES.Types.ClientConfiguration;
|
||||
ssm?: AWS.SSM.Types.ClientConfiguration;
|
||||
}
|
||||
export interface ConfigurationServiceApiVersions {
|
||||
dynamodb?: AWS.DynamoDB.Types.apiVersion;
|
||||
rdsdataservice?: AWS.RDSDataService.Types.apiVersion;
|
||||
s3?: AWS.S3.Types.apiVersion;
|
||||
ses?: AWS.SES.Types.apiVersion;
|
||||
ssm?: AWS.SSM.Types.apiVersion;
|
||||
}
|
||||
11
types/aws-sdk2-types/lib/config_use_dualstack.d.ts
vendored
Normal file
11
types/aws-sdk2-types/lib/config_use_dualstack.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import {ConfigBase} from './config-base';
|
||||
|
||||
export interface UseDualstackConfigOptions {
|
||||
/**
|
||||
* Enables IPv6/IPv4 dualstack endpoint. When a DNS lookup is performed on an endpoint of this type, it returns an “A” record with an IPv4 address and an “AAAA” record with an IPv6 address.
|
||||
* In most cases the network stack in the client environment will automatically prefer the AAAA record and make a connection using the IPv6 address.
|
||||
* Note, however, that currently on Windows, the IPv4 address will be preferred.
|
||||
* @deprecated Use {@link ConfigBase.useDualstackEndpoint}
|
||||
*/
|
||||
useDualstack?: boolean;
|
||||
}
|
||||
28
types/aws-sdk2-types/lib/core.d.ts
vendored
Normal file
28
types/aws-sdk2-types/lib/core.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
export {Config} from './config';
|
||||
export {HTTPOptions, ConfigurationOptions} from './config-base';
|
||||
export {Credentials} from './credentials';
|
||||
export {CredentialProviderChain} from './credentials/credential_provider_chain';
|
||||
export {EC2MetadataCredentials} from './credentials/ec2_metadata_credentials';
|
||||
export {RemoteCredentials} from './credentials/remote_credentials';
|
||||
export {ECSCredentials} from './credentials/ecs_credentials';
|
||||
export {EnvironmentCredentials} from './credentials/environment_credentials';
|
||||
export {FileSystemCredentials} from './credentials/file_system_credentials';
|
||||
export {SAMLCredentials} from './credentials/saml_credentials';
|
||||
export {SharedIniFileCredentials} from './credentials/shared_ini_file_credentials';
|
||||
export {ProcessCredentials} from './credentials/process_credentials';
|
||||
export {TokenFileWebIdentityCredentials} from './credentials/token_file_web_identity_credentials';
|
||||
export {Token} from './token';
|
||||
export {StaticTokenProvider} from './token/static_token_provider';
|
||||
export {SSOTokenProvider} from './token/sso_token_provider';
|
||||
export {TokenProviderChain} from './token/token_provider_chain';
|
||||
export {Endpoint} from './endpoint';
|
||||
export {EventListeners} from './event_listeners';
|
||||
export {HttpRequest} from './http_request';
|
||||
export {HttpResponse} from './http_response';
|
||||
export {MetadataService} from './metadata_service';
|
||||
export {Request} from './request';
|
||||
export {Response} from './response';
|
||||
export {Service} from './service';
|
||||
export {AWSError} from './error';
|
||||
export {IniLoader} from './shared-ini/ini-loader';
|
||||
export {DocumentType} from './model';
|
||||
86
types/aws-sdk2-types/lib/credentials.d.ts
vendored
Normal file
86
types/aws-sdk2-types/lib/credentials.d.ts
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
import {AWSError} from './error';
|
||||
export class Credentials {
|
||||
/**
|
||||
* Creates a Credentials object with a given set of credential information as an options hash.
|
||||
*
|
||||
* @param {object} options - An option hash containing a set of credential information.
|
||||
*/
|
||||
constructor(options: CredentialsOptions);
|
||||
/**
|
||||
* Creates a Credentials object with a given set of credential information as positional arguments.
|
||||
*
|
||||
* @param {string} accessKeyId - The AWS access key ID.
|
||||
* @param {string} secretAccessKey - The AWS secret access key.
|
||||
* @param {string} sessionToken - The optional AWS session token.
|
||||
*/
|
||||
constructor(accessKeyId: string, secretAccessKey: string, sessionToken?: string);
|
||||
/**
|
||||
* Gets the existing credentials, refreshing them if they are not yet loaded or have expired.
|
||||
* Users should call this method before using refresh(), as this will not attempt to reload
|
||||
* credentials when they are already loaded into the object.
|
||||
*
|
||||
* @param {get} callback - Called when the instance metadata service responds. When called with no error, the credentials information has been loaded into the object.
|
||||
*/
|
||||
get(callback: (err?: AWSError) => void): void;
|
||||
/**
|
||||
* Gets the existing credentials, refreshing them if necessary, and returns
|
||||
* a promise that will be fulfilled immediately (if no refresh is necessary)
|
||||
* or when the refresh has completed.
|
||||
*/
|
||||
getPromise(): Promise<void>;
|
||||
/**
|
||||
* Returns whether the credentials object should call refresh()
|
||||
*/
|
||||
needsRefresh(): boolean;
|
||||
/**
|
||||
* Refreshes the credentials.
|
||||
* Users should call get() before attempting to forcibly refresh credentials.
|
||||
*
|
||||
* @param {function} callback - Called when the instance metadata service responds. When called with no error, the credentials information has been loaded into the object.
|
||||
*/
|
||||
refresh(callback: (err?: AWSError) => void): void;
|
||||
/**
|
||||
* Invokes a credential refresh and returns a promise that will be fulfilled
|
||||
* when the refresh has completed or rejected when the refresh has failed.
|
||||
* Users should call get() before attempting to forcibly refresh credentials.
|
||||
*/
|
||||
refreshPromise(): Promise<void>;
|
||||
/**
|
||||
* AWS access key ID.
|
||||
*/
|
||||
accessKeyId: string;
|
||||
/**
|
||||
* Whether the credentials have been expired and require a refresh.
|
||||
* Used in conjunction with expireTime.
|
||||
*/
|
||||
expired: boolean;
|
||||
/**
|
||||
* Time when credentials should be considered expired.
|
||||
* Used in conjunction with expired.
|
||||
*/
|
||||
expireTime: Date;
|
||||
static expiryWindow: number;
|
||||
/**
|
||||
* AWS secret access key.
|
||||
*/
|
||||
secretAccessKey: string;
|
||||
/**
|
||||
* AWS session token.
|
||||
*/
|
||||
sessionToken: string;
|
||||
}
|
||||
|
||||
export interface CredentialsOptions {
|
||||
/**
|
||||
* AWS access key ID.
|
||||
*/
|
||||
accessKeyId: string
|
||||
/**
|
||||
* AWS secret access key.
|
||||
*/
|
||||
secretAccessKey: string
|
||||
/**
|
||||
* AWS session token.
|
||||
*/
|
||||
sessionToken?: string
|
||||
}
|
||||
24
types/aws-sdk2-types/lib/credentials/credential_provider_chain.d.ts
vendored
Normal file
24
types/aws-sdk2-types/lib/credentials/credential_provider_chain.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import {Credentials} from '../credentials';
|
||||
import {AWSError} from '../error';
|
||||
export class CredentialProviderChain {
|
||||
/**
|
||||
* Creates a new CredentialProviderChain with a default set of providers specified by defaultProviders.
|
||||
*/
|
||||
constructor(providers?: provider[])
|
||||
/**
|
||||
* Resolves the provider chain by searching for the first set of credentials in providers.
|
||||
*/
|
||||
resolve(callback:(err: AWSError|null, credentials?: Credentials) => void): CredentialProviderChain;
|
||||
/**
|
||||
* Return a Promise on resolve() function
|
||||
*/
|
||||
resolvePromise(): Promise<Credentials>;
|
||||
/**
|
||||
* Returns a list of credentials objects or functions that return credentials objects. If the provider is a function, the function will be executed lazily when the provider needs to be checked for valid credentials. By default, this object will be set to the defaultProviders.
|
||||
*/
|
||||
providers: Array<Credentials|provider>;
|
||||
|
||||
static defaultProviders: provider[]
|
||||
}
|
||||
|
||||
type provider = () => Credentials;
|
||||
31
types/aws-sdk2-types/lib/credentials/ec2_metadata_credentials.d.ts
vendored
Normal file
31
types/aws-sdk2-types/lib/credentials/ec2_metadata_credentials.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import {Credentials} from '../credentials';
|
||||
import {Logger} from '../config-base';
|
||||
|
||||
export class EC2MetadataCredentials extends Credentials {
|
||||
/**
|
||||
* Creates credentials from the metadata service on an EC2 instance.
|
||||
* @param {object} options - Override the default (1s) timeout period.
|
||||
*/
|
||||
constructor(options?: EC2MetadataCredentialsOptions);
|
||||
|
||||
/**
|
||||
* The original expiration of the current credential. In case of AWS
|
||||
* outage, the EC2 metadata will extend expiration of the existing
|
||||
* credential.
|
||||
*/
|
||||
originalExpiration?: Date;
|
||||
}
|
||||
interface EC2MetadataCredentialsOptions {
|
||||
httpOptions?: {
|
||||
/**
|
||||
* Timeout in milliseconds.
|
||||
*/
|
||||
timeout?: number
|
||||
/**
|
||||
* Connection timeout in milliseconds.
|
||||
*/
|
||||
connectTimeout?: number
|
||||
}
|
||||
maxRetries?: number
|
||||
logger?: Logger
|
||||
}
|
||||
17
types/aws-sdk2-types/lib/credentials/ecs_credentials.d.ts
vendored
Normal file
17
types/aws-sdk2-types/lib/credentials/ecs_credentials.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import {RemoteCredentials} from './remote_credentials';
|
||||
export class ECSCredentials extends RemoteCredentials {
|
||||
/**
|
||||
* Represents credentials received.
|
||||
* @param {object} options - Override the default (1s) timeout period.
|
||||
*/
|
||||
constructor(options?: ECSCredentialsOptions);
|
||||
}
|
||||
interface ECSCredentialsOptions {
|
||||
httpOptions?: {
|
||||
/**
|
||||
* Timeout in milliseconds.
|
||||
*/
|
||||
timeout?: number
|
||||
}
|
||||
maxRetries?: number
|
||||
}
|
||||
8
types/aws-sdk2-types/lib/credentials/environment_credentials.d.ts
vendored
Normal file
8
types/aws-sdk2-types/lib/credentials/environment_credentials.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import {Credentials} from '../credentials';
|
||||
export class EnvironmentCredentials extends Credentials {
|
||||
/**
|
||||
* Creates a new EnvironmentCredentials class with a given variable prefix envPrefix.
|
||||
* @param {string} envPrefix - The prefix for the environment variable names excluding the separating underscore.
|
||||
*/
|
||||
constructor(envPrefix: string);
|
||||
}
|
||||
12
types/aws-sdk2-types/lib/credentials/file_system_credentials.d.ts
vendored
Normal file
12
types/aws-sdk2-types/lib/credentials/file_system_credentials.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import {Credentials} from '../credentials';
|
||||
export class FileSystemCredentials extends Credentials {
|
||||
/**
|
||||
* Creates a new FileSystemCredentials object from a filename.
|
||||
* @param {string} filename - The path on disk to the JSON file to load.
|
||||
*/
|
||||
constructor(filename: string);
|
||||
/**
|
||||
* The path to the JSON file on disk containing the credentials.
|
||||
*/
|
||||
filename: string
|
||||
}
|
||||
14
types/aws-sdk2-types/lib/credentials/process_credentials.d.ts
vendored
Normal file
14
types/aws-sdk2-types/lib/credentials/process_credentials.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import {Credentials} from '../credentials';
|
||||
import {HTTPOptions} from '../config-base';
|
||||
export class ProcessCredentials extends Credentials {
|
||||
/**
|
||||
* Creates a new ProcessCredentials object.
|
||||
*/
|
||||
constructor(options?: ProcessCredentialsOptions);
|
||||
}
|
||||
|
||||
interface ProcessCredentialsOptions {
|
||||
profile?: string
|
||||
filename?: string
|
||||
httpOptions?: HTTPOptions
|
||||
}
|
||||
17
types/aws-sdk2-types/lib/credentials/remote_credentials.d.ts
vendored
Normal file
17
types/aws-sdk2-types/lib/credentials/remote_credentials.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import {Credentials} from '../credentials';
|
||||
export class RemoteCredentials extends Credentials {
|
||||
/**
|
||||
* Represents credentials received.
|
||||
* @param {object} options - Override the default (1s) timeout period.
|
||||
*/
|
||||
constructor(options?: RemoteCredentialsOptions);
|
||||
}
|
||||
interface RemoteCredentialsOptions {
|
||||
httpOptions?: {
|
||||
/**
|
||||
* Timeout in milliseconds.
|
||||
*/
|
||||
timeout?: number
|
||||
}
|
||||
maxRetries?: number
|
||||
}
|
||||
34
types/aws-sdk2-types/lib/credentials/saml_credentials.d.ts
vendored
Normal file
34
types/aws-sdk2-types/lib/credentials/saml_credentials.d.ts
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import {Credentials} from '../credentials';
|
||||
export class SAMLCredentials extends Credentials {
|
||||
/**
|
||||
* Creates a new credentials object.
|
||||
* @param {object} params - The map of params passed to AWS.STS.assumeRoleWithSAML().
|
||||
*/
|
||||
constructor(params: SAMLCredentialsParams);
|
||||
params: SAMLCredentialsParams
|
||||
}
|
||||
interface SAMLCredentialsParams {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the role that the caller is assuming.
|
||||
*/
|
||||
RoleArn: string
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the IdP.
|
||||
*/
|
||||
PrincipalArn: string
|
||||
/**
|
||||
* The base-64 encoded SAML authentication response provided by the IdP.
|
||||
*/
|
||||
SAMLAssertion: string
|
||||
/**
|
||||
* An IAM policy in JSON format.
|
||||
* The policy plain text must be 2048 bytes or shorter.
|
||||
*/
|
||||
Policy?: string
|
||||
/**
|
||||
* The duration, in seconds, of the role session.
|
||||
* The minimum duration is 15 minutes.
|
||||
* The maximum duration is 12 hours.
|
||||
*/
|
||||
DurationSeconds?: number
|
||||
}
|
||||
17
types/aws-sdk2-types/lib/credentials/shared_ini_file_credentials.d.ts
vendored
Normal file
17
types/aws-sdk2-types/lib/credentials/shared_ini_file_credentials.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import {Credentials} from '../credentials';
|
||||
import {HTTPOptions} from '../config-base';
|
||||
export class SharedIniFileCredentials extends Credentials {
|
||||
/**
|
||||
* Creates a new SharedIniFileCredentials object.
|
||||
*/
|
||||
constructor(options?: SharedIniFileCredentialsOptions);
|
||||
}
|
||||
|
||||
interface SharedIniFileCredentialsOptions {
|
||||
profile?: string
|
||||
filename?: string
|
||||
disableAssumeRole?: boolean
|
||||
tokenCodeFn?: (mfaSerial: string, callback: (err?: Error, token?: string) => void) => void
|
||||
httpOptions?: HTTPOptions
|
||||
callback?: (err?: Error) => void
|
||||
}
|
||||
14
types/aws-sdk2-types/lib/credentials/token_file_web_identity_credentials.d.ts
vendored
Normal file
14
types/aws-sdk2-types/lib/credentials/token_file_web_identity_credentials.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import {Credentials} from '../credentials';
|
||||
import {AWSError} from '../error';
|
||||
import {ConfigurationOptions} from '../config-base';
|
||||
export class TokenFileWebIdentityCredentials extends Credentials {
|
||||
/**
|
||||
* Creates a new credentials object with optional configuraion.
|
||||
* @param {Object} clientConfig - a map of configuration options to pass to the underlying STS client.
|
||||
*/
|
||||
constructor(clientConfig?: ConfigurationOptions);
|
||||
/**
|
||||
* Refreshes credentials using AWS.STS.assumeRoleWithWebIdentity().
|
||||
*/
|
||||
refresh(callback: (err?: AWSError) => void): void;
|
||||
}
|
||||
27
types/aws-sdk2-types/lib/dynamodb/converter.d.ts
vendored
Normal file
27
types/aws-sdk2-types/lib/dynamodb/converter.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import DynamoDB = require('../../clients/dynamodb');
|
||||
|
||||
export class Converter {
|
||||
static input(
|
||||
data: any,
|
||||
options?: Converter.ConverterOptions
|
||||
): DynamoDB.AttributeValue;
|
||||
|
||||
static marshall(
|
||||
data: {[key: string]: any},
|
||||
options?: Converter.ConverterOptions
|
||||
): DynamoDB.AttributeMap;
|
||||
|
||||
static output(
|
||||
data: DynamoDB.AttributeValue,
|
||||
options?: Converter.ConverterOptions
|
||||
): any;
|
||||
|
||||
static unmarshall(
|
||||
data: DynamoDB.AttributeMap,
|
||||
options?: Converter.ConverterOptions
|
||||
): {[key: string]: any};
|
||||
}
|
||||
|
||||
export namespace Converter {
|
||||
export type ConverterOptions = DynamoDB.DocumentClient.ConverterOptions;
|
||||
}
|
||||
3477
types/aws-sdk2-types/lib/dynamodb/document_client.d.ts
vendored
Normal file
3477
types/aws-sdk2-types/lib/dynamodb/document_client.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
27
types/aws-sdk2-types/lib/endpoint.d.ts
vendored
Normal file
27
types/aws-sdk2-types/lib/endpoint.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
export class Endpoint {
|
||||
/**
|
||||
* Constructs a new endpoint given an endpoint URL.
|
||||
*/
|
||||
constructor(url: string);
|
||||
|
||||
/**
|
||||
* The host portion of the endpoint including the port, e.g., example.com:80.
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* The host portion of the endpoint, e.g., example.com.
|
||||
*/
|
||||
hostname: string;
|
||||
/**
|
||||
* The full URL of the endpoint.
|
||||
*/
|
||||
href: string;
|
||||
/**
|
||||
* The port of the endpoint.
|
||||
*/
|
||||
port: number;
|
||||
/**
|
||||
* The protocol (http or https) of the endpoint URL.
|
||||
*/
|
||||
protocol: string;
|
||||
}
|
||||
53
types/aws-sdk2-types/lib/error.d.ts
vendored
Normal file
53
types/aws-sdk2-types/lib/error.d.ts
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* A structure containing information about a service or networking error.
|
||||
*/
|
||||
export type AWSError = Error & {
|
||||
/**
|
||||
* A unique short code representing the error that was emitted.
|
||||
*/
|
||||
code: string;
|
||||
/**
|
||||
* A longer human readable error message.
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* Whether the error message is retryable.
|
||||
*/
|
||||
retryable?: boolean;
|
||||
/**
|
||||
* In the case of a request that reached the service, this value contains the response status code.
|
||||
*/
|
||||
statusCode?: number;
|
||||
/**
|
||||
* The date time object when the error occurred.
|
||||
*/
|
||||
time: Date;
|
||||
/**
|
||||
* Set when a networking error occurs to easily identify the endpoint of the request.
|
||||
*/
|
||||
hostname?: string;
|
||||
/**
|
||||
* Set when a networking error occurs to easily identify the region of the request.
|
||||
*/
|
||||
region?: string;
|
||||
/**
|
||||
* Amount of time (in seconds) that the request waited before being resent.
|
||||
*/
|
||||
retryDelay?: number;
|
||||
/**
|
||||
* The unique request ID associated with the response.
|
||||
*/
|
||||
requestId?: string;
|
||||
/**
|
||||
* Second request ID associated with the response from S3.
|
||||
*/
|
||||
extendedRequestId?: string;
|
||||
/**
|
||||
* CloudFront request ID associated with the response.
|
||||
*/
|
||||
cfId?: string;
|
||||
/**
|
||||
* The original error which caused this Error
|
||||
*/
|
||||
originalError?: Error
|
||||
}
|
||||
6
types/aws-sdk2-types/lib/event-stream/event-stream.d.ts
vendored
Normal file
6
types/aws-sdk2-types/lib/event-stream/event-stream.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export interface StreamingEventStream<Events> extends NodeJS.ReadableStream {
|
||||
on(event: "data", listener: (event: Events) => void): this;
|
||||
on(event: string, listener: Function): this;
|
||||
}
|
||||
|
||||
export type EventStream<Events> = StreamingEventStream<Events> | Events[];
|
||||
35
types/aws-sdk2-types/lib/event_listeners.d.ts
vendored
Normal file
35
types/aws-sdk2-types/lib/event_listeners.d.ts
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* The namespace used to register global event listeners for request building and sending.
|
||||
*/
|
||||
export namespace EventListeners {
|
||||
/**
|
||||
* The namespace used to register global event listeners for request building and sending.
|
||||
*/
|
||||
export namespace Core {
|
||||
/**
|
||||
* Removes an event listener from all requests.
|
||||
*/
|
||||
export function removeListener(eventName: string, eventListener: Function): void;
|
||||
/**
|
||||
* A request listener that reads data from the HTTP connection in order to build the response data. Handles the 'httpData' Request event.
|
||||
* Remove this handler if you are overriding the 'httpData' event and do not want extra data processing and buffering overhead.
|
||||
*/
|
||||
export function HTTP_DATA(): void;
|
||||
/**
|
||||
* A request listener that initiates the HTTP connection for a request being sent. Handles the 'send' Request event.
|
||||
*/
|
||||
export function SEND(): void;
|
||||
/**
|
||||
* A request listener that validates whether the request is being sent with credentials. Handles the 'validate' Request event
|
||||
*/
|
||||
export function VALIDATE_CREDENTIALS(): void;
|
||||
/**
|
||||
* A request listener that validates input parameters in a request. Handles the 'validate' Request event.
|
||||
*/
|
||||
export function VALIDATE_PARAMETERS(): void;
|
||||
/**
|
||||
* A request listener that validates whether the region is set for a request. Handles the 'validate' Request event.
|
||||
*/
|
||||
export function VALIDATE_REGION():void;
|
||||
}
|
||||
}
|
||||
40
types/aws-sdk2-types/lib/http_request.d.ts
vendored
Normal file
40
types/aws-sdk2-types/lib/http_request.d.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import {Endpoint} from './endpoint';
|
||||
/**
|
||||
* The low level HTTP request object, encapsulating all HTTP header and body data sent by a service request.
|
||||
*/
|
||||
export class HttpRequest {
|
||||
/**
|
||||
* Constructs HttpRequest object with provided endpoint and region
|
||||
*/
|
||||
constructor(endpoint: Endpoint, region: string);
|
||||
/**
|
||||
* The part of the path excluding the query string.
|
||||
*/
|
||||
pathname(): string;
|
||||
/**
|
||||
* The query string portion of the path.
|
||||
*/
|
||||
search: string;
|
||||
/**
|
||||
* The request body payload.
|
||||
*/
|
||||
body: string | Buffer;
|
||||
/**
|
||||
* The endpoint for the request.
|
||||
*/
|
||||
endpoint: Endpoint;
|
||||
/**
|
||||
* A map of header keys and their respective values.
|
||||
*/
|
||||
headers: {
|
||||
[key: string]: string;
|
||||
}
|
||||
/**
|
||||
* The HTTP method of the request.
|
||||
*/
|
||||
method: string;
|
||||
/**
|
||||
* The path portion of the URI, e.g., "/list/?start=5&num=10".
|
||||
*/
|
||||
path: string;
|
||||
}
|
||||
33
types/aws-sdk2-types/lib/http_response.d.ts
vendored
Normal file
33
types/aws-sdk2-types/lib/http_response.d.ts
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import * as stream from 'stream';
|
||||
interface XMLHttpRequest {}
|
||||
/**
|
||||
* The low level HTTP response object, encapsulating all HTTP header and body data returned from the request.
|
||||
*/
|
||||
export class HttpResponse {
|
||||
/**
|
||||
* Disables buffering on the HTTP response and returns the stream for reading.
|
||||
*/
|
||||
createUnbufferedStream(): stream.Readable|XMLHttpRequest
|
||||
/**
|
||||
* The response body payload.
|
||||
*/
|
||||
body: string|Buffer|Uint8Array;
|
||||
/**
|
||||
* A map of response header keys and their respective values.
|
||||
*/
|
||||
headers: {
|
||||
[key: string]: string;
|
||||
}
|
||||
/**
|
||||
* The HTTP status code of the response (e.g., 200, 404).
|
||||
*/
|
||||
statusCode: number;
|
||||
/**
|
||||
* The HTTP status message of the response (e.g., 'Bad Request', 'Not Found')
|
||||
*/
|
||||
statusMessage: string;
|
||||
/**
|
||||
* Whether this response is being streamed at a low-level.
|
||||
*/
|
||||
streaming: boolean;
|
||||
}
|
||||
56
types/aws-sdk2-types/lib/metadata_service.d.ts
vendored
Normal file
56
types/aws-sdk2-types/lib/metadata_service.d.ts
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
import {AWSError} from './error';
|
||||
/**
|
||||
* Represents a metadata service available on EC2 instances. Using the request() method, you can receieve metadata about any available resource on the metadata service.
|
||||
*/
|
||||
export class MetadataService {
|
||||
/**
|
||||
* Creates a new MetadataService object with a given set of options.
|
||||
*/
|
||||
constructor(options?: MetadataServiceOptions);
|
||||
/**
|
||||
* Sends a request to the instance metadata service for a given resource.
|
||||
*/
|
||||
request(path: string, callback: (err: AWSError, data: string) => void): void;
|
||||
request(
|
||||
path: string,
|
||||
options: {method?: string, headers?: {[key: string]: String} },
|
||||
callback: (err: AWSError, data: string) => void
|
||||
): void;
|
||||
/**
|
||||
* 169.254.169.254
|
||||
*/
|
||||
static host: string
|
||||
/**
|
||||
* A map of options to pass to the underlying HTTP request.
|
||||
*/
|
||||
httpOptions: {
|
||||
/**
|
||||
* a timeout value in milliseconds to wait before aborting the connection. Set to 0 for no timeout.
|
||||
*/
|
||||
timeout: number;
|
||||
}
|
||||
}
|
||||
|
||||
interface MetadataServiceOptions {
|
||||
/**
|
||||
* the hostname of the instance metadata service.
|
||||
*/
|
||||
host?: string;
|
||||
/**
|
||||
* a map of options to pass to the underlying HTTP request.
|
||||
*/
|
||||
httpOptions?: {
|
||||
/**
|
||||
* a timeout value in milliseconds to wait before aborting the connection. Set to 0 for no timeout.
|
||||
*/
|
||||
timeout?: number;
|
||||
}
|
||||
/**
|
||||
* the maximum number of retries to perform for timeout errors.
|
||||
*/
|
||||
maxRetries?: number;
|
||||
/**
|
||||
* A set of options to configure the retry delay on retryable errors. See AWS.Config for details.
|
||||
*/
|
||||
retryDelayOptions?: any
|
||||
}
|
||||
4
types/aws-sdk2-types/lib/model/index.d.ts
vendored
Normal file
4
types/aws-sdk2-types/lib/model/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export type DocumentType = Scalar | Structure | List;
|
||||
type Scalar = string | number | boolean | null;
|
||||
type Structure = { [member: string]: DocumentType };
|
||||
interface List extends Array<DocumentType> {}
|
||||
334
types/aws-sdk2-types/lib/request.d.ts
vendored
Normal file
334
types/aws-sdk2-types/lib/request.d.ts
vendored
Normal file
@@ -0,0 +1,334 @@
|
||||
import * as stream from 'stream';
|
||||
import {Service} from './service';
|
||||
import {Response} from './response';
|
||||
import {HttpRequest} from './http_request';
|
||||
import {AWSError} from './error';
|
||||
export class Request<D, E> {
|
||||
/**
|
||||
* Creates a request for an operation on a given service with a set of input parameters.
|
||||
*
|
||||
* @param {AWS.Service} service - The service to perform the operation on.
|
||||
* @param {string} operation - The operation to perform on the service.
|
||||
* @param {object} params - Parameters to send to the operation.
|
||||
*/
|
||||
constructor(service: Service, operation: string, params?: any);
|
||||
/**
|
||||
* Aborts a request, emitting the error and complete events.
|
||||
* This feature is not supported in the browser environment of the SDK.
|
||||
*/
|
||||
abort(): void;
|
||||
/**
|
||||
* Converts the request object into a readable stream that can be read from or piped into a writable stream.
|
||||
* The data read from a readable stream contains only the raw HTTP body contents.
|
||||
* This feature is not supported in the browser environment of the SDK.
|
||||
*/
|
||||
createReadStream(): stream.Readable;
|
||||
/**
|
||||
* Iterates over each page of results given a pageable request, calling the provided callback with each page of data.
|
||||
* After all pages have been retrieved, the callback is called with null data.
|
||||
*
|
||||
* @param {eachPage} callback - The callback that handles the response.
|
||||
*/
|
||||
eachPage(callback: (err: E, data: D, doneCallback?: () => void) => boolean): void;
|
||||
/**
|
||||
* Returns whether the operation can return multiple pages of response data.
|
||||
*/
|
||||
isPageable(): boolean;
|
||||
/**
|
||||
* Sends the request object.
|
||||
* If a callback is supplied, it is called when a response is returned from the service.
|
||||
*/
|
||||
send(callback?: (err: E, data: D) => void): void;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request emits the specified event.
|
||||
*
|
||||
* @param {string} event - 'Name of a request event.'
|
||||
* @param {function} listener - Callback to run when the event is triggered on the request.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: string, listener: () => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request is being validated.
|
||||
*
|
||||
* @param {string} event - validate: triggered when a request is being validated.
|
||||
* @param {function} listener - Callback to run when the request is being validated.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "validate", listener: (request: Request<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the request payload is being built.
|
||||
*
|
||||
* @param {string} event - build: triggered when the request payload is being built.
|
||||
* @param {function} listener - Callback to run when the request's payload is being built.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "build", listener: (request: Request<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request is being signed.
|
||||
*
|
||||
* @param {string} event - sign: triggered when a request is being signed.
|
||||
* @param {function} listener - Callback to run when the request is being signed.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "sign", listener: (request: Request<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request is ready to be sent.
|
||||
*
|
||||
* @param {string} event - send: triggered when a request is ready to be sent.
|
||||
* @param {function} listener - Callback to run when the request is ready to be sent.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "send", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request failed and might need to be retried or redirected.
|
||||
*
|
||||
* @param {string} event - retry: triggered when a request failed and might need to be retried or redirected.
|
||||
* @param {function} listener - Callback to run when the request failed and may be retried.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "retry", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered on all non-2xx requests so that listeners can extract error details from the response body.
|
||||
*
|
||||
* @param {string} event - extractError: triggered on all non-2xx requests so that listeners can extract error details from the response body.
|
||||
* @param {function} listener - Callback to run when the request failed.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "extractError", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered in successful requests to allow listeners to de-serialize the response body into response.data.
|
||||
*
|
||||
* @param {string} event - extractData: triggered in successful requests to allow listeners to de-serialize the response body into response.data.
|
||||
* @param {function} listener - Callback to run when the request succeeded.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "extractData", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the request completed successfully.
|
||||
*
|
||||
* @param {string} event - success: triggered when the request completed successfully.
|
||||
* @param {function} listener - Callback to run when the request completed successfully.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "success", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when an error occurs at any point during the request.
|
||||
*
|
||||
* @param {string} event - error: triggered when an error occurs at any point during the request.
|
||||
* @param {function} listener - Callback to run when the request errors at any point.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "error", listener: (err: AWSError, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered whenever a request cycle completes.
|
||||
*
|
||||
* @param {string} event - complete: triggered whenever a request cycle completes.
|
||||
* @param {function} listener - Callback to run when the request cycle completes.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "complete", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when headers are sent by the remote server.
|
||||
*
|
||||
* @param {string} event - httpHeaders: triggered when headers are sent by the remote server.
|
||||
* @param {function} listener - Callback to run when the headers are sent by the remote server.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "httpHeaders", listener: (statusCode: number, headers: {[key: string]: string}, response: Response<D, E>, statusMessage: string) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when data is sent by the remote server.
|
||||
*
|
||||
* @param {string} event - httpData: triggered when data is sent by the remote server.
|
||||
* @param {function} listener - Callback to run when data is sent by the remote server.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "httpData", listener: (chunk: Buffer|Uint8Array, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the HTTP request has uploaded more data.
|
||||
*
|
||||
* @param {string} event - httpUploadProgress: triggered when the HTTP request has uploaded more data.
|
||||
* @param {function} listener - Callback to run when the HTTP request has uploaded more data.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "httpUploadProgress", listener: (progress: Progress, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the HTTP request has downloaded more data.
|
||||
*
|
||||
* @param {string} event - httpDownloadProgress: triggered when the HTTP request has downloaded more data.
|
||||
* @param {function} listener - Callback to run when the HTTP request has downloaded more data.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "httpDownloadProgress", listener: (progress: Progress, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the HTTP request failed.
|
||||
*
|
||||
* @param {string} event - httpError: triggered when the HTTP request failed.
|
||||
* @param {function} listener - Callback to run when the HTTP request failed.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "httpError", listener: (err: Error, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the server is finished sending data.
|
||||
*
|
||||
* @param {string} event - httpDone: triggered when the server is finished sending data.
|
||||
* @param {function} listener - Callback to run when the server is finished sending data.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
on(event: "httpDone", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request emits the specified event.
|
||||
*
|
||||
* @param {string} event - 'Name of a request event.'
|
||||
* @param {function} listener - Callback to run when the event is triggered on the request.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: string, listener: () => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request is being validated.
|
||||
*
|
||||
* @param {string} event - validate: triggered when a request is being validated.
|
||||
* @param {function} listener - Callback to run when the request is being validated.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "validate", listener: (request: Request<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the request payload is being built.
|
||||
*
|
||||
* @param {string} event - build: triggered when the request payload is being built.
|
||||
* @param {function} listener - Callback to run when the request's payload is being built.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "build", listener: (request: Request<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request is being signed.
|
||||
*
|
||||
* @param {string} event - sign: triggered when a request is being signed.
|
||||
* @param {function} listener - Callback to run when the request is being signed.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "sign", listener: (request: Request<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request is ready to be sent.
|
||||
*
|
||||
* @param {string} event - send: triggered when a request is ready to be sent.
|
||||
* @param {function} listener - Callback to run when the request is ready to be sent.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "send", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when a request failed and might need to be retried or redirected.
|
||||
*
|
||||
* @param {string} event - retry: triggered when a request failed and might need to be retried or redirected.
|
||||
* @param {function} listener - Callback to run when the request failed and may be retried.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "retry", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered on all non-2xx requests so that listeners can extract error details from the response body.
|
||||
*
|
||||
* @param {string} event - extractError: triggered on all non-2xx requests so that listeners can extract error details from the response body.
|
||||
* @param {function} listener - Callback to run when the request failed.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "extractError", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered in successful requests to allow listeners to de-serialize the response body into response.data.
|
||||
*
|
||||
* @param {string} event - extractData: triggered in successful requests to allow listeners to de-serialize the response body into response.data.
|
||||
* @param {function} listener - Callback to run when the request succeeded.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "extractData", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the request completed successfully.
|
||||
*
|
||||
* @param {string} event - success: triggered when the request completed successfully.
|
||||
* @param {function} listener - Callback to run when the request completed successfully.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "success", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when an error occurs at any point during the request.
|
||||
*
|
||||
* @param {string} event - error: triggered when an error occurs at any point during the request.
|
||||
* @param {function} listener - Callback to run when the request errors at any point.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "error", listener: (err: AWSError, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered whenever a request cycle completes.
|
||||
*
|
||||
* @param {string} event - complete: triggered whenever a request cycle completes.
|
||||
* @param {function} listener - Callback to run when the request cycle completes.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "complete", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when headers are sent by the remote server.
|
||||
*
|
||||
* @param {string} event - httpHeaders: triggered when headers are sent by the remote server.
|
||||
* @param {function} listener - Callback to run when the headers are sent by the remote server.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "httpHeaders", listener: (statusCode: number, headers: {[key: string]: string}, response: Response<D, E>, statusMessage: string) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when data is sent by the remote server.
|
||||
*
|
||||
* @param {string} event - httpData: triggered when data is sent by the remote server.
|
||||
* @param {function} listener - Callback to run when data is sent by the remote server.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "httpData", listener: (chunk: Buffer|Uint8Array, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the HTTP request has uploaded more data.
|
||||
*
|
||||
* @param {string} event - httpUploadProgress: triggered when the HTTP request has uploaded more data.
|
||||
* @param {function} listener - Callback to run when the HTTP request has uploaded more data.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "httpUploadProgress", listener: (progress: Progress, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the HTTP request has downloaded more data.
|
||||
*
|
||||
* @param {string} event - httpDownloadProgress: triggered when the HTTP request has downloaded more data.
|
||||
* @param {function} listener - Callback to run when the HTTP request has downloaded more data.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "httpDownloadProgress", listener: (progress: Progress, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the HTTP request failed.
|
||||
*
|
||||
* @param {string} event - httpError: triggered when the HTTP request failed.
|
||||
* @param {function} listener - Callback to run when the HTTP request failed.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "httpError", listener: (err: Error, response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Adds a listener that is triggered when the server is finished sending data.
|
||||
*
|
||||
* @param {string} event - httpDone: triggered when the server is finished sending data.
|
||||
* @param {function} listener - Callback to run when the server is finished sending data.
|
||||
* @param {boolean} prepend - If set, prepends listener instead of appending.
|
||||
*/
|
||||
onAsync(event: "httpDone", listener: (response: Response<D, E>) => void, prepend?: boolean): Request<D, E>;
|
||||
/**
|
||||
* Returns a 'thenable' promise.
|
||||
*/
|
||||
promise(): Promise<PromiseResult<D, E>>
|
||||
/**
|
||||
* The time that the request started.
|
||||
*/
|
||||
startTime: Date;
|
||||
/**
|
||||
* The raw HTTP request object containing request headers and body information sent by the service.
|
||||
*/
|
||||
httpRequest: HttpRequest;
|
||||
|
||||
}
|
||||
|
||||
export type PromiseResult<D, E> = D & {$response: Response<D, E>};
|
||||
|
||||
export interface Progress {
|
||||
loaded: number;
|
||||
total: number;
|
||||
}
|
||||
38
types/aws-sdk2-types/lib/response.d.ts
vendored
Normal file
38
types/aws-sdk2-types/lib/response.d.ts
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import {HttpResponse} from './http_response';
|
||||
import {Request} from './request';
|
||||
export class Response<D, E> {
|
||||
/**
|
||||
* Whether more pages of data can be returned by further requests.
|
||||
*/
|
||||
hasNextPage(): boolean;
|
||||
/**
|
||||
* Creates a new request for the next page of response data, calling the callback with the page data if a callback is provided.
|
||||
*/
|
||||
nextPage(callback?: (err: E, data: D) => void): Request<D, E>|void;
|
||||
/**
|
||||
* The de-serialized response data from the service.
|
||||
* Can be null if an error occurred.
|
||||
*/
|
||||
data: D|void
|
||||
/**
|
||||
* A structure containing information about a service or networking error.
|
||||
*/
|
||||
error: E|void
|
||||
/**
|
||||
* Returns the unique request ID associated with the response.
|
||||
* Log this value when debugging requests for AWS support.
|
||||
*/
|
||||
requestId: string
|
||||
/**
|
||||
* The number of redirects that were followed before the request was completed.
|
||||
*/
|
||||
redirectCount: number
|
||||
/**
|
||||
* The number of retries that were attempted before the request was completed.
|
||||
*/
|
||||
retryCount: number
|
||||
/**
|
||||
* The raw HTTP response object containing the response headers and body information from the server.
|
||||
*/
|
||||
httpResponse: HttpResponse;
|
||||
}
|
||||
92
types/aws-sdk2-types/lib/s3/managed_upload.d.ts
vendored
Normal file
92
types/aws-sdk2-types/lib/s3/managed_upload.d.ts
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
import {AWSError} from '../error';
|
||||
import S3 = require('../../clients/s3');
|
||||
export class ManagedUpload {
|
||||
/**
|
||||
* Creates a managed upload object with a set of configuration options.
|
||||
*/
|
||||
constructor(options: ManagedUpload.ManagedUploadOptions);
|
||||
/**
|
||||
* Aborts a managed upload, including all concurrent upload requests.
|
||||
*/
|
||||
abort(): void;
|
||||
/**
|
||||
* Returns a 'thenable' promise.
|
||||
*/
|
||||
promise(): Promise<ManagedUpload.SendData>;
|
||||
/**
|
||||
* Initiates the managed upload for the payload.
|
||||
*/
|
||||
send(callback?: (err: AWSError, data: ManagedUpload.SendData) => void): void;
|
||||
/**
|
||||
* Adds a listener that is triggered when theuploader has uploaded more data.
|
||||
*
|
||||
* @param {string} event - httpUploadProgress: triggered when the uploader has uploaded more data.
|
||||
* @param {function} listener - Callback to run when the uploader has uploaded more data.
|
||||
*/
|
||||
on(event: "httpUploadProgress", listener: (progress: ManagedUpload.Progress) => void): any;
|
||||
/**
|
||||
* Default value: 10000
|
||||
*/
|
||||
static maxTotalParts: number
|
||||
/**
|
||||
* Returns the minimum number of bytes for an individual part upload.
|
||||
* Note: Minimum allowed size is 5 MB.
|
||||
* 1024 * 5
|
||||
*/
|
||||
static minPartSize: number
|
||||
}
|
||||
export namespace ManagedUpload {
|
||||
export interface Progress {
|
||||
loaded: number;
|
||||
total: number;
|
||||
}
|
||||
export interface SendData {
|
||||
/**
|
||||
* URL of the uploaded object.
|
||||
*/
|
||||
Location: string;
|
||||
/**
|
||||
* ETag of the uploaded object.
|
||||
*/
|
||||
ETag: string;
|
||||
/**
|
||||
* Bucket to which the object was uploaded.
|
||||
*/
|
||||
Bucket: string;
|
||||
/**
|
||||
* Key to which the object was uploaded.
|
||||
*/
|
||||
Key: string;
|
||||
}
|
||||
export interface ManagedUploadOptions {
|
||||
/**
|
||||
* A map of parameters to pass to the upload requests.
|
||||
* The "Body" parameter is required to be specified either on the service or in the params option.
|
||||
*/
|
||||
params?: S3.Types.PutObjectRequest;
|
||||
/**
|
||||
* The size of the concurrent queue manager to upload parts in parallel. Set to 1 for synchronous uploading of parts. Note that the uploader will buffer at most queueSize * partSize bytes into memory at any given time.
|
||||
* default: 4
|
||||
*/
|
||||
queueSize?: number;
|
||||
/**
|
||||
* Default: 5 mb
|
||||
* The size in bytes for each individual part to be uploaded. Adjust the part size to ensure the number of parts does not exceed maxTotalParts. See minPartSize for the minimum allowed part size.
|
||||
*/
|
||||
partSize?: number;
|
||||
/**
|
||||
* Default: false
|
||||
* Whether to abort the multipart upload if an error occurs. Set to true if you want to handle failures manually.
|
||||
*/
|
||||
leavePartsOnError?: boolean;
|
||||
/**
|
||||
* An optional S3 service object to use for requests.
|
||||
* This object might have bound parameters used by the uploader.
|
||||
*/
|
||||
service?: S3;
|
||||
/**
|
||||
* The tags to apply to the object.
|
||||
*/
|
||||
tags?: Array<S3.Tag>;
|
||||
}
|
||||
}
|
||||
61
types/aws-sdk2-types/lib/s3/presigned_post.d.ts
vendored
Normal file
61
types/aws-sdk2-types/lib/s3/presigned_post.d.ts
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
export class PresignedPost {
|
||||
/**
|
||||
* The URL that should be used as the action of the form.
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* The fields that must be included as hidden inputs on the form.
|
||||
*/
|
||||
fields: PresignedPost.Fields;
|
||||
}
|
||||
|
||||
export namespace PresignedPost {
|
||||
export interface Params {
|
||||
/**
|
||||
* The S3 bucket to which the form should upload an attached file.
|
||||
*/
|
||||
Bucket?: string;
|
||||
|
||||
/**
|
||||
* An array of conditions that must be met for the form upload to be
|
||||
* accepted by S3.
|
||||
*/
|
||||
Conditions?: Array<{[key: string]: any}|[string, any, any]>;
|
||||
|
||||
/**
|
||||
* The number of seconds for which the POST form's signed policy should be
|
||||
* valid. Defaults to 3600 (one hour).
|
||||
*/
|
||||
Expires?: number;
|
||||
|
||||
/**
|
||||
* A hash of form fields to include in the presigned POST form. All fields
|
||||
* (except 'key') will be included as exact match conditions in the
|
||||
* presigned policy.
|
||||
*/
|
||||
Fields?: {[key: string]: any};
|
||||
}
|
||||
|
||||
export interface Fields {
|
||||
/**
|
||||
* A base64-encoded policy detailing what constitutes an acceptable POST
|
||||
* upload. Composed of the conditions and expiration provided to
|
||||
* s3.createPresignedPost
|
||||
*/
|
||||
Policy: string;
|
||||
|
||||
/**
|
||||
* A hex-encoded HMAC of the POST policy, signed with the credentials
|
||||
* provided to the S3 client.
|
||||
*/
|
||||
'X-Amz-Signature': string;
|
||||
|
||||
/**
|
||||
* Additional keys that must be included in the form to be submitted. This
|
||||
* will include signature metadata as well as any fields provided to
|
||||
* s3.createPresignedPost
|
||||
*/
|
||||
[key: string]: string;
|
||||
}
|
||||
}
|
||||
82
types/aws-sdk2-types/lib/service.d.ts
vendored
Normal file
82
types/aws-sdk2-types/lib/service.d.ts
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
import {Request} from './request';
|
||||
import {AWSError} from './error';
|
||||
import {ConfigurationOptions, ConfigBase} from './config-base';
|
||||
import {Endpoint} from './endpoint';
|
||||
|
||||
export interface WaiterConfiguration {
|
||||
/**
|
||||
* The number of seconds to wait between requests
|
||||
*/
|
||||
delay?: number;
|
||||
|
||||
/**
|
||||
* The maximum number of requests to send while waiting
|
||||
*/
|
||||
maxAttempts?: number;
|
||||
}
|
||||
|
||||
export class Service {
|
||||
/**
|
||||
* Creates a new service object with a configuration object.
|
||||
*/
|
||||
constructor(config?: ServiceConfigurationOptions);
|
||||
|
||||
/**
|
||||
* Defines a new Service class using a service identifier and list of versions including an optional set of features (functions) to apply to the class prototype.
|
||||
*
|
||||
* @param {string} serviceIdentifier - the identifier for the service.
|
||||
* @param {string[]} versions - a list of versions that work with this service.
|
||||
* @param {Object} features - an object to attach to the prototype.
|
||||
*/
|
||||
defineService(serviceIdentifier: string, versions: string[], features?: any): typeof Service;
|
||||
/**
|
||||
* Calls an operation on a service with the given input parameters.
|
||||
*
|
||||
* @param {string} operation - the name of the operation to call on the service.
|
||||
* @param {map} params - a map of input options for the operation.
|
||||
*/
|
||||
makeRequest(operation: string, params?: {[key: string]: any}, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>;
|
||||
/**
|
||||
* Calls an operation on a service with the given input parameters, without any authentication data.
|
||||
*
|
||||
* @param {string} operation - the name of the operation to call on the service.
|
||||
* @param {map} params - a map of input options for the operation.
|
||||
*/
|
||||
makeUnauthenticatedRequest(operation: string, params?: {[key: string]: any}, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>;
|
||||
/**
|
||||
* Override this method to setup any custom request listeners for each new request to the service.
|
||||
*/
|
||||
setupRequestListeners(request: Request<any, AWSError>): void;
|
||||
/**
|
||||
* Waits for a given state.
|
||||
*/
|
||||
waitFor(state: string, params?: {[key: string]: any, $waiter?: WaiterConfiguration}, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>;
|
||||
waitFor(state: string, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>;
|
||||
|
||||
/**
|
||||
* The list of API versions supported by this service.
|
||||
*/
|
||||
apiVersions: string[];
|
||||
|
||||
config: ConfigBase & ServiceConfigurationOptions;
|
||||
|
||||
/**
|
||||
* An Endpoint object representing the endpoint URL for service requests.
|
||||
*/
|
||||
endpoint: Endpoint;
|
||||
}
|
||||
|
||||
export interface ServiceConfigurationOptions extends ConfigurationOptions {
|
||||
/**
|
||||
* The endpoint URI to send requests to. The default endpoint is built from the configured region.
|
||||
* The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.
|
||||
*/
|
||||
endpoint?: string | Endpoint;
|
||||
/**
|
||||
* An optional map of parameters to bind to every request sent by this service object.
|
||||
* For more information on bound parameters, see "Working with Services" in the Getting Started Guide.
|
||||
*/
|
||||
params?: {
|
||||
[key: string]: any;
|
||||
}
|
||||
}
|
||||
9
types/aws-sdk2-types/lib/services/dynamodb.d.ts
vendored
Normal file
9
types/aws-sdk2-types/lib/services/dynamodb.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import {Service} from '../service';
|
||||
import {DocumentClient as DDBDocumentClient} from '../dynamodb/document_client';
|
||||
export class DynamoDBCustomizations extends Service {
|
||||
/**
|
||||
* The document client simplifies working with items in Amazon DynamoDB by abstracting away the notion of attribute values.
|
||||
* This abstraction annotates native JavaScript types supplied as input parameters, as well as converts annotated response data to native JavaScript types.
|
||||
*/
|
||||
static DocumentClient: typeof DDBDocumentClient;
|
||||
}
|
||||
49
types/aws-sdk2-types/lib/services/s3.d.ts
vendored
Normal file
49
types/aws-sdk2-types/lib/services/s3.d.ts
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import {Service} from '../service';
|
||||
import {ManagedUpload} from '../s3/managed_upload';
|
||||
import S3 = require('../../clients/s3');
|
||||
|
||||
export class S3Customizations extends Service {
|
||||
/**
|
||||
* Get a pre-signed URL for a given operation name.
|
||||
*/
|
||||
getSignedUrl(operation: string, params: any, callback: (err: Error, url: string) => void): void;
|
||||
/**
|
||||
* Get a pre-signed URL for a given operation name.
|
||||
*/
|
||||
getSignedUrl(operation: string, params: any): string;
|
||||
|
||||
/**
|
||||
* Returns a 'thenable' promise that will be resolved with a pre-signed URL for a given operation name.
|
||||
*/
|
||||
getSignedUrlPromise(operation: string, params: any): Promise<string>;
|
||||
|
||||
/**
|
||||
* Get the form fields and target URL for direct POST uploading.
|
||||
*/
|
||||
createPresignedPost(
|
||||
params: S3.PresignedPost.Params,
|
||||
callback: (err: Error, data: S3.PresignedPost) => void
|
||||
): void;
|
||||
/**
|
||||
* Get the form fields and target URL for direct POST uploading.
|
||||
*/
|
||||
createPresignedPost(params: S3.PresignedPost.Params): S3.PresignedPost;
|
||||
|
||||
/**
|
||||
* Uploads an arbitrarily sized buffer, blob, or stream, using intelligent
|
||||
* concurrent handling of parts if the payload is large enough. You can
|
||||
* configure the concurrent queue size by setting `options`. Note that this
|
||||
* is the only operation for which the SDK can retry requests with stream
|
||||
* bodies.
|
||||
*/
|
||||
upload(params: S3.Types.PutObjectRequest, options?: ManagedUpload.ManagedUploadOptions, callback?: (err: Error, data: ManagedUpload.SendData) => void): ManagedUpload;
|
||||
/**
|
||||
* Uploads an arbitrarily sized buffer, blob, or stream, using intelligent
|
||||
* concurrent handling of parts if the payload is large enough. You can
|
||||
* configure the concurrent queue size by setting `options`. Note that this
|
||||
* is the only operation for which the SDK can retry requests with stream
|
||||
* bodies.
|
||||
*/
|
||||
upload(params: S3.Types.PutObjectRequest, callback?: (err: Error, data: ManagedUpload.SendData) => void): ManagedUpload;
|
||||
static ManagedUpload: typeof ManagedUpload;
|
||||
}
|
||||
30
types/aws-sdk2-types/lib/shared-ini/ini-loader.d.ts
vendored
Normal file
30
types/aws-sdk2-types/lib/shared-ini/ini-loader.d.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
export interface LoadFileOptions {
|
||||
filename?: string,
|
||||
isConfig?: boolean,
|
||||
}
|
||||
|
||||
export interface IniFileContent {
|
||||
[key: string]: {[key: string]: string}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ini file loader class the same as that used in the SDK. It loads and
|
||||
* parses config and credentials files in .ini format and cache the content
|
||||
* to assure files are only read once.
|
||||
* Note that calling operations on the instance instantiated from this class
|
||||
* won't affect the behavior of SDK since SDK uses an internal singleton of
|
||||
* this class.
|
||||
*/
|
||||
export class IniLoader{
|
||||
|
||||
/** Remove all cached files. Used after config files are updated. */
|
||||
clearCachedFiles():void;
|
||||
|
||||
/**
|
||||
* Load configurations from config/credentials files and cache them
|
||||
* for later use. If no file is specified it will try to load default
|
||||
* files.
|
||||
* @returns {object} object of all profile information in the file
|
||||
*/
|
||||
loadFrom(options: LoadFileOptions): IniFileContent;
|
||||
}
|
||||
101
types/aws-sdk2-types/lib/token.d.ts
vendored
Normal file
101
types/aws-sdk2-types/lib/token.d.ts
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
import {AWSError} from './error';
|
||||
|
||||
/**
|
||||
* Represents AWS token object, which contains {token}, and optional
|
||||
* {expireTime}.
|
||||
* Creating a `Token` object allows you to pass around your
|
||||
* token to configuration and service objects.
|
||||
*
|
||||
* Note that this class typically does not need to be constructed manually,
|
||||
* as the {AWS.Config} and {AWS.Service} classes both accept simple
|
||||
* options hashes with the two keys. The token from this object will be used
|
||||
* automatically in operations which require them.
|
||||
*
|
||||
* ## Expiring and Refreshing Token
|
||||
*
|
||||
* Occasionally token can expire in the middle of a long-running
|
||||
* application. In this case, the SDK will automatically attempt to
|
||||
* refresh the token from the storage location if the Token
|
||||
* class implements the {refresh} method.
|
||||
*
|
||||
* If you are implementing a token storage location, you
|
||||
* will want to create a subclass of the `Token` class and
|
||||
* override the {refresh} method. This method allows token to be
|
||||
* retrieved from the backing store, be it a file system, database, or
|
||||
* some network storage. The method should reset the token attributes
|
||||
* on the object.
|
||||
*/
|
||||
export class Token {
|
||||
/**
|
||||
* Creates a Token object with a given set of token information as an options hash.
|
||||
*
|
||||
* @param {object} options - An option hash containing a set of token information.
|
||||
*/
|
||||
constructor(options: TokenOptions);
|
||||
|
||||
/**
|
||||
* Gets the existing token, refreshing it if it's are not yet loaded or have expired.
|
||||
* Users should call this method before using refresh(), as this will not attempt to reload
|
||||
* tokeb when they are already loaded into the object.
|
||||
*
|
||||
* @param {get} callback - When called with no error, the token information has been loaded into the object.
|
||||
*/
|
||||
get(callback: (err?: AWSError) => void): void;
|
||||
|
||||
/**
|
||||
* Gets the existing token, refreshing ot if necessary, and returns
|
||||
* a promise that will be fulfilled immediately (if no refresh is necessary)
|
||||
* or when the refresh has completed.
|
||||
*/
|
||||
getPromise(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Returns whether the token object should call refresh()
|
||||
*/
|
||||
needsRefresh(): boolean;
|
||||
|
||||
/**
|
||||
* Refreshes the token.
|
||||
* Users should call get() before attempting to forcibly refresh token.
|
||||
*
|
||||
* @param {function} callback - When called with no error, the token information has been loaded into the object.
|
||||
*/
|
||||
refresh(callback: (err?: AWSError) => void): void;
|
||||
|
||||
/**
|
||||
* Invokes a token refresh and returns a promise that will be fulfilled
|
||||
* when the refresh has completed or rejected when the refresh has failed.
|
||||
* Users should call get() before attempting to forcibly refresh token.
|
||||
*/
|
||||
refreshPromise(): Promise<void>;
|
||||
|
||||
/**
|
||||
* The literal token string.
|
||||
*/
|
||||
token: string;
|
||||
|
||||
/**
|
||||
* Whether the token has expired and require a refresh.
|
||||
* Used in conjunction with expireTime.
|
||||
*/
|
||||
expired: boolean;
|
||||
|
||||
/**
|
||||
* Time when token should be considered expired.
|
||||
* Used in conjunction with expired.
|
||||
*/
|
||||
expireTime: Date;
|
||||
|
||||
static expiryWindow: number;
|
||||
}
|
||||
|
||||
export interface TokenOptions {
|
||||
/**
|
||||
* The literal token string.
|
||||
*/
|
||||
token: string
|
||||
/**
|
||||
* The time at which the token expires.
|
||||
*/
|
||||
expireTime?: Date
|
||||
}
|
||||
12
types/aws-sdk2-types/lib/token/sso_token_provider.d.ts
vendored
Normal file
12
types/aws-sdk2-types/lib/token/sso_token_provider.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import {Token} from '../token';
|
||||
|
||||
export class SSOTokenProvider extends Token {
|
||||
/**
|
||||
* Creates a new SSOTokenProvider object.
|
||||
*/
|
||||
constructor(options?: SSOTokenProviderOptions);
|
||||
}
|
||||
|
||||
export interface SSOTokenProviderOptions {
|
||||
profile?: string
|
||||
}
|
||||
8
types/aws-sdk2-types/lib/token/static_token_provider.d.ts
vendored
Normal file
8
types/aws-sdk2-types/lib/token/static_token_provider.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import {Token, TokenOptions} from '../token';
|
||||
|
||||
export class StaticTokenProvider extends Token {
|
||||
/**
|
||||
* Creates a new StaticTokenProvider object.
|
||||
*/
|
||||
constructor(options?: TokenOptions);
|
||||
}
|
||||
24
types/aws-sdk2-types/lib/token/token_provider_chain.d.ts
vendored
Normal file
24
types/aws-sdk2-types/lib/token/token_provider_chain.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import {Token} from '../token';
|
||||
import {AWSError} from '../error';
|
||||
export class TokenProviderChain {
|
||||
/**
|
||||
* Creates a new TokenProviderChain with a default set of providers specified by defaultProviders.
|
||||
*/
|
||||
constructor(providers?: provider[])
|
||||
/**
|
||||
* Resolves the provider chain by searching for the first set of token in providers.
|
||||
*/
|
||||
resolve(callback:(err: AWSError|null, token?: Token) => void): TokenProviderChain;
|
||||
/**
|
||||
* Return a Promise on resolve() function
|
||||
*/
|
||||
resolvePromise(): Promise<Token>;
|
||||
/**
|
||||
* Returns a list of token objects or functions that return token objects. If the provider is a function, the function will be executed lazily when the provider needs to be checked for valid token. By default, this object will be set to the defaultProviders.
|
||||
*/
|
||||
providers: Array<Token|provider>;
|
||||
|
||||
static defaultProviders: provider[]
|
||||
}
|
||||
|
||||
type provider = () => Token;
|
||||
4
types/aws-sdk2-types/package.json
Normal file
4
types/aws-sdk2-types/package.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"license": "Apache-2.0",
|
||||
"private": true
|
||||
}
|
||||
24
types/aws-sdk2-types/tsconfig.json
Executable file
24
types/aws-sdk2-types/tsconfig.json
Executable file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es5",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"aws-sdk2-types-tests.ts"
|
||||
]
|
||||
}
|
||||
30
types/aws-sdk2-types/tslint.json
Normal file
30
types/aws-sdk2-types/tslint.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"extends": "@definitelytyped/dtslint/dt.json",
|
||||
"rules": {
|
||||
"ban-types": false,
|
||||
"interface-over-type-literal": false,
|
||||
"no-empty-interface": false,
|
||||
"no-unnecessary-class": false,
|
||||
"unified-signatures": false,
|
||||
"array-type": false,
|
||||
"no-var-keyword": false,
|
||||
"void-return": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"no-duplicate-imports": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"jsdoc-format": false,
|
||||
"comment-format": false,
|
||||
"max-line-length": false,
|
||||
"whitespace": false,
|
||||
"no-irregular-whitespace": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"typedef-whitespace": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"semicolon": false,
|
||||
"trim-file": false,
|
||||
"one-line": false,
|
||||
"eofline": false
|
||||
}
|
||||
}
|
||||
2
types/data-api-client/index.d.ts
vendored
2
types/data-api-client/index.d.ts
vendored
@@ -8,7 +8,7 @@
|
||||
// This is added because aws-sdk depends on @types/node
|
||||
/// <reference types="node" />
|
||||
|
||||
import type { ClientConfiguration, Types } from 'aws-sdk/clients/rdsdataservice';
|
||||
import type { ClientConfiguration, Types } from 'aws-sdk2-types/clients/rdsdataservice';
|
||||
declare namespace Client {
|
||||
type OmittedValues = 'database' | 'resourceArn' | 'secretArn' | 'schema';
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.819.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import dynogels = require("dynogels");
|
||||
import { DynamoDB } from "aws-sdk";
|
||||
import { DynamoDB } from "aws-sdk2-types";
|
||||
import * as Joi from "joi";
|
||||
|
||||
// AWS Configs
|
||||
|
||||
2
types/dynogels/index.d.ts
vendored
2
types/dynogels/index.d.ts
vendored
@@ -8,7 +8,7 @@
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export import AWS = require("aws-sdk");
|
||||
export import AWS = require("aws-sdk2-types");
|
||||
import * as joi from "joi";
|
||||
import stream = require("stream");
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.814.0",
|
||||
"joi": "^17.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"dependencies": {
|
||||
"@middy/core": "^1.4.0",
|
||||
"@elastic/elasticsearch": "~7.4.0",
|
||||
"aws-sdk": "^2.814.0",
|
||||
"firebase-admin": "^9.3.0",
|
||||
"mysql2": "^2.2.5"
|
||||
}
|
||||
|
||||
2
types/lesgo/services/DynamoDbService.d.ts
vendored
2
types/lesgo/services/DynamoDbService.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { DocumentClient } from 'aws-sdk/clients/dynamodb';
|
||||
import { DocumentClient } from 'aws-sdk2-types/clients/dynamodb';
|
||||
|
||||
export interface DynamoDbParams {
|
||||
region: DocumentClient.RegionName;
|
||||
|
||||
2
types/lesgo/services/S3Service.d.ts
vendored
2
types/lesgo/services/S3Service.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import S3 = require('aws-sdk/clients/s3');
|
||||
import S3 = require('aws-sdk2-types/clients/s3');
|
||||
|
||||
// { ClientConfiguration, BucketName, ObjectKey, GetObjectOutput }
|
||||
|
||||
|
||||
2
types/lesgo/services/SQSService.d.ts
vendored
2
types/lesgo/services/SQSService.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import SQS = require('aws-sdk/clients/sqs');
|
||||
import SQS = require('aws-sdk2-types/clients/sqs');
|
||||
|
||||
// { ClientConfiguration, BucketName, ObjectKey, GetObjectOutput }
|
||||
|
||||
|
||||
2
types/lesgo/utils/objectStore.d.ts
vendored
2
types/lesgo/utils/objectStore.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { BucketName, ObjectKey, GetObjectOutput } from 'aws-sdk/clients/s3';
|
||||
import { BucketName, ObjectKey, GetObjectOutput } from 'aws-sdk2-types/clients/s3';
|
||||
import S3Service from '../services/S3Service';
|
||||
|
||||
export function getObject(key: ObjectKey, bucketName: BucketName): Promise<GetObjectOutput>;
|
||||
|
||||
2
types/lesgo/utils/queue.d.ts
vendored
2
types/lesgo/utils/queue.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import SQS = require('aws-sdk/clients/sqs');
|
||||
import SQS = require('aws-sdk2-types/clients/sqs');
|
||||
import SQSService from '../services/SQSService';
|
||||
|
||||
export function dispatch(payload: any, queueName: string): Promise<SQS.SendMessageResult>;
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
RegionName,
|
||||
UpdateExpression,
|
||||
Key,
|
||||
} from 'aws-sdk/clients/dynamodb';
|
||||
} from 'aws-sdk2-types/clients/dynamodb';
|
||||
|
||||
export interface DynamoDbParams {
|
||||
region: RegionName;
|
||||
|
||||
2
types/lesgo/v0.6/lib/services/S3Service.d.ts
vendored
2
types/lesgo/v0.6/lib/services/S3Service.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import S3 = require('aws-sdk/clients/s3');
|
||||
import S3 = require('aws-sdk2-types/clients/s3');
|
||||
|
||||
// { ClientConfiguration, BucketName, ObjectKey, GetObjectOutput }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import SQS = require('aws-sdk/clients/sqs');
|
||||
import SQS = require('aws-sdk2-types/clients/sqs');
|
||||
|
||||
// { ClientConfiguration, BucketName, ObjectKey, GetObjectOutput }
|
||||
|
||||
|
||||
2
types/lesgo/v0.6/lib/utils/objectStore.d.ts
vendored
2
types/lesgo/v0.6/lib/utils/objectStore.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { BucketName, ObjectKey, GetObjectOutput } from 'aws-sdk/clients/s3';
|
||||
import { BucketName, ObjectKey, GetObjectOutput } from 'aws-sdk2-types/clients/s3';
|
||||
import S3Service from '../services/S3Service';
|
||||
|
||||
export function getObject(key: ObjectKey, bucketName: BucketName): Promise<GetObjectOutput>;
|
||||
|
||||
2
types/lesgo/v0.6/lib/utils/queue.d.ts
vendored
2
types/lesgo/v0.6/lib/utils/queue.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import SQS = require('aws-sdk/clients/sqs');
|
||||
import SQS = require('aws-sdk2-types/clients/sqs');
|
||||
import SQSService from '../services/SQSService';
|
||||
|
||||
export function dispatch(payload: any, queueName: string): Promise<SQS.SendMessageResult>;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"dependencies": {
|
||||
"middy": "^0.29.0",
|
||||
"@elastic/elasticsearch": "~7.4.0",
|
||||
"aws-sdk": "^2.814.0",
|
||||
"firebase-admin": "^9.3.0",
|
||||
"mysql2": "^2.2.5"
|
||||
}
|
||||
|
||||
2
types/nodemailer-ses-transport/index.d.ts
vendored
2
types/nodemailer-ses-transport/index.d.ts
vendored
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Seth Westphal <https://github.com/westy92>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as AWS from "aws-sdk";
|
||||
import * as AWS from "aws-sdk2-types";
|
||||
import * as nodemailer from "nodemailer";
|
||||
|
||||
declare namespace sesTransport {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as AWS from "aws-sdk";
|
||||
import * as AWS from "aws-sdk2-types";
|
||||
import * as nodemailer from "nodemailer";
|
||||
import sesTransport = require('nodemailer-ses-transport');
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.814.0"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as nodemailer from 'nodemailer'
|
||||
import * as AWS from 'aws-sdk'
|
||||
import * as AWS from 'aws-sdk2-types'
|
||||
|
||||
// create reusable transporter object using SMTP transport
|
||||
var transporter: nodemailer.Transporter = nodemailer.createTransport({
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.814.0"
|
||||
}
|
||||
}
|
||||
2
types/s3-download-stream/index.d.ts
vendored
2
types/s3-download-stream/index.d.ts
vendored
@@ -6,7 +6,7 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Readable } from "stream";
|
||||
import { S3 } from "aws-sdk";
|
||||
import { S3 } from "aws-sdk2-types";
|
||||
|
||||
declare namespace s3Stream {
|
||||
interface S3StreamDownloaderOptions {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.814.0"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as S3Stream from "s3-download-stream";
|
||||
import * as AWS from "aws-sdk";
|
||||
import * as AWS from "aws-sdk2-types";
|
||||
import * as fs from "fs";
|
||||
|
||||
// Documentation for "params":
|
||||
|
||||
2
types/s3-streams/index.d.ts
vendored
2
types/s3-streams/index.d.ts
vendored
@@ -5,7 +5,7 @@
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import { S3 } from 'aws-sdk';
|
||||
import { S3 } from 'aws-sdk2-types';
|
||||
import { Readable, Writable } from 'stream';
|
||||
|
||||
export interface StreamOptions {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.814.0"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as AWS from 'aws-sdk';
|
||||
import * as AWS from 'aws-sdk2-types';
|
||||
import * as S3S from 's3-streams';
|
||||
|
||||
const s3 = new AWS.S3();
|
||||
|
||||
2
types/s3-upload-stream/index.d.ts
vendored
2
types/s3-upload-stream/index.d.ts
vendored
@@ -6,7 +6,7 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import * as stream from 'stream';
|
||||
import * as AWS from 'aws-sdk';
|
||||
import * as AWS from 'aws-sdk2-types';
|
||||
|
||||
declare namespace s3Stream {
|
||||
interface S3StreamUploader {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.814.0"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as fs from 'fs';
|
||||
import S3Stream = require('s3-upload-stream');
|
||||
import * as AWS from 'aws-sdk';
|
||||
import * as AWS from 'aws-sdk2-types';
|
||||
|
||||
const s3Stream = S3Stream(new AWS.S3());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user