@smithy/core 3.23.12 → 3.23.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist-cjs/getSmithyContext.js +6 -0
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +21 -0
- package/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +21 -0
- package/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +46 -0
- package/dist-cjs/middleware-http-auth-scheme/index.js +6 -0
- package/dist-cjs/middleware-http-auth-scheme/resolveAuthOptions.js +24 -0
- package/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +19 -0
- package/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +27 -0
- package/dist-cjs/middleware-http-signing/index.js +5 -0
- package/dist-cjs/normalizeProvider.js +10 -0
- package/dist-cjs/pagination/createPaginator.js +44 -0
- package/dist-cjs/request-builder/requestBuilder.js +5 -0
- package/dist-cjs/setFeature.js +14 -0
- package/dist-cjs/submodules/protocols/index.js +8 -17
- package/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +17 -0
- package/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +38 -0
- package/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +15 -0
- package/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +6 -0
- package/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +9 -0
- package/dist-cjs/util-identity-and-auth/index.js +6 -0
- package/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +61 -0
- package/dist-es/submodules/protocols/HttpBindingProtocol.js +1 -8
- package/dist-es/submodules/protocols/RpcProtocol.js +7 -9
- package/dist-types/submodules/protocols/RpcProtocol.d.ts +1 -1
- package/package.json +15 -16
- package/dist-types/ts3.4/getSmithyContext.d.ts +0 -5
- package/dist-types/ts3.4/index.d.ts +0 -8
- package/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts +0 -18
- package/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts +0 -18
- package/dist-types/ts3.4/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts +0 -33
- package/dist-types/ts3.4/middleware-http-auth-scheme/index.d.ts +0 -3
- package/dist-types/ts3.4/middleware-http-auth-scheme/resolveAuthOptions.d.ts +0 -10
- package/dist-types/ts3.4/middleware-http-signing/getHttpSigningMiddleware.d.ts +0 -9
- package/dist-types/ts3.4/middleware-http-signing/httpSigningMiddleware.d.ts +0 -5
- package/dist-types/ts3.4/middleware-http-signing/index.d.ts +0 -2
- package/dist-types/ts3.4/normalizeProvider.d.ts +0 -7
- package/dist-types/ts3.4/pagination/createPaginator.d.ts +0 -7
- package/dist-types/ts3.4/request-builder/requestBuilder.d.ts +0 -5
- package/dist-types/ts3.4/setFeature.d.ts +0 -12
- package/dist-types/ts3.4/submodules/cbor/CborCodec.d.ts +0 -33
- package/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +0 -28
- package/dist-types/ts3.4/submodules/cbor/byte-printer.d.ts +0 -6
- package/dist-types/ts3.4/submodules/cbor/cbor-decode.d.ts +0 -17
- package/dist-types/ts3.4/submodules/cbor/cbor-encode.d.ts +0 -9
- package/dist-types/ts3.4/submodules/cbor/cbor-types.d.ts +0 -65
- package/dist-types/ts3.4/submodules/cbor/cbor.d.ts +0 -26
- package/dist-types/ts3.4/submodules/cbor/index.d.ts +0 -5
- package/dist-types/ts3.4/submodules/cbor/parseCborBody.d.ts +0 -31
- package/dist-types/ts3.4/submodules/endpoints/index.d.ts +0 -1
- package/dist-types/ts3.4/submodules/endpoints/toEndpointV1.d.ts +0 -6
- package/dist-types/ts3.4/submodules/event-streams/EventStreamSerde.d.ts +0 -60
- package/dist-types/ts3.4/submodules/event-streams/index.d.ts +0 -1
- package/dist-types/ts3.4/submodules/protocols/HttpBindingProtocol.d.ts +0 -31
- package/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +0 -89
- package/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +0 -16
- package/dist-types/ts3.4/submodules/protocols/SerdeContext.d.ts +0 -16
- package/dist-types/ts3.4/submodules/protocols/collect-stream-body.d.ts +0 -10
- package/dist-types/ts3.4/submodules/protocols/extended-encode-uri-component.d.ts +0 -7
- package/dist-types/ts3.4/submodules/protocols/index.d.ts +0 -13
- package/dist-types/ts3.4/submodules/protocols/requestBuilder.d.ts +0 -51
- package/dist-types/ts3.4/submodules/protocols/resolve-path.d.ts +0 -4
- package/dist-types/ts3.4/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +0 -13
- package/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +0 -21
- package/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +0 -23
- package/dist-types/ts3.4/submodules/protocols/serde/ToStringShapeSerializer.d.ts +0 -14
- package/dist-types/ts3.4/submodules/protocols/serde/determineTimestampFormat.d.ts +0 -9
- package/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +0 -71
- package/dist-types/ts3.4/submodules/schema/deref.d.ts +0 -6
- package/dist-types/ts3.4/submodules/schema/index.d.ts +0 -14
- package/dist-types/ts3.4/submodules/schema/middleware/getSchemaSerdePlugin.d.ts +0 -14
- package/dist-types/ts3.4/submodules/schema/middleware/schema-middleware-types.d.ts +0 -11
- package/dist-types/ts3.4/submodules/schema/middleware/schemaDeserializationMiddleware.d.ts +0 -9
- package/dist-types/ts3.4/submodules/schema/middleware/schemaSerializationMiddleware.d.ts +0 -6
- package/dist-types/ts3.4/submodules/schema/schemas/ErrorSchema.d.ts +0 -37
- package/dist-types/ts3.4/submodules/schema/schemas/ListSchema.d.ts +0 -23
- package/dist-types/ts3.4/submodules/schema/schemas/MapSchema.d.ts +0 -24
- package/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +0 -146
- package/dist-types/ts3.4/submodules/schema/schemas/OperationSchema.d.ts +0 -23
- package/dist-types/ts3.4/submodules/schema/schemas/Schema.d.ts +0 -16
- package/dist-types/ts3.4/submodules/schema/schemas/SimpleSchema.d.ts +0 -28
- package/dist-types/ts3.4/submodules/schema/schemas/StructureSchema.d.ts +0 -23
- package/dist-types/ts3.4/submodules/schema/schemas/operation.d.ts +0 -7
- package/dist-types/ts3.4/submodules/schema/schemas/sentinels.d.ts +0 -23
- package/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +0 -13
- package/dist-types/ts3.4/submodules/serde/copyDocumentWithTransform.d.ts +0 -6
- package/dist-types/ts3.4/submodules/serde/date-utils.d.ts +0 -73
- package/dist-types/ts3.4/submodules/serde/generateIdempotencyToken.d.ts +0 -2
- package/dist-types/ts3.4/submodules/serde/index.d.ts +0 -10
- package/dist-types/ts3.4/submodules/serde/lazy-json.d.ts +0 -45
- package/dist-types/ts3.4/submodules/serde/parse-utils.d.ts +0 -270
- package/dist-types/ts3.4/submodules/serde/quote-header.d.ts +0 -6
- package/dist-types/ts3.4/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +0 -47
- package/dist-types/ts3.4/submodules/serde/split-every.d.ts +0 -11
- package/dist-types/ts3.4/submodules/serde/split-header.d.ts +0 -5
- package/dist-types/ts3.4/submodules/serde/value/NumericValue.d.ts +0 -33
- package/dist-types/ts3.4/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts +0 -15
- package/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts +0 -8
- package/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts +0 -8
- package/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/index.d.ts +0 -3
- package/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts +0 -8
- package/dist-types/ts3.4/util-identity-and-auth/index.d.ts +0 -3
- package/dist-types/ts3.4/util-identity-and-auth/memoizeIdentityProvider.d.ts +0 -30
|
@@ -11,6 +11,6 @@ export declare abstract class RpcProtocol extends HttpProtocol {
|
|
|
11
11
|
* @override
|
|
12
12
|
*/
|
|
13
13
|
protected compositeErrorRegistry: TypeRegistry;
|
|
14
|
-
serializeRequest<Input extends object>(operationSchema: OperationSchema,
|
|
14
|
+
serializeRequest<Input extends object>(operationSchema: OperationSchema, _input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
15
15
|
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.23.
|
|
3
|
+
"version": "3.23.14",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"build": "
|
|
6
|
-
"build:cjs": "node ../../scripts/inline core",
|
|
7
|
-
"build:es": "yarn g:tsc -p tsconfig.es.json",
|
|
5
|
+
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
|
+
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline core",
|
|
8
7
|
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
9
8
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
10
|
-
"stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
11
9
|
"clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
12
|
-
"lint": "npx eslint -c ../../.eslintrc.js \"src/**/*.ts\" --fix && node ./scripts/lint",
|
|
13
|
-
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
14
10
|
"extract:docs": "api-extractor run --local",
|
|
15
|
-
"
|
|
11
|
+
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
12
|
+
"lint": "npx eslint -c ../../.eslintrc.js \"src/**/*.ts\" --fix && node ./scripts/lint",
|
|
13
|
+
"stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
16
14
|
"test": "yarn g:vitest run",
|
|
17
|
-
"test:
|
|
15
|
+
"test:cbor:perf": "node ./scripts/cbor-perf.mjs",
|
|
18
16
|
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
|
|
19
|
-
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
17
|
+
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts",
|
|
18
|
+
"test:watch": "yarn g:vitest watch"
|
|
20
19
|
},
|
|
21
20
|
"main": "./dist-cjs/index.js",
|
|
22
21
|
"module": "./dist-es/index.js",
|
|
@@ -86,13 +85,13 @@
|
|
|
86
85
|
"license": "Apache-2.0",
|
|
87
86
|
"sideEffects": false,
|
|
88
87
|
"dependencies": {
|
|
89
|
-
"@smithy/protocol-http": "^5.3.
|
|
90
|
-
"@smithy/types": "^4.
|
|
91
|
-
"@smithy/url-parser": "^4.2.
|
|
88
|
+
"@smithy/protocol-http": "^5.3.13",
|
|
89
|
+
"@smithy/types": "^4.14.0",
|
|
90
|
+
"@smithy/url-parser": "^4.2.13",
|
|
92
91
|
"@smithy/util-base64": "^4.3.2",
|
|
93
92
|
"@smithy/util-body-length-browser": "^4.2.2",
|
|
94
|
-
"@smithy/util-middleware": "^4.2.
|
|
95
|
-
"@smithy/util-stream": "^4.5.
|
|
93
|
+
"@smithy/util-middleware": "^4.2.13",
|
|
94
|
+
"@smithy/util-stream": "^4.5.22",
|
|
96
95
|
"@smithy/util-utf8": "^4.2.2",
|
|
97
96
|
"@smithy/uuid": "^1.1.2",
|
|
98
97
|
"tslib": "^2.6.2"
|
|
@@ -129,7 +128,7 @@
|
|
|
129
128
|
"directory": "packages/core"
|
|
130
129
|
},
|
|
131
130
|
"devDependencies": {
|
|
132
|
-
"@smithy/eventstream-serde-node": "^4.2.
|
|
131
|
+
"@smithy/eventstream-serde-node": "^4.2.13",
|
|
133
132
|
"@types/node": "^18.11.9",
|
|
134
133
|
"concurrently": "7.0.0",
|
|
135
134
|
"downlevel-dts": "0.10.1",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./getSmithyContext";
|
|
2
|
-
export * from "./middleware-http-auth-scheme";
|
|
3
|
-
export * from "./middleware-http-signing";
|
|
4
|
-
export * from "./normalizeProvider";
|
|
5
|
-
export { createPaginator } from "./pagination/createPaginator";
|
|
6
|
-
export * from "./request-builder/requestBuilder";
|
|
7
|
-
export * from "./setFeature";
|
|
8
|
-
export * from "./util-identity-and-auth";
|
package/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { HandlerExecutionContext, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, IdentityProviderConfig, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types";
|
|
2
|
-
import { PreviouslyResolved } from "./httpAuthSchemeMiddleware";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare const httpAuthSchemeEndpointRuleSetMiddlewareOptions: SerializeHandlerOptions & RelativeMiddlewareOptions;
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
interface HttpAuthSchemeEndpointRuleSetPluginOptions<TConfig extends object, TContext extends HandlerExecutionContext, TParameters extends HttpAuthSchemeParameters, TInput extends object> {
|
|
11
|
-
httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider<TConfig, TContext, TParameters, TInput>;
|
|
12
|
-
identityProviderConfigProvider: (config: TConfig) => Promise<IdentityProviderConfig>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
export declare const getHttpAuthSchemeEndpointRuleSetPlugin: <TConfig extends object, TContext extends HandlerExecutionContext, TParameters extends HttpAuthSchemeParameters, TInput extends object>(config: TConfig & PreviouslyResolved<TParameters>, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }: HttpAuthSchemeEndpointRuleSetPluginOptions<TConfig, TContext, TParameters, TInput>) => Pluggable<any, any>;
|
|
18
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { HandlerExecutionContext, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, IdentityProviderConfig, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types";
|
|
2
|
-
import { PreviouslyResolved } from "./httpAuthSchemeMiddleware";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare const httpAuthSchemeMiddlewareOptions: SerializeHandlerOptions & RelativeMiddlewareOptions;
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
interface HttpAuthSchemePluginOptions<TConfig extends object, TContext extends HandlerExecutionContext, TParameters extends HttpAuthSchemeParameters, TInput extends object> {
|
|
11
|
-
httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider<TConfig, TContext, TParameters, TInput>;
|
|
12
|
-
identityProviderConfigProvider: (config: TConfig) => Promise<IdentityProviderConfig>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
export declare const getHttpAuthSchemePlugin: <TConfig extends object, TContext extends HandlerExecutionContext, TParameters extends HttpAuthSchemeParameters, TInput extends object>(config: TConfig & PreviouslyResolved<TParameters>, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }: HttpAuthSchemePluginOptions<TConfig, TContext, TParameters, TInput>) => Pluggable<any, any>;
|
|
18
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, IdentityProviderConfig, Provider, SelectedHttpAuthScheme, SerializeMiddleware, SMITHY_CONTEXT_KEY } from "@smithy/types";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export interface PreviouslyResolved<TParameters extends HttpAuthSchemeParameters> {
|
|
6
|
-
authSchemePreference?: Provider<string[]>;
|
|
7
|
-
httpAuthSchemes: HttpAuthScheme[];
|
|
8
|
-
httpAuthSchemeProvider: HttpAuthSchemeProvider<TParameters>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
interface HttpAuthSchemeMiddlewareOptions<TConfig extends object, TContext extends HandlerExecutionContext, TParameters extends HttpAuthSchemeParameters, TInput extends object> {
|
|
14
|
-
httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider<TConfig, TContext, TParameters, TInput>;
|
|
15
|
-
identityProviderConfigProvider: (config: TConfig) => Promise<IdentityProviderConfig>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
interface HttpAuthSchemeMiddlewareSmithyContext extends Record<string, unknown> {
|
|
21
|
-
selectedHttpAuthScheme?: SelectedHttpAuthScheme;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
interface HttpAuthSchemeMiddlewareHandlerExecutionContext extends HandlerExecutionContext {
|
|
27
|
-
[SMITHY_CONTEXT_KEY]?: HttpAuthSchemeMiddlewareSmithyContext;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
export declare const httpAuthSchemeMiddleware: <TInput extends object, Output extends object, TConfig extends object, TContext extends HttpAuthSchemeMiddlewareHandlerExecutionContext, TParameters extends HttpAuthSchemeParameters>(config: TConfig & PreviouslyResolved<TParameters>, mwOptions: HttpAuthSchemeMiddlewareOptions<TConfig, TContext, TParameters, TInput>) => SerializeMiddleware<TInput, Output>;
|
|
33
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { HttpAuthOption } from "@smithy/types";
|
|
2
|
-
/**
|
|
3
|
-
* Resolves list of auth options based on the supported ones, vs the preference list.
|
|
4
|
-
*
|
|
5
|
-
* @param candidateAuthOptions list of supported auth options selected by the standard
|
|
6
|
-
* resolution process (model-based, endpoints 2.0, etc.)
|
|
7
|
-
* @param authSchemePreference list of auth schemes preferred by user.
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export declare const resolveAuthOptions: (candidateAuthOptions: HttpAuthOption[], authSchemePreference: string[]) => HttpAuthOption[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FinalizeRequestHandlerOptions, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare const httpSigningMiddlewareOptions: FinalizeRequestHandlerOptions & RelativeMiddlewareOptions;
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export declare const getHttpSigningPlugin: <Input extends object, Output extends object>(config: object) => Pluggable<Input, Output>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PaginationConfiguration, Paginator } from "@smithy/types";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*
|
|
5
|
-
* Creates a paginator.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createPaginator<PaginationConfigType extends PaginationConfiguration, InputType extends object, OutputType extends object>(ClientCtor: any, CommandCtor: any, inputTokenName: string, outputTokenName: string, pageSizeTokenName?: string): (config: PaginationConfigType, input: InputType, ...additionalArguments: any[]) => Paginator<OutputType>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HandlerExecutionContext, SmithyFeatures } from "@smithy/types";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Indicates to the request context that a given feature is active.
|
|
5
|
-
*
|
|
6
|
-
* @param context - handler execution context.
|
|
7
|
-
* @param feature - readable name of feature.
|
|
8
|
-
* @param value - encoding value of feature. This is required because the
|
|
9
|
-
* specification asks the library not to include a runtime lookup of all
|
|
10
|
-
* the feature identifiers.
|
|
11
|
-
*/
|
|
12
|
-
export declare function setFeature<F extends keyof SmithyFeatures>(context: HandlerExecutionContext, feature: F, value: SmithyFeatures[F]): void;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { SerdeContext } from "@smithy/core/protocols";
|
|
2
|
-
import { Codec, Schema, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export declare class CborCodec extends SerdeContext implements Codec<Uint8Array, Uint8Array> {
|
|
7
|
-
createSerializer(): CborShapeSerializer;
|
|
8
|
-
createDeserializer(): CborShapeDeserializer;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
export declare class CborShapeSerializer extends SerdeContext implements ShapeSerializer {
|
|
14
|
-
private value;
|
|
15
|
-
write(schema: Schema, value: unknown): void;
|
|
16
|
-
/**
|
|
17
|
-
* Recursive serializer transform that copies and prepares the user input object
|
|
18
|
-
* for CBOR serialization.
|
|
19
|
-
*/
|
|
20
|
-
serialize(schema: Schema, source: unknown): any;
|
|
21
|
-
flush(): Uint8Array;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @public
|
|
25
|
-
*/
|
|
26
|
-
export declare class CborShapeDeserializer extends SerdeContext implements ShapeDeserializer {
|
|
27
|
-
read(schema: Schema, bytes: Uint8Array): any;
|
|
28
|
-
/**
|
|
29
|
-
* Public because it's called by the protocol implementation to deserialize errors.
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
readValue(_schema: Schema, value: any): any;
|
|
33
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { RpcProtocol } from "@smithy/core/protocols";
|
|
2
|
-
import { TypeRegistry } from "@smithy/core/schema";
|
|
3
|
-
import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, SerdeFunctions } from "@smithy/types";
|
|
4
|
-
import { CborCodec } from "./CborCodec";
|
|
5
|
-
/**
|
|
6
|
-
* Client protocol for Smithy RPCv2 CBOR.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export declare class SmithyRpcV2CborProtocol extends RpcProtocol {
|
|
11
|
-
/**
|
|
12
|
-
* @override
|
|
13
|
-
*/
|
|
14
|
-
protected compositeErrorRegistry: TypeRegistry;
|
|
15
|
-
private codec;
|
|
16
|
-
protected serializer: import("./CborCodec").CborShapeSerializer;
|
|
17
|
-
protected deserializer: import("./CborCodec").CborShapeDeserializer;
|
|
18
|
-
constructor({ defaultNamespace, errorTypeRegistries, }: {
|
|
19
|
-
defaultNamespace: string;
|
|
20
|
-
errorTypeRegistries?: TypeRegistry[];
|
|
21
|
-
});
|
|
22
|
-
getShapeId(): string;
|
|
23
|
-
getPayloadCodec(): CborCodec;
|
|
24
|
-
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
25
|
-
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
|
26
|
-
protected handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
|
|
27
|
-
protected getDefaultContentType(): string;
|
|
28
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CborValueType, Float32, Uint8, Uint32 } from "./cbor-types";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* @param bytes - to be set as the decode source.
|
|
5
|
-
*
|
|
6
|
-
* Sets the decode bytearray source and its data view.
|
|
7
|
-
*/
|
|
8
|
-
export declare function setPayload(bytes: Uint8Array): void;
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
* Decodes the data between the two indices.
|
|
12
|
-
*/
|
|
13
|
-
export declare function decode(at: Uint32, to: Uint32): CborValueType;
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
export declare function bytesToFloat16(a: Uint8, b: Uint8): Float32;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
export type CborItemType = undefined | boolean | number | bigint | [
|
|
2
|
-
CborUnstructuredByteStringType,
|
|
3
|
-
Uint64
|
|
4
|
-
] | string | CborTagType;
|
|
5
|
-
export type CborTagType = {
|
|
6
|
-
tag: Uint64 | number;
|
|
7
|
-
value: CborValueType;
|
|
8
|
-
[tagSymbol]: true;
|
|
9
|
-
};
|
|
10
|
-
export type CborUnstructuredByteStringType = Uint8Array;
|
|
11
|
-
export type CborListType<T = any> = Array<T>;
|
|
12
|
-
export type CborMapType<T = any> = Record<string, T>;
|
|
13
|
-
export type CborCollectionType<T = any> = CborMapType<T> | CborListType<T>;
|
|
14
|
-
export type CborValueType = CborItemType | CborCollectionType | any;
|
|
15
|
-
export type CborArgumentLength = 1 | 2 | 4 | 8;
|
|
16
|
-
export type CborArgumentLengthOffset = 1 | 2 | 3 | 5 | 9;
|
|
17
|
-
export type CborOffset = number;
|
|
18
|
-
export type Uint8 = number;
|
|
19
|
-
export type Uint32 = number;
|
|
20
|
-
export type Uint64 = bigint;
|
|
21
|
-
export type Float32 = number;
|
|
22
|
-
export type Int64 = bigint;
|
|
23
|
-
export type Float16Binary = number;
|
|
24
|
-
export type Float32Binary = number;
|
|
25
|
-
export type CborMajorType = typeof majorUint64 | typeof majorNegativeInt64 | typeof majorUnstructuredByteString | typeof majorUtf8String | typeof majorList | typeof majorMap | typeof majorTag | typeof majorSpecial;
|
|
26
|
-
export declare const majorUint64 = 0;
|
|
27
|
-
export declare const majorNegativeInt64 = 1;
|
|
28
|
-
export declare const majorUnstructuredByteString = 2;
|
|
29
|
-
export declare const majorUtf8String = 3;
|
|
30
|
-
export declare const majorList = 4;
|
|
31
|
-
export declare const majorMap = 5;
|
|
32
|
-
export declare const majorTag = 6;
|
|
33
|
-
export declare const majorSpecial = 7;
|
|
34
|
-
export declare const specialFalse = 20;
|
|
35
|
-
export declare const specialTrue = 21;
|
|
36
|
-
export declare const specialNull = 22;
|
|
37
|
-
export declare const specialUndefined = 23;
|
|
38
|
-
export declare const extendedOneByte = 24;
|
|
39
|
-
export declare const extendedFloat16 = 25;
|
|
40
|
-
export declare const extendedFloat32 = 26;
|
|
41
|
-
export declare const extendedFloat64 = 27;
|
|
42
|
-
export declare const minorIndefinite = 31;
|
|
43
|
-
export declare function alloc(size: number): Uint8Array;
|
|
44
|
-
/**
|
|
45
|
-
* @public
|
|
46
|
-
*
|
|
47
|
-
* The presence of this symbol as an object key indicates it should be considered a tag
|
|
48
|
-
* for CBOR serialization purposes.
|
|
49
|
-
*
|
|
50
|
-
* The object must also have the properties "tag" and "value".
|
|
51
|
-
*/
|
|
52
|
-
export declare const tagSymbol: unique symbol;
|
|
53
|
-
/**
|
|
54
|
-
* @public
|
|
55
|
-
* Applies the tag symbol to the object.
|
|
56
|
-
*/
|
|
57
|
-
export declare function tag(data: {
|
|
58
|
-
tag: number | bigint;
|
|
59
|
-
value: any;
|
|
60
|
-
[tagSymbol]?: true;
|
|
61
|
-
}): {
|
|
62
|
-
tag: number | bigint;
|
|
63
|
-
value: any;
|
|
64
|
-
[tagSymbol]: true;
|
|
65
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This implementation is synchronous and only implements the parts of CBOR
|
|
3
|
-
* specification used by Smithy RPCv2 CBOR protocol.
|
|
4
|
-
*
|
|
5
|
-
* This cbor serde implementation is derived from AWS SDK for Go's implementation.
|
|
6
|
-
* @see https://github.com/aws/smithy-go/tree/main/encoding/cbor
|
|
7
|
-
*
|
|
8
|
-
* The cbor-x implementation was also instructional:
|
|
9
|
-
* @see https://github.com/kriszyp/cbor-x
|
|
10
|
-
*/
|
|
11
|
-
export declare const cbor: {
|
|
12
|
-
deserialize(payload: Uint8Array): any;
|
|
13
|
-
serialize(input: any): Uint8Array;
|
|
14
|
-
/**
|
|
15
|
-
* @public
|
|
16
|
-
* @param size - byte length to allocate.
|
|
17
|
-
*
|
|
18
|
-
* This may be used to garbage collect the CBOR
|
|
19
|
-
* shared encoding buffer space,
|
|
20
|
-
* e.g. resizeEncodingBuffer(0);
|
|
21
|
-
*
|
|
22
|
-
* This may also be used to pre-allocate more space for
|
|
23
|
-
* CBOR encoding, e.g. resizeEncodingBuffer(100_000_000);
|
|
24
|
-
*/
|
|
25
|
-
resizeEncodingBuffer(size: number): void;
|
|
26
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
|
-
import { HeaderBag as __HeaderBag, HttpResponse, SerdeContext as __SerdeContext, SerdeContext } from "@smithy/types";
|
|
3
|
-
import { tagSymbol } from "./cbor-types";
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export declare const parseCborBody: (streamBody: any, context: SerdeContext) => any;
|
|
8
|
-
/**
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
11
|
-
export declare const dateToTag: (date: Date) => {
|
|
12
|
-
tag: number | bigint;
|
|
13
|
-
value: any;
|
|
14
|
-
[tagSymbol]: true;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
export declare const parseCborErrorBody: (errorBody: any, context: SerdeContext) => Promise<any>;
|
|
20
|
-
/**
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
export declare const loadSmithyRpcV2CborErrorCode: (output: HttpResponse, data: any) => string | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
export declare const checkCborResponse: (response: HttpResponse) => void;
|
|
28
|
-
/**
|
|
29
|
-
* @internal
|
|
30
|
-
*/
|
|
31
|
-
export declare const buildHttpRpcRequest: (context: __SerdeContext, headers: __HeaderBag, path: string, resolvedHostname: string | undefined, body: any) => Promise<__HttpRequest>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./toEndpointV1";
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
2
|
-
import { EventStreamMarshaller, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
3
|
-
/**
|
|
4
|
-
* Separated module for async mixin of EventStream serde capability.
|
|
5
|
-
* This is used by the HttpProtocol base class from \@smithy/core/protocols.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export declare class EventStreamSerde {
|
|
10
|
-
private readonly marshaller;
|
|
11
|
-
private readonly serializer;
|
|
12
|
-
private readonly deserializer;
|
|
13
|
-
private readonly serdeContext?;
|
|
14
|
-
private readonly defaultContentType;
|
|
15
|
-
/**
|
|
16
|
-
* Properties are injected by the HttpProtocol.
|
|
17
|
-
*/
|
|
18
|
-
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }: {
|
|
19
|
-
marshaller: EventStreamMarshaller;
|
|
20
|
-
serializer: ShapeSerializer<string | Uint8Array>;
|
|
21
|
-
deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
22
|
-
serdeContext?: SerdeFunctions;
|
|
23
|
-
defaultContentType: string;
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* @param eventStream - the iterable provided by the caller.
|
|
27
|
-
* @param requestSchema - the schema of the event stream container (struct).
|
|
28
|
-
* @param [initialRequest] - only provided if the initial-request is part of the event stream (RPC).
|
|
29
|
-
*
|
|
30
|
-
* @returns a stream suitable for the HTTP body of a request.
|
|
31
|
-
*/
|
|
32
|
-
serializeEventStream({ eventStream, requestSchema, initialRequest, }: {
|
|
33
|
-
eventStream: AsyncIterable<any>;
|
|
34
|
-
requestSchema: NormalizedSchema;
|
|
35
|
-
initialRequest?: any;
|
|
36
|
-
}): Promise<IHttpRequest["body"] | Uint8Array>;
|
|
37
|
-
/**
|
|
38
|
-
* @param response - http response from which to read the event stream.
|
|
39
|
-
* @param unionSchema - schema of the event stream container (struct).
|
|
40
|
-
* @param [initialResponseContainer] - provided and written to only if the initial response is part of the event stream (RPC).
|
|
41
|
-
*
|
|
42
|
-
* @returns the asyncIterable of the event stream for the end-user.
|
|
43
|
-
*/
|
|
44
|
-
deserializeEventStream({ response, responseSchema, initialResponseContainer, }: {
|
|
45
|
-
response: IHttpResponse;
|
|
46
|
-
responseSchema: NormalizedSchema;
|
|
47
|
-
initialResponseContainer?: any;
|
|
48
|
-
}): Promise<AsyncIterable<{
|
|
49
|
-
[key: string]: any;
|
|
50
|
-
$unknown?: unknown;
|
|
51
|
-
}>>;
|
|
52
|
-
/**
|
|
53
|
-
* @param unionMember - member name within the structure that contains an event stream union.
|
|
54
|
-
* @param unionSchema - schema of the union.
|
|
55
|
-
* @param event
|
|
56
|
-
*
|
|
57
|
-
* @returns the event body (bytes) and event type (string).
|
|
58
|
-
*/
|
|
59
|
-
private writeEventBody;
|
|
60
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./EventStreamSerde";
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { TypeRegistry, NormalizedSchema } from "@smithy/core/schema";
|
|
2
|
-
import { HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, Schema, SerdeFunctions } from "@smithy/types";
|
|
4
|
-
import { HttpProtocol } from "./HttpProtocol";
|
|
5
|
-
/**
|
|
6
|
-
* Base for HTTP-binding protocols. Downstream examples
|
|
7
|
-
* include AWS REST JSON and AWS REST XML.
|
|
8
|
-
*
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare abstract class HttpBindingProtocol extends HttpProtocol {
|
|
12
|
-
/**
|
|
13
|
-
* @override
|
|
14
|
-
*/
|
|
15
|
-
protected compositeErrorRegistry: TypeRegistry;
|
|
16
|
-
serializeRequest<Input extends object>(operationSchema: OperationSchema, _input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
17
|
-
protected serializeQuery(ns: NormalizedSchema, data: any, query: HttpRequest["query"]): void;
|
|
18
|
-
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
|
19
|
-
/**
|
|
20
|
-
* The base method ignores HTTP bindings.
|
|
21
|
-
*
|
|
22
|
-
* @deprecated (only this signature) use signature without headerBindings.
|
|
23
|
-
* @override
|
|
24
|
-
*/
|
|
25
|
-
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, headerBindings: Set<string>, dataObject: any): Promise<string[] & {
|
|
26
|
-
discardResponseBody?: boolean;
|
|
27
|
-
}>;
|
|
28
|
-
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any): Promise<string[] & {
|
|
29
|
-
discardResponseBody?: boolean;
|
|
30
|
-
}>;
|
|
31
|
-
}
|