Skip to content

Commit 2ac8c8f

Browse files
authored
docs(tsdoc): add release tags to smithy-client (#4513)
* docs(tsdoc): add release tags to smithy-client * fix(internal): mark object mapping internal * fix(internal): mark all exports as internal * fix(duplicates): remove duplicate release tags
1 parent 06300d4 commit 2ac8c8f

18 files changed

+145
-6
lines changed

packages/smithy-client/src/NoOpLogger.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { Logger } from "@aws-sdk/types";
22

3+
/**
4+
* @internal
5+
*/
36
export class NoOpLogger implements Logger {
47
public trace() {}
58
public debug() {}

packages/smithy-client/src/client.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { constructStack } from "@aws-sdk/middleware-stack";
22
import { Client as IClient, Command, MetadataBearer, MiddlewareStack, RequestHandler } from "@aws-sdk/types";
33

4+
/**
5+
* @internal
6+
*/
47
export interface SmithyConfiguration<HandlerOptions> {
58
requestHandler: RequestHandler<any, any, HandlerOptions>;
69
/**
@@ -11,8 +14,14 @@ export interface SmithyConfiguration<HandlerOptions> {
1114
readonly apiVersion: string;
1215
}
1316

17+
/**
18+
* @internal
19+
*/
1420
export type SmithyResolvedConfiguration<HandlerOptions> = SmithyConfiguration<HandlerOptions>;
1521

22+
/**
23+
* @internal
24+
*/
1625
export class Client<
1726
HandlerOptions,
1827
ClientInput extends object,

packages/smithy-client/src/command.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { constructStack } from "@aws-sdk/middleware-stack";
22
import { Command as ICommand, Handler, MetadataBearer, MiddlewareStack as IMiddlewareStack } from "@aws-sdk/types";
33

4+
/**
5+
* @internal
6+
*/
47
export abstract class Command<
58
Input extends ClientInput,
69
Output extends ClientOutput,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
/**
2+
* @internal
3+
*/
14
export const SENSITIVE_STRING = "***SensitiveInformation***";

packages/smithy-client/src/date-utils.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const DAYS: Array<String> = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
88
const MONTHS: Array<String> = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
99

1010
/**
11+
* @internal
12+
*
1113
* Builds a proper UTC HttpDate timestamp from a Date object
1214
* since not all environments will have this as the expected
1315
* format.
@@ -40,6 +42,8 @@ export function dateToUtcString(date: Date): string {
4042
const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
4143

4244
/**
45+
* @internal
46+
*
4347
* Parses a value into a Date. Returns undefined if the input is null or
4448
* undefined, throws an error if the input is not a string that can be parsed
4549
* as an RFC 3339 date.
@@ -78,6 +82,8 @@ const RFC3339_WITH_OFFSET = new RegExp(
7882
);
7983

8084
/**
85+
* @internal
86+
*
8187
* Parses a value into a Date. Returns undefined if the input is null or
8288
* undefined, throws an error if the input is not a string that can be parsed
8389
* as an RFC 3339 date.
@@ -128,6 +134,8 @@ const ASC_TIME = new RegExp(
128134
);
129135

130136
/**
137+
* @internal
138+
*
131139
* Parses a value into a Date. Returns undefined if the input is null or
132140
* undefined, throws an error if the input is not a string that can be parsed
133141
* as an RFC 7231 IMF-fixdate or obs-date.
@@ -189,6 +197,8 @@ export const parseRfc7231DateTime = (value: unknown): Date | undefined => {
189197
};
190198

191199
/**
200+
* @internal
201+
*
192202
* Parses a value into a Date. Returns undefined if the input is null or
193203
* undefined, throws an error if the input is not a number or a parseable string.
194204
*

packages/smithy-client/src/default-error-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { decorateServiceException } from "./exceptions";
55
/**
66
* Always throws an error with the given {@param exceptionCtor} and other arguments.
77
* This is only called from an error handling code path.
8-
* @private
8+
*
99
* @internal
1010
*/
1111
export const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }: any) => {

packages/smithy-client/src/defaults-mode.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export const loadConfigsForDefaultMode = (mode: ResolvedDefaultsMode): DefaultsM
3030
};
3131

3232
/**
33+
* @internal
34+
*
3335
* Option determining how certain default configuration options are resolved in the SDK. It can be one of the value listed below:
3436
* * `"standard"`: <p>The STANDARD mode provides the latest recommended default values that should be safe to run in most scenarios</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>
3537
* * `"in-region"`: <p>The IN_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services from within the same AWS region</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>

packages/smithy-client/src/emitWarningIfUnsupportedVersion.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
let warningEmitted = false;
33

44
/**
5+
* @internal
6+
*
57
* Emits warning if the provided Node.js version string is pending deprecation.
68
*
79
* @param {string} version - The Node.js version string.

packages/smithy-client/src/exceptions.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ export type ExceptionOptionType<ExceptionType extends Error, BaseExceptionType e
1111
Exclude<keyof BaseExceptionType, "$metadata" | "message">
1212
>;
1313

14+
/**
15+
* @internal
16+
*/
1417
export interface ServiceExceptionOptions extends SmithyException, MetadataBearer {
1518
message?: string;
1619
}
1720

1821
/**
22+
* @internal
23+
*
1924
* Base exception class for the exceptions from the server-side.
2025
*/
2126
export class ServiceException extends Error implements SmithyException, MetadataBearer {

packages/smithy-client/src/extended-encode-uri-component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/**
2+
* @internal
3+
*
24
* Function that wraps encodeURIComponent to encode additional characters
35
* to fully adhere to RFC 3986.
46
*/

packages/smithy-client/src/get-array-if-single-item.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/**
2+
* @internal
3+
*
24
* The XML parser will set one K:V for a member that could
35
* return multiple entries but only has one.
46
*/

packages/smithy-client/src/get-value-from-text-node.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/**
2+
* @internal
3+
*
24
* Recursively parses object and populates value is node from
35
* "#text" key if it's available
46
*/

packages/smithy-client/src/lazy-json.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ interface StringWrapper {
1111
* TS 'extends' shim doesn't support extending native types like String.
1212
* So here we create StringWrapper that duplicate everything from String
1313
* class including its prototype chain. So we can extend from here.
14+
*
15+
* @internal
1416
*/
1517
// @ts-ignore StringWrapper implementation is not a simple constructor
1618
export const StringWrapper: StringWrapper = function () {
@@ -32,6 +34,9 @@ StringWrapper.prototype = Object.create(String.prototype, {
3234
});
3335
Object.setPrototypeOf(StringWrapper, String);
3436

37+
/**
38+
* @internal
39+
*/
3540
export class LazyJsonString extends StringWrapper {
3641
deserializeJSON(): any {
3742
return JSON.parse(super.toString());

packages/smithy-client/src/object-mapping.ts

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/**
2+
* @internal
3+
*
24
* A set of instructions for multiple keys.
35
* The aim is to provide a concise yet readable way to map and filter values
46
* onto a target object.
@@ -45,6 +47,8 @@
4547
export type ObjectMappingInstructions = Record<string, ObjectMappingInstruction>;
4648

4749
/**
50+
* @internal
51+
*
4852
* An instruction set for assigning a value to a target object.
4953
*/
5054
export type ObjectMappingInstruction =
@@ -55,15 +59,31 @@ export type ObjectMappingInstruction =
5559
| UnfilteredValue;
5660

5761
/**
62+
* @internal
63+
*
5864
* non-array
5965
*/
6066
export type UnfilteredValue = any;
67+
/**
68+
* @internal
69+
*/
6170
export type LazyValueInstruction = [FilterStatus, ValueSupplier];
71+
/**
72+
* @internal
73+
*/
6274
export type ConditionalLazyValueInstruction = [FilterStatusSupplier, ValueSupplier];
75+
/**
76+
* @internal
77+
*/
6378
export type SimpleValueInstruction = [FilterStatus, Value];
79+
/**
80+
* @internal
81+
*/
6482
export type ConditionalValueInstruction = [ValueFilteringFunction, Value];
6583

6684
/**
85+
* @internal
86+
*
6787
* Filter is considered passed if
6888
* 1. It is a boolean true.
6989
* 2. It is not undefined and is itself truthy.
@@ -72,26 +92,35 @@ export type ConditionalValueInstruction = [ValueFilteringFunction, Value];
7292
export type FilterStatus = boolean | unknown | void;
7393

7494
/**
95+
* @internal
96+
*
7597
* Supplies the filter check but not against any value as input.
7698
*/
7799
export type FilterStatusSupplier = () => boolean;
78100

79101
/**
102+
* @internal
103+
*
80104
* Filter check with the given value.
81105
*/
82106
export type ValueFilteringFunction = (value: any) => boolean;
83107

84108
/**
109+
* @internal
110+
*
85111
* Supplies the value for lazy evaluation.
86112
*/
87113
export type ValueSupplier = () => any;
88114

89115
/**
116+
* @internal
117+
*
90118
* A non-function value.
91119
*/
92120
export type Value = any;
93121

94122
/**
123+
* @internal
95124
* Internal/Private, for codegen use only.
96125
*
97126
* Transfer a set of keys from [instructions] to [target].
@@ -101,16 +130,23 @@ export type Value = any;
101130
* The target assigned value will be supplied by the instructions as an evaluable function or non-function value.
102131
*
103132
* @see ObjectMappingInstructions for an example.
104-
* @private
105-
* @internal
106133
*/
107134
export function map(
108135
target: any,
109136
filter: (value: any) => boolean,
110137
instructions: Record<string, ValueSupplier | Value>
111138
): typeof target;
139+
/**
140+
* @internal
141+
*/
112142
export function map(instructions: Record<string, ObjectMappingInstruction>): any;
143+
/**
144+
* @internal
145+
*/
113146
export function map(target: any, instructions: Record<string, ObjectMappingInstruction>): typeof target;
147+
/**
148+
* @internal
149+
*/
114150
export function map(arg0: any, arg1?: any, arg2?: any): any {
115151
let target: any;
116152
let filter: (value?: any) => boolean;
@@ -167,7 +203,6 @@ export function map(arg0: any, arg1?: any, arg2?: any): any {
167203
* Convert a regular object { k: v } to { k: [, v] } mapping instruction set with default
168204
* filter.
169205
*
170-
* @private
171206
* @internal
172207
*/
173208
export const convertMap = (target: any): Record<string, any> => {
@@ -185,7 +220,6 @@ export const convertMap = (target: any): Record<string, any> => {
185220
* @param filter - uniform filter function to apply to all values
186221
* @param instructions - map of keys and values/suppliers (will be evaluated)
187222
*
188-
* @private
189223
* @internal
190224
*/
191225
const mapWithFilter = (

0 commit comments

Comments
 (0)