@effect-aws/client-mq 1.2.0 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/Errors/package.json +6 -0
  2. package/MqClientInstance/package.json +6 -0
  3. package/MqService/package.json +6 -0
  4. package/MqServiceConfig/package.json +6 -0
  5. package/{lib → dist/cjs}/Errors.d.ts +6 -11
  6. package/dist/cjs/Errors.d.ts.map +1 -0
  7. package/dist/cjs/Errors.js +14 -0
  8. package/dist/cjs/Errors.js.map +1 -0
  9. package/dist/cjs/MqClientInstance.d.ts +24 -0
  10. package/dist/cjs/MqClientInstance.d.ts.map +1 -0
  11. package/dist/cjs/MqClientInstance.js +50 -0
  12. package/dist/cjs/MqClientInstance.js.map +1 -0
  13. package/dist/cjs/MqService.d.ts +133 -0
  14. package/dist/cjs/MqService.d.ts.map +1 -0
  15. package/dist/cjs/MqService.js +82 -0
  16. package/dist/cjs/MqService.js.map +1 -0
  17. package/dist/cjs/MqServiceConfig.d.ts +25 -0
  18. package/dist/cjs/MqServiceConfig.d.ts.map +1 -0
  19. package/dist/cjs/MqServiceConfig.js +35 -0
  20. package/dist/cjs/MqServiceConfig.js.map +1 -0
  21. package/dist/cjs/index.d.ts +39 -0
  22. package/dist/cjs/index.d.ts.map +1 -0
  23. package/dist/cjs/index.js +56 -0
  24. package/dist/cjs/index.js.map +1 -0
  25. package/dist/dts/Errors.d.ts +13 -0
  26. package/dist/dts/Errors.d.ts.map +1 -0
  27. package/dist/dts/MqClientInstance.d.ts +24 -0
  28. package/dist/dts/MqClientInstance.d.ts.map +1 -0
  29. package/dist/dts/MqService.d.ts +133 -0
  30. package/dist/dts/MqService.d.ts.map +1 -0
  31. package/dist/dts/MqServiceConfig.d.ts +25 -0
  32. package/dist/dts/MqServiceConfig.d.ts.map +1 -0
  33. package/dist/dts/index.d.ts +39 -0
  34. package/dist/dts/index.d.ts.map +1 -0
  35. package/dist/esm/Errors.js +11 -0
  36. package/dist/esm/Errors.js.map +1 -0
  37. package/dist/esm/MqClientInstance.js +23 -0
  38. package/dist/esm/MqClientInstance.js.map +1 -0
  39. package/dist/esm/MqService.js +55 -0
  40. package/dist/esm/MqService.js.map +1 -0
  41. package/dist/esm/MqServiceConfig.js +31 -0
  42. package/dist/esm/MqServiceConfig.js.map +1 -0
  43. package/dist/esm/index.js +27 -0
  44. package/dist/esm/index.js.map +1 -0
  45. package/dist/esm/package.json +4 -0
  46. package/package.json +60 -43
  47. package/src/Errors.ts +29 -0
  48. package/src/MqClientInstance.ts +33 -0
  49. package/src/MqService.ts +429 -0
  50. package/src/MqServiceConfig.ts +51 -0
  51. package/src/index.ts +44 -0
  52. package/CHANGELOG.md +0 -35
  53. package/docgen.json +0 -8
  54. package/lib/Errors.js +0 -14
  55. package/lib/MqClientInstance.d.ts +0 -31
  56. package/lib/MqClientInstance.js +0 -57
  57. package/lib/MqClientInstanceConfig.d.ts +0 -23
  58. package/lib/MqClientInstanceConfig.js +0 -44
  59. package/lib/MqService.d.ts +0 -180
  60. package/lib/MqService.js +0 -111
  61. package/lib/esm/Errors.js +0 -11
  62. package/lib/esm/MqClientInstance.js +0 -30
  63. package/lib/esm/MqClientInstanceConfig.js +0 -40
  64. package/lib/esm/MqService.js +0 -107
  65. package/lib/esm/index.js +0 -5
  66. package/lib/index.d.ts +0 -4
  67. package/lib/index.js +0 -21
  68. package/project.json +0 -77
  69. package/vitest.config.ts +0 -3
