Skip to content
Merged
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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ generate-protocol-tests:
rm -rf ./private/smithy-rpcv2-cbor
rm -rf ./private/smithy-rpcv2-cbor-schema
rm -rf ./private/my-local-model
rm -rf ./private/my-local-model-schema
cp -r ./smithy-typescript-protocol-test-codegen/build/smithyprojections/smithy-typescript-protocol-test-codegen/smithy-rpcv2-cbor/typescript-codegen ./private/smithy-rpcv2-cbor
cp -r ./smithy-typescript-protocol-test-codegen/build/smithyprojections/smithy-typescript-protocol-test-codegen/smithy-rpcv2-cbor-schema/typescript-codegen ./private/smithy-rpcv2-cbor-schema
cp -r ./smithy-typescript-protocol-test-codegen/build/smithyprojections/smithy-typescript-protocol-test-codegen/my-local-model/typescript-client-codegen/ ./private/my-local-model
cp -r ./smithy-typescript-protocol-test-codegen/build/smithyprojections/smithy-typescript-protocol-test-codegen/my-local-model-schema/typescript-client-codegen/ ./private/my-local-model-schema
node ./scripts/post-protocol-test-codegen
npx prettier --write ./private/smithy-rpcv2-cbor
npx prettier --write ./private/smithy-rpcv2-cbor-schema
npx prettier --write ./private/my-local-model
npx prettier --write ./private/my-local-model-schema
yarn

test-protocols:
Expand Down
80 changes: 80 additions & 0 deletions private/my-local-model-schema/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"name": "xyz-schema",
"description": "xyz-schema client",
"version": "0.0.1",
"scripts": {
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:es": "tsc -p tsconfig.es.json",
"build:types": "tsc -p tsconfig.types.json",
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
"prepack": "yarn run clean && yarn run build"
},
"main": "./dist-cjs/index.js",
"types": "./dist-types/index.d.ts",
"module": "./dist-es/index.js",
"sideEffects": false,
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
"@aws-sdk/types": "latest",
"@smithy/config-resolver": "workspace:^",
"@smithy/core": "workspace:^",
"@smithy/eventstream-serde-browser": "workspace:^",
"@smithy/eventstream-serde-config-resolver": "workspace:^",
"@smithy/eventstream-serde-node": "workspace:^",
"@smithy/fetch-http-handler": "workspace:^",
"@smithy/hash-node": "workspace:^",
"@smithy/invalid-dependency": "workspace:^",
"@smithy/middleware-content-length": "workspace:^",
"@smithy/middleware-endpoint": "workspace:^",
"@smithy/middleware-retry": "workspace:^",
"@smithy/middleware-serde": "workspace:^",
"@smithy/middleware-stack": "workspace:^",
"@smithy/node-config-provider": "workspace:^",
"@smithy/node-http-handler": "workspace:^",
"@smithy/protocol-http": "workspace:^",
"@smithy/smithy-client": "workspace:^",
"@smithy/types": "workspace:^",
"@smithy/url-parser": "workspace:^",
"@smithy/util-base64": "workspace:^",
"@smithy/util-body-length-browser": "workspace:^",
"@smithy/util-body-length-node": "workspace:^",
"@smithy/util-defaults-mode-browser": "workspace:^",
"@smithy/util-defaults-mode-node": "workspace:^",
"@smithy/util-endpoints": "workspace:^",
"@smithy/util-middleware": "workspace:^",
"@smithy/util-retry": "workspace:^",
"@smithy/util-utf8": "workspace:^",
"tslib": "^2.6.2"
},
"devDependencies": {
"@tsconfig/node18": "18.2.4",
"@types/node": "^18.19.69",
"concurrently": "7.0.0",
"downlevel-dts": "0.10.1",
"rimraf": "^3.0.0",
"typescript": "~5.8.3"
},
"engines": {
"node": ">=18.0.0"
},
"typesVersions": {
"<4.0": {
"dist-types/*": [
"dist-types/ts3.4/*"
]
}
},
"files": [
"dist-*/**"
],
"private": true,
"browser": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
},
"react-native": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
}
}
54 changes: 54 additions & 0 deletions private/my-local-model-schema/src/XYZService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// smithy-typescript generated code
import { XYZServiceClient, XYZServiceClientConfig } from "./XYZServiceClient";
import { GetNumbersCommand, GetNumbersCommandInput, GetNumbersCommandOutput } from "./commands/GetNumbersCommand";
import {
TradeEventStreamCommand,
TradeEventStreamCommandInput,
TradeEventStreamCommandOutput,
} from "./commands/TradeEventStreamCommand";
import { createAggregatedClient } from "@smithy/smithy-client";
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";

const commands = {
GetNumbersCommand,
TradeEventStreamCommand,
};

export interface XYZService {
/**
* @see {@link GetNumbersCommand}
*/
getNumbers(): Promise<GetNumbersCommandOutput>;
getNumbers(args: GetNumbersCommandInput, options?: __HttpHandlerOptions): Promise<GetNumbersCommandOutput>;
getNumbers(args: GetNumbersCommandInput, cb: (err: any, data?: GetNumbersCommandOutput) => void): void;
getNumbers(
args: GetNumbersCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetNumbersCommandOutput) => void
): void;

/**
* @see {@link TradeEventStreamCommand}
*/
tradeEventStream(): Promise<TradeEventStreamCommandOutput>;
tradeEventStream(
args: TradeEventStreamCommandInput,
options?: __HttpHandlerOptions
): Promise<TradeEventStreamCommandOutput>;
tradeEventStream(
args: TradeEventStreamCommandInput,
cb: (err: any, data?: TradeEventStreamCommandOutput) => void
): void;
tradeEventStream(
args: TradeEventStreamCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: TradeEventStreamCommandOutput) => void
): void;
}

/**
* xyz interfaces
* @public
*/
export class XYZService extends XYZServiceClient implements XYZService {}
createAggregatedClient(commands, XYZService);
Loading