@effect-aws/client-s3 0.6.0 → 1.0.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @effect-aws/client-s3
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`3e5d0b3`](https://github.com/floydspace/effect-aws/commit/3e5d0b3b3882e0aa6d07bc06432990551316ac30) Thanks [@floydspace](https://github.com/floydspace)! - Upgrade to effect v2 and release stable version
8
+
9
+ ## 0.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`744df3c`](https://github.com/floydspace/effect-aws/commit/744df3ca6406b3a35e3066d5fe11ca7082c4c454) Thanks [@floydspace](https://github.com/floydspace)! - upgrade effect dependency
14
+
3
15
  ## 0.6.0
4
16
 
5
17
  ### Minor Changes
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2023 Victor Korzunin
1
+ Copyright (c) 2024 Victor Korzunin
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -11,35 +11,37 @@ npm install --save @effect-aws/client-s3
11
11
  With default S3Client instance:
12
12
 
13
13
  ```typescript
14
- import { DefaultS3ServiceEffect } from "@effect-aws/client-s3";
14
+ import { S3Service, DefaultS3ServiceLayer } from "@effect-aws/client-s3";
15
15
 
16
- const program = Effect.flatMap(DefaultS3ServiceEffect, (s3) =>
17
- s3.headObject(args),
18
- );
16
+ const program = Effect.flatMap(S3Service, (s3) => s3.headObject(args));
19
17
 
20
- const result = pipe(program, Effect.runPromise);
18
+ const result = pipe(
19
+ program,
20
+ Effect.provide(DefaultS3ServiceLayer),
21
+ Effect.runPromise,
22
+ );
21
23
  ```
22
24
 
23
25
  With custom S3Client instance:
24
26
 
25
27
  ```typescript
26
28
  import {
27
- BaseS3ServiceEffect,
28
- S3ClientInstanceTag,
29
+ S3Service,
30
+ BaseS3ServiceLayer,
31
+ S3ClientInstance,
29
32
  } from "@effect-aws/client-s3";
30
33
 
31
- const program = Effect.flatMap(BaseS3ServiceEffect, (s3) =>
32
- s3.headObject(args),
33
- );
34
+ const program = Effect.flatMap(S3Service, (s3) => s3.headObject(args));
34
35
 
35
36
  const S3ClientInstanceLayer = Layer.succeed(
36
- S3ClientInstanceTag,
37
+ S3ClientInstance,
37
38
  new S3Client({ region: "eu-central-1" }),
38
39
  );
39
40
 
40
41
  const result = await pipe(
41
42
  program,
42
- Effect.provideLayer(S3ClientInstanceLayer),
43
+ Effect.provide(BaseS3ServiceLayer),
44
+ Effect.provide(S3ClientInstanceLayer),
43
45
  Effect.runPromise,
44
46
  );
45
47
  ```
@@ -48,31 +50,31 @@ With custom S3Client configuration:
48
50
 
49
51
  ```typescript
50
52
  import {
51
- BaseS3ServiceEffect,
53
+ S3Service,
54
+ BaseS3ServiceLayer,
52
55
  DefaultS3ClientConfigLayer,
53
- S3ClientInstanceTag,
54
- S3ClientConfigTag,
56
+ S3ClientInstance,
57
+ S3ClientInstanceConfig,
55
58
  } from "@effect-aws/client-s3";
56
59
 
57
- const program = Effect.flatMap(BaseS3ServiceEffect, (s3) =>
58
- s3.headObject(args),
59
- );
60
+ const program = Effect.flatMap(S3Service, (s3) => s3.headObject(args));
60
61
 
61
62
  const S3ClientInstanceLayer = Layer.provide(
62
- DefaultS3ClientConfigLayer,
63
63
  Layer.effect(
64
- S3ClientInstanceTag,
65
- S3ClientConfigTag.pipe(
64
+ S3ClientInstance,
65
+ S3ClientInstanceConfig.pipe(
66
66
  Effect.map(
67
67
  (config) => new S3Client({ ...config, region: "eu-central-1" }),
68
68
  ),
69
69
  ),
70
70
  ),
71
+ DefaultS3ClientConfigLayer,
71
72
  );
72
73
 
73
74
  const result = await pipe(
74
75
  program,
75
- Effect.provideLayer(S3ClientInstanceLayer),
76
+ Effect.provide(BaseS3ServiceLayer),
77
+ Effect.provide(S3ClientInstanceLayer),
76
78
  Effect.runPromiseExit,
77
79
  );
78
80
  ```
@@ -0,0 +1,32 @@
1
+ import { S3Client } from "@aws-sdk/client-s3";
2
+ import * as Context from "effect/Context";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Layer from "effect/Layer";
5
+ import { S3ClientInstanceConfig } from "./S3ClientInstanceConfig";
6
+ /**
7
+ * @since 1.0.0
8
+ * @category tags
9
+ */
10
+ export interface S3ClientInstance {
11
+ readonly _: unique symbol;
12
+ }
13
+ /**
14
+ * @since 1.0.0
15
+ * @category tags
16
+ */
17
+ export declare const S3ClientInstance: Context.Tag<S3ClientInstance, S3Client>;
18
+ /**
19
+ * @since 1.0.0
20
+ * @category constructors
21
+ */
22
+ export declare const makeS3ClientInstance: Effect.Effect<S3ClientInstanceConfig, never, S3Client>;
23
+ /**
24
+ * @since 1.0.0
25
+ * @category layers
26
+ */
27
+ export declare const S3ClientInstanceLayer: Layer.Layer<S3ClientInstanceConfig, never, S3ClientInstance>;
28
+ /**
29
+ * @since 1.0.0
30
+ * @category layers
31
+ */
32
+ export declare const DefaultS3ClientInstanceLayer: Layer.Layer<never, never, S3ClientInstance>;
@@ -0,0 +1,52 @@
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.DefaultS3ClientInstanceLayer = exports.S3ClientInstanceLayer = exports.makeS3ClientInstance = exports.S3ClientInstance = void 0;
27
+ const client_s3_1 = require("@aws-sdk/client-s3");
28
+ const Context = __importStar(require("effect/Context"));
29
+ const Effect = __importStar(require("effect/Effect"));
30
+ const Layer = __importStar(require("effect/Layer"));
31
+ const S3ClientInstanceConfig_1 = require("./S3ClientInstanceConfig");
32
+ /**
33
+ * @since 1.0.0
34
+ * @category tags
35
+ */
36
+ exports.S3ClientInstance = Context.Tag(Symbol.for("@effect-aws/client-s3/S3ClientInstance"));
37
+ /**
38
+ * @since 1.0.0
39
+ * @category constructors
40
+ */
41
+ exports.makeS3ClientInstance = Effect.map(S3ClientInstanceConfig_1.S3ClientInstanceConfig, (config) => new client_s3_1.S3Client(config));
42
+ /**
43
+ * @since 1.0.0
44
+ * @category layers
45
+ */
46
+ exports.S3ClientInstanceLayer = Layer.effect(exports.S3ClientInstance, exports.makeS3ClientInstance);
47
+ /**
48
+ * @since 1.0.0
49
+ * @category layers
50
+ */
51
+ exports.DefaultS3ClientInstanceLayer = exports.S3ClientInstanceLayer.pipe(Layer.provide(S3ClientInstanceConfig_1.DefaultS3ClientConfigLayer));
52
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUzNDbGllbnRJbnN0YW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9TM0NsaWVudEluc3RhbmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsa0RBQThDO0FBQzlDLHdE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as Context from "effect/Context";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Layer from "effect/Layer";
5
+ /**
6
+ * @since 1.0.0
7
+ * @category tags
8
+ */
9
+ export interface S3ClientInstanceConfig {
10
+ readonly _: unique symbol;
11
+ }
12
+ /**
13
+ * @since 1.0.0
14
+ * @category tags
15
+ */
16
+ export declare const S3ClientInstanceConfig: Context.Tag<S3ClientInstanceConfig, S3ClientConfig>;
17
+ /**
18
+ * @since 1.0.0
19
+ * @category constructors
20
+ */
21
+ export declare const makeDefaultS3ClientInstanceConfig: Effect.Effect<never, never, S3ClientConfig>;
22
+ /**
23
+ * @since 1.0.0
24
+ * @category layers
25
+ */
26
+ export declare const DefaultS3ClientConfigLayer: Layer.Layer<never, never, S3ClientInstanceConfig>;
@@ -0,0 +1,58 @@
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.DefaultS3ClientConfigLayer = exports.makeDefaultS3ClientInstanceConfig = exports.S3ClientInstanceConfig = void 0;
27
+ const Context = __importStar(require("effect/Context"));
28
+ const Effect = __importStar(require("effect/Effect"));
29
+ const Layer = __importStar(require("effect/Layer"));
30
+ const Runtime = __importStar(require("effect/Runtime"));
31
+ /**
32
+ * @since 1.0.0
33
+ * @category tags
34
+ */
35
+ exports.S3ClientInstanceConfig = Context.Tag(Symbol.for("@effect-aws/client-s3/S3ClientInstanceConfig"));
36
+ /**
37
+ * @since 1.0.0
38
+ * @category constructors
39
+ */
40
+ exports.makeDefaultS3ClientInstanceConfig = Effect.gen(function* (_) {
41
+ const runtime = yield* _(Effect.runtime());
42
+ const runSync = Runtime.runSync(runtime);
43
+ return {
44
+ logger: {
45
+ info: (m) => Effect.logInfo(m).pipe(runSync),
46
+ warn: (m) => Effect.logWarning(m).pipe(runSync),
47
+ error: (m) => Effect.logError(m).pipe(runSync),
48
+ debug: (m) => Effect.logDebug(m).pipe(runSync),
49
+ trace: (m) => Effect.logTrace(m).pipe(runSync),
50
+ },
51
+ };
52
+ });
53
+ /**
54
+ * @since 1.0.0
55
+ * @category layers
56
+ */
57
+ exports.DefaultS3ClientConfigLayer = Layer.effect(exports.S3ClientInstanceConfig, exports.makeDefaultS3ClientInstanceConfig);
58
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUzNDbGllbnRJbnN0YW5jZUNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9TM0NsaWVudEluc3RhbmNlQ29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0Esd0RBQTBDO0FBQzFDLHNEQUF3QztBQUN4QyxvREFBc0M7QUFDdEMsd0RBQTBDO0FBVTFDOzs7R0FHRztBQUNVLFFBQUEsc0JBQXNCLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FHL0MsTUFBTSx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RWZmZWN0LkVmZmVjdDxcbiAgbmV2ZXIsXG4gIG5ldmVyLFxuICBTM0NsaWVudENvbmZpZ1xuPiA9IEVmZmVjdC5nZW4oZnVuY3Rpb24qIChfKSB7XG4gIGNvbnN0IHJ1bnRpbWUgPSB5aWVsZCogXyhFZmZlY3QucnVudGltZTxuZXZlcj4oKSk7XG4gIGNvbnN0IHJ1blN5bmMgPSBSdW50aW1lLnJ1blN5bmMocnVudGltZSk7XG5cbiAgcmV0dXJuIHtcbiAgICBsb2dnZXI6IHtcbiAgICAgIGluZm86IChtKSA9PiBFZmZlY3QubG9nSW5mbyhtKS5waXBlKHJ1blN5bmMpLFxuICAgICAgd2FybjogKG0pID0+IEVmZmVjdC5sb2dXYXJuaW5nKG0pLnBpcGUocnVuU3luYyksXG4gICAgICBlcnJvcjogKG0pID0+IEVmZmVjdC5sb2dFcnJvcihtKS5waXBlKHJ1blN5bmMpLFxuICAgICAgZGVidWc6IChtKSA9PiBFZmZlY3QubG9nRGVidWcobSkucGlwZShydW5TeW5jKSxcbiAgICAgIHRyYWNlOiAobSkgPT4gRWZmZWN0LmxvZ1RyYWNlKG0pLnBpcGUocnVuU3luYyksXG4gICAgfSxcbiAgfTtcbn0pO1xuXG4vKipcbiAqIEBzaW5jZSAxLjAuMFxuICogQGNhdGVnb3J5IGxheWVyc1xuICovXG5leHBvcnQgY29uc3QgRGVmYXVsdFMzQ2xpZW50Q29uZmlnTGF5ZXIgPSBMYXllci5lZmZlY3QoXG4gIFMzQ2xpZW50SW5zdGFuY2VDb25maWcsXG4gIG1ha2VEZWZhdWx0UzNDbGllbnRJbnN0YW5jZUNvbmZpZyxcbik7XG4iXX0=
@@ -1,8 +1,14 @@
1
1
  import { AbortMultipartUploadCommandInput, AbortMultipartUploadCommandOutput, CompleteMultipartUploadCommandInput, CompleteMultipartUploadCommandOutput, CopyObjectCommandInput, CopyObjectCommandOutput, CreateBucketCommandInput, CreateBucketCommandOutput, CreateMultipartUploadCommandInput, CreateMultipartUploadCommandOutput, DeleteBucketAnalyticsConfigurationCommandInput, DeleteBucketAnalyticsConfigurationCommandOutput, DeleteBucketCommandInput, DeleteBucketCommandOutput, DeleteBucketCorsCommandInput, DeleteBucketCorsCommandOutput, DeleteBucketEncryptionCommandInput, DeleteBucketEncryptionCommandOutput, DeleteBucketIntelligentTieringConfigurationCommandInput, DeleteBucketIntelligentTieringConfigurationCommandOutput, DeleteBucketInventoryConfigurationCommandInput, DeleteBucketInventoryConfigurationCommandOutput, DeleteBucketLifecycleCommandInput, DeleteBucketLifecycleCommandOutput, DeleteBucketMetricsConfigurationCommandInput, DeleteBucketMetricsConfigurationCommandOutput, DeleteBucketOwnershipControlsCommandInput, DeleteBucketOwnershipControlsCommandOutput, DeleteBucketPolicyCommandInput, DeleteBucketPolicyCommandOutput, DeleteBucketReplicationCommandInput, DeleteBucketReplicationCommandOutput, DeleteBucketTaggingCommandInput, DeleteBucketTaggingCommandOutput, DeleteBucketWebsiteCommandInput, DeleteBucketWebsiteCommandOutput, DeleteObjectCommandInput, DeleteObjectCommandOutput, DeleteObjectsCommandInput, DeleteObjectsCommandOutput, DeleteObjectTaggingCommandInput, DeleteObjectTaggingCommandOutput, DeletePublicAccessBlockCommandInput, DeletePublicAccessBlockCommandOutput, GetBucketAccelerateConfigurationCommandInput, GetBucketAccelerateConfigurationCommandOutput, GetBucketAclCommandInput, GetBucketAclCommandOutput, GetBucketAnalyticsConfigurationCommandInput, GetBucketAnalyticsConfigurationCommandOutput, GetBucketCorsCommandInput, GetBucketCorsCommandOutput, GetBucketEncryptionCommandInput, GetBucketEncryptionCommandOutput, GetBucketIntelligentTieringConfigurationCommandInput, GetBucketIntelligentTieringConfigurationCommandOutput, GetBucketInventoryConfigurationCommandInput, GetBucketInventoryConfigurationCommandOutput, GetBucketLifecycleConfigurationCommandInput, GetBucketLifecycleConfigurationCommandOutput, GetBucketLocationCommandInput, GetBucketLocationCommandOutput, GetBucketLoggingCommandInput, GetBucketLoggingCommandOutput, GetBucketMetricsConfigurationCommandInput, GetBucketMetricsConfigurationCommandOutput, GetBucketNotificationConfigurationCommandInput, GetBucketNotificationConfigurationCommandOutput, GetBucketOwnershipControlsCommandInput, GetBucketOwnershipControlsCommandOutput, GetBucketPolicyCommandInput, GetBucketPolicyCommandOutput, GetBucketPolicyStatusCommandInput, GetBucketPolicyStatusCommandOutput, GetBucketReplicationCommandInput, GetBucketReplicationCommandOutput, GetBucketRequestPaymentCommandInput, GetBucketRequestPaymentCommandOutput, GetBucketTaggingCommandInput, GetBucketTaggingCommandOutput, GetBucketVersioningCommandInput, GetBucketVersioningCommandOutput, GetBucketWebsiteCommandInput, GetBucketWebsiteCommandOutput, GetObjectAclCommandInput, GetObjectAclCommandOutput, GetObjectAttributesCommandInput, GetObjectAttributesCommandOutput, GetObjectCommandInput, GetObjectCommandOutput, GetObjectLegalHoldCommandInput, GetObjectLegalHoldCommandOutput, GetObjectLockConfigurationCommandInput, GetObjectLockConfigurationCommandOutput, GetObjectRetentionCommandInput, GetObjectRetentionCommandOutput, GetObjectTaggingCommandInput, GetObjectTaggingCommandOutput, GetObjectTorrentCommandInput, GetObjectTorrentCommandOutput, GetPublicAccessBlockCommandInput, GetPublicAccessBlockCommandOutput, HeadBucketCommandInput, HeadBucketCommandOutput, HeadObjectCommandInput, HeadObjectCommandOutput, ListBucketAnalyticsConfigurationsCommandInput, ListBucketAnalyticsConfigurationsCommandOutput, ListBucketIntelligentTieringConfigurationsCommandInput, ListBucketIntelligentTieringConfigurationsCommandOutput, ListBucketInventoryConfigurationsCommandInput, ListBucketInventoryConfigurationsCommandOutput, ListBucketMetricsConfigurationsCommandInput, ListBucketMetricsConfigurationsCommandOutput, ListBucketsCommandInput, ListBucketsCommandOutput, ListMultipartUploadsCommandInput, ListMultipartUploadsCommandOutput, ListObjectsCommandInput, ListObjectsCommandOutput, ListObjectsV2CommandInput, ListObjectsV2CommandOutput, ListObjectVersionsCommandInput, ListObjectVersionsCommandOutput, ListPartsCommandInput, ListPartsCommandOutput, PutBucketAccelerateConfigurationCommandInput, PutBucketAccelerateConfigurationCommandOutput, PutBucketAclCommandInput, PutBucketAclCommandOutput, PutBucketAnalyticsConfigurationCommandInput, PutBucketAnalyticsConfigurationCommandOutput, PutBucketCorsCommandInput, PutBucketCorsCommandOutput, PutBucketEncryptionCommandInput, PutBucketEncryptionCommandOutput, PutBucketIntelligentTieringConfigurationCommandInput, PutBucketIntelligentTieringConfigurationCommandOutput, PutBucketInventoryConfigurationCommandInput, PutBucketInventoryConfigurationCommandOutput, PutBucketLifecycleConfigurationCommandInput, PutBucketLifecycleConfigurationCommandOutput, PutBucketLoggingCommandInput, PutBucketLoggingCommandOutput, PutBucketMetricsConfigurationCommandInput, PutBucketMetricsConfigurationCommandOutput, PutBucketNotificationConfigurationCommandInput, PutBucketNotificationConfigurationCommandOutput, PutBucketOwnershipControlsCommandInput, PutBucketOwnershipControlsCommandOutput, PutBucketPolicyCommandInput, PutBucketPolicyCommandOutput, PutBucketReplicationCommandInput, PutBucketReplicationCommandOutput, PutBucketRequestPaymentCommandInput, PutBucketRequestPaymentCommandOutput, PutBucketTaggingCommandInput, PutBucketTaggingCommandOutput, PutBucketVersioningCommandInput, PutBucketVersioningCommandOutput, PutBucketWebsiteCommandInput, PutBucketWebsiteCommandOutput, PutObjectAclCommandInput, PutObjectAclCommandOutput, PutObjectCommandInput, PutObjectCommandOutput, PutObjectLegalHoldCommandInput, PutObjectLegalHoldCommandOutput, PutObjectLockConfigurationCommandInput, PutObjectLockConfigurationCommandOutput, PutObjectRetentionCommandInput, PutObjectRetentionCommandOutput, PutObjectTaggingCommandInput, PutObjectTaggingCommandOutput, PutPublicAccessBlockCommandInput, PutPublicAccessBlockCommandOutput, RestoreObjectCommandInput, RestoreObjectCommandOutput, SelectObjectContentCommandInput, SelectObjectContentCommandOutput, UploadPartCommandInput, UploadPartCommandOutput, UploadPartCopyCommandInput, UploadPartCopyCommandOutput, WriteGetObjectResponseCommandInput, WriteGetObjectResponseCommandOutput } from "@aws-sdk/client-s3";
2
2
  import { HttpHandlerOptions as __HttpHandlerOptions, RequestPresigningArguments } from "@aws-sdk/types";
3
- import * as Effect from "effect/Effect";
3
+ import { Context, Effect, Layer } from "effect";
4
4
  import { S3ServiceError, SdkError } from "./Errors";
5
+ import { S3ClientInstance } from "./S3ClientInstance";
6
+ /**
7
+ * @since 1.0.0
8
+ * @category models
9
+ */
5
10
  export interface S3Service {
11
+ readonly _: unique symbol;
6
12
  /**
7
13
  * @see {@link AbortMultipartUploadCommand}
8
14
  */
@@ -390,6 +396,40 @@ export interface S3Service {
390
396
  */
391
397
  readonly writeGetObjectResponse: (args: WriteGetObjectResponseCommandInput, options?: __HttpHandlerOptions) => Effect.Effect<never, SdkError | S3ServiceError, WriteGetObjectResponseCommandOutput>;
392
398
  }
393
- export declare const BaseS3ServiceEffect: Effect.Effect<import("@aws-sdk/client-s3").S3Client, never, S3Service>;
394
- export declare const S3ServiceEffect: Effect.Effect<import("./Context").S3ClientOptions, never, S3Service>;
399
+ /**
400
+ * @since 1.0.0
401
+ * @category tags
402
+ */
403
+ export declare const S3Service: Context.Tag<S3Service, S3Service>;
404
+ /**
405
+ * @since 1.0.0
406
+ * @category constructors
407
+ */
408
+ export declare const makeS3Service: Effect.Effect<S3ClientInstance, never, S3Service>;
409
+ /**
410
+ * @since 1.0.0
411
+ * @category layers
412
+ */
413
+ export declare const BaseS3ServiceLayer: Layer.Layer<S3ClientInstance, never, S3Service>;
414
+ /**
415
+ * @since 1.0.0
416
+ * @category layers
417
+ */
418
+ export declare const S3ServiceLayer: Layer.Layer<import("./S3ClientInstanceConfig").S3ClientInstanceConfig, never, S3Service>;
419
+ /**
420
+ * @since 1.0.0
421
+ * @category layers
422
+ */
423
+ export declare const DefaultS3ServiceLayer: Layer.Layer<never, never, S3Service>;
424
+ /**
425
+ * @deprecated
426
+ */
427
+ export declare const BaseS3ServiceEffect: Effect.Effect<S3ClientInstance, never, S3Service>;
428
+ /**
429
+ * @deprecated
430
+ */
431
+ export declare const S3ServiceEffect: Effect.Effect<import("./S3ClientInstanceConfig").S3ClientInstanceConfig, never, S3Service>;
432
+ /**
433
+ * @deprecated
434
+ */
395
435
  export declare const DefaultS3ServiceEffect: Effect.Effect<never, never, S3Service>;