@activepieces/piece-amazon-s3 0.5.4 → 0.5.6
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 +112 -22
- package/src/i18n/translation.json +4 -0
- package/src/index.d.ts +1 -7
- package/src/index.d.ts.map +1 -0
- package/src/index.js +3 -172
- package/src/index.js.map +1 -1
- package/src/lib/actions/decrypt-pgp-file.d.ts +3 -0
- package/src/lib/actions/decrypt-pgp-file.d.ts.map +1 -0
- package/src/lib/actions/decrypt-pgp-file.js +17 -4
- package/src/lib/actions/decrypt-pgp-file.js.map +1 -1
- package/src/lib/actions/delete-file.d.ts +1 -0
- package/src/lib/actions/delete-file.d.ts.map +1 -0
- package/src/lib/actions/delete-file.js +4 -4
- package/src/lib/actions/delete-file.js.map +1 -1
- package/src/lib/actions/generate-signed-url.d.ts +1 -0
- package/src/lib/actions/generate-signed-url.d.ts.map +1 -0
- package/src/lib/actions/generate-signed-url.js +4 -4
- package/src/lib/actions/generate-signed-url.js.map +1 -1
- package/src/lib/actions/list-files.d.ts +1 -0
- package/src/lib/actions/list-files.d.ts.map +1 -0
- package/src/lib/actions/list-files.js +5 -5
- package/src/lib/actions/list-files.js.map +1 -1
- package/src/lib/actions/move-file.d.ts +1 -0
- package/src/lib/actions/move-file.d.ts.map +1 -0
- package/src/lib/actions/move-file.js +6 -6
- package/src/lib/actions/move-file.js.map +1 -1
- package/src/lib/actions/read-file.d.ts +1 -0
- package/src/lib/actions/read-file.d.ts.map +1 -0
- package/src/lib/actions/read-file.js +4 -4
- package/src/lib/actions/read-file.js.map +1 -1
- package/src/lib/actions/upload-file.d.ts +1 -0
- package/src/lib/actions/upload-file.d.ts.map +1 -0
- package/src/lib/actions/upload-file.js +14 -12
- package/src/lib/actions/upload-file.js.map +1 -1
- package/src/lib/auth.d.ts +8 -0
- package/src/lib/auth.d.ts.map +1 -0
- package/src/lib/auth.js +190 -0
- package/src/lib/auth.js.map +1 -0
- package/src/lib/common.d.ts +1 -0
- package/src/lib/common.d.ts.map +1 -0
- package/src/lib/common.js.map +1 -1
- package/src/lib/triggers/new-file.d.ts +5 -4
- package/src/lib/triggers/new-file.d.ts.map +1 -0
- package/src/lib/triggers/new-file.js +2 -2
- package/src/lib/triggers/new-file.js.map +1 -1
- package/README.md +0 -7
package/package.json
CHANGED
|
@@ -1,32 +1,122 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-amazon-s3",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
|
+
"main": "./src/index.js",
|
|
5
|
+
"types": "./src/index.d.ts",
|
|
4
6
|
"dependencies": {
|
|
5
7
|
"@aws-sdk/client-s3": "3.974.0",
|
|
6
|
-
"@aws-sdk/client-secrets-manager": "
|
|
8
|
+
"@aws-sdk/client-secrets-manager": "3.997.0",
|
|
7
9
|
"@aws-sdk/s3-request-presigner": "3.894.0",
|
|
8
|
-
"@sinclair/typebox": "0.34.11",
|
|
9
|
-
"ai": "^6.0.0",
|
|
10
|
-
"axios": "1.13.5",
|
|
11
|
-
"axios-retry": "4.4.1",
|
|
12
10
|
"dayjs": "1.11.9",
|
|
13
|
-
"deepmerge-ts": "7.1.0",
|
|
14
|
-
"form-data": "4.0.4",
|
|
15
11
|
"mime-types": "2.1.35",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"@
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"
|
|
12
|
+
"openpgp": "6.3.0",
|
|
13
|
+
"tslib": "2.6.2",
|
|
14
|
+
"@aws-crypto/sha1-browser": "5.2.0",
|
|
15
|
+
"@aws-crypto/sha256-browser": "5.2.0",
|
|
16
|
+
"@aws-crypto/sha256-js": "5.2.0",
|
|
17
|
+
"@aws-sdk/core": "3.973.24",
|
|
18
|
+
"@aws-sdk/credential-provider-node": "3.972.25",
|
|
19
|
+
"@aws-sdk/middleware-bucket-endpoint": "3.972.8",
|
|
20
|
+
"@aws-sdk/middleware-expect-continue": "3.972.8",
|
|
21
|
+
"@aws-sdk/middleware-flexible-checksums": "3.974.4",
|
|
22
|
+
"@aws-sdk/middleware-host-header": "3.972.8",
|
|
23
|
+
"@aws-sdk/middleware-location-constraint": "3.972.8",
|
|
24
|
+
"@aws-sdk/middleware-logger": "3.972.8",
|
|
25
|
+
"@aws-sdk/middleware-recursion-detection": "3.972.8",
|
|
26
|
+
"@aws-sdk/middleware-sdk-s3": "3.972.25",
|
|
27
|
+
"@aws-sdk/middleware-ssec": "3.972.8",
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.972.25",
|
|
29
|
+
"@aws-sdk/region-config-resolver": "3.972.9",
|
|
30
|
+
"@aws-sdk/signature-v4-multi-region": "3.972.0",
|
|
31
|
+
"@aws-sdk/types": "3.973.6",
|
|
32
|
+
"@aws-sdk/util-endpoints": "3.972.0",
|
|
33
|
+
"@aws-sdk/util-user-agent-browser": "3.972.8",
|
|
34
|
+
"@aws-sdk/util-user-agent-node": "3.973.11",
|
|
35
|
+
"@smithy/config-resolver": "4.4.13",
|
|
36
|
+
"@smithy/core": "3.23.12",
|
|
37
|
+
"@smithy/eventstream-serde-browser": "4.2.12",
|
|
38
|
+
"@smithy/eventstream-serde-config-resolver": "4.3.12",
|
|
39
|
+
"@smithy/eventstream-serde-node": "4.2.12",
|
|
40
|
+
"@smithy/fetch-http-handler": "5.3.15",
|
|
41
|
+
"@smithy/hash-blob-browser": "4.2.13",
|
|
42
|
+
"@smithy/hash-node": "4.2.12",
|
|
43
|
+
"@smithy/hash-stream-node": "4.2.12",
|
|
44
|
+
"@smithy/invalid-dependency": "4.2.12",
|
|
45
|
+
"@smithy/md5-js": "4.2.12",
|
|
46
|
+
"@smithy/middleware-content-length": "4.2.12",
|
|
47
|
+
"@smithy/middleware-endpoint": "4.4.27",
|
|
48
|
+
"@smithy/middleware-retry": "4.4.44",
|
|
49
|
+
"@smithy/middleware-serde": "4.2.15",
|
|
50
|
+
"@smithy/middleware-stack": "4.2.12",
|
|
51
|
+
"@smithy/node-config-provider": "4.3.12",
|
|
52
|
+
"@smithy/node-http-handler": "4.4.14",
|
|
53
|
+
"@smithy/protocol-http": "5.3.8",
|
|
54
|
+
"@smithy/smithy-client": "4.12.7",
|
|
55
|
+
"@smithy/types": "4.13.1",
|
|
56
|
+
"@smithy/url-parser": "4.2.12",
|
|
57
|
+
"@smithy/util-base64": "4.3.2",
|
|
58
|
+
"@smithy/util-body-length-browser": "4.2.2",
|
|
59
|
+
"@smithy/util-body-length-node": "4.2.3",
|
|
60
|
+
"@smithy/util-defaults-mode-browser": "4.3.43",
|
|
61
|
+
"@smithy/util-defaults-mode-node": "4.2.47",
|
|
62
|
+
"@smithy/util-endpoints": "3.3.3",
|
|
63
|
+
"@smithy/util-middleware": "4.2.12",
|
|
64
|
+
"@smithy/util-retry": "4.2.12",
|
|
65
|
+
"@smithy/util-stream": "4.5.20",
|
|
66
|
+
"@smithy/util-utf8": "4.2.2",
|
|
67
|
+
"@smithy/util-waiter": "4.2.13",
|
|
68
|
+
"@aws-sdk/util-format-url": "3.893.0",
|
|
69
|
+
"mime-db": "1.52.0",
|
|
70
|
+
"@aws-crypto/supports-web-crypto": "5.2.0",
|
|
71
|
+
"@aws-crypto/util": "5.2.0",
|
|
72
|
+
"@aws-sdk/util-locate-window": "3.965.5",
|
|
73
|
+
"@aws-sdk/xml-builder": "3.972.15",
|
|
74
|
+
"@smithy/property-provider": "4.2.12",
|
|
75
|
+
"@smithy/signature-v4": "5.3.12",
|
|
76
|
+
"@aws-sdk/credential-provider-env": "3.972.22",
|
|
77
|
+
"@aws-sdk/credential-provider-http": "3.972.24",
|
|
78
|
+
"@aws-sdk/credential-provider-ini": "3.972.24",
|
|
79
|
+
"@aws-sdk/credential-provider-process": "3.972.22",
|
|
80
|
+
"@aws-sdk/credential-provider-sso": "3.972.24",
|
|
81
|
+
"@aws-sdk/credential-provider-web-identity": "3.972.24",
|
|
82
|
+
"@smithy/credential-provider-imds": "4.2.12",
|
|
83
|
+
"@smithy/shared-ini-file-loader": "4.4.7",
|
|
84
|
+
"@aws-sdk/util-arn-parser": "3.972.3",
|
|
85
|
+
"@smithy/util-config-provider": "4.2.2",
|
|
86
|
+
"@aws-crypto/crc32": "5.2.0",
|
|
87
|
+
"@aws-crypto/crc32c": "5.2.0",
|
|
88
|
+
"@aws-sdk/crc64-nvme": "3.972.5",
|
|
89
|
+
"@smithy/is-array-buffer": "4.2.2",
|
|
90
|
+
"@aws/lambda-invoke-store": "0.2.4",
|
|
91
|
+
"bowser": "2.14.1",
|
|
92
|
+
"@smithy/uuid": "1.1.2",
|
|
93
|
+
"@smithy/eventstream-serde-universal": "4.2.12",
|
|
94
|
+
"@smithy/querystring-builder": "4.2.12",
|
|
95
|
+
"@smithy/chunked-blob-reader": "5.2.2",
|
|
96
|
+
"@smithy/chunked-blob-reader-native": "4.2.3",
|
|
97
|
+
"@smithy/util-buffer-from": "4.2.2",
|
|
98
|
+
"@smithy/service-error-classification": "4.2.12",
|
|
99
|
+
"@smithy/abort-controller": "4.2.12",
|
|
100
|
+
"@smithy/querystring-parser": "4.2.12",
|
|
101
|
+
"@smithy/util-hex-encoding": "4.2.2",
|
|
102
|
+
"fast-xml-parser": "5.5.6",
|
|
103
|
+
"@smithy/util-uri-escape": "4.2.2",
|
|
104
|
+
"@aws-sdk/credential-provider-login": "3.972.24",
|
|
105
|
+
"@aws-sdk/nested-clients": "3.996.14",
|
|
106
|
+
"@aws-sdk/token-providers": "3.1015.0",
|
|
107
|
+
"@smithy/eventstream-codec": "4.2.12",
|
|
108
|
+
"fast-xml-builder": "1.1.4",
|
|
109
|
+
"path-expression-matcher": "1.2.0",
|
|
110
|
+
"strnum": "2.2.2",
|
|
111
|
+
"@activepieces/pieces-common": "0.12.1",
|
|
112
|
+
"@activepieces/pieces-framework": "0.26.2",
|
|
113
|
+
"@activepieces/shared": "0.57.0"
|
|
25
114
|
},
|
|
26
|
-
"
|
|
27
|
-
"
|
|
115
|
+
"scripts": {
|
|
116
|
+
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
117
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
28
118
|
},
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
119
|
+
"devDependencies": {
|
|
120
|
+
"@types/mime-types": "2.1.1"
|
|
121
|
+
}
|
|
32
122
|
}
|
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
"Secret ARN": "Secret ARN",
|
|
65
65
|
"Passphrase ARN": "Passphrase ARN",
|
|
66
66
|
"Secrets Manager Region": "Secrets Manager Region",
|
|
67
|
+
"Allow Unauthenticated Messages": "Allow Unauthenticated Messages",
|
|
68
|
+
"Allow Decryption With Signing Keys": "Allow Decryption With Signing Keys",
|
|
67
69
|
"The File Name to use, if not set the API will try to figure out the file name.": "The File Name to use, if not set the API will try to figure out the file name.",
|
|
68
70
|
"Content Type of the uploaded file, if not set the API will try to figure out the content type.": "Content Type of the uploaded file, if not set the API will try to figure out the content type.",
|
|
69
71
|
"The key of the file to read": "The key of the file to read",
|
|
@@ -78,6 +80,8 @@
|
|
|
78
80
|
"The ARN of the secret in AWS Secrets Manager containing the PGP private key": "The ARN of the secret in AWS Secrets Manager containing the PGP private key",
|
|
79
81
|
"Optional ARN of the secret in AWS Secrets Manager containing the passphrase for the private key (if the key is encrypted)": "Optional ARN of the secret in AWS Secrets Manager containing the passphrase for the private key (if the key is encrypted)",
|
|
80
82
|
"The AWS region where the Secrets Manager secret is stored (defaults to S3 region if not provided)": "The AWS region where the Secrets Manager secret is stored (defaults to S3 region if not provided)",
|
|
83
|
+
"Allow decryption of messages without integrity protection (no MDC). WARNING: Without MDC, a malicious actor can silently modify the ciphertext, so the decrypted output may have been tampered with. Only enable this when working with legacy files where integrity protection was never used.": "Allow decryption of messages without integrity protection (no MDC). WARNING: Without MDC, a malicious actor can silently modify the ciphertext, so the decrypted output may have been tampered with. Only enable this when working with legacy files where integrity protection was never used.",
|
|
84
|
+
"Allow decryption using a key not marked for encryption (e.g. a signing-only key). Enable this if your PGP key was not flagged for encryption use.": "Allow decryption using a key not marked for encryption (e.g. a signing-only key). Enable this if your PGP key was not flagged for encryption use.",
|
|
81
85
|
"private": "private",
|
|
82
86
|
"public-read": "public-read",
|
|
83
87
|
"public-read-write": "public-read-write",
|
package/src/index.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
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
1
|
export declare const amazonS3: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
9
2
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
3
|
secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
@@ -12,3 +5,4 @@ export declare const amazonS3: import("@activepieces/pieces-framework").Piece<im
|
|
|
12
5
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
6
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
14
7
|
}>>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,QAAQ;;;;;;GAWnB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.amazonS3 =
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
3
|
+
exports.amazonS3 = void 0;
|
|
5
4
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
5
|
const shared_1 = require("@activepieces/shared");
|
|
7
6
|
const read_file_1 = require("./lib/actions/read-file");
|
|
8
7
|
const upload_file_1 = require("./lib/actions/upload-file");
|
|
9
|
-
const common_1 = require("./lib/common");
|
|
10
8
|
const new_file_1 = require("./lib/triggers/new-file");
|
|
11
9
|
const generate_signed_url_1 = require("./lib/actions/generate-signed-url");
|
|
12
10
|
const move_file_1 = require("./lib/actions/move-file");
|
|
13
11
|
const delete_file_1 = require("./lib/actions/delete-file");
|
|
14
12
|
const list_files_1 = require("./lib/actions/list-files");
|
|
15
13
|
const decrypt_pgp_file_1 = require("./lib/actions/decrypt-pgp-file");
|
|
14
|
+
const auth_1 = require("./lib/auth");
|
|
16
15
|
const description = `
|
|
17
16
|
This piece allows you to upload files to Amazon S3 or other S3 compatible services.
|
|
18
17
|
|
|
@@ -20,174 +19,6 @@ Amazon S3 Settings:
|
|
|
20
19
|
Regions: https://docs.aws.amazon.com/general/latest/gr/s3.html
|
|
21
20
|
Endpoint: leave blank
|
|
22
21
|
`;
|
|
23
|
-
exports.amazonS3Auth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
24
|
-
description: description,
|
|
25
|
-
props: {
|
|
26
|
-
accessKeyId: pieces_framework_1.Property.ShortText({
|
|
27
|
-
displayName: 'Access Key ID',
|
|
28
|
-
required: true,
|
|
29
|
-
}),
|
|
30
|
-
secretAccessKey: pieces_framework_1.PieceAuth.SecretText({
|
|
31
|
-
displayName: 'Secret Access Key',
|
|
32
|
-
required: true,
|
|
33
|
-
}),
|
|
34
|
-
bucket: pieces_framework_1.Property.ShortText({
|
|
35
|
-
displayName: 'Bucket',
|
|
36
|
-
required: true,
|
|
37
|
-
}),
|
|
38
|
-
endpoint: pieces_framework_1.Property.ShortText({
|
|
39
|
-
displayName: 'Endpoint',
|
|
40
|
-
required: false,
|
|
41
|
-
}),
|
|
42
|
-
region: pieces_framework_1.Property.StaticDropdown({
|
|
43
|
-
displayName: 'Region',
|
|
44
|
-
options: {
|
|
45
|
-
options: [
|
|
46
|
-
{
|
|
47
|
-
label: 'Default',
|
|
48
|
-
value: 'us-east-1',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
label: 'US East (N. Virginia) [us-east-1]',
|
|
52
|
-
value: 'us-east-1',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: 'US East (Ohio) [us-east-2]',
|
|
56
|
-
value: 'us-east-2',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
label: 'US West (N. California) [us-west-1]',
|
|
60
|
-
value: 'us-west-1',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
label: 'US West (Oregon) [us-west-2]',
|
|
64
|
-
value: 'us-west-2',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: 'Africa (Cape Town) [af-south-1]',
|
|
68
|
-
value: 'af-south-1',
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
label: 'Asia Pacific (Hong Kong) [ap-east-1]',
|
|
72
|
-
value: 'ap-east-1',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label: 'Asia Pacific (Mumbai) [ap-south-1]',
|
|
76
|
-
value: 'ap-south-1',
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
label: 'Asia Pacific (Osaka-Local) [ap-northeast-3]',
|
|
80
|
-
value: 'ap-northeast-3',
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
label: 'Asia Pacific (Seoul) [ap-northeast-2]',
|
|
84
|
-
value: 'ap-northeast-2',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
label: 'Asia Pacific (Singapore) [ap-southeast-1]',
|
|
88
|
-
value: 'ap-southeast-1',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
label: 'Asia Pacific (Sydney) [ap-southeast-2]',
|
|
92
|
-
value: 'ap-southeast-2',
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
label: 'Asia Pacific (Tokyo) [ap-northeast-1]',
|
|
96
|
-
value: 'ap-northeast-1',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
label: 'Canada (Central) [ca-central-1]',
|
|
100
|
-
value: 'ca-central-1',
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
label: 'Europe (Frankfurt) [eu-central-1]',
|
|
104
|
-
value: 'eu-central-1',
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
label: 'Europe (Ireland) [eu-west-1]',
|
|
108
|
-
value: 'eu-west-1',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
label: 'Europe (London) [eu-west-2]',
|
|
112
|
-
value: 'eu-west-2',
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: 'Europe (Milan) [eu-south-1]',
|
|
116
|
-
value: 'eu-south-1',
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
label: 'Europe (Paris) [eu-west-3]',
|
|
120
|
-
value: 'eu-west-3',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
label: 'Europe (Stockholm) [eu-north-1]',
|
|
124
|
-
value: 'eu-north-1',
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
label: 'Middle East (Bahrain) [me-south-1]',
|
|
128
|
-
value: 'me-south-1',
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
label: 'South America (São Paulo) [sa-east-1]',
|
|
132
|
-
value: 'sa-east-1',
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
label: 'Europe (Spain) [eu-south-2]',
|
|
136
|
-
value: 'eu-south-2',
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
label: 'Asia Pacific (Hyderabad) [ap-south-2]',
|
|
140
|
-
value: 'ap-south-2',
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
label: 'Asia Pacific (Jakarta) [ap-southeast-3]',
|
|
144
|
-
value: 'ap-southeast-3',
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
label: 'Asia Pacific (Melbourne) [ap-southeast-4]',
|
|
148
|
-
value: 'ap-southeast-4',
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
label: 'China (Beijing) [cn-north-1]',
|
|
152
|
-
value: 'cn-north-1',
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
label: 'China (Ningxia) [cn-northwest-1]',
|
|
156
|
-
value: 'cn-northwest-1',
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
label: 'Europe (Zurich) [eu-central-2]',
|
|
160
|
-
value: 'eu-central-2',
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
label: 'Middle East (UAE) [me-central-1]',
|
|
164
|
-
value: 'me-central-1',
|
|
165
|
-
},
|
|
166
|
-
],
|
|
167
|
-
},
|
|
168
|
-
required: true,
|
|
169
|
-
}),
|
|
170
|
-
},
|
|
171
|
-
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
172
|
-
const s3 = (0, common_1.createS3)(auth);
|
|
173
|
-
try {
|
|
174
|
-
yield s3.listObjectsV2({
|
|
175
|
-
Bucket: auth.bucket,
|
|
176
|
-
MaxKeys: 1,
|
|
177
|
-
});
|
|
178
|
-
return {
|
|
179
|
-
valid: true,
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
catch (e) {
|
|
183
|
-
return {
|
|
184
|
-
valid: false,
|
|
185
|
-
error: e === null || e === void 0 ? void 0 : e.message,
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
}),
|
|
189
|
-
required: true,
|
|
190
|
-
});
|
|
191
22
|
exports.amazonS3 = (0, pieces_framework_1.createPiece)({
|
|
192
23
|
displayName: 'Amazon S3',
|
|
193
24
|
description: 'Scalable storage in the cloud',
|
|
@@ -195,7 +26,7 @@ exports.amazonS3 = (0, pieces_framework_1.createPiece)({
|
|
|
195
26
|
minimumSupportedRelease: '0.30.0',
|
|
196
27
|
authors: ["Willianwg", "kishanprmr", "MoShizzle", "AbdulTheActivePiecer", "khaledmashaly", "abuaboud", "Kevinyu-alan"],
|
|
197
28
|
categories: [shared_1.PieceCategory.DEVELOPER_TOOLS],
|
|
198
|
-
auth:
|
|
29
|
+
auth: auth_1.amazonS3Auth,
|
|
199
30
|
actions: [upload_file_1.amazons3UploadFile, read_file_1.readFile, generate_signed_url_1.generateSignedUrl, move_file_1.moveFile, delete_file_1.deleteFile, list_files_1.listFiles, decrypt_pgp_file_1.decryptPgpFile],
|
|
200
31
|
triggers: [new_file_1.newFile],
|
|
201
32
|
});
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qEAIwC;AACxC,iDAAqD;AACrD,uDAAmD;AACnD,2DAA+D;AAE/D,sDAAkD;AAClD,2EAAsE;AACtE,uDAAmD;AACnD,2DAAuD;AACvD,yDAAqD;AACrD,qEAAgE;AAChE,qCAA0C;AAE1C,MAAM,WAAW,GAAG;;;;;;CAMnB,CAAC;AAEW,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,EAAC,YAAY,EAAC,WAAW,EAAC,sBAAsB,EAAC,eAAe,EAAC,UAAU,EAAE,cAAc,CAAC;IACjH,UAAU,EAAE,CAAC,sBAAa,CAAC,eAAe,CAAC;IAC3C,IAAI,EAAE,mBAAY;IAClB,OAAO,EAAE,CAAC,gCAAkB,EAAE,oBAAQ,EAAE,uCAAiB,EAAE,oBAAQ,EAAE,wBAAU,EAAE,sBAAS,EAAE,iCAAc,CAAC;IAC3G,QAAQ,EAAE,CAAC,kBAAO,CAAC;CACpB,CAAC,CAAC"}
|
|
@@ -9,4 +9,7 @@ export declare const decryptPgpFile: import("@activepieces/pieces-framework").IA
|
|
|
9
9
|
secretArn: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
10
|
passphraseArn: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
11
|
secretsManagerRegion: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
+
allowUnauthenticatedMessages: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
13
|
+
allowInsecureDecryptionWithSigningKeys: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
12
14
|
}>;
|
|
15
|
+
//# sourceMappingURL=decrypt-pgp-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decrypt-pgp-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/decrypt-pgp-file.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;;;;;;;EAqNzB,CAAC"}
|
|
@@ -5,10 +5,10 @@ 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
7
|
const openpgp = tslib_1.__importStar(require("openpgp"));
|
|
8
|
-
const
|
|
8
|
+
const auth_1 = require("../auth");
|
|
9
9
|
const common_1 = require("../common");
|
|
10
10
|
exports.decryptPgpFile = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth:
|
|
11
|
+
auth: auth_1.amazonS3Auth,
|
|
12
12
|
name: 'decrypt-pgp-file',
|
|
13
13
|
displayName: 'Decrypt PGP File',
|
|
14
14
|
description: 'Decrypt a PGP encrypted file from S3 using a private key stored in AWS Secrets Manager',
|
|
@@ -33,12 +33,24 @@ exports.decryptPgpFile = (0, pieces_framework_1.createAction)({
|
|
|
33
33
|
description: 'The AWS region where the Secrets Manager secret is stored (defaults to S3 region if not provided)',
|
|
34
34
|
required: false,
|
|
35
35
|
}),
|
|
36
|
+
allowUnauthenticatedMessages: pieces_framework_1.Property.Checkbox({
|
|
37
|
+
displayName: 'Allow Unauthenticated Messages',
|
|
38
|
+
description: 'Allow decryption of messages without integrity protection (no MDC). WARNING: Without MDC, a malicious actor can silently modify the ciphertext, so the decrypted output may have been tampered with. Only enable this when working with legacy files where integrity protection was never used.',
|
|
39
|
+
required: false,
|
|
40
|
+
defaultValue: false,
|
|
41
|
+
}),
|
|
42
|
+
allowInsecureDecryptionWithSigningKeys: pieces_framework_1.Property.Checkbox({
|
|
43
|
+
displayName: 'Allow Decryption With Signing Keys',
|
|
44
|
+
description: 'Allow decryption using a key not marked for encryption (e.g. a signing-only key). Enable this if your PGP key was not flagged for encryption use.',
|
|
45
|
+
required: false,
|
|
46
|
+
defaultValue: false,
|
|
47
|
+
}),
|
|
36
48
|
},
|
|
37
49
|
run(context) {
|
|
38
50
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
39
51
|
var _a, _b;
|
|
40
52
|
const { bucket } = context.auth.props;
|
|
41
|
-
const { key, secretArn, passphraseArn, secretsManagerRegion } = context.propsValue;
|
|
53
|
+
const { key, secretArn, passphraseArn, secretsManagerRegion, allowUnauthenticatedMessages, allowInsecureDecryptionWithSigningKeys } = context.propsValue;
|
|
42
54
|
const { accessKeyId, secretAccessKey, region } = context.auth.props;
|
|
43
55
|
// Create S3 client
|
|
44
56
|
const s3 = (0, common_1.createS3)(context.auth.props);
|
|
@@ -164,7 +176,8 @@ exports.decryptPgpFile = (0, pieces_framework_1.createAction)({
|
|
|
164
176
|
decryptionKeys: privateKey,
|
|
165
177
|
format: 'binary',
|
|
166
178
|
config: {
|
|
167
|
-
allowInsecureDecryptionWithSigningKeys: false,
|
|
179
|
+
allowInsecureDecryptionWithSigningKeys: allowInsecureDecryptionWithSigningKeys !== null && allowInsecureDecryptionWithSigningKeys !== void 0 ? allowInsecureDecryptionWithSigningKeys : false,
|
|
180
|
+
allowUnauthenticatedMessages: allowUnauthenticatedMessages !== null && allowUnauthenticatedMessages !== void 0 ? allowUnauthenticatedMessages : false,
|
|
168
181
|
},
|
|
169
182
|
});
|
|
170
183
|
// Get the decrypted data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decrypt-pgp-file.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"decrypt-pgp-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/decrypt-pgp-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,4EAAwE;AACxE,yDAAmC;AACnC,kCAAuC;AACvC,sCAAiE;AAEpD,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,wFAAwF;IACrG,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,EAAE,gBAAgB;YAC7B,WAAW,EAAE,2HAA2H;YACxI,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,oBAAoB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvC,WAAW,EAAE,wBAAwB;YACrC,WAAW,EAAE,mGAAmG;YAChH,QAAQ,EAAE,KAAK;SAChB,CAAC;Q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;;;;;;;EAyBrB,CAAC"}
|
|
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deleteFile = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
exports.deleteFile = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth:
|
|
9
|
+
auth: auth_1.amazonS3Auth,
|
|
10
10
|
name: 'deleteFile',
|
|
11
11
|
displayName: 'Delete File',
|
|
12
12
|
description: 'Deletes an existing file.',
|
|
13
13
|
props: {
|
|
14
14
|
key: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: '
|
|
16
|
-
description: 'The
|
|
15
|
+
displayName: 'File Path',
|
|
16
|
+
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".',
|
|
17
17
|
required: true,
|
|
18
18
|
}),
|
|
19
19
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-file.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"delete-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,sCAAqC;AAExB,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,2BAA2B;IACxC,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,CAAA;YACrC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEnC,MAAM,EAAE,GAAG,IAAA,iBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAExC,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"}
|
|
@@ -8,3 +8,4 @@ export declare const generateSignedUrl: import("@activepieces/pieces-framework")
|
|
|
8
8
|
key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
9
|
expiresIn: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
10
10
|
}>;
|
|
11
|
+
//# sourceMappingURL=generate-signed-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-signed-url.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-url.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB;;;;;;;;;EAiC5B,CAAC"}
|
|
@@ -4,17 +4,17 @@ 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
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
8
|
const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
|
|
9
9
|
exports.generateSignedUrl = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth:
|
|
10
|
+
auth: auth_1.amazonS3Auth,
|
|
11
11
|
name: 'generate-signed-url',
|
|
12
12
|
displayName: 'Generate signed URL',
|
|
13
13
|
description: 'Generate a signed URL for a file in a s3 bucket',
|
|
14
14
|
props: {
|
|
15
15
|
key: pieces_framework_1.Property.ShortText({
|
|
16
|
-
displayName: '
|
|
17
|
-
description: 'The path
|
|
16
|
+
displayName: 'File Path',
|
|
17
|
+
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".',
|
|
18
18
|
required: true,
|
|
19
19
|
}),
|
|
20
20
|
expiresIn: pieces_framework_1.Property.Number({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-signed-url.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"generate-signed-url.js","sourceRoot":"","sources":["../../../../src/lib/actions/generate-signed-url.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kDAAgE;AAChE,kCAAuC;AACvC,wEAA6D;AAEhD,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,iDAAiD;IAC9D,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,oDAAoD;YACjE,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,EAAE;SACjB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACjB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAC5E,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE9C,MAAM,SAAS,GAAG,MAAM,4BAA4B,CAAC;gBACnD,MAAM;gBACN,MAAM;gBACN,GAAG;gBACH,WAAW;gBACX,eAAe;gBACf,SAAS;aACV,CAAC,CAAC;YAED,OAAO,SAAS,CAAA;QAClB,CAAC;KAAA;CACF,CAAC,CAAC;AAEH,MAAM,4BAA4B,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAO,EAAE,EAAE;IAC5G,MAAM,MAAM,GAAG,IAAI,oBAAQ,CAAC;QAC3B,MAAM;QACN,WAAW,EAAE;YACX,WAAW;YACX,eAAe;SAChB;KACF,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAI,4BAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IACnE,OAAO,IAAA,mCAAY,EAAC,MAAM,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,GAAG,EAAE,EAAE,CAAC,CAAC;AACtE,CAAC,CAAC"}
|
|
@@ -8,3 +8,4 @@ export declare const listFiles: import("@activepieces/pieces-framework").IAction
|
|
|
8
8
|
prefix: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
9
|
maxKeys: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
10
10
|
}>;
|
|
11
|
+
//# sourceMappingURL=list-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-files.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-files.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,SAAS;;;;;;;;;EAqEpB,CAAC"}
|
|
@@ -3,22 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.listFiles = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
exports.listFiles = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth:
|
|
9
|
+
auth: auth_1.amazonS3Auth,
|
|
10
10
|
name: 'list-files',
|
|
11
11
|
displayName: 'List Files',
|
|
12
12
|
description: 'List all files from an S3 bucket folder/prefix.',
|
|
13
13
|
props: {
|
|
14
14
|
prefix: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Folder
|
|
16
|
-
description: '
|
|
15
|
+
displayName: 'Folder Path (Optional)',
|
|
16
|
+
description: 'Filter results to a specific folder. Enter the folder path including the trailing slash (e.g. "invoices/" or "reports/2024/"). Leave empty to list all files in the bucket.',
|
|
17
17
|
required: false,
|
|
18
18
|
}),
|
|
19
19
|
maxKeys: pieces_framework_1.Property.Number({
|
|
20
20
|
displayName: 'Maximum Files',
|
|
21
|
-
description: 'Maximum number of files to return (1
|
|
21
|
+
description: 'Maximum number of files to return (1–1000). Defaults to 1000. Use a lower number if you only need the most recent files.',
|
|
22
22
|
required: false,
|
|
23
23
|
defaultValue: 1000,
|
|
24
24
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-files.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"list-files.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-files.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,sCAAqC;AAiBxB,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,iDAAiD;IAC9D,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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AC,CAAC;oBACL,CAAC;gBACH,CAAC;gBAED,sDAAsD;gBACtD,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,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"}
|
|
@@ -8,3 +8,4 @@ export declare const moveFile: import("@activepieces/pieces-framework").IAction<
|
|
|
8
8
|
fileKey: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
9
|
folderKey: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
10
|
}>;
|
|
11
|
+
//# sourceMappingURL=move-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"move-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/move-file.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;;;;EA0CnB,CAAC"}
|
|
@@ -3,22 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.moveFile = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
exports.moveFile = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth:
|
|
9
|
+
auth: auth_1.amazonS3Auth,
|
|
10
10
|
name: 'moveFile',
|
|
11
11
|
displayName: 'Move File',
|
|
12
12
|
description: 'Move a File to Another Folder',
|
|
13
13
|
props: {
|
|
14
14
|
fileKey: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'File
|
|
16
|
-
description: 'The
|
|
15
|
+
displayName: 'File Path',
|
|
16
|
+
description: 'The full path to the file you want to move (e.g. "old-folder/report.csv").',
|
|
17
17
|
required: true,
|
|
18
18
|
}),
|
|
19
19
|
folderKey: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'Folder
|
|
21
|
-
description: 'The
|
|
20
|
+
displayName: 'Destination Folder',
|
|
21
|
+
description: 'The folder path to move the file into (e.g. "archive/" or "new-folder"). The file name is kept the same.',
|
|
22
22
|
required: true,
|
|
23
23
|
}),
|
|
24
24
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"move-file.js","sourceRoot":"","sources":["
|
|
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,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,4EAA4E;YACzF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,oBAAoB;YACjC,WAAW,EAAE,0GAA0G;YACvH,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,OAAO,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAClD,MAAM,EAAE,GAAG,IAAA,iBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAExC,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YAE1C,MAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,SAAS,CAAC;YAE/E,MAAM,MAAM,GAAG,GAAG,UAAU,IAAI,QAAQ,EAAE,CAAC;YAE3C,MAAM,YAAY,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC;gBACvC,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,MAAM;gBACX,mDAAmD;gBACnD,UAAU,EAAE,kBAAkB,CAAC,GAAG,MAAM,IAAI,OAAO,EAAE,CAAC;aACvD,CAAC,CAAA;YAEF,MAAM,cAAc,GAAG,MAAM,EAAE,CAAC,YAAY,CAAC;gBAC3C,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,OAAO;aACb,CAAC,CAAA;YAEF,OAAO,YAAY,CAAA;QACrB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/read-file.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ;;;;;;;;EA8BnB,CAAC"}
|
|
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.readFile = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
exports.readFile = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth:
|
|
9
|
+
auth: auth_1.amazonS3Auth,
|
|
10
10
|
name: 'read-file',
|
|
11
11
|
displayName: 'Read File',
|
|
12
12
|
description: 'Read a file from S3 to use it in other steps',
|
|
13
13
|
props: {
|
|
14
14
|
key: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: '
|
|
16
|
-
description: 'The
|
|
15
|
+
displayName: 'File Path',
|
|
16
|
+
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".',
|
|
17
17
|
required: true,
|
|
18
18
|
}),
|
|
19
19
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-file.js","sourceRoot":"","sources":["
|
|
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,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"}
|
|
@@ -10,3 +10,4 @@ export declare const amazons3UploadFile: import("@activepieces/pieces-framework"
|
|
|
10
10
|
acl: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
11
11
|
type: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
12
|
}>;
|
|
13
|
+
//# sourceMappingURL=upload-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/upload-file.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB;;;;;;;;;;;EAmG7B,CAAC"}
|
|
@@ -3,55 +3,57 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.amazons3UploadFile = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
const mime_types_1 = tslib_1.__importDefault(require("mime-types"));
|
|
9
9
|
exports.amazons3UploadFile = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth:
|
|
10
|
+
auth: auth_1.amazonS3Auth,
|
|
11
11
|
name: 'upload-file',
|
|
12
12
|
displayName: 'Upload File',
|
|
13
13
|
description: 'Upload an File to S3',
|
|
14
14
|
props: {
|
|
15
15
|
file: pieces_framework_1.Property.File({
|
|
16
16
|
displayName: 'File',
|
|
17
|
+
description: 'The file to upload to S3.',
|
|
17
18
|
required: true,
|
|
18
19
|
}),
|
|
19
20
|
fileName: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'File Name',
|
|
21
|
+
displayName: 'File Name (Optional)',
|
|
21
22
|
required: false,
|
|
22
|
-
description: 'The
|
|
23
|
+
description: 'The name to save the file as in S3 (e.g. "report-2024.csv"). If left blank, a unique name is generated automatically.',
|
|
23
24
|
}),
|
|
24
25
|
acl: pieces_framework_1.Property.StaticDropdown({
|
|
25
|
-
displayName: 'ACL',
|
|
26
|
+
displayName: 'Access Control (ACL)',
|
|
27
|
+
description: 'Who can access this file after upload. Use "Private" for internal files, "Public Read" to make the file publicly accessible via URL.',
|
|
26
28
|
required: false,
|
|
27
29
|
options: {
|
|
28
30
|
options: [
|
|
29
31
|
{
|
|
30
|
-
label: '
|
|
32
|
+
label: 'Private (only your account)',
|
|
31
33
|
value: 'private',
|
|
32
34
|
},
|
|
33
35
|
{
|
|
34
|
-
label: '
|
|
36
|
+
label: 'Public Read (anyone can view)',
|
|
35
37
|
value: 'public-read',
|
|
36
38
|
},
|
|
37
39
|
{
|
|
38
|
-
label: '
|
|
40
|
+
label: 'Public Read/Write (anyone can view and upload)',
|
|
39
41
|
value: 'public-read-write',
|
|
40
42
|
},
|
|
41
43
|
{
|
|
42
|
-
label: '
|
|
44
|
+
label: 'Authenticated AWS Users Read',
|
|
43
45
|
value: 'authenticated-read',
|
|
44
46
|
},
|
|
45
47
|
{
|
|
46
|
-
label: 'aws-exec-read',
|
|
48
|
+
label: 'AWS EC2 Read (aws-exec-read)',
|
|
47
49
|
value: 'aws-exec-read',
|
|
48
50
|
},
|
|
49
51
|
{
|
|
50
|
-
label: '
|
|
52
|
+
label: 'Bucket Owner Read',
|
|
51
53
|
value: 'bucket-owner-read',
|
|
52
54
|
},
|
|
53
55
|
{
|
|
54
|
-
label: '
|
|
56
|
+
label: 'Bucket Owner Full Control',
|
|
55
57
|
value: 'bucket-owner-full-control',
|
|
56
58
|
},
|
|
57
59
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-file.js","sourceRoot":"","sources":["
|
|
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,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,sBAAsB;IACnC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,IAAI,CAAC;YAClB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,uHAAuH;SACrI,CAAC;QACF,GAAG,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC3B,WAAW,EAAE,sBAAsB;YACnC,WAAW,EAAE,sIAAsI;YACnJ,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,6BAA6B;wBACpC,KAAK,EAAE,SAAS;qBACjB;oBACD;wBACE,KAAK,EAAE,+BAA+B;wBACtC,K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I,IAAI,CAAC,oBAAI,CAAC,SAAS,CAAC,IAAc,CAAC,EAAE,CAAC;gBACzC,MAAM,IAAI,KAAK,CAAC,oFAAoF,CAAC,CAAA;YACvG,CAAC;iBAAM,CAAC;gBACN,WAAW,GAAG,IAAI,CAAA;gBAClB,SAAS,GAAG,GAAG,GAAG,oBAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;YACxC,CAAC;YAED,MAAM,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YAExE,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAAqE;AACrE,qCAAoC;AAEpC,MAAM,WAAW,GAAG;;;;;;;;;;CAUnB,CAAC;AAEW,QAAA,YAAY,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC/C,WAAW,EAAE,WAAW;IACxB,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,kFAAkF;YAC/F,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,eAAe,EAAE,4BAAS,CAAC,UAAU,CAAC;YACpC,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,+FAA+F;YAC5G,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,oFAAoF;YACjG,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,6KAA6K;YAC1L,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC9B,WAAW,EAAE,QAAQ;YACrB,OAAO,EAAE;gB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AD,CAAC,CAAY,OAAO;aAC7B,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;IACD,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
package/src/lib/common.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["
|
|
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"}
|
|
@@ -6,7 +6,7 @@ export declare const newFile: import("@activepieces/pieces-framework").ITrigger<
|
|
|
6
6
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
7
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
8
|
}>, {
|
|
9
|
-
markdown: import("
|
|
9
|
+
markdown: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
10
10
|
folderPath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
11
|
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
12
12
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
@@ -15,7 +15,7 @@ export declare const newFile: import("@activepieces/pieces-framework").ITrigger<
|
|
|
15
15
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
16
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
17
17
|
}>, {
|
|
18
|
-
markdown: import("
|
|
18
|
+
markdown: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
19
19
|
folderPath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
20
20
|
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
21
21
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
@@ -24,7 +24,7 @@ export declare const newFile: import("@activepieces/pieces-framework").ITrigger<
|
|
|
24
24
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
25
25
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
26
26
|
}>, {
|
|
27
|
-
markdown: import("
|
|
27
|
+
markdown: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
28
28
|
folderPath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
29
29
|
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
30
30
|
accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
@@ -33,6 +33,7 @@ export declare const newFile: import("@activepieces/pieces-framework").ITrigger<
|
|
|
33
33
|
endpoint: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
34
34
|
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
35
35
|
}>, {
|
|
36
|
-
markdown: import("
|
|
36
|
+
markdown: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
37
37
|
folderPath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
38
38
|
}>;
|
|
39
|
+
//# sourceMappingURL=new-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDlB,CAAC"}
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_framework_2 = require("@activepieces/pieces-framework");
|
|
7
7
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
const
|
|
8
|
+
const auth_1 = require("../auth");
|
|
9
9
|
const common_1 = require("../common");
|
|
10
10
|
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
11
11
|
const shared_1 = require("@activepieces/shared");
|
|
@@ -52,7 +52,7 @@ const polling = {
|
|
|
52
52
|
}),
|
|
53
53
|
};
|
|
54
54
|
exports.newFile = (0, pieces_framework_1.createTrigger)({
|
|
55
|
-
auth:
|
|
55
|
+
auth: auth_1.amazonS3Auth,
|
|
56
56
|
name: 'new_file',
|
|
57
57
|
displayName: 'New or Updated File',
|
|
58
58
|
description: 'Triggers when you add or update a file in your bucket. The bucket/folder you choose must not contain more than 10,000 files.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-file.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"new-file.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-file.ts"],"names":[],"mappings":";;;;AAAA,qEAA4G;AAC5G,qEAAiE;AACjE,+DAAqF;AAErF,kCAAuC;AACvC,sCAAqC;AACrC,0DAA0B;AAE1B,iDAAuD;AAEvD,MAAM,OAAO,GAA6F;IACzG,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE;;QACnD,MAAM,MAAM,GAAG,gBAAgB,KAAK,CAAC,CAAC;QAEtC,MAAM,EAAE,GAAG,IAAA,iBAAQ,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAE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