1.4.0 • Published 9 months ago

@effect-aws/client-api-gateway-management-api v1.4.0

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@effect-aws/client-api-gateway-management-api

Installation

npm install --save @effect-aws/client-api-gateway-management-api

Usage

With default ApiGatewayManagementApiClient instance:

import {
  ApiGatewayManagementApiService,
  DefaultApiGatewayManagementApiServiceLayer,
} from "@effect-aws/client-api-gateway-management-api";

const program = ApiGatewayManagementApiService.postToConnection(args);

const result = pipe(
  program,
  Effect.provide(DefaultApiGatewayManagementApiServiceLayer),
  Effect.runPromise,
);

With custom ApiGatewayManagementApiClient instance:

import {
  ApiGatewayManagementApiService,
  BaseApiGatewayManagementApiServiceLayer,
  ApiGatewayManagementApiClientInstance,
} from "@effect-aws/client-api-gateway-management-api";

const program = ApiGatewayManagementApiService.postToConnection(args);

const ApiGatewayManagementApiClientInstanceLayer = Layer.succeed(
  ApiGatewayManagementApiClientInstance,
  new ApiGatewayManagementApiClient({ region: "eu-central-1" }),
);

const result = await pipe(
  program,
  Effect.provide(BaseApiGatewayManagementApiServiceLayer),
  Effect.provide(ApiGatewayManagementApiClientInstanceLayer),
  Effect.runPromise,
);

With custom ApiGatewayManagementApiClient configuration:

import {
  ApiGatewayManagementApiService,
  ApiGatewayManagementApiServiceLayer,
  ApiGatewayManagementApiClientInstanceConfig,
} from "@effect-aws/client-api-gateway-management-api";

const program = ApiGatewayManagementApiService.postToConnection(args);

const CustomApiGatewayManagementApiServiceLayer = Layer.provide(
  ApiGatewayManagementApiServiceLayer,
  Layer.succeed(ApiGatewayManagementApiClientInstanceConfig, {
    endpoint: `https://domain/path`,
  }),
);

const result = await pipe(
  program,
  Effect.provide(CustomApiGatewayManagementApiServiceLayer),
  Effect.runPromiseExit,
);

or map over DefaultApiGatewayManagementApiClientConfigLayer layer context and update the configuration...

1.4.0

9 months ago

1.3.0

10 months ago

1.2.0

1 year ago

1.1.1

1 year ago

1.0.2

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago