@activepieces/piece-amazon-s3 0.5.9 → 0.6.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/package.json +5 -4
- package/src/index.d.ts +7 -3
- package/src/index.d.ts.map +1 -1
- package/src/index.js +1 -1
- package/src/index.js.map +1 -1
- package/src/lib/actions/decrypt-pgp-file.d.ts +7 -3
- package/src/lib/actions/decrypt-pgp-file.d.ts.map +1 -1
- package/src/lib/actions/decrypt-pgp-file.js +30 -20
- package/src/lib/actions/decrypt-pgp-file.js.map +1 -1
- package/src/lib/actions/delete-file.d.ts +7 -3
- package/src/lib/actions/delete-file.d.ts.map +1 -1
- package/src/lib/actions/delete-file.js +9 -3
- package/src/lib/actions/delete-file.js.map +1 -1
- package/src/lib/actions/generate-signed-upload-url.d.ts +7 -3
- package/src/lib/actions/generate-signed-upload-url.d.ts.map +1 -1
- package/src/lib/actions/generate-signed-upload-url.js +31 -13
- package/src/lib/actions/generate-signed-upload-url.js.map +1 -1
- package/src/lib/actions/generate-signed-url.d.ts +7 -3
- package/src/lib/actions/generate-signed-url.d.ts.map +1 -1
- package/src/lib/actions/generate-signed-url.js +31 -21
- package/src/lib/actions/generate-signed-url.js.map +1 -1
- package/src/lib/actions/list-files.d.ts +7 -3
- package/src/lib/actions/list-files.d.ts.map +1 -1
- package/src/lib/actions/list-files.js +9 -3
- package/src/lib/actions/list-files.js.map +1 -1
- package/src/lib/actions/move-file.d.ts +7 -3
- package/src/lib/actions/move-file.d.ts.map +1 -1
- package/src/lib/actions/move-file.js +9 -3
- package/src/lib/actions/move-file.js.map +1 -1
- package/src/lib/actions/read-file.d.ts +7 -3
- package/src/lib/actions/read-file.d.ts.map +1 -1
- package/src/lib/actions/read-file.js +9 -3
- package/src/lib/actions/read-file.js.map +1 -1
- package/src/lib/actions/upload-file.d.ts +7 -3
- package/src/lib/actions/upload-file.d.ts.map +1 -1
- package/src/lib/actions/upload-file.js +9 -3
- package/src/lib/actions/upload-file.js.map +1 -1
- package/src/lib/auth.d.ts +30 -1
- package/src/lib/auth.d.ts.map +1 -1
- package/src/lib/auth.js +210 -145
- package/src/lib/auth.js.map +1 -1
- package/src/lib/common.d.ts +25 -9
- package/src/lib/common.d.ts.map +1 -1
- package/src/lib/common.js +93 -0
- package/src/lib/common.js.map +1 -1
- package/src/lib/triggers/new-file.d.ts +28 -12
- package/src/lib/triggers/new-file.d.ts.map +1 -1
- package/src/lib/triggers/new-file.js +63 -46
- package/src/lib/triggers/new-file.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-amazon-s3",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@activepieces/pieces-common": "0.12.
|
|
8
|
-
"@activepieces/pieces-framework": "0.
|
|
9
|
-
"@activepieces/shared": "0.
|
|
7
|
+
"@activepieces/pieces-common": "0.12.5",
|
|
8
|
+
"@activepieces/pieces-framework": "0.32.0",
|
|
9
|
+
"@activepieces/shared": "0.95.1",
|
|
10
10
|
"@aws-sdk/client-s3": "3.974.0",
|
|
11
|
+
"@aws-sdk/client-sts": "3.974.0",
|
|
11
12
|
"@aws-sdk/client-secrets-manager": "3.0.0",
|
|
12
13
|
"@aws-sdk/s3-request-presigner": "3.894.0",
|
|
13
14
|
"dayjs": "1.11.9",
|
package/src/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
export declare const amazonS3: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
1
|
+
export declare const amazonS3: import("@activepieces/pieces-framework").Piece<(import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
4
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
5
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
|
|
6
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}> | import("@activepieces/pieces-framework").OIDCProperty<{
|
|
8
|
+
roleArn: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
10
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>)[]>;
|
|
8
12
|
//# sourceMappingURL=index.d.ts.map
|
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ;;;;;;;;;;MAWnB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -20,7 +20,7 @@ exports.amazonS3 = (0, pieces_framework_1.createPiece)({
|
|
|
20
20
|
minimumSupportedRelease: '0.30.0',
|
|
21
21
|
authors: ["Willianwg", "kishanprmr", "MoShizzle", "AbdulTheActivePiecer", "khaledmashaly", "abuaboud", "Kevinyu-alan", "hugh-codes"],
|
|
22
22
|
categories: [shared_1.PieceCategory.DEVELOPER_TOOLS],
|
|
23
|
-
auth: auth_1.
|
|
23
|
+
auth: auth_1.amazonS3CombinedAuth,
|
|
24
24
|
actions: [upload_file_1.amazons3UploadFile, read_file_1.readFile, generate_signed_url_1.generateSignedUrl, generate_signed_upload_url_1.generateSignedUploadUrl, move_file_1.moveFile, delete_file_1.deleteFile, list_files_1.listFiles, decrypt_pgp_file_1.decryptPgpFile],
|
|
25
25
|
triggers: [new_file_1.newFile],
|
|
26
26
|
});
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qEAEwC;AACxC,iDAAqD;AACrD,uDAAmD;AACnD,2DAA+D;AAC/D,sDAAkD;AAClD,2EAAsE;AACtE,yFAAmF;AACnF,uDAAmD;AACnD,2DAAuD;AACvD,yDAAqD;AACrD,qEAAgE;AAChE,qCAAkD;AAErC,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,+BAA+B;IAE5C,OAAO,EAAE,mDAAmD;IAC5D,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,sBAAsB,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,CAAC;IACpI,UAAU,EAAE,CAAC,sBAAa,CAAC,eAAe,CAAC;IAC3C,IAAI,EAAE,2BAAoB;IAC1B,OAAO,EAAE,CAAC,gCAAkB,EAAE,oBAAQ,EAAE,uCAAiB,EAAE,oDAAuB,EAAE,oBAAQ,EAAE,wBAAU,EAAE,sBAAS,EAAE,iCAAc,CAAC;IACpI,QAAQ,EAAE,CAAC,kBAAO,CAAC;CACpB,CAAC,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export declare const decryptPgpFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
1
|
+
export declare const decryptPgpFile: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
4
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
5
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
|
|
6
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}> | import("@activepieces/pieces-framework").OIDCProperty<{
|
|
8
|
+
roleArn: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
10
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>)[], {
|
|
8
12
|
key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
13
|
secretArn: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
14
|
passphraseArn: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decrypt-pgp-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/decrypt-pgp-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decrypt-pgp-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/decrypt-pgp-file.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;EA4NzB,CAAC"}
|
|
@@ -4,14 +4,20 @@ exports.decryptPgpFile = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
|
|
7
|
+
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
7
8
|
const openpgp = tslib_1.__importStar(require("openpgp"));
|
|
8
9
|
const auth_1 = require("../auth");
|
|
9
10
|
const common_1 = require("../common");
|
|
10
11
|
exports.decryptPgpFile = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.
|
|
12
|
+
auth: auth_1.amazonS3CombinedAuth,
|
|
12
13
|
name: 'decrypt-pgp-file',
|
|
13
14
|
displayName: 'Decrypt PGP File',
|
|
14
15
|
description: 'Decrypt a PGP encrypted file from S3 using a private key stored in AWS Secrets Manager',
|
|
16
|
+
audience: 'both',
|
|
17
|
+
aiMetadata: {
|
|
18
|
+
description: 'Downloads a PGP-encrypted object from the configured S3 bucket and decrypts it using a private key (and optional passphrase) retrieved from AWS Secrets Manager by ARN, returning the decrypted contents as a file. Use when an S3 file is PGP-encrypted and you have the key stored in Secrets Manager. Requires the secret ARN for the private key; idempotent since it only reads and decrypts without modifying anything.',
|
|
19
|
+
idempotent: true,
|
|
20
|
+
},
|
|
15
21
|
props: {
|
|
16
22
|
key: pieces_framework_1.Property.ShortText({
|
|
17
23
|
displayName: 'S3 File Key',
|
|
@@ -49,11 +55,21 @@ exports.decryptPgpFile = (0, pieces_framework_1.createAction)({
|
|
|
49
55
|
run(context) {
|
|
50
56
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
51
57
|
var _a, _b;
|
|
52
|
-
const
|
|
58
|
+
const authProps = context.auth.props;
|
|
59
|
+
const { bucket } = authProps;
|
|
53
60
|
const { key, secretArn, passphraseArn, secretsManagerRegion, allowUnauthenticatedMessages, allowInsecureDecryptionWithSigningKeys } = context.propsValue;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
let s3;
|
|
62
|
+
let secretsClient;
|
|
63
|
+
if ((0, common_1.isOidcAuth)(authProps)) {
|
|
64
|
+
const credentials = yield (0, common_1.getTemporaryCredentials)({ auth: authProps, server: context.server });
|
|
65
|
+
s3 = new client_s3_1.S3({ credentials, region: authProps.region });
|
|
66
|
+
secretsClient = new client_secrets_manager_1.SecretsManagerClient({ credentials, region: secretsManagerRegion || authProps.region });
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
const smAuth = secretsManagerRegion ? Object.assign(Object.assign({}, authProps), { region: secretsManagerRegion }) : authProps;
|
|
70
|
+
s3 = (0, common_1.createS3)(authProps);
|
|
71
|
+
secretsClient = (0, common_1.createSecretsManagerClient)(smAuth);
|
|
72
|
+
}
|
|
57
73
|
// Download the encrypted file from S3
|
|
58
74
|
let encryptedData;
|
|
59
75
|
try {
|
|
@@ -70,12 +86,6 @@ exports.decryptPgpFile = (0, pieces_framework_1.createAction)({
|
|
|
70
86
|
catch (error) {
|
|
71
87
|
throw new Error(`Failed to download file from S3: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
72
88
|
}
|
|
73
|
-
// Create AWS Secrets Manager client
|
|
74
|
-
const secretsClient = (0, common_1.createSecretsManagerClient)({
|
|
75
|
-
accessKeyId: accessKeyId,
|
|
76
|
-
secretAccessKey: secretAccessKey,
|
|
77
|
-
region: secretsManagerRegion || region,
|
|
78
|
-
});
|
|
79
89
|
// Fetch the secret key from AWS Secrets Manager
|
|
80
90
|
let privateKeyArmored;
|
|
81
91
|
try {
|
|
@@ -91,14 +101,14 @@ exports.decryptPgpFile = (0, pieces_framework_1.createAction)({
|
|
|
91
101
|
}
|
|
92
102
|
catch (error) {
|
|
93
103
|
// Provide more specific error messages for common issues
|
|
94
|
-
if (error.name === 'AccessDeniedException') {
|
|
104
|
+
if (error instanceof Error && error.name === 'AccessDeniedException') {
|
|
95
105
|
throw new Error(`Access denied when retrieving secret ${secretArn}. ` +
|
|
96
106
|
`Please ensure your AWS credentials have the secretsmanager:GetSecretValue permission for this secret.`);
|
|
97
107
|
}
|
|
98
|
-
if (error.name === 'ResourceNotFoundException') {
|
|
99
|
-
throw new Error(`Secret ${secretArn} not found. Please verify the secret ARN is correct and exists in region ${secretsManagerRegion || region}.`);
|
|
108
|
+
if (error instanceof Error && error.name === 'ResourceNotFoundException') {
|
|
109
|
+
throw new Error(`Secret ${secretArn} not found. Please verify the secret ARN is correct and exists in region ${secretsManagerRegion || authProps.region}.`);
|
|
100
110
|
}
|
|
101
|
-
if (error.name === 'InvalidParameterException') {
|
|
111
|
+
if (error instanceof Error && error.name === 'InvalidParameterException') {
|
|
102
112
|
throw new Error(`Invalid secret ARN: ${secretArn}. Please verify the ARN format is correct.`);
|
|
103
113
|
}
|
|
104
114
|
throw new Error(`Failed to retrieve secret from AWS Secrets Manager: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
@@ -118,14 +128,14 @@ exports.decryptPgpFile = (0, pieces_framework_1.createAction)({
|
|
|
118
128
|
}
|
|
119
129
|
catch (error) {
|
|
120
130
|
// Provide more specific error messages for common issues
|
|
121
|
-
if (error.name === 'AccessDeniedException') {
|
|
131
|
+
if (error instanceof Error && error.name === 'AccessDeniedException') {
|
|
122
132
|
throw new Error(`Access denied when retrieving passphrase secret ${passphraseArn}. ` +
|
|
123
133
|
`Please ensure your AWS credentials have the secretsmanager:GetSecretValue permission for this secret.`);
|
|
124
134
|
}
|
|
125
|
-
if (error.name === 'ResourceNotFoundException') {
|
|
126
|
-
throw new Error(`Passphrase secret ${passphraseArn} not found. Please verify the secret ARN is correct and exists in region ${secretsManagerRegion || region}.`);
|
|
135
|
+
if (error instanceof Error && error.name === 'ResourceNotFoundException') {
|
|
136
|
+
throw new Error(`Passphrase secret ${passphraseArn} not found. Please verify the secret ARN is correct and exists in region ${secretsManagerRegion || authProps.region}.`);
|
|
127
137
|
}
|
|
128
|
-
if (error.name === 'InvalidParameterException') {
|
|
138
|
+
if (error instanceof Error && error.name === 'InvalidParameterException') {
|
|
129
139
|
throw new Error(`Invalid passphrase secret ARN: ${passphraseArn}. Please verify the ARN format is correct.`);
|
|
130
140
|
}
|
|
131
141
|
throw new Error(`Failed to retrieve passphrase from AWS Secrets Manager: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
@@ -183,7 +193,7 @@ exports.decryptPgpFile = (0, pieces_framework_1.createAction)({
|
|
|
183
193
|
// Get the decrypted data
|
|
184
194
|
const decryptedData = new Uint8Array(yield decrypted.data);
|
|
185
195
|
// Write the decrypted file
|
|
186
|
-
const fileName = (_b = key.split(
|
|
196
|
+
const fileName = (_b = key.split('/').at(-1)) === null || _b === void 0 ? void 0 : _b.toLowerCase().replace(/\.(pgp|gpg)$/i, '');
|
|
187
197
|
return yield context.files.write({
|
|
188
198
|
fileName: fileName !== null && fileName !== void 0 ? fileName : 'decrypted_file',
|
|
189
199
|
data: Buffer.from(decryptedData),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decrypt-pgp-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/decrypt-pgp-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"decrypt-pgp-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/decrypt-pgp-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,4EAA8F;AAC9F,kDAAwC;AACxC,yDAAmC;AACnC,kCAA4D;AAC5D,sCAAsG;AAEzF,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,wFAAwF;IACrG,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,+ZAA+Z;QAC5a,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,6EAA6E;YAC1F,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EA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AAS,CAAC,IAAI,CAAC,CAAC;gBAE3D,2BAA2B;gBAC3B,MAAM,QAAQ,GAAG,MAAA,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,0CAAE,WAAW,GAAG,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;gBAEnF,OAAO,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;oBAC/B,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,gBAAgB;oBACtC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;iBACjC,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,2BAA2B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;YACzG,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export declare const deleteFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
1
|
+
export declare const deleteFile: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
4
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
5
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
|
|
6
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}> | import("@activepieces/pieces-framework").OIDCProperty<{
|
|
8
|
+
roleArn: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
10
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>)[], {
|
|
8
12
|
key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
13
|
}>;
|
|
10
14
|
//# sourceMappingURL=delete-file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-file.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"delete-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-file.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;EA+BrB,CAAC"}
|
|
@@ -6,10 +6,15 @@ const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
|
6
6
|
const auth_1 = require("../auth");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
exports.deleteFile = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.
|
|
9
|
+
auth: auth_1.amazonS3CombinedAuth,
|
|
10
10
|
name: 'deleteFile',
|
|
11
11
|
displayName: 'Delete File',
|
|
12
12
|
description: 'Deletes an existing file.',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: {
|
|
15
|
+
description: 'Deletes a single object from the configured S3 bucket by its full key (path). Use to remove a known file. Idempotent: deleting an already-absent key succeeds without error, so repeating the call has no further effect.',
|
|
16
|
+
idempotent: true,
|
|
17
|
+
},
|
|
13
18
|
props: {
|
|
14
19
|
key: pieces_framework_1.Property.ShortText({
|
|
15
20
|
displayName: 'File Path',
|
|
@@ -19,9 +24,10 @@ exports.deleteFile = (0, pieces_framework_1.createAction)({
|
|
|
19
24
|
},
|
|
20
25
|
run(context) {
|
|
21
26
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const
|
|
27
|
+
const authProps = context.auth.props;
|
|
28
|
+
const { bucket } = authProps;
|
|
23
29
|
const { key } = context.propsValue;
|
|
24
|
-
const s3 = (0, common_1.
|
|
30
|
+
const s3 = yield (0, common_1.resolveS3Client)({ authProps, server: context.server });
|
|
25
31
|
const response = yield s3.deleteObject({
|
|
26
32
|
Bucket: bucket,
|
|
27
33
|
Key: key,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"delete-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAA4D;AAC5D,sCAA4C;AAE/B,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,2BAA2B;IACxC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,2NAA2N;QACxO,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,SAAS,GAAgB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAClD,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;YAC7B,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEnC,MAAM,EAAE,GAAG,MAAM,IAAA,wBAAe,EAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;YAExE,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,YAAY,CAAC;gBACrC,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,GAAG;aACT,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAA;QACjB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export declare const generateSignedUploadUrl: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
1
|
+
export declare const generateSignedUploadUrl: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
4
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
5
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
|
|
6
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}> | import("@activepieces/pieces-framework").OIDCProperty<{
|
|
8
|
+
roleArn: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
10
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>)[], {
|
|
8
12
|
key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
13
|
expiresIn: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
10
14
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-signed-upload-url.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-upload-url.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-signed-upload-url.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-upload-url.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;EAqClC,CAAC"}
|
|
@@ -6,11 +6,17 @@ const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
|
6
6
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
7
7
|
const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
|
|
8
8
|
const auth_1 = require("../auth");
|
|
9
|
+
const common_1 = require("../common");
|
|
9
10
|
exports.generateSignedUploadUrl = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.
|
|
11
|
+
auth: auth_1.amazonS3CombinedAuth,
|
|
11
12
|
name: 'generate-signed-upload-url',
|
|
12
13
|
displayName: 'Generate Signed Upload URL',
|
|
13
14
|
description: 'Generate a pre-signed URL that allows anyone with the link to upload a file directly to S3 without needing AWS credentials.',
|
|
15
|
+
audience: 'both',
|
|
16
|
+
aiMetadata: {
|
|
17
|
+
description: 'Generates a time-limited pre-signed upload (PUT) URL for a target key in the configured S3 bucket, letting anyone with the link upload a file directly to S3 without AWS credentials until it expires. Use to delegate an upload to an external client. Generating the URL does not itself create or modify any object and is idempotent (each call returns a freshly signed URL).',
|
|
18
|
+
idempotent: true,
|
|
19
|
+
},
|
|
14
20
|
props: {
|
|
15
21
|
key: pieces_framework_1.Property.ShortText({
|
|
16
22
|
displayName: 'File Key',
|
|
@@ -26,23 +32,35 @@ exports.generateSignedUploadUrl = (0, pieces_framework_1.createAction)({
|
|
|
26
32
|
},
|
|
27
33
|
run(context) {
|
|
28
34
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const
|
|
35
|
+
const authProps = context.auth.props;
|
|
30
36
|
const { key, expiresIn } = context.propsValue;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} }, (endpoint ? { endpoint, forcePathStyle: true } : {})));
|
|
35
|
-
const command = new client_s3_1.PutObjectCommand({
|
|
36
|
-
Bucket: bucket,
|
|
37
|
-
Key: key,
|
|
38
|
-
});
|
|
39
|
-
const signedUrl = yield (0, s3_request_presigner_1.getSignedUrl)(client, command, {
|
|
40
|
-
expiresIn: (expiresIn !== null && expiresIn !== void 0 ? expiresIn : 10) * 60,
|
|
41
|
-
});
|
|
37
|
+
const signedUrl = (0, common_1.isOidcAuth)(authProps)
|
|
38
|
+
? yield createUploadUrlWithAssumeRole({ auth: authProps, server: context.server, key, expiresIn })
|
|
39
|
+
: yield createUploadUrlWithClient({ auth: authProps, key, expiresIn });
|
|
42
40
|
return {
|
|
43
41
|
url: signedUrl,
|
|
44
42
|
};
|
|
45
43
|
});
|
|
46
44
|
},
|
|
47
45
|
});
|
|
46
|
+
function createUploadUrlWithAssumeRole(_a) {
|
|
47
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, server, key, expiresIn, }) {
|
|
48
|
+
const expiresInSeconds = (expiresIn !== null && expiresIn !== void 0 ? expiresIn : 10) * 60;
|
|
49
|
+
// A URL signed with temporary STS credentials stops working once the session expires,
|
|
50
|
+
// so the session must outlast the requested URL validity — and STS caps web-identity
|
|
51
|
+
// sessions at 12h. Beyond that the URL would die silently before its stated expiry.
|
|
52
|
+
if (expiresInSeconds > common_1.MAX_STS_DURATION_SECONDS) {
|
|
53
|
+
throw new Error(`IAM Role (OIDC) signed URLs can be valid for at most ${common_1.MAX_STS_DURATION_SECONDS / 60} minutes (12 hours). Reduce "Expires In", or use Access Key authentication for longer-lived URLs.`);
|
|
54
|
+
}
|
|
55
|
+
const durationSeconds = Math.max(expiresInSeconds, common_1.MIN_STS_DURATION_SECONDS);
|
|
56
|
+
const s3 = yield (0, common_1.createS3WithAssumeRole)({ auth, server, durationSeconds });
|
|
57
|
+
const command = new client_s3_1.PutObjectCommand({ Bucket: auth.bucket, Key: key });
|
|
58
|
+
return (0, s3_request_presigner_1.getSignedUrl)(s3, command, { expiresIn: expiresInSeconds });
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function createUploadUrlWithClient({ auth, key, expiresIn, }) {
|
|
62
|
+
const s3 = (0, common_1.createS3)(auth);
|
|
63
|
+
const command = new client_s3_1.PutObjectCommand({ Bucket: auth.bucket, Key: key });
|
|
64
|
+
return (0, s3_request_presigner_1.getSignedUrl)(s3, command, { expiresIn: (expiresIn !== null && expiresIn !== void 0 ? expiresIn : 10) * 60 });
|
|
65
|
+
}
|
|
48
66
|
//# sourceMappingURL=generate-signed-upload-url.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-signed-upload-url.js","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-upload-url.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"generate-signed-upload-url.js","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-upload-url.ts"],"names":[],"mappings":";;;;AAAA,qEAAuF;AACvF,kDAAsD;AACtD,wEAA6D;AAC7D,kCAA+F;AAC/F,sCAA6H;AAEhH,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAClD,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,4BAA4B;IACzC,WAAW,EACT,6HAA6H;IAC/H,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,oXAAoX;QACjY,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,UAAU;YACvB,WAAW,EACT,gFAAgF;YAClF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACzB,WAAW,EAAE,sBAAsB;YACnC,WAAW,EAAE,2DAA2D;YACxE,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,EAAE;SACjB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,SAAS,GAAgB,OAAO,CAAC,IAAI,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AC,CAAC;IACpE,CAAC;CAAA;AAED,SAAS,yBAAyB,CAAC,EACjC,IAAI,EACJ,GAAG,EACH,SAAS,GAKV;IACC,MAAM,EAAE,GAAG,IAAA,iBAAQ,EAAC,IAAI,CAAC,CAAC;IAC1B,MAAM,OAAO,GAAG,IAAI,4BAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IACxE,OAAO,IAAA,mCAAY,EAAC,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export declare const generateSignedUrl: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
1
|
+
export declare const generateSignedUrl: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
4
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
5
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
|
|
6
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}> | import("@activepieces/pieces-framework").OIDCProperty<{
|
|
8
|
+
roleArn: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
10
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>)[], {
|
|
8
12
|
key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
13
|
expiresIn: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
10
14
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-signed-url.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-url.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-signed-url.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-url.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;EAiC5B,CAAC"}
|
|
@@ -4,13 +4,19 @@ exports.generateSignedUrl = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
7
|
const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
|
|
8
|
+
const auth_1 = require("../auth");
|
|
9
|
+
const common_1 = require("../common");
|
|
9
10
|
exports.generateSignedUrl = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.
|
|
11
|
+
auth: auth_1.amazonS3CombinedAuth,
|
|
11
12
|
name: 'generate-signed-url',
|
|
12
13
|
displayName: 'Generate signed URL',
|
|
13
14
|
description: 'Generate a signed URL for a file in a s3 bucket',
|
|
15
|
+
audience: 'both',
|
|
16
|
+
aiMetadata: {
|
|
17
|
+
description: 'Generates a time-limited pre-signed download (GET) URL for an existing object in the configured S3 bucket, letting anyone with the link fetch the file without AWS credentials until it expires. Use when you need to share read access to a stored file. Read-only and idempotent (no object is modified), though each call returns a freshly signed URL.',
|
|
18
|
+
idempotent: true,
|
|
19
|
+
},
|
|
14
20
|
props: {
|
|
15
21
|
key: pieces_framework_1.Property.ShortText({
|
|
16
22
|
displayName: 'File Path',
|
|
@@ -26,29 +32,33 @@ exports.generateSignedUrl = (0, pieces_framework_1.createAction)({
|
|
|
26
32
|
},
|
|
27
33
|
run(context) {
|
|
28
34
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const
|
|
35
|
+
const authProps = context.auth.props;
|
|
30
36
|
const { key, expiresIn } = context.propsValue;
|
|
31
|
-
const clientUrl =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
key,
|
|
35
|
-
accessKeyId,
|
|
36
|
-
secretAccessKey,
|
|
37
|
-
expiresIn
|
|
38
|
-
});
|
|
37
|
+
const clientUrl = (0, common_1.isOidcAuth)(authProps)
|
|
38
|
+
? yield createPresignedUrlWithAssumeRole({ auth: authProps, server: context.server, key, expiresIn })
|
|
39
|
+
: yield createPresignedUrlWithClient({ auth: authProps, key, expiresIn });
|
|
39
40
|
return clientUrl;
|
|
40
41
|
});
|
|
41
42
|
},
|
|
42
43
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
credentials
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
function createPresignedUrlWithAssumeRole(_a) {
|
|
45
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, server, key, expiresIn, }) {
|
|
46
|
+
const expiresInSeconds = expiresIn * 60;
|
|
47
|
+
// A URL signed with temporary STS credentials stops working once the session expires,
|
|
48
|
+
// so the session must outlast the requested URL validity — and STS caps web-identity
|
|
49
|
+
// sessions at 12h. Beyond that the URL would die silently before its stated expiry.
|
|
50
|
+
if (expiresInSeconds > common_1.MAX_STS_DURATION_SECONDS) {
|
|
51
|
+
throw new Error(`IAM Role (OIDC) signed URLs can be valid for at most ${common_1.MAX_STS_DURATION_SECONDS / 60} minutes (12 hours). Reduce "Expires In", or use Access Key authentication for longer-lived URLs.`);
|
|
52
|
+
}
|
|
53
|
+
const durationSeconds = Math.max(expiresInSeconds, common_1.MIN_STS_DURATION_SECONDS);
|
|
54
|
+
const s3 = yield (0, common_1.createS3WithAssumeRole)({ auth, server, durationSeconds });
|
|
55
|
+
const command = new client_s3_1.GetObjectCommand({ Bucket: auth.bucket, Key: key });
|
|
56
|
+
return (0, s3_request_presigner_1.getSignedUrl)(s3, command, { expiresIn: expiresInSeconds });
|
|
50
57
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
}
|
|
59
|
+
function createPresignedUrlWithClient({ auth, key, expiresIn, }) {
|
|
60
|
+
const s3 = (0, common_1.createS3)(auth);
|
|
61
|
+
const command = new client_s3_1.GetObjectCommand({ Bucket: auth.bucket, Key: key });
|
|
62
|
+
return (0, s3_request_presigner_1.getSignedUrl)(s3, command, { expiresIn: expiresIn * 60 });
|
|
63
|
+
}
|
|
54
64
|
//# sourceMappingURL=generate-signed-url.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-signed-url.js","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-url.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"generate-signed-url.js","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-url.ts"],"names":[],"mappings":";;;;AAAA,qEAAuF;AACvF,kDAAsD;AACtD,wEAA6D;AAC7D,kCAA+F;AAC/F,sCAA6H;AAEhH,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,iDAAiD;IAC9D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,4VAA4V;QACzW,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;QACF,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACzB,WAAW,EAAE,sBAAsB;YACnC,WAAW,EAAE,oDA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EAAC,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACpE,CAAC;CAAA;AAED,SAAS,4BAA4B,CAAC,EACpC,IAAI,EACJ,GAAG,EACH,SAAS,GAKV;IACC,MAAM,EAAE,GAAG,IAAA,iBAAQ,EAAC,IAAI,CAAC,CAAC;IAC1B,MAAM,OAAO,GAAG,IAAI,4BAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IACxE,OAAO,IAAA,mCAAY,EAAC,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,GAAG,EAAE,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export declare const listFiles: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
1
|
+
export declare const listFiles: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
4
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
5
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
|
|
6
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}> | import("@activepieces/pieces-framework").OIDCProperty<{
|
|
8
|
+
roleArn: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
10
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>)[], {
|
|
8
12
|
prefix: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
13
|
maxKeys: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
10
14
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-files.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-files.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"list-files.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-files.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;EA2EpB,CAAC"}
|
|
@@ -6,10 +6,15 @@ const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
|
6
6
|
const auth_1 = require("../auth");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
exports.listFiles = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.
|
|
9
|
+
auth: auth_1.amazonS3CombinedAuth,
|
|
10
10
|
name: 'list-files',
|
|
11
11
|
displayName: 'List Files',
|
|
12
12
|
description: 'List all files from an S3 bucket folder/prefix.',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: {
|
|
15
|
+
description: 'Lists objects in the configured S3 bucket, optionally filtered to a folder prefix (empty prefix lists the whole bucket), capped at a maximum count (1-1000, default 1000) and sorted newest-first. Use to discover files or look up an object key before reading, moving, or deleting it. Read-only and idempotent.',
|
|
16
|
+
idempotent: true,
|
|
17
|
+
},
|
|
13
18
|
props: {
|
|
14
19
|
prefix: pieces_framework_1.Property.ShortText({
|
|
15
20
|
displayName: 'Folder Path (Optional)',
|
|
@@ -25,9 +30,10 @@ exports.listFiles = (0, pieces_framework_1.createAction)({
|
|
|
25
30
|
},
|
|
26
31
|
run(context) {
|
|
27
32
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
const
|
|
33
|
+
const authProps = context.auth.props;
|
|
34
|
+
const s3 = yield (0, common_1.resolveS3Client)({ authProps, server: context.server });
|
|
29
35
|
const params = {
|
|
30
|
-
Bucket:
|
|
36
|
+
Bucket: authProps.bucket,
|
|
31
37
|
MaxKeys: Math.min(Math.max(context.propsValue.maxKeys || 1000, 1), 1000),
|
|
32
38
|
};
|
|
33
39
|
if (context.propsValue.prefix) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-files.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-files.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"list-files.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-files.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAA4D;AAC5D,sCAA4C;AAiB/B,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,iDAAiD;IAC9D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,qTAAqT;QAClU,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,wBAAwB;YACrC,WAAW,EAAE,6KAA6K;YAC1L,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACvB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,0HAA0H;YACvI,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;KAEH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,SAAS,GAAgB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAClD,MAAM,EAAE,GAAG,MAAM,IAAA,wBAAe,EAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;YAExE,MAAM,MAAM,GAA8B;gBACxC,MAAM,EAA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C,CAAC;gBAE9F,MAAM,MAAM,GAAoB;oBAC9B,KAAK;oBACL,WAAW,EAAE,QAAQ,CAAC,WAAW,IAAI,KAAK;iBAC3C,CAAC;gBAEF,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,iCAAiC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;YAC/G,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export declare const moveFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
1
|
+
export declare const moveFile: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
4
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
5
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
|
|
6
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}> | import("@activepieces/pieces-framework").OIDCProperty<{
|
|
8
|
+
roleArn: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
10
|
+
bucket: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>)[], {
|
|
8
12
|
fileKey: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
13
|
folderKey: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
14
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"move-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/move-file.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"move-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/move-file.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;EAgDnB,CAAC"}
|