diff --git a/.changeset/many-pillows-add.md b/.changeset/many-pillows-add.md new file mode 100644 index 00000000000..b13ded1914b --- /dev/null +++ b/.changeset/many-pillows-add.md @@ -0,0 +1,5 @@ +--- +"@smithy/util-endpoints": patch +--- + +Re-export existing types diff --git a/packages/util-endpoints/src/types/EndpointRuleObject.ts b/packages/util-endpoints/src/types/EndpointRuleObject.ts index 108480175fe..31ce4dafdbe 100644 --- a/packages/util-endpoints/src/types/EndpointRuleObject.ts +++ b/packages/util-endpoints/src/types/EndpointRuleObject.ts @@ -1,18 +1,14 @@ -import { EndpointObjectProperty } from "@smithy/types"; +import { + EndpointObject as __EndpointObject, + EndpointObjectHeaders as __EndpointObjectHeaders, + EndpointObjectProperties as __EndpointObjectProperties, + EndpointObjectProperty, + EndpointRuleObject as __EndpointRuleObject, +} from "@smithy/types"; -import { ConditionObject, Expression } from "./shared"; +export type EndpointObjectProperties = __EndpointObjectProperties; -export type EndpointObjectProperties = Record; -export type EndpointObjectHeaders = Record; -export type EndpointObject = { - url: Expression; - properties?: EndpointObjectProperties; - headers?: EndpointObjectHeaders; -}; +export type EndpointObjectHeaders = __EndpointObjectHeaders; +export type EndpointObject = __EndpointObject; -export type EndpointRuleObject = { - type: "endpoint"; - conditions?: ConditionObject[]; - endpoint: EndpointObject; - documentation?: string; -}; +export type EndpointRuleObject = __EndpointRuleObject; diff --git a/packages/util-endpoints/src/types/ErrorRuleObject.ts b/packages/util-endpoints/src/types/ErrorRuleObject.ts index e03239a11b9..2fc5d057128 100644 --- a/packages/util-endpoints/src/types/ErrorRuleObject.ts +++ b/packages/util-endpoints/src/types/ErrorRuleObject.ts @@ -1,8 +1,3 @@ -import { ConditionObject, Expression } from "./shared"; +import { ErrorRuleObject as __ErrorRuleObject } from "@smithy/types"; -export type ErrorRuleObject = { - type: "error"; - conditions?: ConditionObject[]; - error: Expression; - documentation?: string; -}; +export type ErrorRuleObject = __ErrorRuleObject; diff --git a/packages/util-endpoints/src/types/RuleSetObject.ts b/packages/util-endpoints/src/types/RuleSetObject.ts index 013e466f89a..5c74769fedf 100644 --- a/packages/util-endpoints/src/types/RuleSetObject.ts +++ b/packages/util-endpoints/src/types/RuleSetObject.ts @@ -1,22 +1,11 @@ -import { RuleSetRules } from "./TreeRuleObject"; +import { + DeprecatedObject as __DeprecatedObject, + ParameterObject as __ParameterObject, + RuleSetObject as __RuleSetObject, +} from "@smithy/types"; -export type DeprecatedObject = { - message?: string; - since?: string; -}; +export type DeprecatedObject = __DeprecatedObject; -export type ParameterObject = { - type: "String" | "Boolean"; - default?: string | boolean; - required?: boolean; - documentation?: string; - builtIn?: string; - deprecated?: DeprecatedObject; -}; +export type ParameterObject = __ParameterObject; -export type RuleSetObject = { - version: string; - serviceId?: string; - parameters: Record; - rules: RuleSetRules; -}; +export type RuleSetObject = __RuleSetObject; diff --git a/packages/util-endpoints/src/types/TreeRuleObject.ts b/packages/util-endpoints/src/types/TreeRuleObject.ts index b1b7476561a..9b937c0acff 100644 --- a/packages/util-endpoints/src/types/TreeRuleObject.ts +++ b/packages/util-endpoints/src/types/TreeRuleObject.ts @@ -1,12 +1,5 @@ -import { EndpointRuleObject } from "./EndpointRuleObject"; -import { ErrorRuleObject } from "./ErrorRuleObject"; -import { ConditionObject } from "./shared"; +import { RuleSetRules as __RuleSetRules, TreeRuleObject as __TreeRuleObject } from "@smithy/types"; -export type RuleSetRules = Array; +export type RuleSetRules = __RuleSetRules; -export type TreeRuleObject = { - type: "tree"; - conditions?: ConditionObject[]; - rules: RuleSetRules; - documentation?: string; -}; +export type TreeRuleObject = __TreeRuleObject;