@activepieces/piece-amazon-s3 0.5.10 → 0.6.1
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/package.json +7 -21
- package/src/i18n/translation.json +0 -40
- package/src/index.js +183 -27
- package/src/index.d.ts +0 -8
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/decrypt-pgp-file.d.ts +0 -15
- package/src/lib/actions/decrypt-pgp-file.d.ts.map +0 -1
- package/src/lib/actions/decrypt-pgp-file.js +0 -203
- package/src/lib/actions/decrypt-pgp-file.js.map +0 -1
- package/src/lib/actions/delete-file.d.ts +0 -10
- package/src/lib/actions/delete-file.d.ts.map +0 -1
- package/src/lib/actions/delete-file.js +0 -38
- package/src/lib/actions/delete-file.js.map +0 -1
- package/src/lib/actions/generate-signed-upload-url.d.ts +0 -11
- package/src/lib/actions/generate-signed-upload-url.d.ts.map +0 -1
- package/src/lib/actions/generate-signed-upload-url.js +0 -53
- package/src/lib/actions/generate-signed-upload-url.js.map +0 -1
- package/src/lib/actions/generate-signed-url.d.ts +0 -11
- package/src/lib/actions/generate-signed-url.d.ts.map +0 -1
- package/src/lib/actions/generate-signed-url.js +0 -59
- package/src/lib/actions/generate-signed-url.js.map +0 -1
- package/src/lib/actions/list-files.d.ts +0 -11
- package/src/lib/actions/list-files.d.ts.map +0 -1
- package/src/lib/actions/list-files.js +0 -74
- package/src/lib/actions/list-files.js.map +0 -1
- package/src/lib/actions/move-file.d.ts +0 -11
- package/src/lib/actions/move-file.d.ts.map +0 -1
- package/src/lib/actions/move-file.js +0 -52
- package/src/lib/actions/move-file.js.map +0 -1
- package/src/lib/actions/read-file.d.ts +0 -10
- package/src/lib/actions/read-file.d.ts.map +0 -1
- package/src/lib/actions/read-file.js +0 -46
- package/src/lib/actions/read-file.js.map +0 -1
- package/src/lib/actions/upload-file.d.ts +0 -13
- package/src/lib/actions/upload-file.d.ts.map +0 -1
- package/src/lib/actions/upload-file.js +0 -109
- package/src/lib/actions/upload-file.js.map +0 -1
- package/src/lib/auth.d.ts +0 -8
- package/src/lib/auth.d.ts.map +0 -1
- package/src/lib/auth.js +0 -190
- package/src/lib/auth.js.map +0 -1
- package/src/lib/common.d.ts +0 -14
- package/src/lib/common.d.ts.map +0 -1
- package/src/lib/common.js +0 -31
- package/src/lib/common.js.map +0 -1
- package/src/lib/triggers/new-file.d.ts +0 -39
- package/src/lib/triggers/new-file.d.ts.map +0 -1
- package/src/lib/triggers/new-file.js +0 -111
- package/src/lib/triggers/new-file.js.map +0 -1
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.moveFile = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../auth");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
exports.moveFile = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.amazonS3Auth,
|
|
10
|
-
name: 'moveFile',
|
|
11
|
-
displayName: 'Move File',
|
|
12
|
-
description: 'Move a File to Another Folder',
|
|
13
|
-
audience: 'both',
|
|
14
|
-
aiMetadata: {
|
|
15
|
-
description: 'Moves an object within the configured S3 bucket by copying it to a new key under the destination folder (keeping the same filename) and then deleting the original. Use to relocate or archive a file. Not idempotent — the source object is deleted on the first successful run, so a repeat call errors because the source key no longer exists.',
|
|
16
|
-
idempotent: false,
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
fileKey: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'File Path',
|
|
21
|
-
description: 'The full path to the file you want to move (e.g. "old-folder/report.csv").',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
folderKey: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: 'Destination Folder',
|
|
26
|
-
description: 'The folder path to move the file into (e.g. "archive/" or "new-folder"). The file name is kept the same.',
|
|
27
|
-
required: true,
|
|
28
|
-
}),
|
|
29
|
-
},
|
|
30
|
-
run(context) {
|
|
31
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
const { bucket } = context.auth.props;
|
|
33
|
-
const { fileKey, folderKey } = context.propsValue;
|
|
34
|
-
const s3 = (0, common_1.createS3)(context.auth.props);
|
|
35
|
-
const fileName = fileKey.split('/').pop();
|
|
36
|
-
const folderName = folderKey.endsWith('/') ? folderKey.slice(0, -1) : folderKey;
|
|
37
|
-
const newKey = `${folderName}/${fileName}`;
|
|
38
|
-
const copyResponse = yield s3.copyObject({
|
|
39
|
-
Bucket: bucket,
|
|
40
|
-
Key: newKey,
|
|
41
|
-
// https://github.com/aws/aws-sdk-js-v3/issues/5475
|
|
42
|
-
CopySource: encodeURIComponent(`${bucket}/${fileKey}`),
|
|
43
|
-
});
|
|
44
|
-
const deleteResponse = yield s3.deleteObject({
|
|
45
|
-
Bucket: bucket,
|
|
46
|
-
Key: fileKey
|
|
47
|
-
});
|
|
48
|
-
return copyResponse;
|
|
49
|
-
});
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=move-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"move-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/move-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,sCAAqC;AAExB,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,+BAA+B;IAC5C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,oVAAoV;QACjW,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAA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: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
}>, {
|
|
8
|
-
key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
}>;
|
|
10
|
-
//# sourceMappingURL=read-file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/read-file.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ;;;;;;;;EAmCnB,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readFile = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../auth");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
exports.readFile = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.amazonS3Auth,
|
|
10
|
-
name: 'read-file',
|
|
11
|
-
displayName: 'Read File',
|
|
12
|
-
description: 'Read a file from S3 to use it in other steps',
|
|
13
|
-
audience: 'both',
|
|
14
|
-
aiMetadata: {
|
|
15
|
-
description: 'Downloads a single object from the configured S3 bucket by its full key (path) and makes its contents available as a file for later steps. Use to fetch a known file when you have its exact key. Reading the same key repeatedly returns the same content with no side effect (idempotent).',
|
|
16
|
-
idempotent: true,
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
key: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'File Path',
|
|
21
|
-
description: 'The full path to the file within your S3 bucket (e.g. "documents/report.csv" or "myfile.txt"). This is also called the S3 "key".',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
run(context) {
|
|
26
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
var _a;
|
|
28
|
-
const { bucket } = context.auth.props;
|
|
29
|
-
const { key } = context.propsValue;
|
|
30
|
-
const s3 = (0, common_1.createS3)(context.auth.props);
|
|
31
|
-
const file = yield s3.getObject({
|
|
32
|
-
Bucket: bucket,
|
|
33
|
-
Key: key,
|
|
34
|
-
});
|
|
35
|
-
const base64 = yield ((_a = file.Body) === null || _a === void 0 ? void 0 : _a.transformToString('base64'));
|
|
36
|
-
if (!base64) {
|
|
37
|
-
throw new Error(`Could not read file ${key} from S3`);
|
|
38
|
-
}
|
|
39
|
-
return yield context.files.write({
|
|
40
|
-
fileName: key,
|
|
41
|
-
data: Buffer.from(base64, 'base64'),
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=read-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/read-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AAExE,kCAAuC;AACvC,sCAAqC;AAExB,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,8CAA8C;IAC3D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,8RAA8R;QAC3S,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,kIAAkI;YAC/I,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YACtC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACnC,MAAM,EAAE,GAAG,IAAA,iBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAExC,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,SAAS,CAAC;gBAC9B,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,GAAG;aACT,CAAC,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAA,CAAC;YAC5D,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,UAAU,CAAC,CAAC;YACxD,CAAC;YACD,OAAO,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;gBAC/B,QAAQ,EAAE,GAAG;gBACb,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC;aACpC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const amazons3UploadFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
}>, {
|
|
8
|
-
file: import("@activepieces/pieces-framework").FileProperty<true>;
|
|
9
|
-
fileName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
acl: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
11
|
-
type: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=upload-file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/upload-file.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB;;;;;;;;;;;EAwG7B,CAAC"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.amazons3UploadFile = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../auth");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const mime_types_1 = tslib_1.__importDefault(require("mime-types"));
|
|
9
|
-
exports.amazons3UploadFile = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.amazonS3Auth,
|
|
11
|
-
name: 'upload-file',
|
|
12
|
-
displayName: 'Upload File',
|
|
13
|
-
description: 'Upload an File to S3',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: {
|
|
16
|
-
description: 'Uploads a file to the configured S3 bucket, optionally setting a destination filename, content type, and canned ACL (e.g. private vs. public-read). Use to store new content in S3. Not idempotent: when no filename is given a unique timestamp-based key is generated, so each call writes a new object.',
|
|
17
|
-
idempotent: false,
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
file: pieces_framework_1.Property.File({
|
|
21
|
-
displayName: 'File',
|
|
22
|
-
description: 'The file to upload to S3.',
|
|
23
|
-
required: true,
|
|
24
|
-
}),
|
|
25
|
-
fileName: pieces_framework_1.Property.ShortText({
|
|
26
|
-
displayName: 'File Name (Optional)',
|
|
27
|
-
required: false,
|
|
28
|
-
description: 'The name to save the file as in S3 (e.g. "report-2024.csv"). If left blank, a unique name is generated automatically.',
|
|
29
|
-
}),
|
|
30
|
-
acl: pieces_framework_1.Property.StaticDropdown({
|
|
31
|
-
displayName: 'Access Control (ACL)',
|
|
32
|
-
description: 'Who can access this file after upload. Use "Private" for internal files, "Public Read" to make the file publicly accessible via URL.',
|
|
33
|
-
required: false,
|
|
34
|
-
options: {
|
|
35
|
-
options: [
|
|
36
|
-
{
|
|
37
|
-
label: 'Private (only your account)',
|
|
38
|
-
value: 'private',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
label: 'Public Read (anyone can view)',
|
|
42
|
-
value: 'public-read',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
label: 'Public Read/Write (anyone can view and upload)',
|
|
46
|
-
value: 'public-read-write',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
label: 'Authenticated AWS Users Read',
|
|
50
|
-
value: 'authenticated-read',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
label: 'AWS EC2 Read (aws-exec-read)',
|
|
54
|
-
value: 'aws-exec-read',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: 'Bucket Owner Read',
|
|
58
|
-
value: 'bucket-owner-read',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: 'Bucket Owner Full Control',
|
|
62
|
-
value: 'bucket-owner-full-control',
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
}),
|
|
67
|
-
type: pieces_framework_1.Property.ShortText({
|
|
68
|
-
displayName: "Content Type",
|
|
69
|
-
description: "Content Type of the uploaded file, if not set the API will try to figure out the content type.",
|
|
70
|
-
required: false
|
|
71
|
-
})
|
|
72
|
-
},
|
|
73
|
-
run(context) {
|
|
74
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
const { bucket } = context.auth.props;
|
|
76
|
-
const { file, fileName, acl, type } = context.propsValue;
|
|
77
|
-
const s3 = (0, common_1.createS3)(context.auth.props);
|
|
78
|
-
let contentType, extension = null;
|
|
79
|
-
if (!type) {
|
|
80
|
-
if (!file.extension || file.extension === undefined || !mime_types_1.default.contentType(file.extension)) {
|
|
81
|
-
throw new Error("Content type could not be interpreted, please check the input file.");
|
|
82
|
-
}
|
|
83
|
-
extension = '.' + file.extension;
|
|
84
|
-
contentType = mime_types_1.default.contentType(extension);
|
|
85
|
-
}
|
|
86
|
-
else if (!mime_types_1.default.extension(type)) {
|
|
87
|
-
throw new Error("The content type entered does not exist or is misspelled, please check your input.");
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
contentType = type;
|
|
91
|
-
extension = '.' + mime_types_1.default.extension(type);
|
|
92
|
-
}
|
|
93
|
-
const generatedName = new Date().toISOString() + Date.now() + extension;
|
|
94
|
-
const finalFileName = fileName ? (fileName.endsWith(extension) ? fileName : fileName + extension) : generatedName;
|
|
95
|
-
const uploadResponse = yield s3.putObject({
|
|
96
|
-
Bucket: bucket,
|
|
97
|
-
Key: finalFileName,
|
|
98
|
-
ACL: acl,
|
|
99
|
-
ContentType: contentType,
|
|
100
|
-
Body: file.data,
|
|
101
|
-
});
|
|
102
|
-
return {
|
|
103
|
-
fileName: finalFileName,
|
|
104
|
-
etag: uploadResponse.ETag,
|
|
105
|
-
};
|
|
106
|
-
});
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
//# sourceMappingURL=upload-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/upload-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,sCAAqC;AAErC,oEAA8B;AAEjB,QAAA,kBAAkB,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AAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;YAElH,MAAM,cAAc,GAAG,MAAM,EAAE,CAAC,SAAS,CAAC;gBACxC,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,aAAa;gBAClB,GAAG,EAAE,GAAkC;gBACvC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC,CAAC;YAEH,OAAO;gBACL,QAAQ,EAAE,aAAa;gBACvB,IAAI,EAAE,cAAc,CAAC,IAAI;aAC1B,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
package/src/lib/auth.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const amazonS3Auth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/src/lib/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,YAAY;;;;;;EA0KvB,CAAC"}
|
package/src/lib/auth.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.amazonS3Auth = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const common_1 = require("./common");
|
|
7
|
-
const description = `
|
|
8
|
-
Connect your Amazon S3 account to read, write, and manage files in your buckets.
|
|
9
|
-
|
|
10
|
-
**How to get your credentials:**
|
|
11
|
-
1. Open the [AWS IAM Console](https://console.aws.amazon.com/iam/) and go to **Users**.
|
|
12
|
-
2. Select your user (or create a new one), then go to **Security credentials**.
|
|
13
|
-
3. Click **Create access key** — copy both the Access Key ID and Secret Access Key.
|
|
14
|
-
4. Make sure the IAM user has the **AmazonS3FullAccess** policy (or a scoped S3 policy for your bucket).
|
|
15
|
-
|
|
16
|
-
Using a non-AWS S3-compatible service (MinIO, DigitalOcean Spaces, Backblaze B2, etc.)? Set the **Endpoint** field to your service URL.
|
|
17
|
-
`;
|
|
18
|
-
exports.amazonS3Auth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
19
|
-
description: description,
|
|
20
|
-
props: {
|
|
21
|
-
accessKeyId: pieces_framework_1.Property.ShortText({
|
|
22
|
-
displayName: 'Access Key ID',
|
|
23
|
-
description: 'Your AWS access key ID. Found in AWS IAM Console → Users → Security credentials.',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
secretAccessKey: pieces_framework_1.PieceAuth.SecretText({
|
|
27
|
-
displayName: 'Secret Access Key',
|
|
28
|
-
description: 'Your AWS secret access key. Only shown once when you create the access key — store it safely.',
|
|
29
|
-
required: true,
|
|
30
|
-
}),
|
|
31
|
-
bucket: pieces_framework_1.Property.ShortText({
|
|
32
|
-
displayName: 'Bucket Name',
|
|
33
|
-
description: 'The name of your S3 bucket (e.g. "my-company-files"). Found in the AWS S3 Console.',
|
|
34
|
-
required: true,
|
|
35
|
-
}),
|
|
36
|
-
endpoint: pieces_framework_1.Property.ShortText({
|
|
37
|
-
displayName: 'Endpoint (Optional)',
|
|
38
|
-
description: 'Leave blank for Amazon S3. Only set this when using an S3-compatible service like MinIO, DigitalOcean Spaces, or Backblaze B2 (e.g. "https://nyc3.digitaloceanspaces.com").',
|
|
39
|
-
required: false,
|
|
40
|
-
}),
|
|
41
|
-
region: pieces_framework_1.Property.StaticDropdown({
|
|
42
|
-
displayName: 'Region',
|
|
43
|
-
options: {
|
|
44
|
-
options: [
|
|
45
|
-
{
|
|
46
|
-
label: 'Default',
|
|
47
|
-
value: 'us-east-1',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
label: 'US East (N. Virginia) [us-east-1]',
|
|
51
|
-
value: 'us-east-1',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: 'US East (Ohio) [us-east-2]',
|
|
55
|
-
value: 'us-east-2',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: 'US West (N. California) [us-west-1]',
|
|
59
|
-
value: 'us-west-1',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: 'US West (Oregon) [us-west-2]',
|
|
63
|
-
value: 'us-west-2',
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
label: 'Africa (Cape Town) [af-south-1]',
|
|
67
|
-
value: 'af-south-1',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
label: 'Asia Pacific (Hong Kong) [ap-east-1]',
|
|
71
|
-
value: 'ap-east-1',
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
label: 'Asia Pacific (Mumbai) [ap-south-1]',
|
|
75
|
-
value: 'ap-south-1',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
label: 'Asia Pacific (Osaka-Local) [ap-northeast-3]',
|
|
79
|
-
value: 'ap-northeast-3',
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
label: 'Asia Pacific (Seoul) [ap-northeast-2]',
|
|
83
|
-
value: 'ap-northeast-2',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
label: 'Asia Pacific (Singapore) [ap-southeast-1]',
|
|
87
|
-
value: 'ap-southeast-1',
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
label: 'Asia Pacific (Sydney) [ap-southeast-2]',
|
|
91
|
-
value: 'ap-southeast-2',
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
label: 'Asia Pacific (Tokyo) [ap-northeast-1]',
|
|
95
|
-
value: 'ap-northeast-1',
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
label: 'Canada (Central) [ca-central-1]',
|
|
99
|
-
value: 'ca-central-1',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
label: 'Europe (Frankfurt) [eu-central-1]',
|
|
103
|
-
value: 'eu-central-1',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
label: 'Europe (Ireland) [eu-west-1]',
|
|
107
|
-
value: 'eu-west-1',
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
label: 'Europe (London) [eu-west-2]',
|
|
111
|
-
value: 'eu-west-2',
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
label: 'Europe (Milan) [eu-south-1]',
|
|
115
|
-
value: 'eu-south-1',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
label: 'Europe (Paris) [eu-west-3]',
|
|
119
|
-
value: 'eu-west-3',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
label: 'Europe (Stockholm) [eu-north-1]',
|
|
123
|
-
value: 'eu-north-1',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
label: 'Middle East (Bahrain) [me-south-1]',
|
|
127
|
-
value: 'me-south-1',
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
label: 'South America (São Paulo) [sa-east-1]',
|
|
131
|
-
value: 'sa-east-1',
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
label: 'Europe (Spain) [eu-south-2]',
|
|
135
|
-
value: 'eu-south-2',
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
label: 'Asia Pacific (Hyderabad) [ap-south-2]',
|
|
139
|
-
value: 'ap-south-2',
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
label: 'Asia Pacific (Jakarta) [ap-southeast-3]',
|
|
143
|
-
value: 'ap-southeast-3',
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
label: 'Asia Pacific (Melbourne) [ap-southeast-4]',
|
|
147
|
-
value: 'ap-southeast-4',
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
label: 'China (Beijing) [cn-north-1]',
|
|
151
|
-
value: 'cn-north-1',
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
label: 'China (Ningxia) [cn-northwest-1]',
|
|
155
|
-
value: 'cn-northwest-1',
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
label: 'Europe (Zurich) [eu-central-2]',
|
|
159
|
-
value: 'eu-central-2',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
label: 'Middle East (UAE) [me-central-1]',
|
|
163
|
-
value: 'me-central-1',
|
|
164
|
-
},
|
|
165
|
-
],
|
|
166
|
-
},
|
|
167
|
-
required: true,
|
|
168
|
-
}),
|
|
169
|
-
},
|
|
170
|
-
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
171
|
-
const s3 = (0, common_1.createS3)(auth);
|
|
172
|
-
try {
|
|
173
|
-
yield s3.listObjectsV2({
|
|
174
|
-
Bucket: auth.bucket,
|
|
175
|
-
MaxKeys: 1,
|
|
176
|
-
});
|
|
177
|
-
return {
|
|
178
|
-
valid: true,
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
catch (e) {
|
|
182
|
-
return {
|
|
183
|
-
valid: false,
|
|
184
|
-
error: e === null || e === void 0 ? void 0 : e.message,
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
}),
|
|
188
|
-
required: true,
|
|
189
|
-
});
|
|
190
|
-
//# sourceMappingURL=auth.js.map
|
package/src/lib/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","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AE,yCAAyC;wBAChD,KAAK,EAAE,gBAAgB;qBACxB;oBACD;wBACE,KAAK,EAAE,2CAA2C;wBAClD,KAAK,EAAE,gBAAgB;qBACxB;oBACD;wBACE,KAAK,EAAE,8BAA8B;wBACrC,KAAK,EAAE,YAAY;qBACpB;oBACD;wBACE,KAAK,EAAE,kCAAkC;wBACzC,KAAK,EAAE,gBAAgB;qBACxB;oBACD;wBACE,KAAK,EAAE,gCAAgC;wBACvC,KAAK,EAAE,cAAc;qBACtB;oBACD;wBACE,KAAK,EAAE,kCAAkC;wBACzC,KAAK,EAAE,cAAc;qBACtB;iBACF;aACF;YACD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,MAAM,EAAE,GAAG,IAAA,iBAAQ,EAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,aAAa,CAAC;gBACrB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,CAAC;aACX,CAAC,CAAC;YACH,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAG,CAAW,aAAX,CAAC,uBAAD,CAAC,CAAY,OAAO;aAC7B,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;IACD,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
package/src/lib/common.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { S3 } from '@aws-sdk/client-s3';
|
|
2
|
-
import { SecretsManagerClient } from '@aws-sdk/client-secrets-manager';
|
|
3
|
-
export declare function createS3(auth: {
|
|
4
|
-
accessKeyId: string;
|
|
5
|
-
secretAccessKey: string;
|
|
6
|
-
region: string | undefined;
|
|
7
|
-
endpoint: string | undefined;
|
|
8
|
-
}): S3;
|
|
9
|
-
export declare function createSecretsManagerClient(auth: {
|
|
10
|
-
accessKeyId: string;
|
|
11
|
-
secretAccessKey: string;
|
|
12
|
-
region: string | undefined;
|
|
13
|
-
}): SecretsManagerClient;
|
|
14
|
-
//# sourceMappingURL=common.d.ts.map
|
package/src/lib/common.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/lib/common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,wBAAgB,QAAQ,CAAC,IAAI,EAAE;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,MAYA;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,wBAUA"}
|
package/src/lib/common.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createS3 = createS3;
|
|
4
|
-
exports.createSecretsManagerClient = createSecretsManagerClient;
|
|
5
|
-
const shared_1 = require("@activepieces/shared");
|
|
6
|
-
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
7
|
-
const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
|
|
8
|
-
function createS3(auth) {
|
|
9
|
-
const s3 = new client_s3_1.S3({
|
|
10
|
-
credentials: {
|
|
11
|
-
accessKeyId: auth.accessKeyId,
|
|
12
|
-
secretAccessKey: auth.secretAccessKey,
|
|
13
|
-
},
|
|
14
|
-
forcePathStyle: auth.endpoint ? true : undefined,
|
|
15
|
-
region: auth.region,
|
|
16
|
-
endpoint: auth.endpoint === '' || (0, shared_1.isNil)(auth.endpoint) ? undefined : auth.endpoint,
|
|
17
|
-
});
|
|
18
|
-
return s3;
|
|
19
|
-
}
|
|
20
|
-
function createSecretsManagerClient(auth) {
|
|
21
|
-
const client = new client_secrets_manager_1.SecretsManagerClient({
|
|
22
|
-
credentials: {
|
|
23
|
-
accessKeyId: auth.accessKeyId,
|
|
24
|
-
secretAccessKey: auth.secretAccessKey,
|
|
25
|
-
},
|
|
26
|
-
region: auth.region,
|
|
27
|
-
endpoint: undefined,
|
|
28
|
-
});
|
|
29
|
-
return client;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=common.js.map
|
package/src/lib/common.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/lib/common.ts"],"names":[],"mappings":";;AAIA,4BAiBC;AAED,gEAcC;AArCD,iDAA6C;AAC7C,kDAAwC;AACxC,4EAAuE;AAEvE,SAAgB,QAAQ,CAAC,IAKxB;IACC,MAAM,EAAE,GAAG,IAAI,cAAE,CAAC;QAChB,WAAW,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC;QACD,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QAChD,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,EAAE,IAAI,IAAA,cAAK,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ;KAC3E,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,0BAA0B,CAAC,IAI1C;IACC,MAAM,MAAM,GAAG,IAAI,6CAAoB,CAAC;QACtC,WAAW,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC;QACD,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newFile: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
3
|
-
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
-
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
-
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
-
}>, {
|
|
9
|
-
markdown: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
10
|
-
folderPath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
12
|
-
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
|
-
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
14
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
15
|
-
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
-
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
17
|
-
}>, {
|
|
18
|
-
markdown: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
19
|
-
folderPath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
20
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
21
|
-
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
22
|
-
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
23
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
24
|
-
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
25
|
-
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
26
|
-
}>, {
|
|
27
|
-
markdown: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
28
|
-
folderPath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
29
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
30
|
-
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
31
|
-
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
32
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
33
|
-
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
34
|
-
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
35
|
-
}>, {
|
|
36
|
-
markdown: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
37
|
-
folderPath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
38
|
-
}>;
|
|
39
|
-
//# sourceMappingURL=new-file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAiEjE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DlB,CAAC"}
|