@effect-aws/client-s3 1.4.0 → 1.5.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 +12 -0
- package/README.md +16 -40
- package/lib/Errors.d.ts +3 -2
- package/lib/Errors.js +16 -28
- package/lib/S3ClientInstanceConfig.d.ts +1 -3
- package/lib/S3ClientInstanceConfig.js +12 -38
- package/lib/S3Service.d.ts +31 -15
- package/lib/S3Service.js +26 -12
- package/lib/esm/Errors.js +13 -2
- package/lib/esm/S3ClientInstanceConfig.js +2 -5
- package/lib/esm/S3Service.js +26 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @effect-aws/client-s3
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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)
|
|
8
|
+
|
|
9
|
+
## 1.4.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#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
|
|
14
|
+
|
|
3
15
|
## 1.4.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# @effect-aws/client-s3
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@effect-aws/client-s3)
|
|
4
|
+
[](https://www.npmjs.com/package/@effect-aws/client-s3)
|
|
5
|
+
|
|
3
6
|
## Installation
|
|
4
7
|
|
|
5
8
|
```bash
|
|
@@ -11,13 +14,13 @@ npm install --save @effect-aws/client-s3
|
|
|
11
14
|
With default S3Client instance:
|
|
12
15
|
|
|
13
16
|
```typescript
|
|
14
|
-
import {
|
|
17
|
+
import { S3 } from "@effect-aws/client-s3";
|
|
15
18
|
|
|
16
|
-
const program = Effect.flatMap(
|
|
19
|
+
const program = Effect.flatMap(S3, (s3) => s3.headObject(args));
|
|
17
20
|
|
|
18
21
|
const result = pipe(
|
|
19
22
|
program,
|
|
20
|
-
Effect.provide(
|
|
23
|
+
Effect.provide(S3.defaultLayer),
|
|
21
24
|
Effect.runPromise,
|
|
22
25
|
);
|
|
23
26
|
```
|
|
@@ -25,23 +28,15 @@ const result = pipe(
|
|
|
25
28
|
With custom S3Client instance:
|
|
26
29
|
|
|
27
30
|
```typescript
|
|
28
|
-
import {
|
|
29
|
-
S3Service,
|
|
30
|
-
BaseS3ServiceLayer,
|
|
31
|
-
S3ClientInstance,
|
|
32
|
-
} from "@effect-aws/client-s3";
|
|
33
|
-
|
|
34
|
-
const program = Effect.flatMap(S3Service, (s3) => s3.headObject(args));
|
|
31
|
+
import { S3 } from "@effect-aws/client-s3";
|
|
35
32
|
|
|
36
|
-
const
|
|
37
|
-
S3ClientInstance,
|
|
38
|
-
new S3Client({ region: "eu-central-1" }),
|
|
39
|
-
);
|
|
33
|
+
const program = Effect.flatMap(S3, (s3) => s3.headObject(args));
|
|
40
34
|
|
|
41
35
|
const result = await pipe(
|
|
42
36
|
program,
|
|
43
|
-
Effect.provide(
|
|
44
|
-
|
|
37
|
+
Effect.provide(
|
|
38
|
+
S3.baseLayer(() => new S3Client({ region: "eu-central-1" })),
|
|
39
|
+
),
|
|
45
40
|
Effect.runPromise,
|
|
46
41
|
);
|
|
47
42
|
```
|
|
@@ -49,34 +44,15 @@ const result = await pipe(
|
|
|
49
44
|
With custom S3Client configuration:
|
|
50
45
|
|
|
51
46
|
```typescript
|
|
52
|
-
import {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
DefaultS3ClientConfigLayer,
|
|
56
|
-
S3ClientInstance,
|
|
57
|
-
S3ClientInstanceConfig,
|
|
58
|
-
} from "@effect-aws/client-s3";
|
|
59
|
-
|
|
60
|
-
const program = Effect.flatMap(S3Service, (s3) => s3.headObject(args));
|
|
61
|
-
|
|
62
|
-
const S3ClientInstanceLayer = Layer.provide(
|
|
63
|
-
Layer.effect(
|
|
64
|
-
S3ClientInstance,
|
|
65
|
-
S3ClientInstanceConfig.pipe(
|
|
66
|
-
Effect.map(
|
|
67
|
-
(config) => new S3Client({ ...config, region: "eu-central-1" }),
|
|
68
|
-
),
|
|
69
|
-
),
|
|
70
|
-
),
|
|
71
|
-
DefaultS3ClientConfigLayer,
|
|
72
|
-
);
|
|
47
|
+
import { S3 } from "@effect-aws/client-s3";
|
|
48
|
+
|
|
49
|
+
const program = Effect.flatMap(S3, (s3) => s3.headObject(args));
|
|
73
50
|
|
|
74
51
|
const result = await pipe(
|
|
75
52
|
program,
|
|
76
|
-
Effect.provide(
|
|
77
|
-
Effect.provide(S3ClientInstanceLayer),
|
|
53
|
+
Effect.provide(S3.layer({ region: "eu-central-1" })),
|
|
78
54
|
Effect.runPromiseExit,
|
|
79
55
|
);
|
|
80
56
|
```
|
|
81
57
|
|
|
82
|
-
or
|
|
58
|
+
or use `S3.baseLayer((default) => new S3Client({ ...default, region: "eu-central-1" }))`
|
package/lib/Errors.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
1
|
+
import type { BucketAlreadyExists, BucketAlreadyOwnedByYou, InvalidObjectState, NoSuchBucket, NoSuchKey, NoSuchUpload, NotFound, ObjectAlreadyInActiveTierError as ObjectAlreadyInActiveTierException, ObjectNotInActiveTierError as ObjectNotInActiveTierException, S3ServiceException } from "@aws-sdk/client-s3";
|
|
2
|
+
import { Data } from "effect";
|
|
3
|
+
export declare const AllServiceErrors: string[];
|
|
3
4
|
export type TaggedException<T extends {
|
|
4
5
|
name: string;
|
|
5
6
|
}> = T & {
|
package/lib/Errors.js
CHANGED
|
@@ -1,30 +1,18 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.SdkError = exports.S3ServiceError = void 0;
|
|
27
|
-
const
|
|
28
|
-
exports.
|
|
29
|
-
|
|
30
|
-
|
|
3
|
+
exports.SdkError = exports.S3ServiceError = exports.AllServiceErrors = void 0;
|
|
4
|
+
const effect_1 = require("effect");
|
|
5
|
+
exports.AllServiceErrors = [
|
|
6
|
+
"BucketAlreadyExists",
|
|
7
|
+
"BucketAlreadyOwnedByYou",
|
|
8
|
+
"InvalidObjectState",
|
|
9
|
+
"NoSuchBucket",
|
|
10
|
+
"NoSuchKey",
|
|
11
|
+
"NoSuchUpload",
|
|
12
|
+
"NotFound",
|
|
13
|
+
"ObjectAlreadyInActiveTierError",
|
|
14
|
+
"ObjectNotInActiveTierError",
|
|
15
|
+
];
|
|
16
|
+
exports.S3ServiceError = effect_1.Data.tagged("S3ServiceError");
|
|
17
|
+
exports.SdkError = effect_1.Data.tagged("SdkError");
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXJyb3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0Vycm9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFZQSxtQ0FBOEI7QUFFakIsUUFBQSxnQkFBZ0IsR0FBRztJQUM5QixxQkFBcUI7SUFDckIseUJBQXlCO0lBQ3pCLG9CQUFvQjtJQUNwQixjQUFjO0lBQ2QsV0FBVztJQUNYLGNBQWM7SUFDZCxVQUFVO0lBQ1YsZ0NBQWdDO0lBQ2hDLDRCQUE0QjtDQUM3QixDQUFDO0FBc0JXLFFBQUEsY0FBYyxHQUFHLGFBQUksQ0FBQyxNQUFNLENBQWlCLGdCQUFnQixDQUFDLENBQUM7QUFFL0QsUUFBQSxRQUFRLEdBQUcsYUFBSSxDQUFDLE1BQU0sQ0FBVyxVQUFVLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHtcbiAgQnVja2V0QWxyZWFkeUV4aXN0cyxcbiAgQnVja2V0QWxyZWFkeU93bmVkQnlZb3UsXG4gIEludmFsaWRPYmplY3RTdGF0ZSxcbiAgTm9TdWNoQnVja2V0LFxuICBOb1N1Y2hLZXksXG4gIE5vU3VjaFVwbG9hZCxcbiAgTm90Rm91bmQsXG4gIE9iamVjdEFscmVhZHlJbkFjdGl2ZVRpZXJFcnJvciBhcyBPYmplY3RBbHJlYWR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
|
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
4
|
import type { S3ClientConfig } from "@aws-sdk/client-s3";
|
|
5
|
-
import
|
|
6
|
-
import * as Effect from "effect/Effect";
|
|
7
|
-
import * as Layer from "effect/Layer";
|
|
5
|
+
import { Context, Effect, Layer } from "effect";
|
|
8
6
|
declare const S3ClientInstanceConfig_base: Context.TagClass<S3ClientInstanceConfig, "@effect-aws/client-s3/S3ClientInstanceConfig", S3ClientConfig>;
|
|
9
7
|
/**
|
|
10
8
|
* @since 1.0.0
|
|
@@ -1,63 +1,37 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.DefaultS3ClientConfigLayer = exports.makeDefaultS3ClientInstanceConfig = exports.S3ClientInstanceConfig = void 0;
|
|
27
|
-
const
|
|
28
|
-
const Effect = __importStar(require("effect/Effect"));
|
|
29
|
-
const Layer = __importStar(require("effect/Layer"));
|
|
30
|
-
const Runtime = __importStar(require("effect/Runtime"));
|
|
4
|
+
const effect_1 = require("effect");
|
|
31
5
|
/**
|
|
32
6
|
* @since 1.0.0
|
|
33
7
|
* @category tags
|
|
34
8
|
*/
|
|
35
|
-
class S3ClientInstanceConfig extends Context.Tag("@effect-aws/client-s3/S3ClientInstanceConfig")() {
|
|
9
|
+
class S3ClientInstanceConfig extends effect_1.Context.Tag("@effect-aws/client-s3/S3ClientInstanceConfig")() {
|
|
36
10
|
}
|
|
37
11
|
exports.S3ClientInstanceConfig = S3ClientInstanceConfig;
|
|
38
12
|
/**
|
|
39
13
|
* @since 1.0.0
|
|
40
14
|
* @category constructors
|
|
41
15
|
*/
|
|
42
|
-
exports.makeDefaultS3ClientInstanceConfig = Effect.gen(function* (_) {
|
|
43
|
-
const runtime = yield* _(Effect.runtime());
|
|
44
|
-
const runSync = Runtime.runSync(runtime);
|
|
16
|
+
exports.makeDefaultS3ClientInstanceConfig = effect_1.Effect.gen(function* (_) {
|
|
17
|
+
const runtime = yield* _(effect_1.Effect.runtime());
|
|
18
|
+
const runSync = effect_1.Runtime.runSync(runtime);
|
|
45
19
|
return {
|
|
46
20
|
logger: {
|
|
47
21
|
info(m) {
|
|
48
|
-
Effect.logInfo(m).pipe(runSync);
|
|
22
|
+
effect_1.Effect.logInfo(m).pipe(runSync);
|
|
49
23
|
},
|
|
50
24
|
warn(m) {
|
|
51
|
-
Effect.logWarning(m).pipe(runSync);
|
|
25
|
+
effect_1.Effect.logWarning(m).pipe(runSync);
|
|
52
26
|
},
|
|
53
27
|
error(m) {
|
|
54
|
-
Effect.logError(m).pipe(runSync);
|
|
28
|
+
effect_1.Effect.logError(m).pipe(runSync);
|
|
55
29
|
},
|
|
56
30
|
debug(m) {
|
|
57
|
-
Effect.logDebug(m).pipe(runSync);
|
|
31
|
+
effect_1.Effect.logDebug(m).pipe(runSync);
|
|
58
32
|
},
|
|
59
33
|
trace(m) {
|
|
60
|
-
Effect.logTrace(m).pipe(runSync);
|
|
34
|
+
effect_1.Effect.logTrace(m).pipe(runSync);
|
|
61
35
|
},
|
|
62
36
|
},
|
|
63
37
|
};
|
|
@@ -66,5 +40,5 @@ exports.makeDefaultS3ClientInstanceConfig = Effect.gen(function* (_) {
|
|
|
66
40
|
* @since 1.0.0
|
|
67
41
|
* @category layers
|
|
68
42
|
*/
|
|
69
|
-
exports.DefaultS3ClientConfigLayer = Layer.effect(S3ClientInstanceConfig, exports.makeDefaultS3ClientInstanceConfig);
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
43
|
+
exports.DefaultS3ClientConfigLayer = effect_1.Layer.effect(S3ClientInstanceConfig, exports.makeDefaultS3ClientInstanceConfig);
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUzNDbGllbnRJbnN0YW5jZUNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9TM0NsaWVudEluc3RhbmNlQ29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUlBLG1DQUF5RDtBQUV6RDs7O0dBR0c7QUFDSCxNQUFhLHNCQUF1QixTQUFRLGdCQUFPLENBQUMsR0FBRyxDQUNyRCw4Q0FBOEMsQ0FDL0MsRUFBMEM7Q0FBRztBQUY5Qyx3REFFOEM7QUFFOUM7OztHQUdHO0FBQ1UsUUFBQSxpQ0FBaUMsR0FDNUMsZUFBTSxDQUFDLEdBQUcsQ0FBQyxRQUFRLENBQUMsRUFBRSxDQUFDO0lBQ3JCLE1BQU0sT0FBTyxHQUFHLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxlQUF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TeW5jKTtcbiAgICAgICAgfSxcbiAgICAgICAgZGVidWcobSkge1xuICAgICAgICAgIEVmZmVjdC5sb2dEZWJ1ZyhtKS5waXBlKHJ1blN5bmMpO1xuICAgICAgICB9LFxuICAgICAgICB0cmFjZShtKSB7XG4gICAgICAgICAgRWZmZWN0LmxvZ1RyYWNlKG0pLnBpcGUocnVuU3luYyk7XG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgIH07XG4gIH0pO1xuXG4vKipcbiAqIEBzaW5jZSAxLjAuMFxuICogQGNhdGVnb3J5IGxheWVyc1xuICovXG5leHBvcnQgY29uc3QgRGVmYXVsdFMzQ2xpZW50Q29uZmlnTGF5ZXIgPSBMYXllci5lZmZlY3QoXG4gIFMzQ2xpZW50SW5zdGFuY2VDb25maWcsXG4gIG1ha2VEZWZhdWx0UzNDbGllbnRJbnN0YW5jZUNvbmZpZyxcbik7XG4iXX0=
|
package/lib/S3Service.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
|
-
import { type AbortMultipartUploadCommandInput, type AbortMultipartUploadCommandOutput, type CompleteMultipartUploadCommandInput, type CompleteMultipartUploadCommandOutput, type CopyObjectCommandInput, type CopyObjectCommandOutput, type CreateBucketCommandInput, type CreateBucketCommandOutput, type CreateMultipartUploadCommandInput, type CreateMultipartUploadCommandOutput, type CreateSessionCommandInput, type CreateSessionCommandOutput, type
|
|
4
|
+
import { type AbortMultipartUploadCommandInput, type AbortMultipartUploadCommandOutput, type CompleteMultipartUploadCommandInput, type CompleteMultipartUploadCommandOutput, type CopyObjectCommandInput, type CopyObjectCommandOutput, type CreateBucketCommandInput, type CreateBucketCommandOutput, type CreateMultipartUploadCommandInput, type CreateMultipartUploadCommandOutput, type CreateSessionCommandInput, type CreateSessionCommandOutput, type DeleteBucketAnalyticsConfigurationCommandInput, type DeleteBucketAnalyticsConfigurationCommandOutput, type DeleteBucketCommandInput, type DeleteBucketCommandOutput, type DeleteBucketCorsCommandInput, type DeleteBucketCorsCommandOutput, type DeleteBucketEncryptionCommandInput, type DeleteBucketEncryptionCommandOutput, type DeleteBucketIntelligentTieringConfigurationCommandInput, type DeleteBucketIntelligentTieringConfigurationCommandOutput, type DeleteBucketInventoryConfigurationCommandInput, type DeleteBucketInventoryConfigurationCommandOutput, type DeleteBucketLifecycleCommandInput, type DeleteBucketLifecycleCommandOutput, type DeleteBucketMetricsConfigurationCommandInput, type DeleteBucketMetricsConfigurationCommandOutput, type DeleteBucketOwnershipControlsCommandInput, type DeleteBucketOwnershipControlsCommandOutput, type DeleteBucketPolicyCommandInput, type DeleteBucketPolicyCommandOutput, type DeleteBucketReplicationCommandInput, type DeleteBucketReplicationCommandOutput, type DeleteBucketTaggingCommandInput, type DeleteBucketTaggingCommandOutput, type DeleteBucketWebsiteCommandInput, type DeleteBucketWebsiteCommandOutput, type DeleteObjectCommandInput, type DeleteObjectCommandOutput, type DeleteObjectTaggingCommandInput, type DeleteObjectTaggingCommandOutput, type DeleteObjectsCommandInput, type DeleteObjectsCommandOutput, type DeletePublicAccessBlockCommandInput, type DeletePublicAccessBlockCommandOutput, type GetBucketAccelerateConfigurationCommandInput, type GetBucketAccelerateConfigurationCommandOutput, type GetBucketAclCommandInput, type GetBucketAclCommandOutput, type GetBucketAnalyticsConfigurationCommandInput, type GetBucketAnalyticsConfigurationCommandOutput, type GetBucketCorsCommandInput, type GetBucketCorsCommandOutput, type GetBucketEncryptionCommandInput, type GetBucketEncryptionCommandOutput, type GetBucketIntelligentTieringConfigurationCommandInput, type GetBucketIntelligentTieringConfigurationCommandOutput, type GetBucketInventoryConfigurationCommandInput, type GetBucketInventoryConfigurationCommandOutput, type GetBucketLifecycleConfigurationCommandInput, type GetBucketLifecycleConfigurationCommandOutput, type GetBucketLocationCommandInput, type GetBucketLocationCommandOutput, type GetBucketLoggingCommandInput, type GetBucketLoggingCommandOutput, type GetBucketMetricsConfigurationCommandInput, type GetBucketMetricsConfigurationCommandOutput, type GetBucketNotificationConfigurationCommandInput, type GetBucketNotificationConfigurationCommandOutput, type GetBucketOwnershipControlsCommandInput, type GetBucketOwnershipControlsCommandOutput, type GetBucketPolicyCommandInput, type GetBucketPolicyCommandOutput, type GetBucketPolicyStatusCommandInput, type GetBucketPolicyStatusCommandOutput, type GetBucketReplicationCommandInput, type GetBucketReplicationCommandOutput, type GetBucketRequestPaymentCommandInput, type GetBucketRequestPaymentCommandOutput, type GetBucketTaggingCommandInput, type GetBucketTaggingCommandOutput, type GetBucketVersioningCommandInput, type GetBucketVersioningCommandOutput, type GetBucketWebsiteCommandInput, type GetBucketWebsiteCommandOutput, type GetObjectAclCommandInput, type GetObjectAclCommandOutput, type GetObjectAttributesCommandInput, type GetObjectAttributesCommandOutput, type GetObjectCommandInput, type GetObjectCommandOutput, type GetObjectLegalHoldCommandInput, type GetObjectLegalHoldCommandOutput, type GetObjectLockConfigurationCommandInput, type GetObjectLockConfigurationCommandOutput, type GetObjectRetentionCommandInput, type GetObjectRetentionCommandOutput, type GetObjectTaggingCommandInput, type GetObjectTaggingCommandOutput, type GetObjectTorrentCommandInput, type GetObjectTorrentCommandOutput, type GetPublicAccessBlockCommandInput, type GetPublicAccessBlockCommandOutput, type HeadBucketCommandInput, type HeadBucketCommandOutput, type HeadObjectCommandInput, type HeadObjectCommandOutput, type ListBucketAnalyticsConfigurationsCommandInput, type ListBucketAnalyticsConfigurationsCommandOutput, type ListBucketIntelligentTieringConfigurationsCommandInput, type ListBucketIntelligentTieringConfigurationsCommandOutput, type ListBucketInventoryConfigurationsCommandInput, type ListBucketInventoryConfigurationsCommandOutput, type ListBucketMetricsConfigurationsCommandInput, type ListBucketMetricsConfigurationsCommandOutput, type ListBucketsCommandInput, type ListBucketsCommandOutput, type ListDirectoryBucketsCommandInput, type ListDirectoryBucketsCommandOutput, type ListMultipartUploadsCommandInput, type ListMultipartUploadsCommandOutput, type ListObjectVersionsCommandInput, type ListObjectVersionsCommandOutput, type ListObjectsCommandInput, type ListObjectsCommandOutput, type ListObjectsV2CommandInput, type ListObjectsV2CommandOutput, type ListPartsCommandInput, type ListPartsCommandOutput, type PutBucketAccelerateConfigurationCommandInput, type PutBucketAccelerateConfigurationCommandOutput, type PutBucketAclCommandInput, type PutBucketAclCommandOutput, type PutBucketAnalyticsConfigurationCommandInput, type PutBucketAnalyticsConfigurationCommandOutput, type PutBucketCorsCommandInput, type PutBucketCorsCommandOutput, type PutBucketEncryptionCommandInput, type PutBucketEncryptionCommandOutput, type PutBucketIntelligentTieringConfigurationCommandInput, type PutBucketIntelligentTieringConfigurationCommandOutput, type PutBucketInventoryConfigurationCommandInput, type PutBucketInventoryConfigurationCommandOutput, type PutBucketLifecycleConfigurationCommandInput, type PutBucketLifecycleConfigurationCommandOutput, type PutBucketLoggingCommandInput, type PutBucketLoggingCommandOutput, type PutBucketMetricsConfigurationCommandInput, type PutBucketMetricsConfigurationCommandOutput, type PutBucketNotificationConfigurationCommandInput, type PutBucketNotificationConfigurationCommandOutput, type PutBucketOwnershipControlsCommandInput, type PutBucketOwnershipControlsCommandOutput, type PutBucketPolicyCommandInput, type PutBucketPolicyCommandOutput, type PutBucketReplicationCommandInput, type PutBucketReplicationCommandOutput, type PutBucketRequestPaymentCommandInput, type PutBucketRequestPaymentCommandOutput, type PutBucketTaggingCommandInput, type PutBucketTaggingCommandOutput, type PutBucketVersioningCommandInput, type PutBucketVersioningCommandOutput, type PutBucketWebsiteCommandInput, type PutBucketWebsiteCommandOutput, type PutObjectAclCommandInput, type PutObjectAclCommandOutput, type PutObjectCommandInput, type PutObjectCommandOutput, type PutObjectLegalHoldCommandInput, type PutObjectLegalHoldCommandOutput, type PutObjectLockConfigurationCommandInput, type PutObjectLockConfigurationCommandOutput, type PutObjectRetentionCommandInput, type PutObjectRetentionCommandOutput, type PutObjectTaggingCommandInput, type PutObjectTaggingCommandOutput, type PutPublicAccessBlockCommandInput, type PutPublicAccessBlockCommandOutput, type RestoreObjectCommandInput, type RestoreObjectCommandOutput, type S3Client, type S3ClientConfig, type SelectObjectContentCommandInput, type SelectObjectContentCommandOutput, type UploadPartCommandInput, type UploadPartCommandOutput, type UploadPartCopyCommandInput, type UploadPartCopyCommandOutput, type WriteGetObjectResponseCommandInput, type WriteGetObjectResponseCommandOutput } from "@aws-sdk/client-s3";
|
|
5
5
|
import type { RequestPresigningArguments } from "@aws-sdk/types";
|
|
6
6
|
import { Effect, Layer } from "effect";
|
|
7
7
|
import { BucketAlreadyExistsError, BucketAlreadyOwnedByYouError, InvalidObjectStateError, NoSuchBucketError, NoSuchKeyError, NoSuchUploadError, NotFoundError, ObjectAlreadyInActiveTierError, ObjectNotInActiveTierError, S3ServiceError, SdkError } from "./Errors";
|
|
8
8
|
import { S3ClientInstance } from "./S3ClientInstance";
|
|
9
|
-
|
|
9
|
+
import { S3ClientInstanceConfig } from "./S3ClientInstanceConfig";
|
|
10
|
+
/**
|
|
11
|
+
* @since 1.0.1
|
|
12
|
+
*/
|
|
13
|
+
export interface HttpHandlerOptions {
|
|
10
14
|
/**
|
|
11
15
|
* The maximum time in milliseconds that the connection phase of a request
|
|
12
16
|
* may take before the connection attempt is abandoned.
|
|
@@ -95,14 +99,14 @@ interface S3Service$ {
|
|
|
95
99
|
* @see {@link DeleteObjectCommand}
|
|
96
100
|
*/
|
|
97
101
|
deleteObject(args: DeleteObjectCommandInput, options?: HttpHandlerOptions): Effect.Effect<DeleteObjectCommandOutput, SdkError | S3ServiceError>;
|
|
98
|
-
/**
|
|
99
|
-
* @see {@link DeleteObjectsCommand}
|
|
100
|
-
*/
|
|
101
|
-
deleteObjects(args: DeleteObjectsCommandInput, options?: HttpHandlerOptions): Effect.Effect<DeleteObjectsCommandOutput, SdkError | S3ServiceError>;
|
|
102
102
|
/**
|
|
103
103
|
* @see {@link DeleteObjectTaggingCommand}
|
|
104
104
|
*/
|
|
105
105
|
deleteObjectTagging(args: DeleteObjectTaggingCommandInput, options?: HttpHandlerOptions): Effect.Effect<DeleteObjectTaggingCommandOutput, SdkError | S3ServiceError>;
|
|
106
|
+
/**
|
|
107
|
+
* @see {@link DeleteObjectsCommand}
|
|
108
|
+
*/
|
|
109
|
+
deleteObjects(args: DeleteObjectsCommandInput, options?: HttpHandlerOptions): Effect.Effect<DeleteObjectsCommandOutput, SdkError | S3ServiceError>;
|
|
106
110
|
/**
|
|
107
111
|
* @see {@link DeletePublicAccessBlockCommand}
|
|
108
112
|
*/
|
|
@@ -264,6 +268,10 @@ interface S3Service$ {
|
|
|
264
268
|
* @see {@link ListMultipartUploadsCommand}
|
|
265
269
|
*/
|
|
266
270
|
listMultipartUploads(args: ListMultipartUploadsCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListMultipartUploadsCommandOutput, SdkError | S3ServiceError>;
|
|
271
|
+
/**
|
|
272
|
+
* @see {@link ListObjectVersionsCommand}
|
|
273
|
+
*/
|
|
274
|
+
listObjectVersions(args: ListObjectVersionsCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListObjectVersionsCommandOutput, SdkError | S3ServiceError>;
|
|
267
275
|
/**
|
|
268
276
|
* @see {@link ListObjectsCommand}
|
|
269
277
|
*/
|
|
@@ -272,10 +280,6 @@ interface S3Service$ {
|
|
|
272
280
|
* @see {@link ListObjectsV2Command}
|
|
273
281
|
*/
|
|
274
282
|
listObjectsV2(args: ListObjectsV2CommandInput, options?: HttpHandlerOptions): Effect.Effect<ListObjectsV2CommandOutput, SdkError | NoSuchBucketError>;
|
|
275
|
-
/**
|
|
276
|
-
* @see {@link ListObjectVersionsCommand}
|
|
277
|
-
*/
|
|
278
|
-
listObjectVersions(args: ListObjectVersionsCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListObjectVersionsCommandOutput, SdkError | S3ServiceError>;
|
|
279
283
|
/**
|
|
280
284
|
* @see {@link ListPartsCommand}
|
|
281
285
|
*/
|
|
@@ -406,6 +410,11 @@ interface S3Service$ {
|
|
|
406
410
|
*/
|
|
407
411
|
writeGetObjectResponse(args: WriteGetObjectResponseCommandInput, options?: HttpHandlerOptions): Effect.Effect<WriteGetObjectResponseCommandOutput, SdkError | S3ServiceError>;
|
|
408
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* @since 1.0.0
|
|
415
|
+
* @category constructors
|
|
416
|
+
*/
|
|
417
|
+
export declare const makeS3Service: Effect.Effect<S3Service$, never, S3ClientInstance>;
|
|
409
418
|
declare const S3Service_base: import("effect/Context").TagClass<S3Service, "@effect-aws/client-s3/S3Service", S3Service$> & {
|
|
410
419
|
readonly _: Effect.Effect<S3Service$["_"], never, S3Service>;
|
|
411
420
|
abortMultipartUpload: (args: AbortMultipartUploadCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<AbortMultipartUploadCommandOutput, NoSuchUploadError | SdkError, S3Service>;
|
|
@@ -428,8 +437,8 @@ declare const S3Service_base: import("effect/Context").TagClass<S3Service, "@eff
|
|
|
428
437
|
deleteBucketTagging: (args: DeleteBucketTaggingCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeleteBucketTaggingCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
429
438
|
deleteBucketWebsite: (args: DeleteBucketWebsiteCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeleteBucketWebsiteCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
430
439
|
deleteObject: (args: DeleteObjectCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeleteObjectCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
431
|
-
deleteObjects: (args: DeleteObjectsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeleteObjectsCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
432
440
|
deleteObjectTagging: (args: DeleteObjectTaggingCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeleteObjectTaggingCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
441
|
+
deleteObjects: (args: DeleteObjectsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeleteObjectsCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
433
442
|
deletePublicAccessBlock: (args: DeletePublicAccessBlockCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeletePublicAccessBlockCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
434
443
|
getBucketAccelerateConfiguration: (args: GetBucketAccelerateConfigurationCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<GetBucketAccelerateConfigurationCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
435
444
|
getBucketAcl: (args: GetBucketAclCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<GetBucketAclCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
@@ -468,9 +477,9 @@ declare const S3Service_base: import("effect/Context").TagClass<S3Service, "@eff
|
|
|
468
477
|
listBuckets: (args: ListBucketsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListBucketsCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
469
478
|
listDirectoryBuckets: (args: ListDirectoryBucketsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListDirectoryBucketsCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
470
479
|
listMultipartUploads: (args: ListMultipartUploadsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListMultipartUploadsCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
480
|
+
listObjectVersions: (args: ListObjectVersionsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListObjectVersionsCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
471
481
|
listObjects: (args: ListObjectsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListObjectsCommandOutput, NoSuchBucketError | SdkError, S3Service>;
|
|
472
482
|
listObjectsV2: (args: ListObjectsV2CommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListObjectsV2CommandOutput, NoSuchBucketError | SdkError, S3Service>;
|
|
473
|
-
listObjectVersions: (args: ListObjectVersionsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListObjectVersionsCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
474
483
|
listParts: (args: ListPartsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListPartsCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
475
484
|
putBucketAccelerateConfiguration: (args: PutBucketAccelerateConfigurationCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<PutBucketAccelerateConfigurationCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
476
485
|
putBucketAcl: (args: PutBucketAclCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<PutBucketAclCommandOutput, S3ServiceError | SdkError, S3Service>;
|
|
@@ -509,25 +518,32 @@ declare const S3Service_base: import("effect/Context").TagClass<S3Service, "@eff
|
|
|
509
518
|
* @category models
|
|
510
519
|
*/
|
|
511
520
|
export declare class S3Service extends S3Service_base {
|
|
521
|
+
static readonly defaultLayer: Layer.Layer<S3Service, never, never>;
|
|
522
|
+
static readonly layer: (config: S3ClientConfig) => Layer.Layer<S3Service, never, never>;
|
|
523
|
+
static readonly baseLayer: (evaluate: (defaultConfig: S3ClientConfig) => S3Client) => Layer.Layer<S3Service, never, never>;
|
|
512
524
|
}
|
|
513
525
|
/**
|
|
514
526
|
* @since 1.0.0
|
|
515
|
-
* @category
|
|
527
|
+
* @category models
|
|
528
|
+
* @alias S3Service
|
|
516
529
|
*/
|
|
517
|
-
export declare const
|
|
530
|
+
export declare const S3: typeof S3Service;
|
|
518
531
|
/**
|
|
519
532
|
* @since 1.0.0
|
|
520
533
|
* @category layers
|
|
534
|
+
* @deprecated use S3.baseLayer instead
|
|
521
535
|
*/
|
|
522
536
|
export declare const BaseS3ServiceLayer: Layer.Layer<S3Service, never, S3ClientInstance>;
|
|
523
537
|
/**
|
|
524
538
|
* @since 1.0.0
|
|
525
539
|
* @category layers
|
|
540
|
+
* @deprecated use S3.layer instead
|
|
526
541
|
*/
|
|
527
|
-
export declare const S3ServiceLayer: Layer.Layer<S3Service, never,
|
|
542
|
+
export declare const S3ServiceLayer: Layer.Layer<S3Service, never, S3ClientInstanceConfig>;
|
|
528
543
|
/**
|
|
529
544
|
* @since 1.0.0
|
|
530
545
|
* @category layers
|
|
546
|
+
* @deprecated use S3.defaultLayer instead
|
|
531
547
|
*/
|
|
532
548
|
export declare const DefaultS3ServiceLayer: Layer.Layer<S3Service, never, never>;
|
|
533
549
|
export {};
|