@@ -0,0 +1,429 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import {
5
+ CreateBrokerCommand,
6
+ type CreateBrokerCommandInput,
7
+ type CreateBrokerCommandOutput,
8
+ CreateConfigurationCommand,
9
+ type CreateConfigurationCommandInput,
10
+ type CreateConfigurationCommandOutput,
11
+ CreateTagsCommand,
12
+ type CreateTagsCommandInput,
13
+ type CreateTagsCommandOutput,
14
+ CreateUserCommand,
15
+ type CreateUserCommandInput,
16
+ type CreateUserCommandOutput,
17
+ DeleteBrokerCommand,
18
+ type DeleteBrokerCommandInput,
19
+ type DeleteBrokerCommandOutput,
20
+ DeleteTagsCommand,
21
+ type DeleteTagsCommandInput,
22
+ type DeleteTagsCommandOutput,
23
+ DeleteUserCommand,
24
+ type DeleteUserCommandInput,
25
+ type DeleteUserCommandOutput,
26
+ DescribeBrokerCommand,
27
+ type DescribeBrokerCommandInput,
28
+ type DescribeBrokerCommandOutput,
29
+ DescribeBrokerEngineTypesCommand,
30
+ type DescribeBrokerEngineTypesCommandInput,
31
+ type DescribeBrokerEngineTypesCommandOutput,
32
+ DescribeBrokerInstanceOptionsCommand,
33
+ type DescribeBrokerInstanceOptionsCommandInput,
34
+ type DescribeBrokerInstanceOptionsCommandOutput,
35
+ DescribeConfigurationCommand,
36
+ type DescribeConfigurationCommandInput,
37
+ type DescribeConfigurationCommandOutput,
38
+ DescribeConfigurationRevisionCommand,
39
+ type DescribeConfigurationRevisionCommandInput,
40
+ type DescribeConfigurationRevisionCommandOutput,
41
+ DescribeUserCommand,
42
+ type DescribeUserCommandInput,
43
+ type DescribeUserCommandOutput,
44
+ ListBrokersCommand,
45
+ type ListBrokersCommandInput,
46
+ type ListBrokersCommandOutput,
47
+ ListConfigurationRevisionsCommand,
48
+ type ListConfigurationRevisionsCommandInput,
49
+ type ListConfigurationRevisionsCommandOutput,
50
+ ListConfigurationsCommand,
51
+ type ListConfigurationsCommandInput,
52
+ type ListConfigurationsCommandOutput,
53
+ ListTagsCommand,
54
+ type ListTagsCommandInput,
55
+ type ListTagsCommandOutput,
56
+ ListUsersCommand,
57
+ type ListUsersCommandInput,
58
+ type ListUsersCommandOutput,
59
+ type MqClient,
60
+ type MqClientConfig,
61
+ PromoteCommand,
62
+ type PromoteCommandInput,
63
+ type PromoteCommandOutput,
64
+ RebootBrokerCommand,
65
+ type RebootBrokerCommandInput,
66
+ type RebootBrokerCommandOutput,
67
+ UpdateBrokerCommand,
68
+ type UpdateBrokerCommandInput,
69
+ type UpdateBrokerCommandOutput,
70
+ UpdateConfigurationCommand,
71
+ type UpdateConfigurationCommandInput,
72
+ type UpdateConfigurationCommandOutput,
73
+ UpdateUserCommand,
74
+ type UpdateUserCommandInput,
75
+ type UpdateUserCommandOutput,
76
+ } from "@aws-sdk/client-mq";
77
+ import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons";
78
+ import { Service } from "@effect-aws/commons";
79
+ import { Effect, Layer } from "effect";
80
+ import type {
81
+ BadRequestError,
82
+ ConflictError,
83
+ ForbiddenError,
84
+ InternalServerError,
85
+ NotFoundError,
86
+ UnauthorizedError,
87
+ } from "./Errors.js";
88
+ import { AllServiceErrors } from "./Errors.js";
89
+ import * as Instance from "./MqClientInstance.js";
90
+ import * as MqServiceConfig from "./MqServiceConfig.js";
91
+
92
+ const commands = {
93
+ CreateBrokerCommand,
94
+ CreateConfigurationCommand,
95
+ CreateTagsCommand,
96
+ CreateUserCommand,
97
+ DeleteBrokerCommand,
98
+ DeleteTagsCommand,
99
+ DeleteUserCommand,
100
+ DescribeBrokerCommand,
101
+ DescribeBrokerEngineTypesCommand,
102
+ DescribeBrokerInstanceOptionsCommand,
103
+ DescribeConfigurationCommand,
104
+ DescribeConfigurationRevisionCommand,
105
+ DescribeUserCommand,
106
+ ListBrokersCommand,
107
+ ListConfigurationRevisionsCommand,
108
+ ListConfigurationsCommand,
109
+ ListTagsCommand,
110
+ ListUsersCommand,
111
+ PromoteCommand,
112
+ RebootBrokerCommand,
113
+ UpdateBrokerCommand,
114
+ UpdateConfigurationCommand,
115
+ UpdateUserCommand,
116
+ };
117
+
118
+ interface MqService$ {
119
+ readonly _: unique symbol;
120
+
121
+ /**
122
+ * @see {@link CreateBrokerCommand}
123
+ */
124
+ createBroker(
125
+ args: CreateBrokerCommandInput,
126
+ options?: HttpHandlerOptions,
127
+ ): Effect.Effect<
128
+ CreateBrokerCommandOutput,
129
+ SdkError | BadRequestError | ConflictError | ForbiddenError | InternalServerError | UnauthorizedError
130
+ >;
131
+
132
+ /**
133
+ * @see {@link CreateConfigurationCommand}
134
+ */
135
+ createConfiguration(
136
+ args: CreateConfigurationCommandInput,
137
+ options?: HttpHandlerOptions,
138
+ ): Effect.Effect<
139
+ CreateConfigurationCommandOutput,
140
+ SdkError | BadRequestError | ConflictError | ForbiddenError | InternalServerError
141
+ >;
142
+
143
+ /**
144
+ * @see {@link CreateTagsCommand}
145
+ */
146
+ createTags(
147
+ args: CreateTagsCommandInput,
148
+ options?: HttpHandlerOptions,
149
+ ): Effect.Effect<
150
+ CreateTagsCommandOutput,
151
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
152
+ >;
153
+
154
+ /**
155
+ * @see {@link CreateUserCommand}
156
+ */
157
+ createUser(
158
+ args: CreateUserCommandInput,
159
+ options?: HttpHandlerOptions,
160
+ ): Effect.Effect<
161
+ CreateUserCommandOutput,
162
+ SdkError | BadRequestError | ConflictError | ForbiddenError | InternalServerError | NotFoundError
163
+ >;
164
+
165
+ /**
166
+ * @see {@link DeleteBrokerCommand}
167
+ */
168
+ deleteBroker(
169
+ args: DeleteBrokerCommandInput,
170
+ options?: HttpHandlerOptions,
171
+ ): Effect.Effect<
172
+ DeleteBrokerCommandOutput,
173
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
174
+ >;
175
+
176
+ /**
177
+ * @see {@link DeleteTagsCommand}
178
+ */
179
+ deleteTags(
180
+ args: DeleteTagsCommandInput,
181
+ options?: HttpHandlerOptions,
182
+ ): Effect.Effect<
183
+ DeleteTagsCommandOutput,
184
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
185
+ >;
186
+
187
+ /**
188
+ * @see {@link DeleteUserCommand}
189
+ */
190
+ deleteUser(
191
+ args: DeleteUserCommandInput,
192
+ options?: HttpHandlerOptions,
193
+ ): Effect.Effect<
194
+ DeleteUserCommandOutput,
195
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
196
+ >;
197
+
198
+ /**
199
+ * @see {@link DescribeBrokerCommand}
200
+ */
201
+ describeBroker(
202
+ args: DescribeBrokerCommandInput,
203
+ options?: HttpHandlerOptions,
204
+ ): Effect.Effect<
205
+ DescribeBrokerCommandOutput,
206
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
207
+ >;
208
+
209
+ /**
210
+ * @see {@link DescribeBrokerEngineTypesCommand}
211
+ */
212
+ describeBrokerEngineTypes(
213
+ args: DescribeBrokerEngineTypesCommandInput,
214
+ options?: HttpHandlerOptions,
215
+ ): Effect.Effect<
216
+ DescribeBrokerEngineTypesCommandOutput,
217
+ SdkError | BadRequestError | ForbiddenError | InternalServerError
218
+ >;
219
+
220
+ /**
221
+ * @see {@link DescribeBrokerInstanceOptionsCommand}
222
+ */
223
+ describeBrokerInstanceOptions(
224
+ args: DescribeBrokerInstanceOptionsCommandInput,
225
+ options?: HttpHandlerOptions,
226
+ ): Effect.Effect<
227
+ DescribeBrokerInstanceOptionsCommandOutput,
228
+ SdkError | BadRequestError | ForbiddenError | InternalServerError
229
+ >;
230
+
231
+ /**
232
+ * @see {@link DescribeConfigurationCommand}
233
+ */
234
+ describeConfiguration(
235
+ args: DescribeConfigurationCommandInput,
236
+ options?: HttpHandlerOptions,
237
+ ): Effect.Effect<
238
+ DescribeConfigurationCommandOutput,
239
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
240
+ >;
241
+
242
+ /**
243
+ * @see {@link DescribeConfigurationRevisionCommand}
244
+ */
245
+ describeConfigurationRevision(
246
+ args: DescribeConfigurationRevisionCommandInput,
247
+ options?: HttpHandlerOptions,
248
+ ): Effect.Effect<
249
+ DescribeConfigurationRevisionCommandOutput,
250
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
251
+ >;
252
+
253
+ /**
254
+ * @see {@link DescribeUserCommand}
255
+ */
256
+ describeUser(
257
+ args: DescribeUserCommandInput,
258
+ options?: HttpHandlerOptions,
259
+ ): Effect.Effect<
260
+ DescribeUserCommandOutput,
261
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
262
+ >;
263
+
264
+ /**
265
+ * @see {@link ListBrokersCommand}
266
+ */
267
+ listBrokers(
268
+ args: ListBrokersCommandInput,
269
+ options?: HttpHandlerOptions,
270
+ ): Effect.Effect<
271
+ ListBrokersCommandOutput,
272
+ SdkError | BadRequestError | ForbiddenError | InternalServerError
273
+ >;
274
+
275
+ /**
276
+ * @see {@link ListConfigurationRevisionsCommand}
277
+ */
278
+ listConfigurationRevisions(
279
+ args: ListConfigurationRevisionsCommandInput,
280
+ options?: HttpHandlerOptions,
281
+ ): Effect.Effect<
282
+ ListConfigurationRevisionsCommandOutput,
283
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
284
+ >;
285
+
286
+ /**
287
+ * @see {@link ListConfigurationsCommand}
288
+ */
289
+ listConfigurations(
290
+ args: ListConfigurationsCommandInput,
291
+ options?: HttpHandlerOptions,
292
+ ): Effect.Effect<
293
+ ListConfigurationsCommandOutput,
294
+ SdkError | BadRequestError | ForbiddenError | InternalServerError
295
+ >;
296
+
297
+ /**
298
+ * @see {@link ListTagsCommand}
299
+ */
300
+ listTags(
301
+ args: ListTagsCommandInput,
302
+ options?: HttpHandlerOptions,
303
+ ): Effect.Effect<
304
+ ListTagsCommandOutput,
305
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
306
+ >;
307
+
308
+ /**
309
+ * @see {@link ListUsersCommand}
310
+ */
311
+ listUsers(
312
+ args: ListUsersCommandInput,
313
+ options?: HttpHandlerOptions,
314
+ ): Effect.Effect<
315
+ ListUsersCommandOutput,
316
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
317
+ >;
318
+
319
+ /**
320
+ * @see {@link PromoteCommand}
321
+ */
322
+ promote(
323
+ args: PromoteCommandInput,
324
+ options?: HttpHandlerOptions,
325
+ ): Effect.Effect<
326
+ PromoteCommandOutput,
327
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
328
+ >;
329
+
330
+ /**
331
+ * @see {@link RebootBrokerCommand}
332
+ */
333
+ rebootBroker(
334
+ args: RebootBrokerCommandInput,
335
+ options?: HttpHandlerOptions,
336
+ ): Effect.Effect<
337
+ RebootBrokerCommandOutput,
338
+ SdkError | BadRequestError | ForbiddenError | InternalServerError | NotFoundError
339
+ >;
340
+
341
+ /**
342
+ * @see {@link UpdateBrokerCommand}
343
+ */
344
+ updateBroker(
345
+ args: UpdateBrokerCommandInput,
346
+ options?: HttpHandlerOptions,
347
+ ): Effect.Effect<
348
+ UpdateBrokerCommandOutput,
349
+ SdkError | BadRequestError | ConflictError | ForbiddenError | InternalServerError | NotFoundError
350
+ >;
351
+
352
+ /**
353
+ * @see {@link UpdateConfigurationCommand}
354
+ */
355
+ updateConfiguration(
356
+ args: UpdateConfigurationCommandInput,
357
+ options?: HttpHandlerOptions,
358
+ ): Effect.Effect<
359
+ UpdateConfigurationCommandOutput,
360
+ SdkError | BadRequestError | ConflictError | ForbiddenError | InternalServerError | NotFoundError
361
+ >;
362
+
363
+ /**
364
+ * @see {@link UpdateUserCommand}
365
+ */
366
+ updateUser(
367
+ args: UpdateUserCommandInput,
368
+ options?: HttpHandlerOptions,
369
+ ): Effect.Effect<
370
+ UpdateUserCommandOutput,
371
+ SdkError | BadRequestError | ConflictError | ForbiddenError | InternalServerError | NotFoundError
372
+ >;
373
+ }
374
+
375
+ /**
376
+ * @since 1.0.0
377
+ * @category constructors
378
+ */
379
+ export const makeMqService = Effect.gen(function*() {
380
+ const client = yield* Instance.MqClientInstance;
381
+
382
+ return Service.fromClientAndCommands<MqService$>(
383
+ client,
384
+ commands,
385
+ {
386
+ errorTags: AllServiceErrors,
387
+ resolveClientConfig: MqServiceConfig.toMqClientConfig,
388
+ },
389
+ );
390
+ });
391
+
392
+ /**
393
+ * @since 1.0.0
394
+ * @category models
395
+ */
396
+ export class MqService extends Effect.Tag("@effect-aws/client-mq/MqService")<
397
+ MqService,
398
+ MqService$
399
+ >() {
400
+ static readonly defaultLayer = Layer.effect(this, makeMqService).pipe(Layer.provide(Instance.layer));
401
+ static readonly layer = (config: MqService.Config) =>
402
+ Layer.effect(this, makeMqService).pipe(
403
+ Layer.provide(Instance.layer),
404
+ Layer.provide(MqServiceConfig.setMqServiceConfig(config)),
405
+ );
406
+ static readonly baseLayer = (
407
+ evaluate: (defaultConfig: MqClientConfig) => MqClient,
408
+ ) =>
409
+ Layer.effect(this, makeMqService).pipe(
410
+ Layer.provide(
411
+ Layer.effect(
412
+ Instance.MqClientInstance,
413
+ Effect.map(MqServiceConfig.toMqClientConfig, evaluate),
414
+ ),
415
+ ),
416
+ );
417
+ }
418
+
419
+ /**
420
+ * @since 1.0.0
421
+ */
422
+ export declare namespace MqService {
423
+ /**
424
+ * @since 1.0.0
425
+ */
426
+ export interface Config extends Omit<MqClientConfig, "logger"> {
427
+ readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
428
+ }
429
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type { MqClientConfig } from "@aws-sdk/client-mq";
5
+ import { ServiceLogger } from "@effect-aws/commons";
6
+ import { Effect, FiberRef, Layer } from "effect";
7
+ import { dual } from "effect/Function";
8
+ import { globalValue } from "effect/GlobalValue";
9
+ import type { MqService } from "./MqService.js";
10
+
11
+ /**
12
+ * @since 1.0.0
13
+ * @category mq service config
14
+ */
15
+ const currentMqServiceConfig = globalValue(
16
+ "@effect-aws/client-mq/currentMqServiceConfig",
17
+ () => FiberRef.unsafeMake<MqService.Config>({}),
18
+ );
19
+
20
+ /**
21
+ * @since 1.0.0
22
+ * @category mq service config
23
+ */
24
+ export const withMqServiceConfig: {
25
+ (config: MqService.Config): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
26
+ <A, E, R>(effect: Effect.Effect<A, E, R>, config: MqService.Config): Effect.Effect<A, E, R>;
27
+ } = dual(
28
+ 2,
29
+ <A, E, R>(effect: Effect.Effect<A, E, R>, config: MqService.Config): Effect.Effect<A, E, R> =>
30
+ Effect.locally(effect, currentMqServiceConfig, config),
31
+ );
32
+
33
+ /**
34
+ * @since 1.0.0
35
+ * @category mq service config
36
+ */
37
+ export const setMqServiceConfig = (config: MqService.Config) => Layer.locallyScoped(currentMqServiceConfig, config);
38
+
39
+ /**
40
+ * @since 1.0.0
41
+ * @category adapters
42
+ */
43
+ export const toMqClientConfig: Effect.Effect<MqClientConfig> = Effect.gen(function*() {
44
+ const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentMqServiceConfig);
45
+
46
+ const logger = serviceLogger === true
47
+ ? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
48
+ : (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
49
+
50
+ return { logger, ...config };
51
+ });
package/src/index.ts ADDED
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { MqService } from "./MqService.js";
5
+
6
+ /**
7
+ * @since 1.0.0
8
+ */
9
+ export * from "./Errors.js";
10
+
11
+ /**
12
+ * @since 1.0.0
13
+ */
14
+ export * as MqClientInstance from "./MqClientInstance.js";
15
+
16
+ /**
17
+ * @since 1.0.0
18
+ */
19
+ export * as MqServiceConfig from "./MqServiceConfig.js";
20
+
21
+ /**
22
+ * @since 1.0.0
23
+ */
24
+ export * from "./MqService.js";
25
+
26
+ /**
27
+ * @since 1.0.0
28
+ * @category exports
29
+ * @alias MqService
30
+ */
31
+ export declare namespace Mq {
32
+ /**
33
+ * @since 1.0.0
34
+ * @alias MqService.Config
35
+ */
36
+ export type Config = MqService.Config;
37
+ }
38
+
39
+ /**
40
+ * @since 1.0.0
41
+ * @category exports
42
+ * @alias MqService
43
+ */
44
+ export const Mq = MqService;
package/CHANGELOG.md DELETED
@@ -1,35 +0,0 @@
1
- # @effect-aws/client-mq
2
-
3
- ## 1.2.0
4
-
5
- ### Minor Changes
6
-
7
- - [#93](https://github.com/floydspace/effect-aws/pull/93) [`a96fbd8`](https://github.com/floydspace/effect-aws/commit/a96fbd8840a7a6cfb795a2a6ab96aa32d32a3525) Thanks [@godu](https://github.com/godu)! - Destroy client after layer lifecycle to release idle connections.
8
-
9
- ## 1.1.0
10
-
11
- ### Minor Changes
12
-
13
- - [#80](https://github.com/floydspace/effect-aws/pull/80) [`4b16fbe`](https://github.com/floydspace/effect-aws/commit/4b16fbebce8131df7798ee92f43cf6b7df3e907c) Thanks [@floydspace](https://github.com/floydspace)! - simplify layers configuration (closes #78)
14
-
15
- ## 1.0.1
16
-
17
- ### Patch Changes
18
-
19
- - [#75](https://github.com/floydspace/effect-aws/pull/75) [`9dc170d`](https://github.com/floydspace/effect-aws/commit/9dc170d975c04888bbc7ca7b241b4b5265668fb5) Thanks [@godu](https://github.com/godu)! - export the HttpHandlerOptions type
20
-
21
- ## 1.0.0
22
-
23
- ### Major Changes
24
-
25
- - [#69](https://github.com/floydspace/effect-aws/pull/69) [`0cf6af5`](https://github.com/floydspace/effect-aws/commit/0cf6af591e45f0d8838b26493525db5ef389a90f) Thanks [@godu](https://github.com/godu)! - implement effectful account client
26
- implement effectful cloudtrail client
27
- implement effectful cloudwatch client
28
- implement effectful cloudwatch-events client
29
- implement effectful cloudwatch-logs client
30
- implement effectful cognito-identity-provider client
31
- implement effectful kms client
32
- implement effectful mq client
33
- implement effectful cloudsearch client
34
- implement effectful rds client
35
- implement effectful sts client
package/docgen.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/@effect/docgen/schema.json",
3
- "exclude": [
4
- "src/index.ts",
5
- "src/Errors.ts"
6
- ],
7
- "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"."
8
- }
package/lib/Errors.js DELETED
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SdkError = exports.AllServiceErrors = void 0;
4
- const effect_1 = require("effect");
5
- exports.AllServiceErrors = [
6
- "BadRequestException",
7
- "ConflictException",
8
- "ForbiddenException",
9
- "InternalServerErrorException",
10
- "NotFoundException",
11
- "UnauthorizedException",
12
- ];
13
- exports.SdkError = effect_1.Data.tagged("SdkError");
14
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXJyb3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0Vycm9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFRQSxtQ0FBOEI7QUFFakIsUUFBQSxnQkFBZ0IsR0FBRztJQUM5QixxQkFBcUI7SUFDckIsbUJBQW1CO0lBQ25CLG9CQUFvQjtJQUNwQiw4QkFBOEI7SUFDOUIsbUJBQW1CO0lBQ25CLHVCQUF1QjtDQUN4QixDQUFDO0FBY1csUUFBQSxRQUFRLEdBQUcsYUFBSSxDQUFDLE1BQU0sQ0FBVyxVQUFVLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHtcbiAgQmFkUmVxdWVzdEV4Y2VwdGlvbixcbiAgQ29uZmxpY3RFeGNlcHRpb24sXG4gIEZvcmJpZGRlbkV4Y2VwdGlvbixcbiAgSW50ZXJuYWxTZXJ2ZXJFcnJvckV4Y2VwdGlvbixcbiAgTm90Rm91bmRFeGNlcHRpb24sXG4gIFVuYXV0aG9yaXplZEV4Y2VwdGlvbixcbn0gZnJvbSBcIkBhd3Mtc2RrL2NsaWVudC1tcVwiO1xuaW1wb3J0IHsgRGF0YSB9IGZyb20gXCJlZmZlY3RcIjtcblxuZXhwb3J0IGNvbnN0IEFsbFNlcnZpY2VFcnJvcnMgPSBbXG4gIFwiQmFkUmVxdWVzdEV4Y2VwdGlvblwiLFxuICBcIkNvbmZsaWN0RXhjZXB0aW9uXCIsXG4gIFwiRm9yYmlkZGVuRXhjZXB0aW9uXCIsXG4gIFwiSW50ZXJuYWxTZXJ2ZXJFcnJvckV4Y2VwdGlvblwiLFxuICBcIk5vdEZvdW5kRXhjZXB0aW9uXCIsXG4gIFwiVW5hdXRob3JpemVkRXhjZXB0aW9uXCIsXG5dO1xuXG5leHBvcnQgdHlwZSBUYWdnZWRFeGNlcHRpb248VCBleHRlbmRzIHsgbmFtZTogc3RyaW5nIH0+ID0gVCAmIHtcbiAgcmVhZG9ubHkgX3RhZzogVFtcIm5hbWVcIl07XG59O1xuXG5leHBvcnQgdHlwZSBCYWRSZXF1ZXN0RXJyb3IgPSBUYWdnZWRFeGNlcHRpb248QmFkUmVxdWVzdEV4Y2VwdGlvbj47XG5leHBvcnQgdHlwZSBDb25mbGljdEVycm9yID0gVGFnZ2VkRXhjZXB0aW9uPENvbmZsaWN0RXhjZXB0aW9uPjtcbmV4cG9ydCB0eXBlIEZvcmJpZGRlbkVycm9yID0gVGFnZ2VkRXhjZXB0aW9uPEZvcmJpZGRlbkV4Y2VwdGlvbj47XG5leHBvcnQgdHlwZSBJbnRlcm5hbFNlcnZlckVycm9yID0gVGFnZ2VkRXhjZXB0aW9uPEludGVybmFsU2VydmVyRXJyb3JFeGNlcHRpb24+O1xuZXhwb3J0IHR5cGUgTm90Rm91bmRFcnJvciA9IFRhZ2dlZEV4Y2VwdGlvbjxOb3RGb3VuZEV4Y2VwdGlvbj47XG5leHBvcnQgdHlwZSBVbmF1dGhvcml6ZWRFcnJvciA9IFRhZ2dlZEV4Y2VwdGlvbjxVbmF1dGhvcml6ZWRFeGNlcHRpb24+O1xuXG5leHBvcnQgdHlwZSBTZGtFcnJvciA9IFRhZ2dlZEV4Y2VwdGlvbjxFcnJvciAmIHsgbmFtZTogXCJTZGtFcnJvclwiIH0+O1xuZXhwb3J0IGNvbnN0IFNka0Vycm9yID0gRGF0YS50YWdnZWQ8U2RrRXJyb3I+KFwiU2RrRXJyb3JcIik7XG4iXX0=
@@ -1,31 +0,0 @@
1
- /**
2
- * @since 1.0.0
3
- */
4
- import { MqClient } from "@aws-sdk/client-mq";
5
- import * as Context from "effect/Context";
6
- import * as Effect from "effect/Effect";
7
- import * as Layer from "effect/Layer";
8
- import { MqClientInstanceConfig } from "./MqClientInstanceConfig";
9
- declare const MqClientInstance_base: Context.TagClass<MqClientInstance, "@effect-aws/client-mq/MqClientInstance", MqClient>;
10
- /**
11
- * @since 1.0.0
12
- * @category tags
13
- */
14
- export declare class MqClientInstance extends MqClientInstance_base {
15
- }
16
- /**
17
- * @since 1.0.0
18
- * @category constructors
19
- */
20
- export declare const makeMqClientInstance: Effect.Effect<MqClient, never, import("effect/Scope").Scope | MqClientInstanceConfig>;
21
- /**
22
- * @since 1.0.0
23
- * @category layers
24
- */
25
- export declare const MqClientInstanceLayer: Layer.Layer<MqClientInstance, never, MqClientInstanceConfig>;
26
- /**
27
- * @since 1.0.0
28
- * @category layers
29
- */
30
- export declare const DefaultMqClientInstanceLayer: Layer.Layer<MqClientInstance, never, never>;
31
- export {};
@@ -1,57 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.DefaultMqClientInstanceLayer = exports.MqClientInstanceLayer = exports.makeMqClientInstance = exports.MqClientInstance = void 0;
27
- /**
28
- * @since 1.0.0
29
- */
30
- const client_mq_1 = require("@aws-sdk/client-mq");
31
- const Context = __importStar(require("effect/Context"));
32
- const Effect = __importStar(require("effect/Effect"));
33
- const Layer = __importStar(require("effect/Layer"));
34
- const MqClientInstanceConfig_1 = require("./MqClientInstanceConfig");
35
- /**
36
- * @since 1.0.0
37
- * @category tags
38
- */
39
- class MqClientInstance extends Context.Tag("@effect-aws/client-mq/MqClientInstance")() {
40
- }
41
- exports.MqClientInstance = MqClientInstance;
42
- /**
43
- * @since 1.0.0
44
- * @category constructors
45
- */
46
- exports.makeMqClientInstance = Effect.flatMap(MqClientInstanceConfig_1.MqClientInstanceConfig, (config) => Effect.acquireRelease(Effect.sync(() => new client_mq_1.MqClient(config)), (client) => Effect.sync(() => client.destroy())));
47
- /**
48
- * @since 1.0.0
49
- * @category layers
50
- */
51
- exports.MqClientInstanceLayer = Layer.scoped(MqClientInstance, exports.makeMqClientInstance);
52
- /**
53
- * @since 1.0.0
54
- * @category layers
55
- */
56
- exports.DefaultMqClientInstanceLayer = exports.MqClientInstanceLayer.pipe(Layer.provide(MqClientInstanceConfig_1.DefaultMqClientConfigLayer));
57
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTXFDbGllbnRJbnN0YW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9NcUNsaWVudEluc3RhbmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7O0dBRUc7QUFDSCxrREFBOEM7QUFDOUMsd0RBQTBDO0FBQzFDLHNEQUF3QztBQUN4QyxvREFBc0M7QUFDdEMscUVBR2tDO0FBRWxDOzs7R0FHRztBQUNILE1BQWEsZ0JBQWlCLFNBQVEsT0FBTyxDQUFDL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