Skip to content

Commit 2043a99

Browse files
authored
export schemas from packages with $ suffix (#1807)
1 parent 27f444b commit 2043a99

27 files changed

+367
-184
lines changed

private/my-local-model-schema/src/commands/GetNumbersCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { GetNumbersRequest, GetNumbersResponse } from "../models/models_0";
8-
import { GetNumbers } from "../schemas/schemas_0";
8+
import { GetNumbers$ } from "../schemas/schemas_0";
99
import type { ServiceInputTypes, ServiceOutputTypes, XYZServiceClientResolvedConfig } from "../XYZServiceClient";
1010

1111
/**
@@ -89,7 +89,7 @@ export class GetNumbersCommand extends $Command
8989
})
9090
.s("XYZService", "GetNumbers", {})
9191
.n("XYZServiceClient", "GetNumbersCommand")
92-
.sc(GetNumbers)
92+
.sc(GetNumbers$)
9393
.build() {
9494
/** @internal type navigation helper, not in runtime. */
9595
protected declare static __types: {

private/my-local-model-schema/src/commands/TradeEventStreamCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { TradeEventStreamRequest, TradeEventStreamResponse } from "../models/models_0";
8-
import { TradeEventStream } from "../schemas/schemas_0";
8+
import { TradeEventStream$ } from "../schemas/schemas_0";
99
import type { ServiceInputTypes, ServiceOutputTypes, XYZServiceClientResolvedConfig } from "../XYZServiceClient";
1010

1111
/**
@@ -97,7 +97,7 @@ export class TradeEventStreamCommand extends $Command
9797
},
9898
})
9999
.n("XYZServiceClient", "TradeEventStreamCommand")
100-
.sc(TradeEventStream)
100+
.sc(TradeEventStream$)
101101
.build() {
102102
/** @internal type navigation helper, not in runtime. */
103103
protected declare static __types: {

private/my-local-model-schema/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
1111
export type { RuntimeExtension } from "./runtimeExtensions";
1212
export type { XYZServiceExtensionConfiguration } from "./extensionConfiguration";
1313
export * from "./commands";
14+
export * from "./schemas/schemas_0";
1415

1516
export * from "./models/errors";
1617
export type * from "./models/models_0";

private/my-local-model-schema/src/schemas/schemas_0.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,78 +46,78 @@ import {
4646
} from "../models/XYZServiceSyntheticServiceException";
4747

4848
/* eslint no-var: 0 */
49-
export var Alpha: StaticStructureSchema = [3, n0, _A,
49+
export var Alpha$: StaticStructureSchema = [3, n0, _A,
5050
0,
5151
[_i, _t],
5252
[0, 4]
5353
];
54-
export var CodedThrottlingError: StaticErrorSchema = [-3, n0, _CTE,
54+
export var CodedThrottlingError$: StaticErrorSchema = [-3, n0, _CTE,
5555
{ [_e]: _c, [_hE]: 429 },
5656
[],
5757
[]
5858
];
59-
TypeRegistry.for(n0).registerError(CodedThrottlingError, __CodedThrottlingError);
60-
export var GetNumbersRequest: StaticStructureSchema = [3, n0, _GNR,
59+
TypeRegistry.for(n0).registerError(CodedThrottlingError$, __CodedThrottlingError);
60+
export var GetNumbersRequest$: StaticStructureSchema = [3, n0, _GNR,
6161
0,
6262
[_bD, _bI, _fWM, _fWMi],
6363
[17, 19, 0, 0]
6464
];
65-
export var GetNumbersResponse: StaticStructureSchema = [3, n0, _GNRe,
65+
export var GetNumbersResponse$: StaticStructureSchema = [3, n0, _GNRe,
6666
0,
6767
[_bD, _bI],
6868
[17, 19]
6969
];
70-
export var HaltError: StaticErrorSchema = [-3, n0, _HE,
70+
export var HaltError$: StaticErrorSchema = [-3, n0, _HE,
7171
{ [_e]: _c },
7272
[],
7373
[]
7474
];
75-
TypeRegistry.for(n0).registerError(HaltError, __HaltError);
76-
export var MainServiceLinkedError: StaticErrorSchema = [-3, n0, _MSLE,
75+
TypeRegistry.for(n0).registerError(HaltError$, __HaltError);
76+
export var MainServiceLinkedError$: StaticErrorSchema = [-3, n0, _MSLE,
7777
{ [_e]: _c, [_hE]: 400 },
7878
[],
7979
[]
8080
];
81-
TypeRegistry.for(n0).registerError(MainServiceLinkedError, __MainServiceLinkedError);
82-
export var MysteryThrottlingError: StaticErrorSchema = [-3, n0, _MTE,
81+
TypeRegistry.for(n0).registerError(MainServiceLinkedError$, __MainServiceLinkedError);
82+
export var MysteryThrottlingError$: StaticErrorSchema = [-3, n0, _MTE,
8383
{ [_e]: _c },
8484
[],
8585
[]
8686
];
87-
TypeRegistry.for(n0).registerError(MysteryThrottlingError, __MysteryThrottlingError);
88-
export var RetryableError: StaticErrorSchema = [-3, n0, _RE,
87+
TypeRegistry.for(n0).registerError(MysteryThrottlingError$, __MysteryThrottlingError);
88+
export var RetryableError$: StaticErrorSchema = [-3, n0, _RE,
8989
{ [_e]: _c },
9090
[],
9191
[]
9292
];
93-
TypeRegistry.for(n0).registerError(RetryableError, __RetryableError);
94-
export var TradeEventStreamRequest: StaticStructureSchema = [3, n0, _TESR,
93+
TypeRegistry.for(n0).registerError(RetryableError$, __RetryableError);
94+
export var TradeEventStreamRequest$: StaticStructureSchema = [3, n0, _TESR,
9595
0,
9696
[_eS],
97-
[[() => TradeEvents, 0]]
97+
[[() => TradeEvents$, 0]]
9898
];
99-
export var TradeEventStreamResponse: StaticStructureSchema = [3, n0, _TESRr,
99+
export var TradeEventStreamResponse$: StaticStructureSchema = [3, n0, _TESRr,
100100
0,
101101
[_eS],
102-
[[() => TradeEvents, 0]]
102+
[[() => TradeEvents$, 0]]
103103
];
104-
export var XYZServiceServiceException: StaticErrorSchema = [-3, n0, _XYZSSE,
104+
export var XYZServiceServiceException$: StaticErrorSchema = [-3, n0, _XYZSSE,
105105
{ [_e]: _c },
106106
[],
107107
[]
108108
];
109-
TypeRegistry.for(n0).registerError(XYZServiceServiceException, __XYZServiceServiceException);
110-
export var __Unit = "unit" as const;
109+
TypeRegistry.for(n0).registerError(XYZServiceServiceException$, __XYZServiceServiceException);
110+
var __Unit = "unit" as const;
111111
export var XYZServiceSyntheticServiceException: StaticErrorSchema = [-3, _s, "XYZServiceSyntheticServiceException", 0, [], []];
112112
TypeRegistry.for(_s).registerError(XYZServiceSyntheticServiceException, __XYZServiceSyntheticServiceException);
113-
export var TradeEvents: StaticStructureSchema = [3, n0, _TE,
113+
export var TradeEvents$: StaticStructureSchema = [3, n0, _TE,
114114
{ [_st]: 1 },
115115
[_a, _b, _g],
116-
[() => Alpha, () => __Unit, () => __Unit]
116+
[() => Alpha$, () => __Unit, () => __Unit]
117117
];
118-
export var GetNumbers: StaticOperationSchema = [9, n0, _GN,
119-
0, () => GetNumbersRequest, () => GetNumbersResponse
118+
export var GetNumbers$: StaticOperationSchema = [9, n0, _GN,
119+
0, () => GetNumbersRequest$, () => GetNumbersResponse$
120120
];
121-
export var TradeEventStream: StaticOperationSchema = [9, n0, _TES,
122-
0, () => TradeEventStreamRequest, () => TradeEventStreamResponse
121+
export var TradeEventStream$: StaticOperationSchema = [9, n0, _TES,
122+
0, () => TradeEventStreamRequest$, () => TradeEventStreamResponse$
123123
];

private/my-local-model-schema/test/index-objects.spec.mjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
import {
2+
Alpha$,
23
CodedThrottlingError,
4+
CodedThrottlingError$,
5+
GetNumbers$,
36
GetNumbersCommand,
7+
GetNumbersRequest$,
8+
GetNumbersResponse$,
49
HaltError,
10+
HaltError$,
511
MainServiceLinkedError,
12+
MainServiceLinkedError$,
613
MysteryThrottlingError,
14+
MysteryThrottlingError$,
715
RetryableError,
16+
RetryableError$,
17+
TradeEventStream$,
818
TradeEventStreamCommand,
19+
TradeEventStreamRequest$,
20+
TradeEventStreamResponse$,
21+
TradeEvents$,
922
XYZService,
1023
XYZServiceClient,
1124
XYZServiceServiceException,
25+
XYZServiceServiceException$,
1226
XYZServiceSyntheticServiceException,
1327
} from "../dist-cjs/index.js";
1428
import assert from "node:assert";
@@ -17,13 +31,28 @@ assert(typeof XYZServiceClient === "function");
1731
assert(typeof XYZService === "function");
1832
// commands
1933
assert(typeof GetNumbersCommand === "function");
34+
assert(typeof GetNumbers$ === "object");
2035
assert(typeof TradeEventStreamCommand === "function");
36+
assert(typeof TradeEventStream$ === "object");
37+
// structural schemas
38+
assert(typeof Alpha$ === "object");
39+
assert(typeof GetNumbersRequest$ === "object");
40+
assert(typeof GetNumbersResponse$ === "object");
41+
assert(typeof TradeEvents$ === "object");
42+
assert(typeof TradeEventStreamRequest$ === "object");
43+
assert(typeof TradeEventStreamResponse$ === "object");
2144
// errors
2245
assert(CodedThrottlingError.prototype instanceof XYZServiceSyntheticServiceException);
46+
assert(typeof CodedThrottlingError$ === "object");
2347
assert(HaltError.prototype instanceof XYZServiceSyntheticServiceException);
48+
assert(typeof HaltError$ === "object");
2449
assert(MainServiceLinkedError.prototype instanceof XYZServiceSyntheticServiceException);
50+
assert(typeof MainServiceLinkedError$ === "object");
2551
assert(MysteryThrottlingError.prototype instanceof XYZServiceSyntheticServiceException);
52+
assert(typeof MysteryThrottlingError$ === "object");
2653
assert(RetryableError.prototype instanceof XYZServiceSyntheticServiceException);
54+
assert(typeof RetryableError$ === "object");
2755
assert(XYZServiceServiceException.prototype instanceof XYZServiceSyntheticServiceException);
56+
assert(typeof XYZServiceServiceException$ === "object");
2857
assert(XYZServiceSyntheticServiceException.prototype instanceof Error);
2958
console.log(`XYZService index test passed.`);

private/smithy-rpcv2-cbor-schema/src/commands/EmptyInputOutputCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { EmptyStructure } from "../models/models_0";
88
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
9-
import { EmptyInputOutput } from "../schemas/schemas_0";
9+
import { EmptyInputOutput$ } from "../schemas/schemas_0";
1010

1111
/**
1212
* @public
@@ -69,7 +69,7 @@ export class EmptyInputOutputCommand extends $Command
6969
})
7070
.s("RpcV2Protocol", "EmptyInputOutput", {})
7171
.n("RpcV2ProtocolClient", "EmptyInputOutputCommand")
72-
.sc(EmptyInputOutput)
72+
.sc(EmptyInputOutput$)
7373
.build() {
7474
/** @internal type navigation helper, not in runtime. */
7575
protected declare static __types: {

private/smithy-rpcv2-cbor-schema/src/commands/Float16Command.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { Float16Output } from "../models/models_0";
88
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
9-
import { Float16 } from "../schemas/schemas_0";
9+
import { Float16$ } from "../schemas/schemas_0";
1010

1111
/**
1212
* @public
@@ -71,7 +71,7 @@ export class Float16Command extends $Command
7171
})
7272
.s("RpcV2Protocol", "Float16", {})
7373
.n("RpcV2ProtocolClient", "Float16Command")
74-
.sc(Float16)
74+
.sc(Float16$)
7575
.build() {
7676
/** @internal type navigation helper, not in runtime. */
7777
protected declare static __types: {

private/smithy-rpcv2-cbor-schema/src/commands/FractionalSecondsCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { FractionalSecondsOutput } from "../models/models_0";
88
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
9-
import { FractionalSeconds } from "../schemas/schemas_0";
9+
import { FractionalSeconds$ } from "../schemas/schemas_0";
1010

1111
/**
1212
* @public
@@ -71,7 +71,7 @@ export class FractionalSecondsCommand extends $Command
7171
})
7272
.s("RpcV2Protocol", "FractionalSeconds", {})
7373
.n("RpcV2ProtocolClient", "FractionalSecondsCommand")
74-
.sc(FractionalSeconds)
74+
.sc(FractionalSeconds$)
7575
.build() {
7676
/** @internal type navigation helper, not in runtime. */
7777
protected declare static __types: {

private/smithy-rpcv2-cbor-schema/src/commands/GreetingWithErrorsCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { GreetingWithErrorsOutput } from "../models/models_0";
88
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
9-
import { GreetingWithErrors } from "../schemas/schemas_0";
9+
import { GreetingWithErrors$ } from "../schemas/schemas_0";
1010

1111
/**
1212
* @public
@@ -84,7 +84,7 @@ export class GreetingWithErrorsCommand extends $Command
8484
})
8585
.s("RpcV2Protocol", "GreetingWithErrors", {})
8686
.n("RpcV2ProtocolClient", "GreetingWithErrorsCommand")
87-
.sc(GreetingWithErrors)
87+
.sc(GreetingWithErrors$)
8888
.build() {
8989
/** @internal type navigation helper, not in runtime. */
9090
protected declare static __types: {

private/smithy-rpcv2-cbor-schema/src/commands/NoInputOutputCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

66
import { commonParams } from "../endpoint/EndpointParameters";
77
import type { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RpcV2ProtocolClient";
8-
import { NoInputOutput } from "../schemas/schemas_0";
8+
import { NoInputOutput$ } from "../schemas/schemas_0";
99

1010
/**
1111
* @public
@@ -68,7 +68,7 @@ export class NoInputOutputCommand extends $Command
6868
})
6969
.s("RpcV2Protocol", "NoInputOutput", {})
7070
.n("RpcV2ProtocolClient", "NoInputOutputCommand")
71-
.sc(NoInputOutput)
71+
.sc(NoInputOutput$)
7272
.build() {
7373
/** @internal type navigation helper, not in runtime. */
7474
protected declare static __types: {

0 commit comments

Comments
 (0)