Skip to content

Commit

Permalink
docs(types): improve streaming payload types
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Jul 24, 2023
1 parent b2c3880 commit bda01ce
Show file tree
Hide file tree
Showing 87 changed files with 322 additions and 358 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// smithy-typescript generated code
import { BlobTypes } from "@aws-sdk/types";
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
BlobPayloadInputTypes,
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
Expand All @@ -26,7 +26,7 @@ export { __MetadataBearer, $Command };
* @public
*/
export type ImportApiKeysCommandInputType = Omit<ImportApiKeysRequest, "body"> & {
body: BlobTypes;
body: BlobPayloadInputTypes;
};

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// smithy-typescript generated code
import { BlobTypes } from "@aws-sdk/types";
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
BlobPayloadInputTypes,
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
Expand All @@ -26,7 +26,7 @@ export { __MetadataBearer, $Command };
* @public
*/
export type ImportDocumentationPartsCommandInputType = Omit<ImportDocumentationPartsRequest, "body"> & {
body: BlobTypes;
body: BlobPayloadInputTypes;
};

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// smithy-typescript generated code
import { BlobTypes } from "@aws-sdk/types";
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
BlobPayloadInputTypes,
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
Expand All @@ -26,7 +26,7 @@ export { __MetadataBearer, $Command };
* @public
*/
export type ImportRestApiCommandInputType = Omit<ImportRestApiRequest, "body"> & {
body: BlobTypes;
body: BlobPayloadInputTypes;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions clients/client-api-gateway/src/commands/PutRestApiCommand.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// smithy-typescript generated code
import { BlobTypes } from "@aws-sdk/types";
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
BlobPayloadInputTypes,
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
Expand All @@ -26,7 +26,7 @@ export { __MetadataBearer, $Command };
* @public
*/
export type PutRestApiCommandInputType = Omit<PutRestApiRequest, "body"> & {
body: BlobTypes;
body: BlobPayloadInputTypes;
};

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// smithy-typescript generated code
import { BlobTypes } from "@aws-sdk/types";
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
BlobPayloadInputTypes,
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
Expand All @@ -30,7 +30,7 @@ export { __MetadataBearer, $Command };
* @public
*/
export type PostToConnectionCommandInputType = Omit<PostToConnectionRequest, "Data"> & {
Data: BlobTypes;
Data: BlobPayloadInputTypes;
};

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// smithy-typescript generated code
import { BlobTypes } from "@aws-sdk/types";
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
BlobPayloadInputTypes,
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
Expand Down Expand Up @@ -38,7 +38,7 @@ export type CreateHostedConfigurationVersionCommandInputType = Omit<
CreateHostedConfigurationVersionRequest,
"Content"
> & {
Content: BlobTypes;
Content: BlobPayloadInputTypes;
};

/**
Expand Down
7 changes: 4 additions & 3 deletions clients/client-backupstorage/src/commands/GetChunkCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import {
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SdkStream as __SdkStream,
SdkStreamSerdeContext as __SdkStreamSerdeContext,
SerdeContext as __SerdeContext,
WithSdkStreamMixin as __WithSdkStreamMixin,
StreamingBlobPayloadOutputTypes,
} from "@smithy/types";

import { BackupStorageClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BackupStorageClient";
Expand All @@ -35,7 +34,9 @@ export interface GetChunkCommandInput extends GetChunkInput {}
*
* The output of {@link GetChunkCommand}.
*/
export interface GetChunkCommandOutput extends __WithSdkStreamMixin<GetChunkOutput, "Data">, __MetadataBearer {}
export interface GetChunkCommandOutput extends Omit<GetChunkOutput, "Data">, __MetadataBearer {
Data: StreamingBlobPayloadOutputTypes;
}

/**
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import {
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SdkStream as __SdkStream,
SdkStreamSerdeContext as __SdkStreamSerdeContext,
SerdeContext as __SerdeContext,
WithSdkStreamMixin as __WithSdkStreamMixin,
StreamingBlobPayloadOutputTypes,
} from "@smithy/types";

import { BackupStorageClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BackupStorageClient";
Expand All @@ -40,8 +39,10 @@ export interface GetObjectMetadataCommandInput extends GetObjectMetadataInput {}
* The output of {@link GetObjectMetadataCommand}.
*/
export interface GetObjectMetadataCommandOutput
extends __WithSdkStreamMixin<GetObjectMetadataOutput, "MetadataBlob">,
__MetadataBearer {}
extends Omit<GetObjectMetadataOutput, "MetadataBlob">,
__MetadataBearer {
MetadataBlob?: StreamingBlobPayloadOutputTypes;
}

/**
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
StreamingBlobPayloadInputTypes,
} from "@smithy/types";

import { BackupStorageClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BackupStorageClient";
Expand All @@ -25,18 +26,15 @@ import { de_NotifyObjectCompleteCommand, se_NotifyObjectCompleteCommand } from "
* @public
*/
export { __MetadataBearer, $Command };
export type NotifyObjectCompleteCommandInputType = Omit<NotifyObjectCompleteInput, "MetadataBlob"> & {
/**
* For *`NotifyObjectCompleteInput["MetadataBlob"]`*, see {@link NotifyObjectCompleteInput.MetadataBlob}.
*/
MetadataBlob?: NotifyObjectCompleteInput["MetadataBlob"] | string | Uint8Array | Buffer;
};
/**
* @public
*
* The input for {@link NotifyObjectCompleteCommand}.
*/
export interface NotifyObjectCompleteCommandInput extends NotifyObjectCompleteCommandInputType {}
export interface NotifyObjectCompleteCommandInput extends Omit<NotifyObjectCompleteInput, "MetadataBlob"> {
MetadataBlob?: StreamingBlobPayloadInputTypes;
}

/**
* @public
*
Expand Down
12 changes: 5 additions & 7 deletions clients/client-backupstorage/src/commands/PutChunkCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
StreamingBlobPayloadInputTypes,
} from "@smithy/types";

import { BackupStorageClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BackupStorageClient";
Expand All @@ -21,18 +22,15 @@ import { de_PutChunkCommand, se_PutChunkCommand } from "../protocols/Aws_restJso
* @public
*/
export { __MetadataBearer, $Command };
export type PutChunkCommandInputType = Omit<PutChunkInput, "Data"> & {
/**
* For *`PutChunkInput["Data"]`*, see {@link PutChunkInput.Data}.
*/
Data: PutChunkInput["Data"] | string | Uint8Array | Buffer;
};
/**
* @public
*
* The input for {@link PutChunkCommand}.
*/
export interface PutChunkCommandInput extends PutChunkCommandInputType {}
export interface PutChunkCommandInput extends Omit<PutChunkInput, "Data"> {
Data: StreamingBlobPayloadInputTypes;
}

/**
* @public
*
Expand Down
12 changes: 5 additions & 7 deletions clients/client-backupstorage/src/commands/PutObjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
StreamingBlobPayloadInputTypes,
} from "@smithy/types";

import { BackupStorageClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BackupStorageClient";
Expand All @@ -21,18 +22,15 @@ import { de_PutObjectCommand, se_PutObjectCommand } from "../protocols/Aws_restJ
* @public
*/
export { __MetadataBearer, $Command };
export type PutObjectCommandInputType = Omit<PutObjectInput, "InlineChunk"> & {
/**
* For *`PutObjectInput["InlineChunk"]`*, see {@link PutObjectInput.InlineChunk}.
*/
InlineChunk?: PutObjectInput["InlineChunk"] | string | Uint8Array | Buffer;
};
/**
* @public
*
* The input for {@link PutObjectCommand}.
*/
export interface PutObjectCommandInput extends PutObjectCommandInputType {}
export interface PutObjectCommandInput extends Omit<PutObjectInput, "InlineChunk"> {
InlineChunk?: StreamingBlobPayloadInputTypes;
}

/**
* @public
*
Expand Down
12 changes: 6 additions & 6 deletions clients/client-backupstorage/src/models/models_0.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// smithy-typescript generated code
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { Readable } from "stream";
import { StreamingBlobTypes } from "@smithy/types";

import { BackupStorageServiceException as __BaseException } from "./BackupStorageServiceException";

Expand Down Expand Up @@ -288,7 +288,7 @@ export interface GetChunkOutput {
/**
* Chunk data
*/
Data: Readable | ReadableStream | Blob | undefined;
Data: StreamingBlobTypes | undefined;

/**
* Data length
Expand Down Expand Up @@ -355,7 +355,7 @@ export interface GetObjectMetadataOutput {
/**
* Metadata blob.
*/
MetadataBlob?: Readable | ReadableStream | Blob;
MetadataBlob?: StreamingBlobTypes;

/**
* The size of MetadataBlob.
Expand Down Expand Up @@ -500,7 +500,7 @@ export interface NotifyObjectCompleteInput {
/**
* Optional metadata associated with an Object. Maximum length is 4MB.
*/
MetadataBlob?: Readable | ReadableStream | Blob;
MetadataBlob?: StreamingBlobTypes;

/**
* The size of MetadataBlob.
Expand Down Expand Up @@ -577,7 +577,7 @@ export interface PutChunkInput {
/**
* Data to be uploaded
*/
Data: Readable | ReadableStream | Blob | undefined;
Data: StreamingBlobTypes | undefined;

/**
* Data length
Expand Down Expand Up @@ -632,7 +632,7 @@ export interface PutObjectInput {
/**
* Inline chunk data to be uploaded.
*/
InlineChunk?: Readable | ReadableStream | Blob;
InlineChunk?: StreamingBlobTypes;

/**
* Length of the inline chunk data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
StreamingBlobPayloadInputTypes,
} from "@smithy/types";

import {
Expand All @@ -29,18 +30,15 @@ import { de_UploadDocumentsCommand, se_UploadDocumentsCommand } from "../protoco
* @public
*/
export { __MetadataBearer, $Command };
export type UploadDocumentsCommandInputType = Omit<UploadDocumentsRequest, "documents"> & {
/**
* For *`UploadDocumentsRequest["documents"]`*, see {@link UploadDocumentsRequest.documents}.
*/
documents: UploadDocumentsRequest["documents"] | string | Uint8Array | Buffer;
};
/**
* @public
*
* The input for {@link UploadDocumentsCommand}.
*/
export interface UploadDocumentsCommandInput extends UploadDocumentsCommandInputType {}
export interface UploadDocumentsCommandInput extends Omit<UploadDocumentsRequest, "documents"> {
documents: StreamingBlobPayloadInputTypes;
}

/**
* @public
*
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloudsearch-domain/src/models/models_0.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// smithy-typescript generated code
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { Readable } from "stream";
import { StreamingBlobTypes } from "@smithy/types";

import { CloudSearchDomainServiceException as __BaseException } from "./CloudSearchDomainServiceException";

Expand Down Expand Up @@ -620,7 +620,7 @@ export interface UploadDocumentsRequest {
/**
* <p>A batch of documents formatted in JSON or HTML.</p>
*/
documents: Readable | ReadableStream | Blob | undefined;
documents: StreamingBlobTypes | undefined;

/**
* <p>The format of the batch you are uploading. Amazon CloudSearch supports two document batch formats:</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import {
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SdkStream as __SdkStream,
SdkStreamSerdeContext as __SdkStreamSerdeContext,
SerdeContext as __SerdeContext,
WithSdkStreamMixin as __WithSdkStreamMixin,
StreamingBlobPayloadOutputTypes,
} from "@smithy/types";

import { CodeartifactClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeartifactClient";
Expand All @@ -40,8 +39,10 @@ export interface GetPackageVersionAssetCommandInput extends GetPackageVersionAss
* The output of {@link GetPackageVersionAssetCommand}.
*/
export interface GetPackageVersionAssetCommandOutput
extends __WithSdkStreamMixin<GetPackageVersionAssetResult, "asset">,
__MetadataBearer {}
extends Omit<GetPackageVersionAssetResult, "asset">,
__MetadataBearer {
asset?: StreamingBlobPayloadOutputTypes;
}

/**
* @public
Expand Down
Loading

0 comments on commit bda01ce

Please sign in to comment.