backend v4 half
This commit is contained in:
Generated
Vendored
+20
-20
@@ -225,7 +225,10 @@ var HttpProtocol = class {
|
||||
|
||||
// src/submodules/protocols/HttpBindingProtocol.ts
|
||||
var HttpBindingProtocol = class extends HttpProtocol {
|
||||
async serializeRequest(operationSchema, input, context) {
|
||||
async serializeRequest(operationSchema, _input, context) {
|
||||
const input = {
|
||||
..._input ?? {}
|
||||
};
|
||||
const serializer = this.serializer;
|
||||
const query = {};
|
||||
const headers = {};
|
||||
@@ -260,16 +263,12 @@ var HttpBindingProtocol = class extends HttpProtocol {
|
||||
Object.assign(query, Object.fromEntries(traitSearchParams));
|
||||
}
|
||||
}
|
||||
const _input = {
|
||||
...input
|
||||
};
|
||||
for (const memberName of Object.keys(_input)) {
|
||||
const memberNs = ns.getMemberSchema(memberName);
|
||||
if (memberNs === void 0) {
|
||||
for (const [memberName, memberNs] of ns.structIterator()) {
|
||||
const memberTraits = memberNs.getMergedTraits() ?? {};
|
||||
const inputMemberValue = input[memberName];
|
||||
if (inputMemberValue == null) {
|
||||
continue;
|
||||
}
|
||||
const memberTraits = memberNs.getMergedTraits();
|
||||
const inputMember = _input[memberName];
|
||||
if (memberTraits.httpPayload) {
|
||||
const isStreaming = memberNs.isStreaming();
|
||||
if (isStreaming) {
|
||||
@@ -277,14 +276,15 @@ var HttpBindingProtocol = class extends HttpProtocol {
|
||||
if (isEventStream) {
|
||||
throw new Error("serialization of event streams is not yet implemented");
|
||||
} else {
|
||||
payload = inputMember;
|
||||
payload = inputMemberValue;
|
||||
}
|
||||
} else {
|
||||
serializer.write(memberNs, inputMember);
|
||||
serializer.write(memberNs, inputMemberValue);
|
||||
payload = serializer.flush();
|
||||
}
|
||||
delete input[memberName];
|
||||
} else if (memberTraits.httpLabel) {
|
||||
serializer.write(memberNs, inputMember);
|
||||
serializer.write(memberNs, inputMemberValue);
|
||||
const replacement = serializer.flush();
|
||||
if (request.path.includes(`{${memberName}+}`)) {
|
||||
request.path = request.path.replace(
|
||||
@@ -294,27 +294,27 @@ var HttpBindingProtocol = class extends HttpProtocol {
|
||||
} else if (request.path.includes(`{${memberName}}`)) {
|
||||
request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));
|
||||
}
|
||||
delete _input[memberName];
|
||||
delete input[memberName];
|
||||
} else if (memberTraits.httpHeader) {
|
||||
serializer.write(memberNs, inputMember);
|
||||
serializer.write(memberNs, inputMemberValue);
|
||||
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
||||
delete _input[memberName];
|
||||
delete input[memberName];
|
||||
} else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
||||
for (const [key, val] of Object.entries(inputMember)) {
|
||||
for (const [key, val] of Object.entries(inputMemberValue)) {
|
||||
const amalgam = memberTraits.httpPrefixHeaders + key;
|
||||
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
||||
headers[amalgam.toLowerCase()] = serializer.flush();
|
||||
}
|
||||
delete _input[memberName];
|
||||
delete input[memberName];
|
||||
} else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {
|
||||
this.serializeQuery(memberNs, inputMember, query);
|
||||
delete _input[memberName];
|
||||
this.serializeQuery(memberNs, inputMemberValue, query);
|
||||
delete input[memberName];
|
||||
} else {
|
||||
hasNonHttpBindingMember = true;
|
||||
}
|
||||
}
|
||||
if (hasNonHttpBindingMember && input) {
|
||||
serializer.write(schema, _input);
|
||||
serializer.write(schema, input);
|
||||
payload = serializer.flush();
|
||||
}
|
||||
request.headers = headers;
|
||||
|
||||
Generated
Vendored
+80
-6
@@ -247,12 +247,24 @@ var Schema = class {
|
||||
};
|
||||
|
||||
// src/submodules/schema/schemas/ListSchema.ts
|
||||
var ListSchema = class extends Schema {
|
||||
var ListSchema = class _ListSchema extends Schema {
|
||||
constructor(name, traits, valueSchema) {
|
||||
super(name, traits);
|
||||
this.name = name;
|
||||
this.traits = traits;
|
||||
this.valueSchema = valueSchema;
|
||||
this.symbol = _ListSchema.symbol;
|
||||
}
|
||||
static {
|
||||
this.symbol = Symbol.for("@smithy/core/schema::ListSchema");
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = _ListSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const list2 = lhs;
|
||||
return list2.symbol === _ListSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
};
|
||||
function list(namespace, name, traits = {}, valueSchema) {
|
||||
@@ -266,13 +278,25 @@ function list(namespace, name, traits = {}, valueSchema) {
|
||||
}
|
||||
|
||||
// src/submodules/schema/schemas/MapSchema.ts
|
||||
var MapSchema = class extends Schema {
|
||||
var MapSchema = class _MapSchema extends Schema {
|
||||
constructor(name, traits, keySchema, valueSchema) {
|
||||
super(name, traits);
|
||||
this.name = name;
|
||||
this.traits = traits;
|
||||
this.keySchema = keySchema;
|
||||
this.valueSchema = valueSchema;
|
||||
this.symbol = _MapSchema.symbol;
|
||||
}
|
||||
static {
|
||||
this.symbol = Symbol.for("@smithy/core/schema::MapSchema");
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = _MapSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const map2 = lhs;
|
||||
return map2.symbol === _MapSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
};
|
||||
function map(namespace, name, traits = {}, keySchema, valueSchema) {
|
||||
@@ -303,18 +327,30 @@ function op(namespace, name, traits = {}, input, output) {
|
||||
}
|
||||
|
||||
// src/submodules/schema/schemas/StructureSchema.ts
|
||||
var StructureSchema = class extends Schema {
|
||||
var StructureSchema = class _StructureSchema extends Schema {
|
||||
constructor(name, traits, memberNames, memberList) {
|
||||
super(name, traits);
|
||||
this.name = name;
|
||||
this.traits = traits;
|
||||
this.memberNames = memberNames;
|
||||
this.memberList = memberList;
|
||||
this.symbol = _StructureSchema.symbol;
|
||||
this.members = {};
|
||||
for (let i = 0; i < memberNames.length; ++i) {
|
||||
this.members[memberNames[i]] = Array.isArray(memberList[i]) ? memberList[i] : [memberList[i], 0];
|
||||
}
|
||||
}
|
||||
static {
|
||||
this.symbol = Symbol.for("@smithy/core/schema::StructureSchema");
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = _StructureSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const struct2 = lhs;
|
||||
return struct2.symbol === _StructureSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
};
|
||||
function struct(namespace, name, traits, memberNames, memberList) {
|
||||
const schema = new StructureSchema(namespace + "#" + name, traits, memberNames, memberList);
|
||||
@@ -323,7 +359,7 @@ function struct(namespace, name, traits, memberNames, memberList) {
|
||||
}
|
||||
|
||||
// src/submodules/schema/schemas/ErrorSchema.ts
|
||||
var ErrorSchema = class extends StructureSchema {
|
||||
var ErrorSchema = class _ErrorSchema extends StructureSchema {
|
||||
constructor(name, traits, memberNames, memberList, ctor) {
|
||||
super(name, traits, memberNames, memberList);
|
||||
this.name = name;
|
||||
@@ -331,6 +367,18 @@ var ErrorSchema = class extends StructureSchema {
|
||||
this.memberNames = memberNames;
|
||||
this.memberList = memberList;
|
||||
this.ctor = ctor;
|
||||
this.symbol = _ErrorSchema.symbol;
|
||||
}
|
||||
static {
|
||||
this.symbol = Symbol.for("@smithy/core/schema::ErrorSchema");
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = _ErrorSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const err = lhs;
|
||||
return err.symbol === _ErrorSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
};
|
||||
function error(namespace, name, traits = {}, memberNames, memberList, ctor) {
|
||||
@@ -372,12 +420,24 @@ var SCHEMA = {
|
||||
};
|
||||
|
||||
// src/submodules/schema/schemas/SimpleSchema.ts
|
||||
var SimpleSchema = class extends Schema {
|
||||
var SimpleSchema = class _SimpleSchema extends Schema {
|
||||
constructor(name, schemaRef, traits) {
|
||||
super(name, traits);
|
||||
this.name = name;
|
||||
this.schemaRef = schemaRef;
|
||||
this.traits = traits;
|
||||
this.symbol = _SimpleSchema.symbol;
|
||||
}
|
||||
static {
|
||||
this.symbol = Symbol.for("@smithy/core/schema::SimpleSchema");
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = _SimpleSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const sim2 = lhs;
|
||||
return sim2.symbol === _SimpleSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
};
|
||||
function sim(namespace, name, schemaRef, traits) {
|
||||
@@ -395,6 +455,7 @@ var NormalizedSchema = class _NormalizedSchema {
|
||||
constructor(ref, memberName) {
|
||||
this.ref = ref;
|
||||
this.memberName = memberName;
|
||||
this.symbol = _NormalizedSchema.symbol;
|
||||
const traitStack = [];
|
||||
let _ref = ref;
|
||||
let schema = ref;
|
||||
@@ -434,10 +495,23 @@ var NormalizedSchema = class _NormalizedSchema {
|
||||
this.name = (typeof this.schema === "object" ? this.schema?.name : void 0) ?? this.memberName ?? this.getSchemaName();
|
||||
if (this._isMemberSchema && !memberName) {
|
||||
throw new Error(
|
||||
`@smithy/core/schema - NormalizedSchema member schema ${this.getName(true)} must initialize with memberName argument.`
|
||||
`@smithy/core/schema - NormalizedSchema member schema ${this.getName(
|
||||
true
|
||||
)} must initialize with memberName argument.`
|
||||
);
|
||||
}
|
||||
}
|
||||
static {
|
||||
this.symbol = Symbol.for("@smithy/core/schema::NormalizedSchema");
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = _NormalizedSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const ns = lhs;
|
||||
return ns.symbol === _NormalizedSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
/**
|
||||
* Static constructor that attempts to avoid wrapping a NormalizedSchema within another.
|
||||
*/
|
||||
|
||||
Generated
Vendored
+20
-20
@@ -4,7 +4,10 @@ import { collectBody } from "./collect-stream-body";
|
||||
import { extendedEncodeURIComponent } from "./extended-encode-uri-component";
|
||||
import { HttpProtocol } from "./HttpProtocol";
|
||||
export class HttpBindingProtocol extends HttpProtocol {
|
||||
async serializeRequest(operationSchema, input, context) {
|
||||
async serializeRequest(operationSchema, _input, context) {
|
||||
const input = {
|
||||
...(_input ?? {}),
|
||||
};
|
||||
const serializer = this.serializer;
|
||||
const query = {};
|
||||
const headers = {};
|
||||
@@ -40,16 +43,12 @@ export class HttpBindingProtocol extends HttpProtocol {
|
||||
Object.assign(query, Object.fromEntries(traitSearchParams));
|
||||
}
|
||||
}
|
||||
const _input = {
|
||||
...input,
|
||||
};
|
||||
for (const memberName of Object.keys(_input)) {
|
||||
const memberNs = ns.getMemberSchema(memberName);
|
||||
if (memberNs === undefined) {
|
||||
for (const [memberName, memberNs] of ns.structIterator()) {
|
||||
const memberTraits = memberNs.getMergedTraits() ?? {};
|
||||
const inputMemberValue = input[memberName];
|
||||
if (inputMemberValue == null) {
|
||||
continue;
|
||||
}
|
||||
const memberTraits = memberNs.getMergedTraits();
|
||||
const inputMember = _input[memberName];
|
||||
if (memberTraits.httpPayload) {
|
||||
const isStreaming = memberNs.isStreaming();
|
||||
if (isStreaming) {
|
||||
@@ -58,16 +57,17 @@ export class HttpBindingProtocol extends HttpProtocol {
|
||||
throw new Error("serialization of event streams is not yet implemented");
|
||||
}
|
||||
else {
|
||||
payload = inputMember;
|
||||
payload = inputMemberValue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
serializer.write(memberNs, inputMember);
|
||||
serializer.write(memberNs, inputMemberValue);
|
||||
payload = serializer.flush();
|
||||
}
|
||||
delete input[memberName];
|
||||
}
|
||||
else if (memberTraits.httpLabel) {
|
||||
serializer.write(memberNs, inputMember);
|
||||
serializer.write(memberNs, inputMemberValue);
|
||||
const replacement = serializer.flush();
|
||||
if (request.path.includes(`{${memberName}+}`)) {
|
||||
request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/"));
|
||||
@@ -75,31 +75,31 @@ export class HttpBindingProtocol extends HttpProtocol {
|
||||
else if (request.path.includes(`{${memberName}}`)) {
|
||||
request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));
|
||||
}
|
||||
delete _input[memberName];
|
||||
delete input[memberName];
|
||||
}
|
||||
else if (memberTraits.httpHeader) {
|
||||
serializer.write(memberNs, inputMember);
|
||||
serializer.write(memberNs, inputMemberValue);
|
||||
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
||||
delete _input[memberName];
|
||||
delete input[memberName];
|
||||
}
|
||||
else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
||||
for (const [key, val] of Object.entries(inputMember)) {
|
||||
for (const [key, val] of Object.entries(inputMemberValue)) {
|
||||
const amalgam = memberTraits.httpPrefixHeaders + key;
|
||||
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
||||
headers[amalgam.toLowerCase()] = serializer.flush();
|
||||
}
|
||||
delete _input[memberName];
|
||||
delete input[memberName];
|
||||
}
|
||||
else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {
|
||||
this.serializeQuery(memberNs, inputMember, query);
|
||||
delete _input[memberName];
|
||||
this.serializeQuery(memberNs, inputMemberValue, query);
|
||||
delete input[memberName];
|
||||
}
|
||||
else {
|
||||
hasNonHttpBindingMember = true;
|
||||
}
|
||||
}
|
||||
if (hasNonHttpBindingMember && input) {
|
||||
serializer.write(schema, _input);
|
||||
serializer.write(schema, input);
|
||||
payload = serializer.flush();
|
||||
}
|
||||
request.headers = headers;
|
||||
|
||||
Generated
Vendored
+10
@@ -8,8 +8,18 @@ export class ErrorSchema extends StructureSchema {
|
||||
this.memberNames = memberNames;
|
||||
this.memberList = memberList;
|
||||
this.ctor = ctor;
|
||||
this.symbol = ErrorSchema.symbol;
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = ErrorSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const err = lhs;
|
||||
return err.symbol === ErrorSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
}
|
||||
ErrorSchema.symbol = Symbol.for("@smithy/core/schema::ErrorSchema");
|
||||
export function error(namespace, name, traits = {}, memberNames, memberList, ctor) {
|
||||
const schema = new ErrorSchema(namespace + "#" + name, traits, memberNames, memberList, ctor);
|
||||
TypeRegistry.for(namespace).register(name, schema);
|
||||
|
||||
Generated
Vendored
+10
@@ -6,8 +6,18 @@ export class ListSchema extends Schema {
|
||||
this.name = name;
|
||||
this.traits = traits;
|
||||
this.valueSchema = valueSchema;
|
||||
this.symbol = ListSchema.symbol;
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = ListSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const list = lhs;
|
||||
return list.symbol === ListSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
}
|
||||
ListSchema.symbol = Symbol.for("@smithy/core/schema::ListSchema");
|
||||
export function list(namespace, name, traits = {}, valueSchema) {
|
||||
const schema = new ListSchema(namespace + "#" + name, traits, typeof valueSchema === "function" ? valueSchema() : valueSchema);
|
||||
TypeRegistry.for(namespace).register(name, schema);
|
||||
|
||||
Generated
Vendored
+10
@@ -7,8 +7,18 @@ export class MapSchema extends Schema {
|
||||
this.traits = traits;
|
||||
this.keySchema = keySchema;
|
||||
this.valueSchema = valueSchema;
|
||||
this.symbol = MapSchema.symbol;
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = MapSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const map = lhs;
|
||||
return map.symbol === MapSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
}
|
||||
MapSchema.symbol = Symbol.for("@smithy/core/schema::MapSchema");
|
||||
export function map(namespace, name, traits = {}, keySchema, valueSchema) {
|
||||
const schema = new MapSchema(namespace + "#" + name, traits, keySchema, typeof valueSchema === "function" ? valueSchema() : valueSchema);
|
||||
TypeRegistry.for(namespace).register(name, schema);
|
||||
|
||||
Generated
Vendored
+10
@@ -8,6 +8,7 @@ export class NormalizedSchema {
|
||||
constructor(ref, memberName) {
|
||||
this.ref = ref;
|
||||
this.memberName = memberName;
|
||||
this.symbol = NormalizedSchema.symbol;
|
||||
const traitStack = [];
|
||||
let _ref = ref;
|
||||
let schema = ref;
|
||||
@@ -52,6 +53,14 @@ export class NormalizedSchema {
|
||||
throw new Error(`@smithy/core/schema - NormalizedSchema member schema ${this.getName(true)} must initialize with memberName argument.`);
|
||||
}
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = NormalizedSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const ns = lhs;
|
||||
return ns.symbol === NormalizedSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
static of(ref, memberName) {
|
||||
if (ref instanceof NormalizedSchema) {
|
||||
return ref;
|
||||
@@ -292,3 +301,4 @@ export class NormalizedSchema {
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
NormalizedSchema.symbol = Symbol.for("@smithy/core/schema::NormalizedSchema");
|
||||
|
||||
Generated
Vendored
+10
@@ -6,8 +6,18 @@ export class SimpleSchema extends Schema {
|
||||
this.name = name;
|
||||
this.schemaRef = schemaRef;
|
||||
this.traits = traits;
|
||||
this.symbol = SimpleSchema.symbol;
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = SimpleSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const sim = lhs;
|
||||
return sim.symbol === SimpleSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
}
|
||||
SimpleSchema.symbol = Symbol.for("@smithy/core/schema::SimpleSchema");
|
||||
export function sim(namespace, name, schemaRef, traits) {
|
||||
const schema = new SimpleSchema(namespace + "#" + name, schemaRef, traits);
|
||||
TypeRegistry.for(namespace).register(name, schema);
|
||||
|
||||
Generated
Vendored
+10
@@ -7,6 +7,7 @@ export class StructureSchema extends Schema {
|
||||
this.traits = traits;
|
||||
this.memberNames = memberNames;
|
||||
this.memberList = memberList;
|
||||
this.symbol = StructureSchema.symbol;
|
||||
this.members = {};
|
||||
for (let i = 0; i < memberNames.length; ++i) {
|
||||
this.members[memberNames[i]] = Array.isArray(memberList[i])
|
||||
@@ -14,7 +15,16 @@ export class StructureSchema extends Schema {
|
||||
: [memberList[i], 0];
|
||||
}
|
||||
}
|
||||
static [Symbol.hasInstance](lhs) {
|
||||
const isPrototype = StructureSchema.prototype.isPrototypeOf(lhs);
|
||||
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
||||
const struct = lhs;
|
||||
return struct.symbol === StructureSchema.symbol;
|
||||
}
|
||||
return isPrototype;
|
||||
}
|
||||
}
|
||||
StructureSchema.symbol = Symbol.for("@smithy/core/schema::StructureSchema");
|
||||
export function struct(namespace, name, traits, memberNames, memberList) {
|
||||
const schema = new StructureSchema(namespace + "#" + name, traits, memberNames, memberList);
|
||||
TypeRegistry.for(namespace).register(name, schema);
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -9,7 +9,7 @@ import { HttpProtocol } from "./HttpProtocol";
|
||||
* @alpha
|
||||
*/
|
||||
export declare abstract class HttpBindingProtocol extends HttpProtocol {
|
||||
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
||||
serializeRequest<Input extends object>(operationSchema: OperationSchema, _input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
||||
protected serializeQuery(ns: NormalizedSchema, data: any, query: HttpRequest["query"]): void;
|
||||
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
||||
}
|
||||
|
||||
Generated
Vendored
+3
@@ -17,11 +17,14 @@ export declare class ErrorSchema extends StructureSchema {
|
||||
* Constructor for a modeled service exception class that extends Error.
|
||||
*/
|
||||
ctor: any;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
constructor(name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[],
|
||||
/**
|
||||
* Constructor for a modeled service exception class that extends Error.
|
||||
*/
|
||||
ctor: any);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is ErrorSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for ErrorSchema, to reduce codegen output and register the schema.
|
||||
|
||||
Generated
Vendored
+3
@@ -10,7 +10,10 @@ export declare class ListSchema extends Schema implements IListSchema {
|
||||
name: string;
|
||||
traits: SchemaTraits;
|
||||
valueSchema: SchemaRef;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
constructor(name: string, traits: SchemaTraits, valueSchema: SchemaRef);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is ListSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for ListSchema.
|
||||
|
||||
Generated
Vendored
+3
@@ -12,11 +12,14 @@ export declare class MapSchema extends Schema implements IMapSchema {
|
||||
*/
|
||||
keySchema: SchemaRef;
|
||||
valueSchema: SchemaRef;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
constructor(name: string, traits: SchemaTraits,
|
||||
/**
|
||||
* This is expected to be StringSchema, but may have traits.
|
||||
*/
|
||||
keySchema: SchemaRef, valueSchema: SchemaRef);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is MapSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for MapSchema.
|
||||
|
||||
Generated
Vendored
+3
@@ -8,6 +8,8 @@ import type { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISc
|
||||
export declare class NormalizedSchema implements INormalizedSchema {
|
||||
private readonly ref;
|
||||
private memberName?;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
private readonly name;
|
||||
private readonly traits;
|
||||
private _isMemberSchema;
|
||||
@@ -19,6 +21,7 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
||||
* @param memberName - optional memberName if this NormalizedSchema should be considered a member schema.
|
||||
*/
|
||||
constructor(ref: SchemaRef, memberName?: string | undefined);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is NormalizedSchema;
|
||||
/**
|
||||
* Static constructor that attempts to avoid wrapping a NormalizedSchema within another.
|
||||
*/
|
||||
|
||||
SerpentRace_Backend/node_modules/@smithy/core/dist-types/submodules/schema/schemas/SimpleSchema.d.ts
Generated
Vendored
+3
@@ -10,7 +10,10 @@ export declare class SimpleSchema extends Schema implements TraitsSchema {
|
||||
name: string;
|
||||
schemaRef: SchemaRef;
|
||||
traits: SchemaTraits;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
constructor(name: string, schemaRef: SchemaRef, traits: SchemaTraits);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is SimpleSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for simple schema class objects.
|
||||
|
||||
Generated
Vendored
+3
@@ -10,8 +10,11 @@ export declare class StructureSchema extends Schema implements IStructureSchema
|
||||
traits: SchemaTraits;
|
||||
memberNames: string[];
|
||||
memberList: SchemaRef[];
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
members: Record<string, [SchemaRef, SchemaTraits]>;
|
||||
constructor(name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[]);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is StructureSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for StructureSchema.
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -9,7 +9,7 @@ import { HttpProtocol } from "./HttpProtocol";
|
||||
* @alpha
|
||||
*/
|
||||
export declare abstract class HttpBindingProtocol extends HttpProtocol {
|
||||
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
||||
serializeRequest<Input extends object>(operationSchema: OperationSchema, _input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
||||
protected serializeQuery(ns: NormalizedSchema, data: any, query: HttpRequest["query"]): void;
|
||||
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
||||
}
|
||||
|
||||
Generated
Vendored
+3
@@ -17,11 +17,14 @@ export declare class ErrorSchema extends StructureSchema {
|
||||
* Constructor for a modeled service exception class that extends Error.
|
||||
*/
|
||||
ctor: any;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
constructor(name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[],
|
||||
/**
|
||||
* Constructor for a modeled service exception class that extends Error.
|
||||
*/
|
||||
ctor: any);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is ErrorSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for ErrorSchema, to reduce codegen output and register the schema.
|
||||
|
||||
Generated
Vendored
+3
@@ -10,7 +10,10 @@ export declare class ListSchema extends Schema implements IListSchema {
|
||||
name: string;
|
||||
traits: SchemaTraits;
|
||||
valueSchema: SchemaRef;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
constructor(name: string, traits: SchemaTraits, valueSchema: SchemaRef);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is ListSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for ListSchema.
|
||||
|
||||
Generated
Vendored
+3
@@ -12,11 +12,14 @@ export declare class MapSchema extends Schema implements IMapSchema {
|
||||
*/
|
||||
keySchema: SchemaRef;
|
||||
valueSchema: SchemaRef;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
constructor(name: string, traits: SchemaTraits,
|
||||
/**
|
||||
* This is expected to be StringSchema, but may have traits.
|
||||
*/
|
||||
keySchema: SchemaRef, valueSchema: SchemaRef);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is MapSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for MapSchema.
|
||||
|
||||
Generated
Vendored
+3
@@ -8,6 +8,8 @@ import { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema,
|
||||
export declare class NormalizedSchema implements INormalizedSchema {
|
||||
private readonly ref;
|
||||
private memberName?;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
private readonly name;
|
||||
private readonly traits;
|
||||
private _isMemberSchema;
|
||||
@@ -19,6 +21,7 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
||||
* @param memberName - optional memberName if this NormalizedSchema should be considered a member schema.
|
||||
*/
|
||||
constructor(ref: SchemaRef, memberName?: string | undefined);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is NormalizedSchema;
|
||||
/**
|
||||
* Static constructor that attempts to avoid wrapping a NormalizedSchema within another.
|
||||
*/
|
||||
|
||||
Generated
Vendored
+3
@@ -10,7 +10,10 @@ export declare class SimpleSchema extends Schema implements TraitsSchema {
|
||||
name: string;
|
||||
schemaRef: SchemaRef;
|
||||
traits: SchemaTraits;
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
constructor(name: string, schemaRef: SchemaRef, traits: SchemaTraits);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is SimpleSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for simple schema class objects.
|
||||
|
||||
Generated
Vendored
+3
@@ -10,11 +10,14 @@ export declare class StructureSchema extends Schema implements IStructureSchema
|
||||
traits: SchemaTraits;
|
||||
memberNames: string[];
|
||||
memberList: SchemaRef[];
|
||||
static symbol: symbol;
|
||||
protected symbol: symbol;
|
||||
members: Record<string, [
|
||||
SchemaRef,
|
||||
SchemaTraits
|
||||
]>;
|
||||
constructor(name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[]);
|
||||
static [Symbol.hasInstance](lhs: unknown): lhs is StructureSchema;
|
||||
}
|
||||
/**
|
||||
* Factory for StructureSchema.
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@smithy/core",
|
||||
"version": "3.6.0",
|
||||
"version": "3.7.0",
|
||||
"scripts": {
|
||||
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
||||
"build:cjs": "node ../../scripts/inline core",
|
||||
@@ -75,7 +75,7 @@
|
||||
"@smithy/util-base64": "^4.0.0",
|
||||
"@smithy/util-body-length-browser": "^4.0.0",
|
||||
"@smithy/util-middleware": "^4.0.4",
|
||||
"@smithy/util-stream": "^4.2.2",
|
||||
"@smithy/util-stream": "^4.2.3",
|
||||
"@smithy/util-utf8": "^4.0.0",
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user