Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import type { GetNumbersRequest, GetNumbersResponse } from "../models/models_0";
import { GetNumbers$ } from "../schemas/schemas_0";
import { GetNumbersSchema } from "../schemas/schemas_0";
import type { ServiceInputTypes, ServiceOutputTypes, XYZServiceClientResolvedConfig } from "../XYZServiceClient";

/**
Expand Down Expand Up @@ -89,7 +89,7 @@ export class GetNumbersCommand extends $Command
})
.s("XYZService", "GetNumbers", {})
.n("XYZServiceClient", "GetNumbersCommand")
.sc(GetNumbers$)
.sc(GetNumbersSchema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import type { TradeEventStreamRequest, TradeEventStreamResponse } from "../models/models_0";
import { TradeEventStream$ } from "../schemas/schemas_0";
import { TradeEventStreamSchema } from "../schemas/schemas_0";
import type { ServiceInputTypes, ServiceOutputTypes, XYZServiceClientResolvedConfig } from "../XYZServiceClient";

/**
Expand Down Expand Up @@ -97,7 +97,7 @@ export class TradeEventStreamCommand extends $Command
},
})
.n("XYZServiceClient", "TradeEventStreamCommand")
.sc(TradeEventStream$)
.sc(TradeEventStreamSchema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
70 changes: 34 additions & 36 deletions private/my-local-model-schema/src/schemas/schemas_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,90 +34,88 @@ import { TypeRegistry } from "@smithy/core/schema";
import type { StaticErrorSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";

import {
CodedThrottlingError as __CodedThrottlingError,
HaltError as __HaltError,
MainServiceLinkedError as __MainServiceLinkedError,
MysteryThrottlingError as __MysteryThrottlingError,
RetryableError as __RetryableError,
XYZServiceServiceException as __XYZServiceServiceException,
CodedThrottlingError,
HaltError,
MainServiceLinkedError,
MysteryThrottlingError,
RetryableError,
XYZServiceServiceException,
} from "../models/errors";
import {
XYZServiceSyntheticServiceException as __XYZServiceSyntheticServiceException,
} from "../models/XYZServiceSyntheticServiceException";
import { XYZServiceSyntheticServiceException } from "../models/XYZServiceSyntheticServiceException";

/* eslint no-var: 0 */
export var Alpha$: StaticStructureSchema = [3, n0, _A,
export var AlphaSchema: StaticStructureSchema = [3, n0, _A,
0,
[_i, _t],
[0, 4]
];
export var CodedThrottlingError$: StaticErrorSchema = [-3, n0, _CTE,
export var CodedThrottlingErrorSchema: StaticErrorSchema = [-3, n0, _CTE,
{ [_e]: _c, [_hE]: 429 },
[],
[]
];
TypeRegistry.for(n0).registerError(CodedThrottlingError$, __CodedThrottlingError);
export var GetNumbersRequest$: StaticStructureSchema = [3, n0, _GNR,
TypeRegistry.for(n0).registerError(CodedThrottlingErrorSchema, CodedThrottlingError);
export var GetNumbersRequestSchema: StaticStructureSchema = [3, n0, _GNR,
0,
[_bD, _bI, _fWM, _fWMi],
[17, 19, 0, 0]
];
export var GetNumbersResponse$: StaticStructureSchema = [3, n0, _GNRe,
export var GetNumbersResponseSchema: StaticStructureSchema = [3, n0, _GNRe,
0,
[_bD, _bI],
[17, 19]
];
export var HaltError$: StaticErrorSchema = [-3, n0, _HE,
export var HaltErrorSchema: StaticErrorSchema = [-3, n0, _HE,
{ [_e]: _c },
[],
[]
];
TypeRegistry.for(n0).registerError(HaltError$, __HaltError);
export var MainServiceLinkedError$: StaticErrorSchema = [-3, n0, _MSLE,
TypeRegistry.for(n0).registerError(HaltErrorSchema, HaltError);
export var MainServiceLinkedErrorSchema: StaticErrorSchema = [-3, n0, _MSLE,
{ [_e]: _c, [_hE]: 400 },
[],
[]
];
TypeRegistry.for(n0).registerError(MainServiceLinkedError$, __MainServiceLinkedError);
export var MysteryThrottlingError$: StaticErrorSchema = [-3, n0, _MTE,
TypeRegistry.for(n0).registerError(MainServiceLinkedErrorSchema, MainServiceLinkedError);
export var MysteryThrottlingErrorSchema: StaticErrorSchema = [-3, n0, _MTE,
{ [_e]: _c },
[],
[]
];
TypeRegistry.for(n0).registerError(MysteryThrottlingError$, __MysteryThrottlingError);
export var RetryableError$: StaticErrorSchema = [-3, n0, _RE,
TypeRegistry.for(n0).registerError(MysteryThrottlingErrorSchema, MysteryThrottlingError);
export var RetryableErrorSchema: StaticErrorSchema = [-3, n0, _RE,
{ [_e]: _c },
[],
[]
];
TypeRegistry.for(n0).registerError(RetryableError$, __RetryableError);
export var TradeEventStreamRequest$: StaticStructureSchema = [3, n0, _TESR,
TypeRegistry.for(n0).registerError(RetryableErrorSchema, RetryableError);
export var TradeEventStreamRequestSchema: StaticStructureSchema = [3, n0, _TESR,
0,
[_eS],
[[() => TradeEvents$, 0]]
[[() => TradeEventsSchema, 0]]
];
export var TradeEventStreamResponse$: StaticStructureSchema = [3, n0, _TESRr,
export var TradeEventStreamResponseSchema: StaticStructureSchema = [3, n0, _TESRr,
0,
[_eS],
[[() => TradeEvents$, 0]]
[[() => TradeEventsSchema, 0]]
];
export var XYZServiceServiceException$: StaticErrorSchema = [-3, n0, _XYZSSE,
export var XYZServiceServiceExceptionSchema: StaticErrorSchema = [-3, n0, _XYZSSE,
{ [_e]: _c },
[],
[]
];
TypeRegistry.for(n0).registerError(XYZServiceServiceException$, __XYZServiceServiceException);
TypeRegistry.for(n0).registerError(XYZServiceServiceExceptionSchema, XYZServiceServiceException);
var __Unit = "unit" as const;
export var XYZServiceSyntheticServiceException: StaticErrorSchema = [-3, _s, "XYZServiceSyntheticServiceException", 0, [], []];
TypeRegistry.for(_s).registerError(XYZServiceSyntheticServiceException, __XYZServiceSyntheticServiceException);
export var TradeEvents$: StaticStructureSchema = [3, n0, _TE,
export var XYZServiceSyntheticServiceException$: StaticErrorSchema = [-3, _s, "XYZServiceSyntheticServiceException", 0, [], []];
TypeRegistry.for(_s).registerError(XYZServiceSyntheticServiceException$, XYZServiceSyntheticServiceException);
export var TradeEventsSchema: StaticStructureSchema = [3, n0, _TE,
{ [_st]: 1 },
[_a, _b, _g],
[() => Alpha$, () => __Unit, () => __Unit]
[() => AlphaSchema, () => __Unit, () => __Unit]
];
export var GetNumbers$: StaticOperationSchema = [9, n0, _GN,
0, () => GetNumbersRequest$, () => GetNumbersResponse$
export var GetNumbersSchema: StaticOperationSchema = [9, n0, _GN,
0, () => GetNumbersRequestSchema, () => GetNumbersResponseSchema
];
export var TradeEventStream$: StaticOperationSchema = [9, n0, _TES,
0, () => TradeEventStreamRequest$, () => TradeEventStreamResponse$
export var TradeEventStreamSchema: StaticOperationSchema = [9, n0, _TES,
0, () => TradeEventStreamRequestSchema, () => TradeEventStreamResponseSchema
];
56 changes: 28 additions & 28 deletions private/my-local-model-schema/test/index-objects.spec.mjs
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import {
Alpha$,
AlphaSchema,
CodedThrottlingError,
CodedThrottlingError$,
GetNumbers$,
CodedThrottlingErrorSchema,
GetNumbersCommand,
GetNumbersRequest$,
GetNumbersResponse$,
GetNumbersRequestSchema,
GetNumbersResponseSchema,
GetNumbersSchema,
HaltError,
HaltError$,
HaltErrorSchema,
MainServiceLinkedError,
MainServiceLinkedError$,
MainServiceLinkedErrorSchema,
MysteryThrottlingError,
MysteryThrottlingError$,
MysteryThrottlingErrorSchema,
RetryableError,
RetryableError$,
TradeEventStream$,
RetryableErrorSchema,
TradeEventStreamCommand,
TradeEventStreamRequest$,
TradeEventStreamResponse$,
TradeEvents$,
TradeEventStreamRequestSchema,
TradeEventStreamResponseSchema,
TradeEventStreamSchema,
TradeEventsSchema,
XYZService,
XYZServiceClient,
XYZServiceServiceException,
XYZServiceServiceException$,
XYZServiceServiceExceptionSchema,
XYZServiceSyntheticServiceException,
} from "../dist-cjs/index.js";
import assert from "node:assert";
Expand All @@ -31,28 +31,28 @@ assert(typeof XYZServiceClient === "function");
assert(typeof XYZService === "function");
// commands
assert(typeof GetNumbersCommand === "function");
assert(typeof GetNumbers$ === "object");
assert(typeof GetNumbersSchema === "object");
assert(typeof TradeEventStreamCommand === "function");
assert(typeof TradeEventStream$ === "object");
assert(typeof TradeEventStreamSchema === "object");
// structural schemas
assert(typeof Alpha$ === "object");
assert(typeof GetNumbersRequest$ === "object");
assert(typeof GetNumbersResponse$ === "object");
assert(typeof TradeEvents$ === "object");
assert(typeof TradeEventStreamRequest$ === "object");
assert(typeof TradeEventStreamResponse$ === "object");
assert(typeof AlphaSchema === "object");
assert(typeof GetNumbersRequestSchema === "object");
assert(typeof GetNumbersResponseSchema === "object");
assert(typeof TradeEventsSchema === "object");
assert(typeof TradeEventStreamRequestSchema === "object");
assert(typeof TradeEventStreamResponseSchema === "object");
// errors
assert(CodedThrottlingError.prototype instanceof XYZServiceSyntheticServiceException);
assert(typeof CodedThrottlingError$ === "object");
assert(typeof CodedThrottlingErrorSchema === "object");
assert(HaltError.prototype instanceof XYZServiceSyntheticServiceException);
assert(typeof HaltError$ === "object");
assert(typeof HaltErrorSchema === "object");
assert(MainServiceLinkedError.prototype instanceof XYZServiceSyntheticServiceException);
assert(typeof MainServiceLinkedError$ === "object");
assert(typeof MainServiceLinkedErrorSchema === "object");
assert(MysteryThrottlingError.prototype instanceof XYZServiceSyntheticServiceException);
assert(typeof MysteryThrottlingError$ === "object");
assert(typeof MysteryThrottlingErrorSchema === "object");
assert(RetryableError.prototype instanceof XYZServiceSyntheticServiceException);
assert(typeof RetryableError$ === "object");
assert(typeof RetryableErrorSchema === "object");
assert(XYZServiceServiceException.prototype instanceof XYZServiceSyntheticServiceException);
assert(typeof XYZServiceServiceException$ === "object");
assert(typeof XYZServiceServiceExceptionSchema === "object");
assert(XYZServiceSyntheticServiceException.prototype instanceof Error);
console.log(`XYZService index test passed.`);
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { commonParams } from "../endpoint/EndpointParameters";
import type { EmptyStructure } from "../models/models_0";
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
import { EmptyInputOutput$ } from "../schemas/schemas_0";
import { EmptyInputOutputSchema } from "../schemas/schemas_0";

/**
* @public
Expand Down Expand Up @@ -69,7 +69,7 @@ export class EmptyInputOutputCommand extends $Command
})
.s("RpcV2Protocol", "EmptyInputOutput", {})
.n("RpcV2ProtocolClient", "EmptyInputOutputCommand")
.sc(EmptyInputOutput$)
.sc(EmptyInputOutputSchema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { commonParams } from "../endpoint/EndpointParameters";
import type { Float16Output } from "../models/models_0";
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
import { Float16$ } from "../schemas/schemas_0";
import { Float16Schema } from "../schemas/schemas_0";

/**
* @public
Expand Down Expand Up @@ -71,7 +71,7 @@ export class Float16Command extends $Command
})
.s("RpcV2Protocol", "Float16", {})
.n("RpcV2ProtocolClient", "Float16Command")
.sc(Float16$)
.sc(Float16Schema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { commonParams } from "../endpoint/EndpointParameters";
import type { FractionalSecondsOutput } from "../models/models_0";
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
import { FractionalSeconds$ } from "../schemas/schemas_0";
import { FractionalSecondsSchema } from "../schemas/schemas_0";

/**
* @public
Expand Down Expand Up @@ -71,7 +71,7 @@ export class FractionalSecondsCommand extends $Command
})
.s("RpcV2Protocol", "FractionalSeconds", {})
.n("RpcV2ProtocolClient", "FractionalSecondsCommand")
.sc(FractionalSeconds$)
.sc(FractionalSecondsSchema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { commonParams } from "../endpoint/EndpointParameters";
import type { GreetingWithErrorsOutput } from "../models/models_0";
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
import { GreetingWithErrors$ } from "../schemas/schemas_0";
import { GreetingWithErrorsSchema } from "../schemas/schemas_0";

/**
* @public
Expand Down Expand Up @@ -84,7 +84,7 @@ export class GreetingWithErrorsCommand extends $Command
})
.s("RpcV2Protocol", "GreetingWithErrors", {})
.n("RpcV2ProtocolClient", "GreetingWithErrorsCommand")
.sc(GreetingWithErrors$)
.sc(GreetingWithErrorsSchema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
import { NoInputOutput$ } from "../schemas/schemas_0";
import { NoInputOutputSchema } from "../schemas/schemas_0";

/**
* @public
Expand Down Expand Up @@ -68,7 +68,7 @@ export class NoInputOutputCommand extends $Command
})
.s("RpcV2Protocol", "NoInputOutput", {})
.n("RpcV2ProtocolClient", "NoInputOutputCommand")
.sc(NoInputOutput$)
.sc(NoInputOutputSchema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { commonParams } from "../endpoint/EndpointParameters";
import type { OperationWithDefaultsInput, OperationWithDefaultsOutput } from "../models/models_0";
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
import { OperationWithDefaults$ } from "../schemas/schemas_0";
import { OperationWithDefaultsSchema } from "../schemas/schemas_0";

/**
* @public
Expand Down Expand Up @@ -137,7 +137,7 @@ export class OperationWithDefaultsCommand extends $Command
})
.s("RpcV2Protocol", "OperationWithDefaults", {})
.n("RpcV2ProtocolClient", "OperationWithDefaultsCommand")
.sc(OperationWithDefaults$)
.sc(OperationWithDefaultsSchema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { commonParams } from "../endpoint/EndpointParameters";
import type { SimpleStructure } from "../models/models_0";
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
import { OptionalInputOutput$ } from "../schemas/schemas_0";
import { OptionalInputOutputSchema } from "../schemas/schemas_0";

/**
* @public
Expand Down Expand Up @@ -73,7 +73,7 @@ export class OptionalInputOutputCommand extends $Command
})
.s("RpcV2Protocol", "OptionalInputOutput", {})
.n("RpcV2ProtocolClient", "OptionalInputOutputCommand")
.sc(OptionalInputOutput$)
.sc(OptionalInputOutputSchema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { commonParams } from "../endpoint/EndpointParameters";
import type { RecursiveShapesInputOutput } from "../models/models_0";
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
import { RecursiveShapes$ } from "../schemas/schemas_0";
import { RecursiveShapesSchema } from "../schemas/schemas_0";

/**
* @public
Expand Down Expand Up @@ -97,7 +97,7 @@ export class RecursiveShapesCommand extends $Command
})
.s("RpcV2Protocol", "RecursiveShapes", {})
.n("RpcV2ProtocolClient", "RecursiveShapesCommand")
.sc(RecursiveShapes$)
.sc(RecursiveShapesSchema)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
Expand Down
Loading