diff --git a/.changeset/shy-gorillas-work.md b/.changeset/shy-gorillas-work.md new file mode 100644 index 00000000..33b6423b --- /dev/null +++ b/.changeset/shy-gorillas-work.md @@ -0,0 +1,5 @@ +--- +"@effect-aws/client-ec2": patch +--- + +new service methods diff --git a/.changeset/tall-eels-change.md b/.changeset/tall-eels-change.md new file mode 100644 index 00000000..5e129643 --- /dev/null +++ b/.changeset/tall-eels-change.md @@ -0,0 +1,55 @@ +--- +"@effect-aws/client-api-gateway-management-api": patch +"@effect-aws/client-cognito-identity-provider": patch +"@effect-aws/client-opensearch-serverless": patch +"@effect-aws/client-iot-jobs-data-plane": patch +"@effect-aws/client-timestream-influxdb": patch +"@effect-aws/client-cloudwatch-events": patch +"@effect-aws/client-timestream-query": patch +"@effect-aws/client-timestream-write": patch +"@effect-aws/client-bedrock-runtime": patch +"@effect-aws/client-cloudwatch-logs": patch +"@effect-aws/client-iot-events-data": patch +"@effect-aws/client-secrets-manager": patch +"@effect-aws/client-api-gateway-v2": patch +"@effect-aws/client-iot-data-plane": patch +"@effect-aws/client-organizations": patch +"@effect-aws/client-auto-scaling": patch +"@effect-aws/client-iot-wireless": patch +"@effect-aws/client-api-gateway": patch +"@effect-aws/client-cloudsearch": patch +"@effect-aws/client-elasticache": patch +"@effect-aws/client-eventbridge": patch +"@effect-aws/client-cloudtrail": patch +"@effect-aws/client-cloudwatch": patch +"@effect-aws/client-codedeploy": patch +"@effect-aws/client-iot-events": patch +"@effect-aws/client-opensearch": patch +"@effect-aws/client-scheduler": patch +"@effect-aws/client-dynamodb": patch +"@effect-aws/client-firehose": patch +"@effect-aws/client-textract": patch +"@effect-aws/client-account": patch +"@effect-aws/client-bedrock": patch +"@effect-aws/client-kinesis": patch +"@effect-aws/client-athena": patch +"@effect-aws/client-lambda": patch +"@effect-aws/lib-dynamodb": patch +"@effect-aws/client-ec2": patch +"@effect-aws/client-ecr": patch +"@effect-aws/client-ecs": patch +"@effect-aws/client-iam": patch +"@effect-aws/client-iot": patch +"@effect-aws/client-kms": patch +"@effect-aws/client-rds": patch +"@effect-aws/client-ses": patch +"@effect-aws/client-sfn": patch +"@effect-aws/client-sns": patch +"@effect-aws/client-sqs": patch +"@effect-aws/client-ssm": patch +"@effect-aws/client-sts": patch +"@effect-aws/client-mq": patch +"@effect-aws/client-s3": patch +--- + +Fix "cannot be named without a reference" error diff --git a/packages/client-account/src/AccountService.ts b/packages/client-account/src/AccountService.ts index a82102bf..67f74a6c 100644 --- a/packages/client-account/src/AccountService.ts +++ b/packages/client-account/src/AccountService.ts @@ -47,7 +47,7 @@ import { type StartPrimaryEmailUpdateCommandInput, type StartPrimaryEmailUpdateCommandOutput, } from "@aws-sdk/client-account"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -58,6 +58,7 @@ import type { ConflictError, InternalServerError, ResourceNotFoundError, + SdkError, TooManyRequestsError, ValidationError, } from "./Errors.js"; diff --git a/packages/client-account/src/Errors.ts b/packages/client-account/src/Errors.ts index 96052753..87369aba 100644 --- a/packages/client-account/src/Errors.ts +++ b/packages/client-account/src/Errors.ts @@ -7,7 +7,6 @@ import type { ValidationException, } from "@aws-sdk/client-account"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -24,6 +23,4 @@ export type InternalServerError = TaggedException; export type ResourceNotFoundError = TaggedException; export type TooManyRequestsError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-account/test/Account.test.ts b/packages/client-account/test/Account.test.ts index b3fc439e..5e7fc54c 100644 --- a/packages/client-account/test/Account.test.ts +++ b/packages/client-account/test/Account.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-account"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-account/dist-cjs/runtimeConfig"; -import { Account, AccountServiceConfig, SdkError } from "@effect-aws/client-account"; +import { Account, AccountServiceConfig } from "@effect-aws/client-account"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-api-gateway-management-api/src/ApiGatewayManagementApiService.ts b/packages/client-api-gateway-management-api/src/ApiGatewayManagementApiService.ts index 05b55383..06fe7c58 100644 --- a/packages/client-api-gateway-management-api/src/ApiGatewayManagementApiService.ts +++ b/packages/client-api-gateway-management-api/src/ApiGatewayManagementApiService.ts @@ -14,13 +14,13 @@ import { type PostToConnectionCommandInput, type PostToConnectionCommandOutput, } from "@aws-sdk/client-apigatewaymanagementapi"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; import * as Instance from "./ApiGatewayManagementApiClientInstance.js"; import * as ApiGatewayManagementApiServiceConfig from "./ApiGatewayManagementApiServiceConfig.js"; -import type { ForbiddenError, GoneError, LimitExceededError, PayloadTooLargeError } from "./Errors.js"; +import type { ForbiddenError, GoneError, LimitExceededError, PayloadTooLargeError, SdkError } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; const commands = { diff --git a/packages/client-api-gateway-management-api/src/Errors.ts b/packages/client-api-gateway-management-api/src/Errors.ts index 6be2cea3..3a97cf4a 100644 --- a/packages/client-api-gateway-management-api/src/Errors.ts +++ b/packages/client-api-gateway-management-api/src/Errors.ts @@ -5,7 +5,6 @@ import type { PayloadTooLargeException, } from "@aws-sdk/client-apigatewaymanagementapi"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ForbiddenException", @@ -18,6 +17,4 @@ export type ForbiddenError = TaggedException; export type GoneError = TaggedException; export type LimitExceededError = TaggedException; export type PayloadTooLargeError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-api-gateway-management-api/test/ApiGatewayManagementApi.test.ts b/packages/client-api-gateway-management-api/test/ApiGatewayManagementApi.test.ts index c6eed818..4cf96c5b 100644 --- a/packages/client-api-gateway-management-api/test/ApiGatewayManagementApi.test.ts +++ b/packages/client-api-gateway-management-api/test/ApiGatewayManagementApi.test.ts @@ -9,8 +9,8 @@ import * as runtimeConfig from "@aws-sdk/client-apigatewaymanagementapi/dist-cjs import { ApiGatewayManagementApi, ApiGatewayManagementApiServiceConfig, - SdkError, } from "@effect-aws/client-api-gateway-management-api"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-api-gateway-v2/src/ApiGatewayV2Service.ts b/packages/client-api-gateway-v2/src/ApiGatewayV2Service.ts index de7ebdbd..f0f9318e 100644 --- a/packages/client-api-gateway-v2/src/ApiGatewayV2Service.ts +++ b/packages/client-api-gateway-v2/src/ApiGatewayV2Service.ts @@ -221,7 +221,7 @@ import { type UpdateVpcLinkCommandInput, type UpdateVpcLinkCommandOutput, } from "@aws-sdk/client-apigatewayv2"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -232,6 +232,7 @@ import type { BadRequestError, ConflictError, NotFoundError, + SdkError, TooManyRequestsError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-api-gateway-v2/src/Errors.ts b/packages/client-api-gateway-v2/src/Errors.ts index faf9f736..b794e20a 100644 --- a/packages/client-api-gateway-v2/src/Errors.ts +++ b/packages/client-api-gateway-v2/src/Errors.ts @@ -6,7 +6,6 @@ import type { TooManyRequestsException, } from "@aws-sdk/client-apigatewayv2"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -21,6 +20,4 @@ export type BadRequestError = TaggedException; export type ConflictError = TaggedException; export type NotFoundError = TaggedException; export type TooManyRequestsError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-api-gateway-v2/test/ApiGatewayV2.test.ts b/packages/client-api-gateway-v2/test/ApiGatewayV2.test.ts index a441b071..18ef9f5d 100644 --- a/packages/client-api-gateway-v2/test/ApiGatewayV2.test.ts +++ b/packages/client-api-gateway-v2/test/ApiGatewayV2.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-apigatewayv2"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-apigatewayv2/dist-cjs/runtimeConfig"; -import { ApiGatewayV2, ApiGatewayV2ServiceConfig, SdkError } from "@effect-aws/client-api-gateway-v2"; +import { ApiGatewayV2, ApiGatewayV2ServiceConfig } from "@effect-aws/client-api-gateway-v2"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-api-gateway/src/APIGatewayService.ts b/packages/client-api-gateway/src/APIGatewayService.ts index 7336cbc9..670be898 100644 --- a/packages/client-api-gateway/src/APIGatewayService.ts +++ b/packages/client-api-gateway/src/APIGatewayService.ts @@ -377,7 +377,7 @@ import { type UpdateVpcLinkCommandInput, type UpdateVpcLinkCommandOutput, } from "@aws-sdk/client-api-gateway"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -388,6 +388,7 @@ import type { ConflictError, LimitExceededError, NotFoundError, + SdkError, ServiceUnavailableError, TooManyRequestsError, UnauthorizedError, diff --git a/packages/client-api-gateway/src/Errors.ts b/packages/client-api-gateway/src/Errors.ts index e42d8c17..cd0743e9 100644 --- a/packages/client-api-gateway/src/Errors.ts +++ b/packages/client-api-gateway/src/Errors.ts @@ -8,7 +8,6 @@ import type { UnauthorizedException, } from "@aws-sdk/client-api-gateway"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "BadRequestException", @@ -27,6 +26,4 @@ export type NotFoundError = TaggedException; export type ServiceUnavailableError = TaggedException; export type TooManyRequestsError = TaggedException; export type UnauthorizedError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-api-gateway/test/APIGateway.test.ts b/packages/client-api-gateway/test/APIGateway.test.ts index 9e4b7365..8316db8a 100644 --- a/packages/client-api-gateway/test/APIGateway.test.ts +++ b/packages/client-api-gateway/test/APIGateway.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-api-gateway"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-api-gateway/dist-cjs/runtimeConfig"; -import { APIGateway, APIGatewayServiceConfig, SdkError } from "@effect-aws/client-api-gateway"; +import { APIGateway, APIGatewayServiceConfig } from "@effect-aws/client-api-gateway"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-athena/src/AthenaService.ts b/packages/client-athena/src/AthenaService.ts index 912ecb91..fc82457d 100644 --- a/packages/client-athena/src/AthenaService.ts +++ b/packages/client-athena/src/AthenaService.ts @@ -209,7 +209,7 @@ import { type UpdateWorkGroupCommandInput, type UpdateWorkGroupCommandOutput, } from "@aws-sdk/client-athena"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -220,6 +220,7 @@ import type { InvalidRequestError, MetadataError, ResourceNotFoundError, + SdkError, SessionAlreadyExistsError, TooManyRequestsError, } from "./Errors.js"; diff --git a/packages/client-athena/src/Errors.ts b/packages/client-athena/src/Errors.ts index 10d30962..9320398b 100644 --- a/packages/client-athena/src/Errors.ts +++ b/packages/client-athena/src/Errors.ts @@ -7,7 +7,6 @@ import type { TooManyRequestsException, } from "@aws-sdk/client-athena"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "InternalServerException", @@ -24,6 +23,4 @@ export type MetadataError = TaggedException; export type ResourceNotFoundError = TaggedException; export type SessionAlreadyExistsError = TaggedException; export type TooManyRequestsError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-athena/test/Athena.test.ts b/packages/client-athena/test/Athena.test.ts index d08a97f7..f6547ac0 100644 --- a/packages/client-athena/test/Athena.test.ts +++ b/packages/client-athena/test/Athena.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-athena"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-athena/dist-cjs/runtimeConfig"; -import { Athena, AthenaServiceConfig, SdkError } from "@effect-aws/client-athena"; +import { Athena, AthenaServiceConfig } from "@effect-aws/client-athena"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-auto-scaling/src/AutoScalingService.ts b/packages/client-auto-scaling/src/AutoScalingService.ts index 0b0b997b..e2f0f1e6 100644 --- a/packages/client-auto-scaling/src/AutoScalingService.ts +++ b/packages/client-auto-scaling/src/AutoScalingService.ts @@ -200,7 +200,7 @@ import { type UpdateAutoScalingGroupCommandInput, type UpdateAutoScalingGroupCommandOutput, } from "@aws-sdk/client-auto-scaling"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -216,6 +216,7 @@ import type { ResourceContentionFaultError, ResourceInUseFaultError, ScalingActivityInProgressFaultError, + SdkError, ServiceLinkedRoleError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-auto-scaling/src/Errors.ts b/packages/client-auto-scaling/src/Errors.ts index cc44e705..96bf7b68 100644 --- a/packages/client-auto-scaling/src/Errors.ts +++ b/packages/client-auto-scaling/src/Errors.ts @@ -11,7 +11,6 @@ import type { ServiceLinkedRoleFailure, } from "@aws-sdk/client-auto-scaling"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ActiveInstanceRefreshNotFoundFault", @@ -36,6 +35,4 @@ export type ResourceContentionFaultError = TaggedException; export type ScalingActivityInProgressFaultError = TaggedException; export type ServiceLinkedRoleError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-auto-scaling/test/AutoScaling.test.ts b/packages/client-auto-scaling/test/AutoScaling.test.ts index cf110054..c89c53dd 100644 --- a/packages/client-auto-scaling/test/AutoScaling.test.ts +++ b/packages/client-auto-scaling/test/AutoScaling.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-auto-scaling"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-auto-scaling/dist-cjs/runtimeConfig"; -import { AutoScaling, AutoScalingServiceConfig, SdkError } from "@effect-aws/client-auto-scaling"; +import { AutoScaling, AutoScalingServiceConfig } from "@effect-aws/client-auto-scaling"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-bedrock-runtime/src/BedrockRuntimeService.ts b/packages/client-bedrock-runtime/src/BedrockRuntimeService.ts index 83232350..0086abbe 100644 --- a/packages/client-bedrock-runtime/src/BedrockRuntimeService.ts +++ b/packages/client-bedrock-runtime/src/BedrockRuntimeService.ts @@ -32,7 +32,7 @@ import { type StartAsyncInvokeCommandInput, type StartAsyncInvokeCommandOutput, } from "@aws-sdk/client-bedrock-runtime"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -47,6 +47,7 @@ import type { ModelStreamError, ModelTimeoutError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ServiceUnavailableError, ThrottlingError, diff --git a/packages/client-bedrock-runtime/src/Errors.ts b/packages/client-bedrock-runtime/src/Errors.ts index de515aec..ddde8b45 100644 --- a/packages/client-bedrock-runtime/src/Errors.ts +++ b/packages/client-bedrock-runtime/src/Errors.ts @@ -13,7 +13,6 @@ import type { ValidationException, } from "@aws-sdk/client-bedrock-runtime"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -42,6 +41,4 @@ export type ServiceQuotaExceededError = TaggedException; export type ThrottlingError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-bedrock-runtime/test/BedrockRuntime.test.ts b/packages/client-bedrock-runtime/test/BedrockRuntime.test.ts index eff07132..b60a1ec7 100644 --- a/packages/client-bedrock-runtime/test/BedrockRuntime.test.ts +++ b/packages/client-bedrock-runtime/test/BedrockRuntime.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-bedrock-runtime"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig"; -import { BedrockRuntime, BedrockRuntimeServiceConfig, SdkError } from "@effect-aws/client-bedrock-runtime"; +import { BedrockRuntime, BedrockRuntimeServiceConfig } from "@effect-aws/client-bedrock-runtime"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-bedrock/src/BedrockService.ts b/packages/client-bedrock/src/BedrockService.ts index 16e8a09d..96b0fc2a 100644 --- a/packages/client-bedrock/src/BedrockService.ts +++ b/packages/client-bedrock/src/BedrockService.ts @@ -182,7 +182,7 @@ import { type UpdateProvisionedModelThroughputCommandInput, type UpdateProvisionedModelThroughputCommandOutput, } from "@aws-sdk/client-bedrock"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -193,6 +193,7 @@ import type { ConflictError, InternalServerError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ServiceUnavailableError, ThrottlingError, diff --git a/packages/client-bedrock/src/Errors.ts b/packages/client-bedrock/src/Errors.ts index 508b278e..4ea9b89c 100644 --- a/packages/client-bedrock/src/Errors.ts +++ b/packages/client-bedrock/src/Errors.ts @@ -10,7 +10,6 @@ import type { ValidationException, } from "@aws-sdk/client-bedrock"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -33,6 +32,4 @@ export type ServiceUnavailableError = TaggedException; export type TooManyTagsError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-bedrock/test/Bedrock.test.ts b/packages/client-bedrock/test/Bedrock.test.ts index 13ba1453..b295669d 100644 --- a/packages/client-bedrock/test/Bedrock.test.ts +++ b/packages/client-bedrock/test/Bedrock.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-bedrock"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-bedrock/dist-cjs/runtimeConfig"; -import { Bedrock, BedrockServiceConfig, SdkError } from "@effect-aws/client-bedrock"; +import { Bedrock, BedrockServiceConfig } from "@effect-aws/client-bedrock"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-cloudsearch/src/CloudSearchService.ts b/packages/client-cloudsearch/src/CloudSearchService.ts index 6c449685..c43400dd 100644 --- a/packages/client-cloudsearch/src/CloudSearchService.ts +++ b/packages/client-cloudsearch/src/CloudSearchService.ts @@ -83,7 +83,7 @@ import { type UpdateServiceAccessPoliciesCommandInput, type UpdateServiceAccessPoliciesCommandOutput, } from "@aws-sdk/client-cloudsearch"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -97,6 +97,7 @@ import type { LimitExceededError, ResourceAlreadyExistsError, ResourceNotFoundError, + SdkError, ValidationError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-cloudsearch/src/Errors.ts b/packages/client-cloudsearch/src/Errors.ts index 7167cb5f..3f79a1c5 100644 --- a/packages/client-cloudsearch/src/Errors.ts +++ b/packages/client-cloudsearch/src/Errors.ts @@ -9,7 +9,6 @@ import type { ValidationException, } from "@aws-sdk/client-cloudsearch"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "BaseException", @@ -30,6 +29,4 @@ export type LimitExceededError = TaggedException; export type ResourceAlreadyExistsError = TaggedException; export type ResourceNotFoundError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-cloudsearch/test/CloudSearch.test.ts b/packages/client-cloudsearch/test/CloudSearch.test.ts index 04a838a7..4dca3698 100644 --- a/packages/client-cloudsearch/test/CloudSearch.test.ts +++ b/packages/client-cloudsearch/test/CloudSearch.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-cloudsearch"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-cloudsearch/dist-cjs/runtimeConfig"; -import { CloudSearch, CloudSearchServiceConfig, SdkError } from "@effect-aws/client-cloudsearch"; +import { CloudSearch, CloudSearchServiceConfig } from "@effect-aws/client-cloudsearch"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-cloudtrail/src/CloudTrailService.ts b/packages/client-cloudtrail/src/CloudTrailService.ts index 9fa76fb0..88d068cc 100644 --- a/packages/client-cloudtrail/src/CloudTrailService.ts +++ b/packages/client-cloudtrail/src/CloudTrailService.ts @@ -176,7 +176,7 @@ import { type UpdateTrailCommandInput, type UpdateTrailCommandOutput, } from "@aws-sdk/client-cloudtrail"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -261,6 +261,7 @@ import type { ResourcePolicyNotValidError, ResourceTypeNotSupportedError, S3BucketDoesNotExistError, + SdkError, ServiceQuotaExceededError, TagsLimitExceededError, ThrottlingError, diff --git a/packages/client-cloudtrail/src/Errors.ts b/packages/client-cloudtrail/src/Errors.ts index 27db05c0..f0f03b5c 100644 --- a/packages/client-cloudtrail/src/Errors.ts +++ b/packages/client-cloudtrail/src/Errors.ts @@ -86,7 +86,6 @@ import type { UnsupportedOperationException, } from "@aws-sdk/client-cloudtrail"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -263,6 +262,4 @@ export type TrailAlreadyExistsError = TaggedException; export type TrailNotProvidedError = TaggedException; export type UnsupportedOperationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-cloudtrail/test/CloudTrail.test.ts b/packages/client-cloudtrail/test/CloudTrail.test.ts index 8ee50430..b88a668b 100644 --- a/packages/client-cloudtrail/test/CloudTrail.test.ts +++ b/packages/client-cloudtrail/test/CloudTrail.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-cloudtrail"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-cloudtrail/dist-cjs/runtimeConfig"; -import { CloudTrail, CloudTrailServiceConfig, SdkError } from "@effect-aws/client-cloudtrail"; +import { CloudTrail, CloudTrailServiceConfig } from "@effect-aws/client-cloudtrail"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-cloudwatch-events/src/CloudWatchEventsService.ts b/packages/client-cloudwatch-events/src/CloudWatchEventsService.ts index 7e41a451..963f81ea 100644 --- a/packages/client-cloudwatch-events/src/CloudWatchEventsService.ts +++ b/packages/client-cloudwatch-events/src/CloudWatchEventsService.ts @@ -158,7 +158,7 @@ import { type UpdateConnectionCommandInput, type UpdateConnectionCommandOutput, } from "@aws-sdk/client-cloudwatch-events"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -176,6 +176,7 @@ import type { PolicyLengthExceededError, ResourceAlreadyExistsError, ResourceNotFoundError, + SdkError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-cloudwatch-events/src/Errors.ts b/packages/client-cloudwatch-events/src/Errors.ts index be098072..041e6492 100644 --- a/packages/client-cloudwatch-events/src/Errors.ts +++ b/packages/client-cloudwatch-events/src/Errors.ts @@ -12,7 +12,6 @@ import type { ResourceNotFoundException, } from "@aws-sdk/client-cloudwatch-events"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ConcurrentModificationException", @@ -39,6 +38,4 @@ export type OperationDisabledError = TaggedException export type PolicyLengthExceededError = TaggedException; export type ResourceAlreadyExistsError = TaggedException; export type ResourceNotFoundError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-cloudwatch-events/test/CloudWatchEvents.test.ts b/packages/client-cloudwatch-events/test/CloudWatchEvents.test.ts index 5fd20246..e281df9c 100644 --- a/packages/client-cloudwatch-events/test/CloudWatchEvents.test.ts +++ b/packages/client-cloudwatch-events/test/CloudWatchEvents.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-cloudwatch-events"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-cloudwatch-events/dist-cjs/runtimeConfig"; -import { CloudWatchEvents, CloudWatchEventsServiceConfig, SdkError } from "@effect-aws/client-cloudwatch-events"; +import { CloudWatchEvents, CloudWatchEventsServiceConfig } from "@effect-aws/client-cloudwatch-events"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-cloudwatch-logs/src/CloudWatchLogsService.ts b/packages/client-cloudwatch-logs/src/CloudWatchLogsService.ts index 447fae7c..75bfd3d9 100644 --- a/packages/client-cloudwatch-logs/src/CloudWatchLogsService.ts +++ b/packages/client-cloudwatch-logs/src/CloudWatchLogsService.ts @@ -272,7 +272,7 @@ import { type UpdateLogAnomalyDetectorCommandInput, type UpdateLogAnomalyDetectorCommandOutput, } from "@aws-sdk/client-cloudwatch-logs"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -290,6 +290,7 @@ import type { OperationAbortedError, ResourceAlreadyExistsError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ServiceUnavailableError, ThrottlingError, diff --git a/packages/client-cloudwatch-logs/src/Errors.ts b/packages/client-cloudwatch-logs/src/Errors.ts index abf44b11..95cfb0b6 100644 --- a/packages/client-cloudwatch-logs/src/Errors.ts +++ b/packages/client-cloudwatch-logs/src/Errors.ts @@ -20,7 +20,6 @@ import type { ValidationException, } from "@aws-sdk/client-cloudwatch-logs"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -63,6 +62,4 @@ export type ThrottlingError = TaggedException; export type TooManyTagsError = TaggedException; export type UnrecognizedClientError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-cloudwatch-logs/test/CloudWatchLogs.test.ts b/packages/client-cloudwatch-logs/test/CloudWatchLogs.test.ts index 935875c4..c73342b6 100644 --- a/packages/client-cloudwatch-logs/test/CloudWatchLogs.test.ts +++ b/packages/client-cloudwatch-logs/test/CloudWatchLogs.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-cloudwatch-logs"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-cloudwatch-logs/dist-cjs/runtimeConfig"; -import { CloudWatchLogs, CloudWatchLogsServiceConfig, SdkError } from "@effect-aws/client-cloudwatch-logs"; +import { CloudWatchLogs, CloudWatchLogsServiceConfig } from "@effect-aws/client-cloudwatch-logs"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-cloudwatch/src/CloudWatchService.ts b/packages/client-cloudwatch/src/CloudWatchService.ts index 67882837..9838411d 100644 --- a/packages/client-cloudwatch/src/CloudWatchService.ts +++ b/packages/client-cloudwatch/src/CloudWatchService.ts @@ -119,7 +119,7 @@ import { type UntagResourceCommandInput, type UntagResourceCommandOutput, } from "@aws-sdk/client-cloudwatch"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -139,6 +139,7 @@ import type { MissingRequiredParameterError, ResourceNotFoundError, ResourceNotFoundExceptionError, + SdkError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-cloudwatch/src/Errors.ts b/packages/client-cloudwatch/src/Errors.ts index 50e85618..911e4180 100644 --- a/packages/client-cloudwatch/src/Errors.ts +++ b/packages/client-cloudwatch/src/Errors.ts @@ -14,7 +14,6 @@ import type { ResourceNotFoundException, } from "@aws-sdk/client-cloudwatch"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ConcurrentModificationException", @@ -45,6 +44,4 @@ export type LimitExceededFaultError = TaggedException; export type MissingRequiredParameterError = TaggedException; export type ResourceNotFoundError = TaggedException; export type ResourceNotFoundExceptionError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-cloudwatch/test/CloudWatch.test.ts b/packages/client-cloudwatch/test/CloudWatch.test.ts index b0e61a45..19c7694c 100644 --- a/packages/client-cloudwatch/test/CloudWatch.test.ts +++ b/packages/client-cloudwatch/test/CloudWatch.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-cloudwatch"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-cloudwatch/dist-cjs/runtimeConfig"; -import { CloudWatch, CloudWatchServiceConfig, SdkError } from "@effect-aws/client-cloudwatch"; +import { CloudWatch, CloudWatchServiceConfig } from "@effect-aws/client-cloudwatch"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-codedeploy/src/CodeDeployService.ts b/packages/client-codedeploy/src/CodeDeployService.ts index e2f7c22a..ebdc43c7 100644 --- a/packages/client-codedeploy/src/CodeDeployService.ts +++ b/packages/client-codedeploy/src/CodeDeployService.ts @@ -146,7 +146,7 @@ import { type UpdateDeploymentGroupCommandInput, type UpdateDeploymentGroupCommandOutput, } from "@aws-sdk/client-codedeploy"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -257,6 +257,7 @@ import type { RevisionDoesNotExistError, RevisionRequiredError, RoleRequiredError, + SdkError, TagLimitExceededError, TagRequiredError, TagSetListLimitExceededError, diff --git a/packages/client-codedeploy/src/Errors.ts b/packages/client-codedeploy/src/Errors.ts index e53bb207..755470e7 100644 --- a/packages/client-codedeploy/src/Errors.ts +++ b/packages/client-codedeploy/src/Errors.ts @@ -111,7 +111,6 @@ import type { UnsupportedActionForDeploymentTypeException, } from "@aws-sdk/client-codedeploy"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AlarmsLimitExceededException", @@ -344,6 +343,4 @@ export type TagSetListLimitExceededError = TaggedException; export type TriggerTargetsLimitExceededError = TaggedException; export type UnsupportedActionForDeploymentTypeError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-codedeploy/test/CodeDeploy.test.ts b/packages/client-codedeploy/test/CodeDeploy.test.ts index 6b5331da..c0492a13 100644 --- a/packages/client-codedeploy/test/CodeDeploy.test.ts +++ b/packages/client-codedeploy/test/CodeDeploy.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-codedeploy"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-codedeploy/dist-cjs/runtimeConfig"; -import { CodeDeploy, CodeDeployServiceConfig, SdkError } from "@effect-aws/client-codedeploy"; +import { CodeDeploy, CodeDeployServiceConfig } from "@effect-aws/client-codedeploy"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-cognito-identity-provider/src/CognitoIdentityProviderService.ts b/packages/client-cognito-identity-provider/src/CognitoIdentityProviderService.ts index 180d220a..6a1c3390 100644 --- a/packages/client-cognito-identity-provider/src/CognitoIdentityProviderService.ts +++ b/packages/client-cognito-identity-provider/src/CognitoIdentityProviderService.ts @@ -347,7 +347,7 @@ import { type VerifyUserAttributeCommandInput, type VerifyUserAttributeCommandOutput, } from "@aws-sdk/client-cognito-identity-provider"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -384,6 +384,7 @@ import type { RefreshTokenReuseError, ResourceNotFoundError, ScopeDoesNotExistError, + SdkError, SoftwareTokenMFANotFoundError, TierChangeNotAllowedError, TooManyFailedAttemptsError, diff --git a/packages/client-cognito-identity-provider/src/Errors.ts b/packages/client-cognito-identity-provider/src/Errors.ts index d12c6bbc..f462b31e 100644 --- a/packages/client-cognito-identity-provider/src/Errors.ts +++ b/packages/client-cognito-identity-provider/src/Errors.ts @@ -55,7 +55,6 @@ import type { WebAuthnRelyingPartyMismatchException, } from "@aws-sdk/client-cognito-identity-provider"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AliasExistsException", @@ -168,6 +167,4 @@ export type WebAuthnCredentialNotSupportedError = TaggedException; export type WebAuthnOriginNotAllowedError = TaggedException; export type WebAuthnRelyingPartyMismatchError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-cognito-identity-provider/test/CognitoIdentityProvider.test.ts b/packages/client-cognito-identity-provider/test/CognitoIdentityProvider.test.ts index 7558e58a..2d01fe96 100644 --- a/packages/client-cognito-identity-provider/test/CognitoIdentityProvider.test.ts +++ b/packages/client-cognito-identity-provider/test/CognitoIdentityProvider.test.ts @@ -9,8 +9,8 @@ import * as runtimeConfig from "@aws-sdk/client-cognito-identity-provider/dist-c import { CognitoIdentityProvider, CognitoIdentityProviderServiceConfig, - SdkError, } from "@effect-aws/client-cognito-identity-provider"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-dynamodb/src/DynamoDBService.ts b/packages/client-dynamodb/src/DynamoDBService.ts index fa35c0b2..86a55af2 100644 --- a/packages/client-dynamodb/src/DynamoDBService.ts +++ b/packages/client-dynamodb/src/DynamoDBService.ts @@ -176,7 +176,7 @@ import { type UpdateTimeToLiveCommandInput, type UpdateTimeToLiveCommandOutput, } from "@aws-sdk/client-dynamodb"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -211,6 +211,7 @@ import type { RequestLimitExceededError, ResourceInUseError, ResourceNotFoundError, + SdkError, TableAlreadyExistsError, TableInUseError, TableNotFoundError, diff --git a/packages/client-dynamodb/src/Errors.ts b/packages/client-dynamodb/src/Errors.ts index b13c2af7..a388c2c8 100644 --- a/packages/client-dynamodb/src/Errors.ts +++ b/packages/client-dynamodb/src/Errors.ts @@ -35,7 +35,6 @@ import type { TransactionInProgressException, } from "@aws-sdk/client-dynamodb"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "BackupInUseException", @@ -108,6 +107,4 @@ export type TableNotFoundError = TaggedException; export type TransactionCanceledError = TaggedException; export type TransactionConflictError = TaggedException; export type TransactionInProgressError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-dynamodb/test/DynamoDB.test.ts b/packages/client-dynamodb/test/DynamoDB.test.ts index 6ba56c07..d9914325 100644 --- a/packages/client-dynamodb/test/DynamoDB.test.ts +++ b/packages/client-dynamodb/test/DynamoDB.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-dynamodb"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-dynamodb/dist-cjs/runtimeConfig"; -import { DynamoDB, DynamoDBServiceConfig, SdkError } from "@effect-aws/client-dynamodb"; +import { DynamoDB, DynamoDBServiceConfig } from "@effect-aws/client-dynamodb"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-ec2/src/EC2Service.ts b/packages/client-ec2/src/EC2Service.ts index a64b6420..b3fa4346 100644 --- a/packages/client-ec2/src/EC2Service.ts +++ b/packages/client-ec2/src/EC2Service.ts @@ -281,6 +281,12 @@ import { CreateLocalGatewayRouteTableVpcAssociationCommand, type CreateLocalGatewayRouteTableVpcAssociationCommandInput, type CreateLocalGatewayRouteTableVpcAssociationCommandOutput, + CreateLocalGatewayVirtualInterfaceCommand, + type CreateLocalGatewayVirtualInterfaceCommandInput, + type CreateLocalGatewayVirtualInterfaceCommandOutput, + CreateLocalGatewayVirtualInterfaceGroupCommand, + type CreateLocalGatewayVirtualInterfaceGroupCommandInput, + type CreateLocalGatewayVirtualInterfaceGroupCommandOutput, CreateManagedPrefixListCommand, type CreateManagedPrefixListCommandInput, type CreateManagedPrefixListCommandOutput, @@ -524,6 +530,12 @@ import { DeleteLocalGatewayRouteTableVpcAssociationCommand, type DeleteLocalGatewayRouteTableVpcAssociationCommandInput, type DeleteLocalGatewayRouteTableVpcAssociationCommandOutput, + DeleteLocalGatewayVirtualInterfaceCommand, + type DeleteLocalGatewayVirtualInterfaceCommandInput, + type DeleteLocalGatewayVirtualInterfaceCommandOutput, + DeleteLocalGatewayVirtualInterfaceGroupCommand, + type DeleteLocalGatewayVirtualInterfaceGroupCommandInput, + type DeleteLocalGatewayVirtualInterfaceGroupCommandOutput, DeleteManagedPrefixListCommand, type DeleteManagedPrefixListCommandInput, type DeleteManagedPrefixListCommandOutput, @@ -980,6 +992,9 @@ import { DescribeNetworkInterfacesCommand, type DescribeNetworkInterfacesCommandInput, type DescribeNetworkInterfacesCommandOutput, + DescribeOutpostLagsCommand, + type DescribeOutpostLagsCommandInput, + type DescribeOutpostLagsCommandOutput, DescribePlacementGroupsCommand, type DescribePlacementGroupsCommandInput, type DescribePlacementGroupsCommandOutput, @@ -1040,6 +1055,9 @@ import { DescribeSecurityGroupVpcAssociationsCommand, type DescribeSecurityGroupVpcAssociationsCommandInput, type DescribeSecurityGroupVpcAssociationsCommandOutput, + DescribeServiceLinkVirtualInterfacesCommand, + type DescribeServiceLinkVirtualInterfacesCommandInput, + type DescribeServiceLinkVirtualInterfacesCommandOutput, DescribeSnapshotAttributeCommand, type DescribeSnapshotAttributeCommandInput, type DescribeSnapshotAttributeCommandOutput, @@ -2030,13 +2048,13 @@ import { type WithdrawByoipCidrCommandInput, type WithdrawByoipCidrCommandOutput, } from "@aws-sdk/client-ec2"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; import * as Instance from "./EC2ClientInstance.js"; import * as EC2ServiceConfig from "./EC2ServiceConfig.js"; -import type { EC2ServiceError } from "./Errors.js"; +import type { EC2ServiceError, SdkError } from "./Errors.js"; const commands = { AcceptAddressTransferCommand, @@ -2132,6 +2150,8 @@ const commands = { CreateLocalGatewayRouteTableCommand, CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationCommand, CreateLocalGatewayRouteTableVpcAssociationCommand, + CreateLocalGatewayVirtualInterfaceCommand, + CreateLocalGatewayVirtualInterfaceGroupCommand, CreateManagedPrefixListCommand, CreateNatGatewayCommand, CreateNetworkAclCommand, @@ -2213,6 +2233,8 @@ const commands = { DeleteLocalGatewayRouteTableCommand, DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationCommand, DeleteLocalGatewayRouteTableVpcAssociationCommand, + DeleteLocalGatewayVirtualInterfaceCommand, + DeleteLocalGatewayVirtualInterfaceGroupCommand, DeleteManagedPrefixListCommand, DeleteNatGatewayCommand, DeleteNetworkAclCommand, @@ -2365,6 +2387,7 @@ const commands = { DescribeNetworkInterfaceAttributeCommand, DescribeNetworkInterfacePermissionsCommand, DescribeNetworkInterfacesCommand, + DescribeOutpostLagsCommand, DescribePlacementGroupsCommand, DescribePrefixListsCommand, DescribePrincipalIdFormatCommand, @@ -2385,6 +2408,7 @@ const commands = { DescribeSecurityGroupRulesCommand, DescribeSecurityGroupVpcAssociationsCommand, DescribeSecurityGroupsCommand, + DescribeServiceLinkVirtualInterfacesCommand, DescribeSnapshotAttributeCommand, DescribeSnapshotTierStatusCommand, DescribeSnapshotsCommand, @@ -3742,6 +3766,28 @@ interface EC2Service$ { Cause.TimeoutException | SdkError | EC2ServiceError >; + /** + * @see {@link CreateLocalGatewayVirtualInterfaceCommand} + */ + createLocalGatewayVirtualInterface( + args: CreateLocalGatewayVirtualInterfaceCommandInput, + options?: HttpHandlerOptions, + ): Effect.Effect< + CreateLocalGatewayVirtualInterfaceCommandOutput, + Cause.TimeoutException | SdkError | EC2ServiceError + >; + + /** + * @see {@link CreateLocalGatewayVirtualInterfaceGroupCommand} + */ + createLocalGatewayVirtualInterfaceGroup( + args: CreateLocalGatewayVirtualInterfaceGroupCommandInput, + options?: HttpHandlerOptions, + ): Effect.Effect< + CreateLocalGatewayVirtualInterfaceGroupCommandOutput, + Cause.TimeoutException | SdkError | EC2ServiceError + >; + /** * @see {@link CreateManagedPrefixListCommand} */ @@ -4633,6 +4679,28 @@ interface EC2Service$ { Cause.TimeoutException | SdkError | EC2ServiceError >; + /** + * @see {@link DeleteLocalGatewayVirtualInterfaceCommand} + */ + deleteLocalGatewayVirtualInterface( + args: DeleteLocalGatewayVirtualInterfaceCommandInput, + options?: HttpHandlerOptions, + ): Effect.Effect< + DeleteLocalGatewayVirtualInterfaceCommandOutput, + Cause.TimeoutException | SdkError | EC2ServiceError + >; + + /** + * @see {@link DeleteLocalGatewayVirtualInterfaceGroupCommand} + */ + deleteLocalGatewayVirtualInterfaceGroup( + args: DeleteLocalGatewayVirtualInterfaceGroupCommandInput, + options?: HttpHandlerOptions, + ): Effect.Effect< + DeleteLocalGatewayVirtualInterfaceGroupCommandOutput, + Cause.TimeoutException | SdkError | EC2ServiceError + >; + /** * @see {@link DeleteManagedPrefixListCommand} */ @@ -6305,6 +6373,17 @@ interface EC2Service$ { Cause.TimeoutException | SdkError | EC2ServiceError >; + /** + * @see {@link DescribeOutpostLagsCommand} + */ + describeOutpostLags( + args: DescribeOutpostLagsCommandInput, + options?: HttpHandlerOptions, + ): Effect.Effect< + DescribeOutpostLagsCommandOutput, + Cause.TimeoutException | SdkError | EC2ServiceError + >; + /** * @see {@link DescribePlacementGroupsCommand} */ @@ -6525,6 +6604,17 @@ interface EC2Service$ { Cause.TimeoutException | SdkError | EC2ServiceError >; + /** + * @see {@link DescribeServiceLinkVirtualInterfacesCommand} + */ + describeServiceLinkVirtualInterfaces( + args: DescribeServiceLinkVirtualInterfacesCommandInput, + options?: HttpHandlerOptions, + ): Effect.Effect< + DescribeServiceLinkVirtualInterfacesCommandOutput, + Cause.TimeoutException | SdkError | EC2ServiceError + >; + /** * @see {@link DescribeSnapshotAttributeCommand} */ diff --git a/packages/client-ec2/src/Errors.ts b/packages/client-ec2/src/Errors.ts index 2b8a3f8c..974af906 100644 --- a/packages/client-ec2/src/Errors.ts +++ b/packages/client-ec2/src/Errors.ts @@ -1,11 +1,10 @@ import type { EC2ServiceException } from "@aws-sdk/client-ec2"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; import { Data } from "effect"; export type EC2ServiceError = TaggedException< EC2ServiceException & { name: "EC2ServiceError" } >; export const EC2ServiceError = Data.tagged("EC2ServiceError"); -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; + +export type SdkError = TaggedException; diff --git a/packages/client-ec2/test/EC2.test.ts b/packages/client-ec2/test/EC2.test.ts index 8d026150..abf53a1f 100644 --- a/packages/client-ec2/test/EC2.test.ts +++ b/packages/client-ec2/test/EC2.test.ts @@ -1,7 +1,8 @@ import { AcceptAddressTransferCommand, type AcceptAddressTransferCommandInput, EC2Client } from "@aws-sdk/client-ec2"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-ec2/dist-cjs/runtimeConfig"; -import { EC2, EC2ServiceConfig, SdkError } from "@effect-aws/client-ec2"; +import { EC2, EC2ServiceConfig } from "@effect-aws/client-ec2"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-ecr/src/ECRService.ts b/packages/client-ecr/src/ECRService.ts index 62b7d20d..02438c17 100644 --- a/packages/client-ecr/src/ECRService.ts +++ b/packages/client-ecr/src/ECRService.ts @@ -152,7 +152,7 @@ import { type ValidatePullThroughCacheRuleCommandInput, type ValidatePullThroughCacheRuleCommandOutput, } from "@aws-sdk/client-ecr"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -186,6 +186,7 @@ import type { RepositoryNotFoundError, RepositoryPolicyNotFoundError, ScanNotFoundError, + SdkError, SecretNotFoundError, ServerError, TemplateAlreadyExistsError, diff --git a/packages/client-ecr/src/Errors.ts b/packages/client-ecr/src/Errors.ts index 1e064069..e7bfc4fa 100644 --- a/packages/client-ecr/src/Errors.ts +++ b/packages/client-ecr/src/Errors.ts @@ -41,7 +41,6 @@ import type { ValidationException, } from "@aws-sdk/client-ecr"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "EmptyUploadException", @@ -126,6 +125,4 @@ export type UnsupportedImageTypeError = TaggedException; export type UploadNotFoundError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-ecr/test/ECR.test.ts b/packages/client-ecr/test/ECR.test.ts index 75c75a7e..f0427e8a 100644 --- a/packages/client-ecr/test/ECR.test.ts +++ b/packages/client-ecr/test/ECR.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-ecr"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-ecr/dist-cjs/runtimeConfig"; -import { ECR, ECRServiceConfig, SdkError } from "@effect-aws/client-ecr"; +import { ECR, ECRServiceConfig } from "@effect-aws/client-ecr"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-ecs/src/ECSService.ts b/packages/client-ecs/src/ECSService.ts index 34e5b615..09c1e81e 100644 --- a/packages/client-ecs/src/ECSService.ts +++ b/packages/client-ecs/src/ECSService.ts @@ -185,7 +185,7 @@ import { type UpdateTaskSetCommandInput, type UpdateTaskSetCommandOutput, } from "@aws-sdk/client-ecs"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -210,6 +210,7 @@ import type { PlatformUnknownError, ResourceInUseError, ResourceNotFoundError, + SdkError, ServerError, ServiceDeploymentNotFoundError, ServiceNotActiveError, diff --git a/packages/client-ecs/src/Errors.ts b/packages/client-ecs/src/Errors.ts index 0371ac52..58743632 100644 --- a/packages/client-ecs/src/Errors.ts +++ b/packages/client-ecs/src/Errors.ts @@ -28,7 +28,6 @@ import type { UpdateInProgressException, } from "@aws-sdk/client-ecs"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -89,6 +88,4 @@ export type TargetNotFoundError = TaggedException; export type TaskSetNotFoundError = TaggedException; export type UnsupportedFeatureError = TaggedException; export type UpdateInProgressError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-ecs/test/ECS.test.ts b/packages/client-ecs/test/ECS.test.ts index d26eca16..963b9035 100644 --- a/packages/client-ecs/test/ECS.test.ts +++ b/packages/client-ecs/test/ECS.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-ecs"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-ecs/dist-cjs/runtimeConfig"; -import { ECS, ECSServiceConfig, SdkError } from "@effect-aws/client-ecs"; +import { ECS, ECSServiceConfig } from "@effect-aws/client-ecs"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-elasticache/src/ElastiCacheService.ts b/packages/client-elasticache/src/ElastiCacheService.ts index f94392f2..e1d5ceb9 100644 --- a/packages/client-elasticache/src/ElastiCacheService.ts +++ b/packages/client-elasticache/src/ElastiCacheService.ts @@ -230,7 +230,7 @@ import { type TestMigrationCommandInput, type TestMigrationCommandOutput, } from "@aws-sdk/client-elasticache"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -290,6 +290,7 @@ import type { ReservedCacheNodeNotFoundFaultError, ReservedCacheNodeQuotaExceededFaultError, ReservedCacheNodesOfferingNotFoundFaultError, + SdkError, ServerlessCacheAlreadyExistsFaultError, ServerlessCacheNotFoundFaultError, ServerlessCacheQuotaForCustomerExceededFaultError, diff --git a/packages/client-elasticache/src/Errors.ts b/packages/client-elasticache/src/Errors.ts index f46b777f..e9748939 100644 --- a/packages/client-elasticache/src/Errors.ts +++ b/packages/client-elasticache/src/Errors.ts @@ -77,7 +77,6 @@ import type { UserQuotaExceededFault, } from "@aws-sdk/client-elasticache"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "APICallRateForCustomerExceededFault", @@ -240,6 +239,4 @@ export type UserGroupNotFoundFaultError = TaggedException; export type UserNotFoundFaultError = TaggedException; export type UserQuotaExceededFaultError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-elasticache/test/ElastiCache.test.ts b/packages/client-elasticache/test/ElastiCache.test.ts index a4d9bf7e..475e7430 100644 --- a/packages/client-elasticache/test/ElastiCache.test.ts +++ b/packages/client-elasticache/test/ElastiCache.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-elasticache"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-elasticache/dist-cjs/runtimeConfig"; -import { ElastiCache, ElastiCacheServiceConfig, SdkError } from "@effect-aws/client-elasticache"; +import { ElastiCache, ElastiCacheServiceConfig } from "@effect-aws/client-elasticache"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-eventbridge/src/Errors.ts b/packages/client-eventbridge/src/Errors.ts index c807a878..1ac7de9f 100644 --- a/packages/client-eventbridge/src/Errors.ts +++ b/packages/client-eventbridge/src/Errors.ts @@ -14,7 +14,6 @@ import type { ThrottlingException, } from "@aws-sdk/client-eventbridge"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -45,6 +44,4 @@ export type PolicyLengthExceededError = TaggedException; export type ResourceNotFoundError = TaggedException; export type ThrottlingError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-eventbridge/src/EventBridgeService.ts b/packages/client-eventbridge/src/EventBridgeService.ts index 0064d631..59dc2e3f 100644 --- a/packages/client-eventbridge/src/EventBridgeService.ts +++ b/packages/client-eventbridge/src/EventBridgeService.ts @@ -176,7 +176,7 @@ import { type UpdateEventBusCommandInput, type UpdateEventBusCommandOutput, } from "@aws-sdk/client-eventbridge"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -193,6 +193,7 @@ import type { PolicyLengthExceededError, ResourceAlreadyExistsError, ResourceNotFoundError, + SdkError, ThrottlingError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-eventbridge/test/EventBridge.test.ts b/packages/client-eventbridge/test/EventBridge.test.ts index 4ed510fd..53d63721 100644 --- a/packages/client-eventbridge/test/EventBridge.test.ts +++ b/packages/client-eventbridge/test/EventBridge.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-eventbridge"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-eventbridge/dist-cjs/runtimeConfig"; -import { EventBridge, EventBridgeServiceConfig, SdkError } from "@effect-aws/client-eventbridge"; +import { EventBridge, EventBridgeServiceConfig } from "@effect-aws/client-eventbridge"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-firehose/src/Errors.ts b/packages/client-firehose/src/Errors.ts index 5e6fc5c5..b22261ec 100644 --- a/packages/client-firehose/src/Errors.ts +++ b/packages/client-firehose/src/Errors.ts @@ -9,7 +9,6 @@ import type { ServiceUnavailableException, } from "@aws-sdk/client-firehose"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ConcurrentModificationException", @@ -30,6 +29,4 @@ export type LimitExceededError = TaggedException; export type ResourceInUseError = TaggedException; export type ResourceNotFoundError = TaggedException; export type ServiceUnavailableError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-firehose/src/FirehoseService.ts b/packages/client-firehose/src/FirehoseService.ts index d07f5863..8bb903cf 100644 --- a/packages/client-firehose/src/FirehoseService.ts +++ b/packages/client-firehose/src/FirehoseService.ts @@ -41,7 +41,7 @@ import { type UpdateDestinationCommandInput, type UpdateDestinationCommandOutput, } from "@aws-sdk/client-firehose"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -53,6 +53,7 @@ import type { LimitExceededError, ResourceInUseError, ResourceNotFoundError, + SdkError, ServiceUnavailableError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-firehose/test/Firehose.test.ts b/packages/client-firehose/test/Firehose.test.ts index 0cc961a2..28bf4393 100644 --- a/packages/client-firehose/test/Firehose.test.ts +++ b/packages/client-firehose/test/Firehose.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-firehose"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-firehose/dist-cjs/runtimeConfig"; -import { Firehose, FirehoseServiceConfig, SdkError } from "@effect-aws/client-firehose"; +import { Firehose, FirehoseServiceConfig } from "@effect-aws/client-firehose"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-iam/src/Errors.ts b/packages/client-iam/src/Errors.ts index 86893585..a14810b5 100644 --- a/packages/client-iam/src/Errors.ts +++ b/packages/client-iam/src/Errors.ts @@ -34,7 +34,6 @@ import type { UnrecognizedPublicKeyEncodingException, } from "@aws-sdk/client-iam"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccountNotManagementOrDelegatedAdministratorException", @@ -107,6 +106,4 @@ export type ServiceFailureError = TaggedException; export type ServiceNotSupportedError = TaggedException; export type UnmodifiableEntityError = TaggedException; export type UnrecognizedPublicKeyEncodingError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-iam/src/IAMService.ts b/packages/client-iam/src/IAMService.ts index 16368289..c33a0f13 100644 --- a/packages/client-iam/src/IAMService.ts +++ b/packages/client-iam/src/IAMService.ts @@ -497,7 +497,7 @@ import { type UploadSSHPublicKeyCommandInput, type UploadSSHPublicKeyCommandOutput, } from "@aws-sdk/client-iam"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -530,6 +530,7 @@ import type { PolicyEvaluationError, PolicyNotAttachableError, ReportGenerationLimitExceededError, + SdkError, ServiceAccessNotEnabledError, ServiceFailureError, ServiceNotSupportedError, diff --git a/packages/client-iam/test/IAM.test.ts b/packages/client-iam/test/IAM.test.ts index 4d3cd007..3e83ee4a 100644 --- a/packages/client-iam/test/IAM.test.ts +++ b/packages/client-iam/test/IAM.test.ts @@ -1,7 +1,8 @@ import { CreateRoleCommand, type CreateRoleCommandInput, IAMClient, IAMServiceException } from "@aws-sdk/client-iam"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-iam/dist-cjs/runtimeConfig"; -import { IAM, IAMServiceConfig, SdkError } from "@effect-aws/client-iam"; +import { IAM, IAMServiceConfig } from "@effect-aws/client-iam"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-iot-data-plane/src/Errors.ts b/packages/client-iot-data-plane/src/Errors.ts index 58e89e43..06a60303 100644 --- a/packages/client-iot-data-plane/src/Errors.ts +++ b/packages/client-iot-data-plane/src/Errors.ts @@ -11,7 +11,6 @@ import type { UnsupportedDocumentEncodingException, } from "@aws-sdk/client-iot-data-plane"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ConflictException", @@ -36,6 +35,4 @@ export type ServiceUnavailableError = TaggedException; export type UnauthorizedError = TaggedException; export type UnsupportedDocumentEncodingError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-iot-data-plane/src/IoTDataPlaneService.ts b/packages/client-iot-data-plane/src/IoTDataPlaneService.ts index 290d6da5..fa272bb2 100644 --- a/packages/client-iot-data-plane/src/IoTDataPlaneService.ts +++ b/packages/client-iot-data-plane/src/IoTDataPlaneService.ts @@ -26,7 +26,7 @@ import { type UpdateThingShadowCommandInput, type UpdateThingShadowCommandOutput, } from "@aws-sdk/client-iot-data-plane"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -37,6 +37,7 @@ import type { MethodNotAllowedError, RequestEntityTooLargeError, ResourceNotFoundError, + SdkError, ServiceUnavailableError, ThrottlingError, UnauthorizedError, diff --git a/packages/client-iot-data-plane/test/IoTDataPlane.test.ts b/packages/client-iot-data-plane/test/IoTDataPlane.test.ts index e7b461c9..aa61f485 100644 --- a/packages/client-iot-data-plane/test/IoTDataPlane.test.ts +++ b/packages/client-iot-data-plane/test/IoTDataPlane.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-iot-data-plane"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-iot-data-plane/dist-cjs/runtimeConfig"; -import { IoTDataPlane, IoTDataPlaneServiceConfig, SdkError } from "@effect-aws/client-iot-data-plane"; +import { IoTDataPlane, IoTDataPlaneServiceConfig } from "@effect-aws/client-iot-data-plane"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-iot-events-data/src/Errors.ts b/packages/client-iot-events-data/src/Errors.ts index d648e751..4ed8c179 100644 --- a/packages/client-iot-events-data/src/Errors.ts +++ b/packages/client-iot-events-data/src/Errors.ts @@ -6,7 +6,6 @@ import type { ThrottlingException, } from "@aws-sdk/client-iot-events-data"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "InternalFailureException", @@ -21,6 +20,4 @@ export type InvalidRequestError = TaggedException; export type ResourceNotFoundError = TaggedException; export type ServiceUnavailableError = TaggedException; export type ThrottlingError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-iot-events-data/src/IoTEventsDataService.ts b/packages/client-iot-events-data/src/IoTEventsDataService.ts index c2553abe..1b59d49b 100644 --- a/packages/client-iot-events-data/src/IoTEventsDataService.ts +++ b/packages/client-iot-events-data/src/IoTEventsDataService.ts @@ -41,7 +41,7 @@ import { type ListDetectorsCommandInput, type ListDetectorsCommandOutput, } from "@aws-sdk/client-iot-events-data"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -49,6 +49,7 @@ import type { InternalFailureError, InvalidRequestError, ResourceNotFoundError, + SdkError, ServiceUnavailableError, ThrottlingError, } from "./Errors.js"; diff --git a/packages/client-iot-events-data/test/IoTEventsData.test.ts b/packages/client-iot-events-data/test/IoTEventsData.test.ts index e06feeeb..ed091e8b 100644 --- a/packages/client-iot-events-data/test/IoTEventsData.test.ts +++ b/packages/client-iot-events-data/test/IoTEventsData.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-iot-events-data"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-iot-events-data/dist-cjs/runtimeConfig"; -import { IoTEventsData, IoTEventsDataServiceConfig, SdkError } from "@effect-aws/client-iot-events-data"; +import { IoTEventsData, IoTEventsDataServiceConfig } from "@effect-aws/client-iot-events-data"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-iot-events/src/Errors.ts b/packages/client-iot-events/src/Errors.ts index 8e5d448d..25497d17 100644 --- a/packages/client-iot-events/src/Errors.ts +++ b/packages/client-iot-events/src/Errors.ts @@ -10,7 +10,6 @@ import type { UnsupportedOperationException, } from "@aws-sdk/client-iot-events"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "InternalFailureException", @@ -33,6 +32,4 @@ export type ResourceNotFoundError = TaggedException; export type ServiceUnavailableError = TaggedException; export type ThrottlingError = TaggedException; export type UnsupportedOperationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-iot-events/src/IoTEventsService.ts b/packages/client-iot-events/src/IoTEventsService.ts index c237e63c..2effd0c9 100644 --- a/packages/client-iot-events/src/IoTEventsService.ts +++ b/packages/client-iot-events/src/IoTEventsService.ts @@ -83,7 +83,7 @@ import { type UpdateInputCommandInput, type UpdateInputCommandOutput, } from "@aws-sdk/client-iot-events"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -94,6 +94,7 @@ import type { ResourceAlreadyExistsError, ResourceInUseError, ResourceNotFoundError, + SdkError, ServiceUnavailableError, ThrottlingError, UnsupportedOperationError, diff --git a/packages/client-iot-events/test/IoTEvents.test.ts b/packages/client-iot-events/test/IoTEvents.test.ts index 265156f1..b6edf552 100644 --- a/packages/client-iot-events/test/IoTEvents.test.ts +++ b/packages/client-iot-events/test/IoTEvents.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-iot-events"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-iot-events/dist-cjs/runtimeConfig"; -import { IoTEvents, IoTEventsServiceConfig, SdkError } from "@effect-aws/client-iot-events"; +import { IoTEvents, IoTEventsServiceConfig } from "@effect-aws/client-iot-events"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-iot-jobs-data-plane/src/Errors.ts b/packages/client-iot-jobs-data-plane/src/Errors.ts index cffd531a..6bb6e96d 100644 --- a/packages/client-iot-jobs-data-plane/src/Errors.ts +++ b/packages/client-iot-jobs-data-plane/src/Errors.ts @@ -12,7 +12,6 @@ import type { ValidationException, } from "@aws-sdk/client-iot-jobs-data-plane"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "CertificateValidationException", @@ -39,6 +38,4 @@ export type ServiceUnavailableError = TaggedException; export type ThrottlingError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-iot-jobs-data-plane/src/IoTJobsDataPlaneService.ts b/packages/client-iot-jobs-data-plane/src/IoTJobsDataPlaneService.ts index d4bd59d2..cdeb61c1 100644 --- a/packages/client-iot-jobs-data-plane/src/IoTJobsDataPlaneService.ts +++ b/packages/client-iot-jobs-data-plane/src/IoTJobsDataPlaneService.ts @@ -20,7 +20,7 @@ import { type UpdateJobExecutionCommandInput, type UpdateJobExecutionCommandOutput, } from "@aws-sdk/client-iot-jobs-data-plane"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -31,6 +31,7 @@ import type { InvalidRequestError, InvalidStateTransitionError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ServiceUnavailableError, TerminalStateError, diff --git a/packages/client-iot-jobs-data-plane/test/IoTJobsDataPlane.test.ts b/packages/client-iot-jobs-data-plane/test/IoTJobsDataPlane.test.ts index c68c248b..c614fdfe 100644 --- a/packages/client-iot-jobs-data-plane/test/IoTJobsDataPlane.test.ts +++ b/packages/client-iot-jobs-data-plane/test/IoTJobsDataPlane.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-iot-jobs-data-plane"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-iot-jobs-data-plane/dist-cjs/runtimeConfig"; -import { IoTJobsDataPlane, IoTJobsDataPlaneServiceConfig, SdkError } from "@effect-aws/client-iot-jobs-data-plane"; +import { IoTJobsDataPlane, IoTJobsDataPlaneServiceConfig } from "@effect-aws/client-iot-jobs-data-plane"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-iot-wireless/src/Errors.ts b/packages/client-iot-wireless/src/Errors.ts index 88c91d6b..d8ac8af0 100644 --- a/packages/client-iot-wireless/src/Errors.ts +++ b/packages/client-iot-wireless/src/Errors.ts @@ -8,7 +8,6 @@ import type { ValidationException, } from "@aws-sdk/client-iot-wireless"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -27,6 +26,4 @@ export type ResourceNotFoundError = TaggedException; export type ThrottlingError = TaggedException; export type TooManyTagsError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-iot-wireless/src/IoTWirelessService.ts b/packages/client-iot-wireless/src/IoTWirelessService.ts index fbf785eb..8a7ac86d 100644 --- a/packages/client-iot-wireless/src/IoTWirelessService.ts +++ b/packages/client-iot-wireless/src/IoTWirelessService.ts @@ -341,7 +341,7 @@ import { type UpdateWirelessGatewayCommandInput, type UpdateWirelessGatewayCommandOutput, } from "@aws-sdk/client-iot-wireless"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -350,6 +350,7 @@ import type { ConflictError, InternalServerError, ResourceNotFoundError, + SdkError, ThrottlingError, TooManyTagsError, ValidationError, diff --git a/packages/client-iot-wireless/test/IoTWireless.test.ts b/packages/client-iot-wireless/test/IoTWireless.test.ts index 54c39ed0..409b2e36 100644 --- a/packages/client-iot-wireless/test/IoTWireless.test.ts +++ b/packages/client-iot-wireless/test/IoTWireless.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-iot-wireless"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-iot-wireless/dist-cjs/runtimeConfig"; -import { IoTWireless, IoTWirelessServiceConfig, SdkError } from "@effect-aws/client-iot-wireless"; +import { IoTWireless, IoTWirelessServiceConfig } from "@effect-aws/client-iot-wireless"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-iot/src/Errors.ts b/packages/client-iot/src/Errors.ts index f4cf9796..1e1c36e6 100644 --- a/packages/client-iot/src/Errors.ts +++ b/packages/client-iot/src/Errors.ts @@ -34,7 +34,6 @@ import type { VersionsLimitExceededException, } from "@aws-sdk/client-iot"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "CertificateConflictException", @@ -105,6 +104,4 @@ export type UnauthorizedError = TaggedException; export type ValidationError = TaggedException; export type VersionConflictError = TaggedException; export type VersionsLimitExceededError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-iot/src/IoTService.ts b/packages/client-iot/src/IoTService.ts index 1c9c153f..2c3e1ec0 100644 --- a/packages/client-iot/src/IoTService.ts +++ b/packages/client-iot/src/IoTService.ts @@ -815,7 +815,7 @@ import { type ValidateSecurityProfileBehaviorsCommandInput, type ValidateSecurityProfileBehaviorsCommandOutput, } from "@aws-sdk/client-iot"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -842,6 +842,7 @@ import type { ResourceAlreadyExistsError, ResourceNotFoundError, ResourceRegistrationFailureError, + SdkError, ServiceQuotaExceededError, ServiceUnavailableError, SqlParseError, diff --git a/packages/client-iot/test/IoT.test.ts b/packages/client-iot/test/IoT.test.ts index 9ed8391b..e851e9e3 100644 --- a/packages/client-iot/test/IoT.test.ts +++ b/packages/client-iot/test/IoT.test.ts @@ -1,7 +1,8 @@ import { DescribeJobCommand, type DescribeJobCommandInput, IoTClient, IoTServiceException } from "@aws-sdk/client-iot"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-iot/dist-cjs/runtimeConfig"; -import { IoT, IoTServiceConfig, SdkError } from "@effect-aws/client-iot"; +import { IoT, IoTServiceConfig } from "@effect-aws/client-iot"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-kinesis/src/Errors.ts b/packages/client-kinesis/src/Errors.ts index ff3db9be..a164ef7a 100644 --- a/packages/client-kinesis/src/Errors.ts +++ b/packages/client-kinesis/src/Errors.ts @@ -17,7 +17,6 @@ import type { ValidationException, } from "@aws-sdk/client-kinesis"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -54,6 +53,4 @@ export type ProvisionedThroughputExceededError = TaggedException; export type ResourceNotFoundError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-kinesis/src/KinesisService.ts b/packages/client-kinesis/src/KinesisService.ts index 14e88d23..efb3acc2 100644 --- a/packages/client-kinesis/src/KinesisService.ts +++ b/packages/client-kinesis/src/KinesisService.ts @@ -110,7 +110,7 @@ import { type UpdateStreamModeCommandInput, type UpdateStreamModeCommandOutput, } from "@aws-sdk/client-kinesis"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -130,6 +130,7 @@ import type { ProvisionedThroughputExceededError, ResourceInUseError, ResourceNotFoundError, + SdkError, ValidationError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-kinesis/test/Kinesis.test.ts b/packages/client-kinesis/test/Kinesis.test.ts index 30af3d58..75568df3 100644 --- a/packages/client-kinesis/test/Kinesis.test.ts +++ b/packages/client-kinesis/test/Kinesis.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-kinesis"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-kinesis/dist-cjs/runtimeConfig"; -import { Kinesis, KinesisServiceConfig, SdkError } from "@effect-aws/client-kinesis"; +import { Kinesis, KinesisServiceConfig } from "@effect-aws/client-kinesis"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-kms/src/Errors.ts b/packages/client-kms/src/Errors.ts index e35b2efa..5ab946e9 100644 --- a/packages/client-kms/src/Errors.ts +++ b/packages/client-kms/src/Errors.ts @@ -49,7 +49,6 @@ import type { XksProxyVpcEndpointServiceNotFoundException, } from "@aws-sdk/client-kms"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AlreadyExistsException", @@ -154,6 +153,4 @@ export type XksProxyVpcEndpointServiceInvalidConfigurationError = TaggedExceptio XksProxyVpcEndpointServiceInvalidConfigurationException >; export type XksProxyVpcEndpointServiceNotFoundError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-kms/src/KMSService.ts b/packages/client-kms/src/KMSService.ts index bde3c562..ca821af5 100644 --- a/packages/client-kms/src/KMSService.ts +++ b/packages/client-kms/src/KMSService.ts @@ -164,7 +164,7 @@ import { type VerifyMacCommandInput, type VerifyMacCommandOutput, } from "@aws-sdk/client-kms"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -203,6 +203,7 @@ import type { LimitExceededError, MalformedPolicyDocumentError, NotFoundError, + SdkError, TagError, UnsupportedOperationError, XksKeyAlreadyInUseError, diff --git a/packages/client-kms/test/KMS.test.ts b/packages/client-kms/test/KMS.test.ts index fd57e819..6d9b8b5b 100644 --- a/packages/client-kms/test/KMS.test.ts +++ b/packages/client-kms/test/KMS.test.ts @@ -1,7 +1,8 @@ import { KMSClient, KMSServiceException, ListKeysCommand, type ListKeysCommandInput } from "@aws-sdk/client-kms"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-kms/dist-cjs/runtimeConfig"; -import { KMS, KMSServiceConfig, SdkError } from "@effect-aws/client-kms"; +import { KMS, KMSServiceConfig } from "@effect-aws/client-kms"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-lambda/src/Errors.ts b/packages/client-lambda/src/Errors.ts index dd0f810c..d6ad6ee6 100644 --- a/packages/client-lambda/src/Errors.ts +++ b/packages/client-lambda/src/Errors.ts @@ -39,7 +39,6 @@ import type { UnsupportedMediaTypeException, } from "@aws-sdk/client-lambda"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "CodeSigningConfigNotFoundException", @@ -120,6 +119,4 @@ export type SnapStartTimeoutError = TaggedException; export type SubnetIPAddressLimitReachedError = TaggedException; export type TooManyRequestsError = TaggedException; export type UnsupportedMediaTypeError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-lambda/src/LambdaService.ts b/packages/client-lambda/src/LambdaService.ts index 5abfe16f..6da2ec9e 100644 --- a/packages/client-lambda/src/LambdaService.ts +++ b/packages/client-lambda/src/LambdaService.ts @@ -209,7 +209,7 @@ import { type UpdateFunctionUrlConfigCommandInput, type UpdateFunctionUrlConfigCommandOutput, } from "@aws-sdk/client-lambda"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -245,6 +245,7 @@ import type { ResourceInUseError, ResourceNotFoundError, ResourceNotReadyError, + SdkError, ServiceError, SnapStartError, SnapStartNotReadyError, diff --git a/packages/client-lambda/test/Lambda.test.ts b/packages/client-lambda/test/Lambda.test.ts index 7e02dc84..d12376c4 100644 --- a/packages/client-lambda/test/Lambda.test.ts +++ b/packages/client-lambda/test/Lambda.test.ts @@ -1,7 +1,8 @@ import { InvokeCommand, type InvokeCommandInput, LambdaClient, LambdaServiceException } from "@aws-sdk/client-lambda"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-lambda/dist-cjs/runtimeConfig"; -import { Lambda, LambdaServiceConfig, SdkError } from "@effect-aws/client-lambda"; +import { Lambda, LambdaServiceConfig } from "@effect-aws/client-lambda"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-mq/src/Errors.ts b/packages/client-mq/src/Errors.ts index 39fab509..d6060c64 100644 --- a/packages/client-mq/src/Errors.ts +++ b/packages/client-mq/src/Errors.ts @@ -7,7 +7,6 @@ import type { UnauthorizedException, } from "@aws-sdk/client-mq"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "BadRequestException", @@ -24,6 +23,4 @@ export type ForbiddenError = TaggedException; export type InternalServerError = TaggedException; export type NotFoundError = TaggedException; export type UnauthorizedError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-mq/src/MqService.ts b/packages/client-mq/src/MqService.ts index 2e0192d3..c58d9c0a 100644 --- a/packages/client-mq/src/MqService.ts +++ b/packages/client-mq/src/MqService.ts @@ -77,7 +77,7 @@ import { type UpdateUserCommandInput, type UpdateUserCommandOutput, } from "@aws-sdk/client-mq"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -87,6 +87,7 @@ import type { ForbiddenError, InternalServerError, NotFoundError, + SdkError, UnauthorizedError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-mq/test/Mq.test.ts b/packages/client-mq/test/Mq.test.ts index 3399ace0..32ef1a7a 100644 --- a/packages/client-mq/test/Mq.test.ts +++ b/packages/client-mq/test/Mq.test.ts @@ -1,7 +1,8 @@ import { ListBrokersCommand, type ListBrokersCommandInput, MqClient, MqServiceException } from "@aws-sdk/client-mq"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-mq/dist-cjs/runtimeConfig"; -import { Mq, MqServiceConfig, SdkError } from "@effect-aws/client-mq"; +import { Mq, MqServiceConfig } from "@effect-aws/client-mq"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-opensearch-serverless/src/Errors.ts b/packages/client-opensearch-serverless/src/Errors.ts index 7ebac36f..d79e5ea7 100644 --- a/packages/client-opensearch-serverless/src/Errors.ts +++ b/packages/client-opensearch-serverless/src/Errors.ts @@ -7,7 +7,6 @@ import type { ValidationException, } from "@aws-sdk/client-opensearchserverless"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ConflictException", @@ -24,6 +23,4 @@ export type OcuLimitExceededError = TaggedException; export type ResourceNotFoundError = TaggedException; export type ServiceQuotaExceededError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-opensearch-serverless/src/OpenSearchServerlessService.ts b/packages/client-opensearch-serverless/src/OpenSearchServerlessService.ts index be1d4d7d..704f7759 100644 --- a/packages/client-opensearch-serverless/src/OpenSearchServerlessService.ts +++ b/packages/client-opensearch-serverless/src/OpenSearchServerlessService.ts @@ -116,7 +116,7 @@ import { type UpdateVpcEndpointCommandInput, type UpdateVpcEndpointCommandOutput, } from "@aws-sdk/client-opensearchserverless"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -125,6 +125,7 @@ import type { InternalServerError, OcuLimitExceededError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ValidationError, } from "./Errors.js"; diff --git a/packages/client-opensearch-serverless/test/OpenSearchServerless.test.ts b/packages/client-opensearch-serverless/test/OpenSearchServerless.test.ts index 4aaff27d..e4fb1546 100644 --- a/packages/client-opensearch-serverless/test/OpenSearchServerless.test.ts +++ b/packages/client-opensearch-serverless/test/OpenSearchServerless.test.ts @@ -6,11 +6,8 @@ import { } from "@aws-sdk/client-opensearchserverless"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-opensearchserverless/dist-cjs/runtimeConfig"; -import { - OpenSearchServerless, - OpenSearchServerlessServiceConfig, - SdkError, -} from "@effect-aws/client-opensearch-serverless"; +import { OpenSearchServerless, OpenSearchServerlessServiceConfig } from "@effect-aws/client-opensearch-serverless"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-opensearch/src/Errors.ts b/packages/client-opensearch/src/Errors.ts index 71a67961..0828c0d6 100644 --- a/packages/client-opensearch/src/Errors.ts +++ b/packages/client-opensearch/src/Errors.ts @@ -14,7 +14,6 @@ import type { ValidationException, } from "@aws-sdk/client-opensearch"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -45,6 +44,4 @@ export type ResourceAlreadyExistsError = TaggedException; export type SlotNotAvailableError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-opensearch/src/OpenSearchService.ts b/packages/client-opensearch/src/OpenSearchService.ts index 0521d062..b22c0d04 100644 --- a/packages/client-opensearch/src/OpenSearchService.ts +++ b/packages/client-opensearch/src/OpenSearchService.ts @@ -233,7 +233,7 @@ import { type UpgradeDomainCommandInput, type UpgradeDomainCommandOutput, } from "@aws-sdk/client-opensearch"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -249,6 +249,7 @@ import type { LimitExceededError, ResourceAlreadyExistsError, ResourceNotFoundError, + SdkError, SlotNotAvailableError, ValidationError, } from "./Errors.js"; diff --git a/packages/client-opensearch/test/OpenSearch.test.ts b/packages/client-opensearch/test/OpenSearch.test.ts index 58d97091..1b1a84aa 100644 --- a/packages/client-opensearch/test/OpenSearch.test.ts +++ b/packages/client-opensearch/test/OpenSearch.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-opensearch"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-opensearch/dist-cjs/runtimeConfig"; -import { OpenSearch, OpenSearchServiceConfig, SdkError } from "@effect-aws/client-opensearch"; +import { OpenSearch, OpenSearchServiceConfig } from "@effect-aws/client-opensearch"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-organizations/src/Errors.ts b/packages/client-organizations/src/Errors.ts index b61986d9..2ea5486f 100644 --- a/packages/client-organizations/src/Errors.ts +++ b/packages/client-organizations/src/Errors.ts @@ -48,7 +48,6 @@ import type { UnsupportedAPIEndpointException, } from "@aws-sdk/client-organizations"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AWSOrganizationsNotInUseException", @@ -149,6 +148,4 @@ export type SourceParentNotFoundError = TaggedException; export type TooManyRequestsError = TaggedException; export type UnsupportedAPIEndpointError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-organizations/src/OrganizationsService.ts b/packages/client-organizations/src/OrganizationsService.ts index 545d6dba..a0f018db 100644 --- a/packages/client-organizations/src/OrganizationsService.ts +++ b/packages/client-organizations/src/OrganizationsService.ts @@ -170,7 +170,7 @@ import { type UpdatePolicyCommandInput, type UpdatePolicyCommandOutput, } from "@aws-sdk/client-organizations"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -217,6 +217,7 @@ import type { PolicyTypeNotEnabledError, ResourcePolicyNotFoundError, RootNotFoundError, + SdkError, ServiceError, SourceParentNotFoundError, TargetNotFoundError, diff --git a/packages/client-organizations/test/Organizations.test.ts b/packages/client-organizations/test/Organizations.test.ts index 7e7c8c22..2fd3fca4 100644 --- a/packages/client-organizations/test/Organizations.test.ts +++ b/packages/client-organizations/test/Organizations.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-organizations"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-organizations/dist-cjs/runtimeConfig"; -import { Organizations, OrganizationsServiceConfig, SdkError } from "@effect-aws/client-organizations"; +import { Organizations, OrganizationsServiceConfig } from "@effect-aws/client-organizations"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-rds/src/Errors.ts b/packages/client-rds/src/Errors.ts index d7537c69..72f30ba8 100644 --- a/packages/client-rds/src/Errors.ts +++ b/packages/client-rds/src/Errors.ts @@ -146,7 +146,6 @@ import type { UnsupportedDBEngineVersionFault, } from "@aws-sdk/client-rds"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AuthorizationAlreadyExistsFault", @@ -447,6 +446,4 @@ export type TenantDatabaseAlreadyExistsFaultError = TaggedException; export type TenantDatabaseQuotaExceededFaultError = TaggedException; export type UnsupportedDBEngineVersionFaultError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-rds/src/RDSService.ts b/packages/client-rds/src/RDSService.ts index 8bdabe61..5f76e701 100644 --- a/packages/client-rds/src/RDSService.ts +++ b/packages/client-rds/src/RDSService.ts @@ -491,7 +491,7 @@ import { type SwitchoverReadReplicaCommandInput, type SwitchoverReadReplicaCommandOutput, } from "@aws-sdk/client-rds"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -622,6 +622,7 @@ import type { ReservedDBInstanceQuotaExceededFaultError, ReservedDBInstancesOfferingNotFoundFaultError, ResourceNotFoundFaultError, + SdkError, SharedSnapshotQuotaExceededFaultError, SnapshotQuotaExceededFaultError, SNSInvalidTopicFaultError, diff --git a/packages/client-rds/test/RDS.test.ts b/packages/client-rds/test/RDS.test.ts index 592a66ed..b096f9fd 100644 --- a/packages/client-rds/test/RDS.test.ts +++ b/packages/client-rds/test/RDS.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-rds"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-rds/dist-cjs/runtimeConfig"; -import { RDS, RDSServiceConfig, SdkError } from "@effect-aws/client-rds"; +import { RDS, RDSServiceConfig } from "@effect-aws/client-rds"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-s3/src/Errors.ts b/packages/client-s3/src/Errors.ts index ba916b9e..d2fa56f1 100644 --- a/packages/client-s3/src/Errors.ts +++ b/packages/client-s3/src/Errors.ts @@ -15,7 +15,6 @@ import type { TooManyParts, } from "@aws-sdk/client-s3"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; import { Data } from "effect"; export const AllServiceErrors = [ @@ -52,5 +51,4 @@ export type S3ServiceError = TaggedException< S3ServiceException & { name: "S3ServiceError" } >; export const S3ServiceError = Data.tagged("S3ServiceError"); -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-s3/src/S3Service.ts b/packages/client-s3/src/S3Service.ts index e0a4436f..c9e1b523 100644 --- a/packages/client-s3/src/S3Service.ts +++ b/packages/client-s3/src/S3Service.ts @@ -301,7 +301,7 @@ import { } from "@aws-sdk/client-s3"; import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; import type { RequestPresigningArguments } from "@aws-sdk/types"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -319,6 +319,7 @@ import type { ObjectAlreadyInActiveTierError, ObjectNotInActiveTierError, S3ServiceError, + SdkError, TooManyPartsError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; diff --git a/packages/client-s3/test/S3.test.ts b/packages/client-s3/test/S3.test.ts index 2fa5adf9..365e93dd 100644 --- a/packages/client-s3/test/S3.test.ts +++ b/packages/client-s3/test/S3.test.ts @@ -8,7 +8,8 @@ import { } from "@aws-sdk/client-s3"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-s3/dist-cjs/runtimeConfig"; -import { S3, S3ServiceConfig, SdkError } from "@effect-aws/client-s3"; +import { S3, S3ServiceConfig } from "@effect-aws/client-s3"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-scheduler/src/Errors.ts b/packages/client-scheduler/src/Errors.ts index 7c330bd5..6abe35fa 100644 --- a/packages/client-scheduler/src/Errors.ts +++ b/packages/client-scheduler/src/Errors.ts @@ -7,7 +7,6 @@ import type { ValidationException, } from "@aws-sdk/client-scheduler"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ConflictException", @@ -24,6 +23,4 @@ export type ResourceNotFoundError = TaggedException; export type ServiceQuotaExceededError = TaggedException; export type ThrottlingError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-scheduler/src/SchedulerService.ts b/packages/client-scheduler/src/SchedulerService.ts index a94c30fc..00040308 100644 --- a/packages/client-scheduler/src/SchedulerService.ts +++ b/packages/client-scheduler/src/SchedulerService.ts @@ -41,7 +41,7 @@ import { type UpdateScheduleCommandInput, type UpdateScheduleCommandOutput, } from "@aws-sdk/client-scheduler"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -49,6 +49,7 @@ import type { ConflictError, InternalServerError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ThrottlingError, ValidationError, diff --git a/packages/client-scheduler/test/Scheduler.test.ts b/packages/client-scheduler/test/Scheduler.test.ts index 42f64df4..7527e21d 100644 --- a/packages/client-scheduler/test/Scheduler.test.ts +++ b/packages/client-scheduler/test/Scheduler.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-scheduler"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-scheduler/dist-cjs/runtimeConfig"; -import { Scheduler, SchedulerServiceConfig, SdkError } from "@effect-aws/client-scheduler"; +import { Scheduler, SchedulerServiceConfig } from "@effect-aws/client-scheduler"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-secrets-manager/src/Errors.ts b/packages/client-secrets-manager/src/Errors.ts index f62316e6..d19df712 100644 --- a/packages/client-secrets-manager/src/Errors.ts +++ b/packages/client-secrets-manager/src/Errors.ts @@ -13,7 +13,6 @@ import type { ResourceNotFoundException, } from "@aws-sdk/client-secrets-manager"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "DecryptionFailure", @@ -42,6 +41,4 @@ export type PreconditionNotMetError = TaggedException; export type ResourceExistsError = TaggedException; export type ResourceNotFoundError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-secrets-manager/src/SecretsManagerService.ts b/packages/client-secrets-manager/src/SecretsManagerService.ts index fe2f9442..c6da8ef0 100644 --- a/packages/client-secrets-manager/src/SecretsManagerService.ts +++ b/packages/client-secrets-manager/src/SecretsManagerService.ts @@ -74,7 +74,7 @@ import { type ValidateResourcePolicyCommandInput, type ValidateResourcePolicyCommandOutput, } from "@aws-sdk/client-secrets-manager"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -91,6 +91,7 @@ import type { PublicPolicyError, ResourceExistsError, ResourceNotFoundError, + SdkError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; import * as Instance from "./SecretsManagerClientInstance.js"; diff --git a/packages/client-secrets-manager/test/SecretsManager.test.ts b/packages/client-secrets-manager/test/SecretsManager.test.ts index 7e7adcdf..f33f8e95 100644 --- a/packages/client-secrets-manager/test/SecretsManager.test.ts +++ b/packages/client-secrets-manager/test/SecretsManager.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-secrets-manager"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig"; -import { SdkError, SecretsManager, SecretsManagerServiceConfig } from "@effect-aws/client-secrets-manager"; +import { SecretsManager, SecretsManagerServiceConfig } from "@effect-aws/client-secrets-manager"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-ses/src/Errors.ts b/packages/client-ses/src/Errors.ts index 0b774337..63a5b15c 100644 --- a/packages/client-ses/src/Errors.ts +++ b/packages/client-ses/src/Errors.ts @@ -35,7 +35,6 @@ import type { TrackingOptionsDoesNotExistException, } from "@aws-sdk/client-ses"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccountSendingPausedException", @@ -114,6 +113,4 @@ export type RuleSetDoesNotExistError = TaggedException; export type TrackingOptionsAlreadyExistsError = TaggedException; export type TrackingOptionsDoesNotExistError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-ses/src/SESService.ts b/packages/client-ses/src/SESService.ts index c9126e47..701c4a48 100644 --- a/packages/client-ses/src/SESService.ts +++ b/packages/client-ses/src/SESService.ts @@ -218,7 +218,7 @@ import { type VerifyEmailIdentityCommandInput, type VerifyEmailIdentityCommandOutput, } from "@aws-sdk/client-ses"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -254,6 +254,7 @@ import type { ProductionAccessNotGrantedError, RuleDoesNotExistError, RuleSetDoesNotExistError, + SdkError, TemplateDoesNotExistError, TrackingOptionsAlreadyExistsError, TrackingOptionsDoesNotExistError, diff --git a/packages/client-ses/test/SES.test.ts b/packages/client-ses/test/SES.test.ts index e95482f1..986e277c 100644 --- a/packages/client-ses/test/SES.test.ts +++ b/packages/client-ses/test/SES.test.ts @@ -1,7 +1,8 @@ import { SendEmailCommand, type SendEmailCommandInput, SESClient, SESServiceException } from "@aws-sdk/client-ses"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-ses/dist-cjs/runtimeConfig"; -import { SdkError, SES, SESServiceConfig } from "@effect-aws/client-ses"; +import { SES, SESServiceConfig } from "@effect-aws/client-ses"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-sfn/src/Errors.ts b/packages/client-sfn/src/Errors.ts index 4e79b971..3bd945a1 100644 --- a/packages/client-sfn/src/Errors.ts +++ b/packages/client-sfn/src/Errors.ts @@ -34,7 +34,6 @@ import type { ValidationException, } from "@aws-sdk/client-sfn"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ActivityAlreadyExists", @@ -105,6 +104,4 @@ export type TaskDoesNotExistError = TaggedException; export type TaskTimedOutError = TaggedException; export type TooManyTagsError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-sfn/src/SFNService.ts b/packages/client-sfn/src/SFNService.ts index a6316638..1c9e5fe0 100644 --- a/packages/client-sfn/src/SFNService.ts +++ b/packages/client-sfn/src/SFNService.ts @@ -116,7 +116,7 @@ import { type ValidateStateMachineDefinitionCommandInput, type ValidateStateMachineDefinitionCommandOutput, } from "@aws-sdk/client-sfn"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -144,6 +144,7 @@ import type { KmsThrottlingError, MissingRequiredParameterError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, StateMachineAlreadyExistsError, StateMachineDeletingError, diff --git a/packages/client-sfn/test/SFN.test.ts b/packages/client-sfn/test/SFN.test.ts index d8190167..7a72e40a 100644 --- a/packages/client-sfn/test/SFN.test.ts +++ b/packages/client-sfn/test/SFN.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-sfn"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-sfn/dist-cjs/runtimeConfig"; -import { SdkError, SFN, SFNServiceConfig } from "@effect-aws/client-sfn"; +import { SFN, SFNServiceConfig } from "@effect-aws/client-sfn"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-sns/src/Errors.ts b/packages/client-sns/src/Errors.ts index bbe1416c..bf072cc6 100644 --- a/packages/client-sns/src/Errors.ts +++ b/packages/client-sns/src/Errors.ts @@ -35,7 +35,6 @@ import type { VerificationException, } from "@aws-sdk/client-sns"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AuthorizationErrorException", @@ -108,6 +107,4 @@ export type TopicLimitExceededError = TaggedException; export type ValidationError = TaggedException; export type VerificationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-sns/src/SNSService.ts b/packages/client-sns/src/SNSService.ts index ef0c22a3..77bbd5c0 100644 --- a/packages/client-sns/src/SNSService.ts +++ b/packages/client-sns/src/SNSService.ts @@ -131,7 +131,7 @@ import { type VerifySMSSandboxPhoneNumberCommandInput, type VerifySMSSandboxPhoneNumberCommandOutput, } from "@aws-sdk/client-sns"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -160,6 +160,7 @@ import type { PlatformApplicationDisabledError, ReplayLimitExceededError, ResourceNotFoundError, + SdkError, StaleTagError, SubscriptionLimitExceededError, TagLimitExceededError, diff --git a/packages/client-sns/test/SNS.test.ts b/packages/client-sns/test/SNS.test.ts index d52e168d..bf766c0b 100644 --- a/packages/client-sns/test/SNS.test.ts +++ b/packages/client-sns/test/SNS.test.ts @@ -1,7 +1,8 @@ import { PublishCommand, type PublishCommandInput, SNSClient, SNSServiceException } from "@aws-sdk/client-sns"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-sns/dist-cjs/runtimeConfig"; -import { SdkError, SNS, SNSServiceConfig } from "@effect-aws/client-sns"; +import { SNS, SNSServiceConfig } from "@effect-aws/client-sns"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-sqs/src/Errors.ts b/packages/client-sqs/src/Errors.ts index e7513986..82929987 100644 --- a/packages/client-sqs/src/Errors.ts +++ b/packages/client-sqs/src/Errors.ts @@ -29,7 +29,6 @@ import type { UnsupportedOperation, } from "@aws-sdk/client-sqs"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "BatchEntryIdsNotDistinct", @@ -90,6 +89,4 @@ export type RequestThrottledError = TaggedException; export type ResourceNotFoundError = TaggedException; export type TooManyEntriesInBatchRequestError = TaggedException; export type UnsupportedOperationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-sqs/src/SQSService.ts b/packages/client-sqs/src/SQSService.ts index b886faf7..31fe7ee8 100644 --- a/packages/client-sqs/src/SQSService.ts +++ b/packages/client-sqs/src/SQSService.ts @@ -74,7 +74,7 @@ import { type UntagQueueCommandInput, type UntagQueueCommandOutput, } from "@aws-sdk/client-sqs"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -105,6 +105,7 @@ import type { ReceiptHandleIsInvalidError, RequestThrottledError, ResourceNotFoundError, + SdkError, TooManyEntriesInBatchRequestError, UnsupportedOperationError, } from "./Errors.js"; diff --git a/packages/client-sqs/test/SQS.test.ts b/packages/client-sqs/test/SQS.test.ts index 57598d56..1ad27f83 100644 --- a/packages/client-sqs/test/SQS.test.ts +++ b/packages/client-sqs/test/SQS.test.ts @@ -1,7 +1,8 @@ import { SendMessageCommand, type SendMessageCommandInput, SQSClient, SQSServiceException } from "@aws-sdk/client-sqs"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-sqs/dist-cjs/runtimeConfig"; -import { SdkError, SQS, SQSServiceConfig } from "@effect-aws/client-sqs"; +import { SQS, SQSServiceConfig } from "@effect-aws/client-sqs"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-ssm/src/Errors.ts b/packages/client-ssm/src/Errors.ts index 16deb352..88e82a65 100644 --- a/packages/client-ssm/src/Errors.ts +++ b/packages/client-ssm/src/Errors.ts @@ -139,7 +139,6 @@ import type { ValidationException, } from "@aws-sdk/client-ssm"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -422,6 +421,4 @@ export type UnsupportedOperationError = TaggedException; export type UnsupportedPlatformTypeError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-ssm/src/SSMService.ts b/packages/client-ssm/src/SSMService.ts index a27d0644..05d12e86 100644 --- a/packages/client-ssm/src/SSMService.ts +++ b/packages/client-ssm/src/SSMService.ts @@ -443,7 +443,7 @@ import { type UpdateServiceSettingCommandInput, type UpdateServiceSettingCommandOutput, } from "@aws-sdk/client-ssm"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -567,6 +567,7 @@ import type { ResourcePolicyInvalidParameterError, ResourcePolicyLimitExceededError, ResourcePolicyNotFoundError, + SdkError, ServiceQuotaExceededError, ServiceSettingNotFoundError, StatusUnchangedError, diff --git a/packages/client-ssm/test/SSM.test.ts b/packages/client-ssm/test/SSM.test.ts index 25eeeaeb..09fd43f1 100644 --- a/packages/client-ssm/test/SSM.test.ts +++ b/packages/client-ssm/test/SSM.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-ssm"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-ssm/dist-cjs/runtimeConfig"; -import { SdkError, SSM, SSMServiceConfig } from "@effect-aws/client-ssm"; +import { SSM, SSMServiceConfig } from "@effect-aws/client-ssm"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-sts/src/Errors.ts b/packages/client-sts/src/Errors.ts index c08ae794..608b6f97 100644 --- a/packages/client-sts/src/Errors.ts +++ b/packages/client-sts/src/Errors.ts @@ -9,7 +9,6 @@ import type { RegionDisabledException, } from "@aws-sdk/client-sts"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "ExpiredTokenException", @@ -30,6 +29,4 @@ export type InvalidIdentityTokenError = TaggedException; export type PackedPolicyTooLargeError = TaggedException; export type RegionDisabledError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-sts/src/STSService.ts b/packages/client-sts/src/STSService.ts index 169c480f..a2eb9810 100644 --- a/packages/client-sts/src/STSService.ts +++ b/packages/client-sts/src/STSService.ts @@ -32,7 +32,7 @@ import { type STSClient, type STSClientConfig, } from "@aws-sdk/client-sts"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -45,6 +45,7 @@ import type { MalformedPolicyDocumentError, PackedPolicyTooLargeError, RegionDisabledError, + SdkError, } from "./Errors.js"; import { AllServiceErrors } from "./Errors.js"; import * as Instance from "./STSClientInstance.js"; diff --git a/packages/client-sts/test/STS.test.ts b/packages/client-sts/test/STS.test.ts index 8bf5236a..46373965 100644 --- a/packages/client-sts/test/STS.test.ts +++ b/packages/client-sts/test/STS.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-sts"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-sts/dist-cjs/runtimeConfig"; -import { SdkError, STS, STSServiceConfig } from "@effect-aws/client-sts"; +import { STS, STSServiceConfig } from "@effect-aws/client-sts"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-textract/src/Errors.ts b/packages/client-textract/src/Errors.ts index dcf57b00..f2f51853 100644 --- a/packages/client-textract/src/Errors.ts +++ b/packages/client-textract/src/Errors.ts @@ -19,7 +19,6 @@ import type { ValidationException, } from "@aws-sdk/client-textract"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -60,6 +59,4 @@ export type ServiceQuotaExceededError = TaggedException; export type UnsupportedDocumentError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-textract/src/TextractService.ts b/packages/client-textract/src/TextractService.ts index 6c2ef4cd..61d3547d 100644 --- a/packages/client-textract/src/TextractService.ts +++ b/packages/client-textract/src/TextractService.ts @@ -80,7 +80,7 @@ import { type UpdateAdapterCommandInput, type UpdateAdapterCommandOutput, } from "@aws-sdk/client-textract"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -99,6 +99,7 @@ import type { LimitExceededError, ProvisionedThroughputExceededError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ThrottlingError, UnsupportedDocumentError, diff --git a/packages/client-textract/test/Textract.test.ts b/packages/client-textract/test/Textract.test.ts index 9b4e2e6f..dcbd67fa 100644 --- a/packages/client-textract/test/Textract.test.ts +++ b/packages/client-textract/test/Textract.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-textract"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-textract/dist-cjs/runtimeConfig"; -import { SdkError, Textract, TextractServiceConfig } from "@effect-aws/client-textract"; +import { Textract, TextractServiceConfig } from "@effect-aws/client-textract"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-timestream-influxdb/src/Errors.ts b/packages/client-timestream-influxdb/src/Errors.ts index e40318e4..356a8157 100644 --- a/packages/client-timestream-influxdb/src/Errors.ts +++ b/packages/client-timestream-influxdb/src/Errors.ts @@ -8,7 +8,6 @@ import type { ValidationException, } from "@aws-sdk/client-timestream-influxdb"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -27,6 +26,4 @@ export type ResourceNotFoundError = TaggedException; export type ServiceQuotaExceededError = TaggedException; export type ThrottlingError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-timestream-influxdb/src/TimestreamInfluxDBService.ts b/packages/client-timestream-influxdb/src/TimestreamInfluxDBService.ts index fd23da7d..d199449e 100644 --- a/packages/client-timestream-influxdb/src/TimestreamInfluxDBService.ts +++ b/packages/client-timestream-influxdb/src/TimestreamInfluxDBService.ts @@ -56,7 +56,7 @@ import { type UpdateDbInstanceCommandInput, type UpdateDbInstanceCommandOutput, } from "@aws-sdk/client-timestream-influxdb"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -65,6 +65,7 @@ import type { ConflictError, InternalServerError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ThrottlingError, ValidationError, diff --git a/packages/client-timestream-influxdb/test/TimestreamInfluxDB.test.ts b/packages/client-timestream-influxdb/test/TimestreamInfluxDB.test.ts index e8a18028..ad4a9a58 100644 --- a/packages/client-timestream-influxdb/test/TimestreamInfluxDB.test.ts +++ b/packages/client-timestream-influxdb/test/TimestreamInfluxDB.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-timestream-influxdb"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-timestream-influxdb/dist-cjs/runtimeConfig"; -import { SdkError, TimestreamInfluxDB, TimestreamInfluxDBServiceConfig } from "@effect-aws/client-timestream-influxdb"; +import { TimestreamInfluxDB, TimestreamInfluxDBServiceConfig } from "@effect-aws/client-timestream-influxdb"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-timestream-query/src/Errors.ts b/packages/client-timestream-query/src/Errors.ts index b4b941e8..059ceaa4 100644 --- a/packages/client-timestream-query/src/Errors.ts +++ b/packages/client-timestream-query/src/Errors.ts @@ -10,7 +10,6 @@ import type { ValidationException, } from "@aws-sdk/client-timestream-query"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -33,6 +32,4 @@ export type ResourceNotFoundError = TaggedException; export type ServiceQuotaExceededError = TaggedException; export type ThrottlingError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-timestream-query/src/TimestreamQueryService.ts b/packages/client-timestream-query/src/TimestreamQueryService.ts index d82eed4d..9fcfc69b 100644 --- a/packages/client-timestream-query/src/TimestreamQueryService.ts +++ b/packages/client-timestream-query/src/TimestreamQueryService.ts @@ -50,7 +50,7 @@ import { type UpdateScheduledQueryCommandInput, type UpdateScheduledQueryCommandOutput, } from "@aws-sdk/client-timestream-query"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -61,6 +61,7 @@ import type { InvalidEndpointError, QueryExecutionError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ThrottlingError, ValidationError, diff --git a/packages/client-timestream-query/test/TimestreamQuery.test.ts b/packages/client-timestream-query/test/TimestreamQuery.test.ts index b79f9b87..ce50c95b 100644 --- a/packages/client-timestream-query/test/TimestreamQuery.test.ts +++ b/packages/client-timestream-query/test/TimestreamQuery.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-timestream-query"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-timestream-query/dist-cjs/runtimeConfig"; -import { SdkError, TimestreamQuery, TimestreamQueryServiceConfig } from "@effect-aws/client-timestream-query"; +import { TimestreamQuery, TimestreamQueryServiceConfig } from "@effect-aws/client-timestream-query"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/client-timestream-write/src/Errors.ts b/packages/client-timestream-write/src/Errors.ts index 5cee1751..acb971f3 100644 --- a/packages/client-timestream-write/src/Errors.ts +++ b/packages/client-timestream-write/src/Errors.ts @@ -10,7 +10,6 @@ import type { ValidationException, } from "@aws-sdk/client-timestream-write"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; export const AllServiceErrors = [ "AccessDeniedException", @@ -33,6 +32,4 @@ export type ResourceNotFoundError = TaggedException; export type ServiceQuotaExceededError = TaggedException; export type ThrottlingError = TaggedException; export type ValidationError = TaggedException; - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; diff --git a/packages/client-timestream-write/src/TimestreamWriteService.ts b/packages/client-timestream-write/src/TimestreamWriteService.ts index 36fc897a..ff22caac 100644 --- a/packages/client-timestream-write/src/TimestreamWriteService.ts +++ b/packages/client-timestream-write/src/TimestreamWriteService.ts @@ -62,7 +62,7 @@ import { type WriteRecordsCommandInput, type WriteRecordsCommandOutput, } from "@aws-sdk/client-timestream-write"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; @@ -73,6 +73,7 @@ import type { InvalidEndpointError, RejectedRecordsError, ResourceNotFoundError, + SdkError, ServiceQuotaExceededError, ThrottlingError, ValidationError, diff --git a/packages/client-timestream-write/test/TimestreamWrite.test.ts b/packages/client-timestream-write/test/TimestreamWrite.test.ts index 31854579..8342b2af 100644 --- a/packages/client-timestream-write/test/TimestreamWrite.test.ts +++ b/packages/client-timestream-write/test/TimestreamWrite.test.ts @@ -6,7 +6,8 @@ import { } from "@aws-sdk/client-timestream-write"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-timestream-write/dist-cjs/runtimeConfig"; -import { SdkError, TimestreamWrite, TimestreamWriteServiceConfig } from "@effect-aws/client-timestream-write"; +import { TimestreamWrite, TimestreamWriteServiceConfig } from "@effect-aws/client-timestream-write"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function"; diff --git a/packages/lib-dynamodb/test/DynamoDBDocument.test.ts b/packages/lib-dynamodb/test/DynamoDBDocument.test.ts index efb3ccf9..d0fa2d47 100644 --- a/packages/lib-dynamodb/test/DynamoDBDocument.test.ts +++ b/packages/lib-dynamodb/test/DynamoDBDocument.test.ts @@ -2,7 +2,8 @@ import { DynamoDBClient } from "@aws-sdk/client-dynamodb"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-dynamodb/dist-cjs/runtimeConfig"; import { DynamoDBDocumentClient, PutCommand, type PutCommandInput } from "@aws-sdk/lib-dynamodb"; -import { DynamoDBServiceConfig, SdkError } from "@effect-aws/client-dynamodb"; +import { DynamoDBServiceConfig } from "@effect-aws/client-dynamodb"; +import { SdkError } from "@effect-aws/commons"; import { DynamoDBDocument } from "@effect-aws/lib-dynamodb"; import { mockClient } from "aws-sdk-client-mock"; import * as Effect from "effect/Effect"; diff --git a/scripts/generate-client.ts b/scripts/generate-client.ts index a78134a5..1a49d420 100644 --- a/scripts/generate-client.ts +++ b/scripts/generate-client.ts @@ -47,7 +47,12 @@ export async function generateClient([ Record.keys, ); - await generateErrorsFile(`./packages/client-${serviceName}/src/Errors.ts`, exportedErrors, originalServiceName); + await generateErrorsFile( + `./packages/client-${serviceName}/src/Errors.ts`, + sdkName, + exportedErrors, + originalServiceName, + ); await generateClientInstanceFile( `./packages/client-${serviceName}/src/${sdkName}ClientInstance.ts`, @@ -90,36 +95,60 @@ export async function generateClient([ exec(`pnpm --filter @effect-aws/client-${serviceName} run eslint --fix`); } -async function generateErrorsFile(filePath: string, exportedErrors: Array, originalServiceName: string) { +async function generateErrorsFile( + filePath: string, + sdkName: string, + exportedErrors: Array, + originalServiceName: string, +) { + const allServiceErrors = exportedErrors.map((e) => `"${e}"`).join(", "); await writeFile( filePath, `import type { ${ - exportedErrors.map((e) => (e.endsWith("Error") ? `${e} as ${String.replace(/Error$/, "")(e)}Exception` : e)).join( - ", ", - ) + exportedErrors.length > 0 ? + exportedErrors.map((e) => (e.endsWith("Error") ? `${e} as ${String.replace(/Error$/, "")(e)}Exception` : e)) + .join( + ", ", + ) : + `${sdkName}ServiceException` } } from "@aws-sdk/client-${originalServiceName}"; import type { TaggedException } from "@effect-aws/commons"; -import { SdkError as CommonSdkError } from "@effect-aws/commons"; - -export const AllServiceErrors = [${exportedErrors.map((e) => `"${e}"`).join(", ")}] as const; +${ + allServiceErrors.length > 0 ? + ` +export const AllServiceErrors = [${allServiceErrors}] as const;` : + `import { Data } from "effect"; + +export type ${sdkName}ServiceError = TaggedException< + ${sdkName}ServiceException & { name: "${sdkName}ServiceError" } +>; +export const ${sdkName}ServiceError = Data.tagged<${sdkName}ServiceError>("${sdkName}ServiceError");` + } ${ pipe( exportedErrors, - Array.map( - (taggedError) => - `export type ${ - pipe(taggedError, String.replace(/(Failure|Exception|Error|ErrorException)$/, "")) - }Error = TaggedException<${ - taggedError.endsWith("Error") ? `${String.replace(/Error$/, "")(taggedError)}Exception` : taggedError - }>;`, + Array.reduce( + [] as Array<[string, string]>, + ( + acc, + taggedError, + ) => { + const errorName = pipe(taggedError, String.replace(/(Failure|Exception|Error|ErrorException)$/, "")); + return [ + ...acc, + [ + acc.map(([e]) => e).includes(`${errorName}Error`) ? `${taggedError}Error` : `${errorName}Error`, + taggedError.endsWith("Error") ? `${String.replace(/Error$/, "")(taggedError)}Exception` : taggedError, + ] as [string, string], + ]; + }, ), + Array.map(([errorName, errorType]) => `export type ${errorName} = TaggedException<${errorType}>;`), Array.join("\n"), ) } - -export type SdkError = CommonSdkError; -export const SdkError = CommonSdkError; +export type SdkError = TaggedException; `, ); } @@ -346,24 +375,38 @@ import { ) } } from "@aws-sdk/client-${originalServiceName}"; -import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons"; +import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons"; import { Service } from "@effect-aws/commons"; import type { Cause } from "effect"; import { Effect, Layer } from "effect"; import * as Instance from "./${sdkName}ClientInstance.js"; import * as ${sdkName}ServiceConfig from "./${sdkName}ServiceConfig.js"; -import type { +${ + exportedErrors.length > 0 ? + `import type { + SdkError, ${ - pipe( - importedErrors.map( - String.replace(/(Failure|Exception|Error|ErrorException)$/, ""), - ), - Array.map((error) => `${error}Error`), - Array.join(","), - ) - }, + pipe( + importedErrors.reduce( + ( + acc, + taggedError, + ) => { + const errorName = pipe(taggedError, String.replace(/(Failure|Exception|Error|ErrorException)$/, "")); + return [ + ...acc, + acc.includes(`${errorName}Error`) ? `${taggedError}Error` : `${errorName}Error`, + ]; + }, + [] as Array, + ), + Array.join(","), + ) + }, } from "./Errors.js"; -import { AllServiceErrors } from "./Errors.js"; +import { AllServiceErrors } from "./Errors.js";` : + `import type { ${sdkName}ServiceError, SdkError } from "./Errors.js";` + } const commands = { ${ @@ -398,7 +441,12 @@ ${ options?: HttpHandlerOptions, ): Effect.Effect< ${operationName}CommandOutput, - ${pipe(["Cause.TimeoutException", "SdkError", ...errors], Array.join(" | "))} + ${ + pipe( + ["Cause.TimeoutException", "SdkError", ...(exportedErrors.length ? errors : [`${sdkName}ServiceError`])], + Array.join(" | "), + ) + } >`; }), Array.join("\n\n"), @@ -417,7 +465,7 @@ export const make${sdkName}Service = Effect.gen(function* () { client, commands, { - errorTags: AllServiceErrors, + ${exportedErrors.length ? "errorTags: AllServiceErrors," : ""} resolveClientConfig: ${sdkName}ServiceConfig.to${sdkName}ClientConfig, }, ); @@ -483,7 +531,8 @@ async function generateTestFile( } from "@aws-sdk/client-${originalServiceName}"; // @ts-ignore import * as runtimeConfig from "@aws-sdk/client-${originalServiceName}/dist-cjs/runtimeConfig"; -import { ${sdkName}, ${sdkName}ServiceConfig, SdkError } from "@effect-aws/client-${serviceName}"; +import { ${sdkName}, ${sdkName}ServiceConfig } from "@effect-aws/client-${serviceName}"; +import { SdkError } from "@effect-aws/commons"; import { mockClient } from "aws-sdk-client-mock"; import { Effect, Exit } from "effect"; import { pipe } from "effect/Function";