@activepieces/piece-amazon-secrets-manager 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # pieces-amazon-secrets-manager
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build pieces-amazon-secrets-manager` to build the library.
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@activepieces/piece-amazon-secrets-manager",
3
+ "version": "0.0.1",
4
+ "type": "commonjs",
5
+ "main": "./src/index.js",
6
+ "types": "./src/index.d.ts",
7
+ "dependencies": {
8
+ "@aws-sdk/client-secrets-manager": "3.989.0",
9
+ "@sinclair/typebox": "0.34.11",
10
+ "ai": "^6.0.0",
11
+ "deepmerge-ts": "7.1.0",
12
+ "nanoid": "3.3.8",
13
+ "semver": "7.6.0",
14
+ "socket.io-client": "4.8.1",
15
+ "tslib": "^2.3.0",
16
+ "@activepieces/pieces-framework": "0.25.3",
17
+ "@activepieces/shared": "0.36.0"
18
+ },
19
+ "resolutions": {
20
+ "rollup": "npm:@rollup/wasm-node"
21
+ }
22
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export declare const amazonSecretsManager: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>>;
package/src/index.js ADDED
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.amazonSecretsManager = void 0;
4
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
5
+ const auth_1 = require("./lib/common/auth");
6
+ const get_secret_value_1 = require("./lib/actions/get-secret-value");
7
+ const update_secret_1 = require("./lib/actions/update-secret");
8
+ const create_secret_1 = require("./lib/actions/create-secret");
9
+ const delete_secret_1 = require("./lib/actions/delete-secret");
10
+ const find_secret_1 = require("./lib/actions/find-secret");
11
+ const get_a_random_password_1 = require("./lib/actions/get-a-random-password");
12
+ const shared_1 = require("@activepieces/shared");
13
+ exports.amazonSecretsManager = (0, pieces_framework_1.createPiece)({
14
+ displayName: 'AWS Secrets Manager',
15
+ auth: auth_1.awsSecretsManagerAuth,
16
+ minimumSupportedRelease: '0.36.1',
17
+ logoUrl: 'https://cdn.activepieces.com/pieces/amazon-secrets-manager.png',
18
+ authors: ['sanket-a11y'],
19
+ categories: [shared_1.PieceCategory.DEVELOPER_TOOLS],
20
+ actions: [
21
+ create_secret_1.createSecret,
22
+ get_secret_value_1.getSecretValue,
23
+ update_secret_1.updateSecret,
24
+ delete_secret_1.deleteSecret,
25
+ find_secret_1.findSecret,
26
+ get_a_random_password_1.getARandomPassword,
27
+ ],
28
+ triggers: [],
29
+ });
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/amazon-secrets-manager/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAA6D;AAC7D,4CAA0D;AAC1D,qEAAgE;AAChE,+DAA2D;AAC3D,+DAA2D;AAC3D,+DAA2D;AAC3D,2DAAuD;AACvD,+EAAyE;AACzE,iDAAqD;AAExC,QAAA,oBAAoB,GAAG,IAAA,8BAAW,EAAC;IAC9C,WAAW,EAAE,qBAAqB;IAClC,IAAI,EAAE,4BAAqB;IAC3B,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,gEAAgE;IACzE,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,UAAU,EAAE,CAAC,sBAAa,CAAC,eAAe,CAAC;IAC3C,OAAO,EAAE;QACP,4BAAY;QACZ,iCAAc;QACd,4BAAY;QACZ,4BAAY;QACZ,wBAAU;QACV,0CAAkB;KACnB;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const createSecret: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>, {
6
+ name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ secretValue: import("@activepieces/pieces-framework").LongTextProperty<true>;
8
+ description: import("@activepieces/pieces-framework").LongTextProperty<false>;
9
+ tags: import("@activepieces/pieces-framework").ArrayProperty<true> | import("@activepieces/pieces-framework").ArrayProperty<false>;
10
+ }>;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createSecret = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
7
+ const auth_1 = require("../common/auth");
8
+ exports.createSecret = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.awsSecretsManagerAuth,
10
+ name: 'createSecret',
11
+ displayName: 'Create Secret',
12
+ description: 'Creates a new secret.',
13
+ props: {
14
+ name: pieces_framework_1.Property.ShortText({
15
+ displayName: 'Secret Name',
16
+ description: 'The name of the secret',
17
+ required: true,
18
+ }),
19
+ secretValue: pieces_framework_1.Property.LongText({
20
+ displayName: 'Secret Value',
21
+ description: 'The secret value (text)',
22
+ required: true,
23
+ }),
24
+ description: pieces_framework_1.Property.LongText({
25
+ displayName: 'Description',
26
+ description: 'A description of the secret (optional)',
27
+ required: false,
28
+ }),
29
+ tags: pieces_framework_1.Property.Array({
30
+ displayName: 'Tags',
31
+ description: 'Tags',
32
+ required: false,
33
+ properties: {
34
+ key: pieces_framework_1.Property.ShortText({
35
+ displayName: 'Tag Key',
36
+ description: 'The key of the tag',
37
+ required: true,
38
+ }),
39
+ value: pieces_framework_1.Property.ShortText({
40
+ displayName: 'Tag Value',
41
+ description: 'The value of the tag',
42
+ required: true,
43
+ }),
44
+ },
45
+ }),
46
+ },
47
+ run(_a) {
48
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
49
+ var _b, _c;
50
+ const client = new client_secrets_manager_1.SecretsManagerClient({
51
+ region: auth.props.region,
52
+ credentials: {
53
+ accessKeyId: auth.props.accessKeyId,
54
+ secretAccessKey: auth.props.secretAccessKey,
55
+ },
56
+ });
57
+ try {
58
+ const command = new client_secrets_manager_1.CreateSecretCommand({
59
+ Name: propsValue.name,
60
+ SecretString: propsValue.secretValue,
61
+ Description: propsValue.description,
62
+ Tags: (_b = propsValue.tags) === null || _b === void 0 ? void 0 : _b.map((tag) => ({
63
+ Key: tag.key,
64
+ Value: tag.value,
65
+ })),
66
+ });
67
+ const response = yield client.send(command);
68
+ return response;
69
+ }
70
+ catch (error) {
71
+ throw new Error(`Failed to create secret: ${(_c = error.message) !== null && _c !== void 0 ? _c : 'Unknown error'}`);
72
+ }
73
+ });
74
+ },
75
+ });
76
+ //# sourceMappingURL=create-secret.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-secret.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/amazon-secrets-manager/src/lib/actions/create-secret.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,4EAIyC;AACzC,yCAAuD;AAE1C,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,4BAAqB;IAC3B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,uBAAuB;IACpC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,wBAAwB;YACrC,QAAQ,EAAE,IAAI;SACf,C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Q,EAAE,EAAE,CAAC,CAAC;wBACxC,GAAG,EAAE,GAAG,CAAC,GAAG;wBACZ,KAAK,EAAE,GAAG,CAAC,KAAK;qBACjB,CAAC,CAAC;iBACJ,CAAC,CAAC;gBAEH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAE5C,OAAO,QAAQ,CAAC;YAClB,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CACb,4BAA4B,MAAA,KAAK,CAAC,OAAO,mCAAI,eAAe,EAAE,CAC/D,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const deleteSecret: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>, {
6
+ secretId: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
10
+ }>>;
11
+ recoveryWindowInDays: import("@activepieces/pieces-framework").NumberProperty<false>;
12
+ forceDeleteWithoutRecovery: import("@activepieces/pieces-framework").CheckboxProperty<false>;
13
+ }>;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteSecret = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
7
+ const auth_1 = require("../common/auth");
8
+ const props_1 = require("../common/props");
9
+ exports.deleteSecret = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.awsSecretsManagerAuth,
11
+ name: 'deleteSecret',
12
+ displayName: 'Delete Secret',
13
+ description: 'Deletes an existing secret.',
14
+ props: {
15
+ secretId: props_1.secretIdDropdown,
16
+ recoveryWindowInDays: pieces_framework_1.Property.Number({
17
+ displayName: 'Recovery Window (days)',
18
+ description: 'The number of days before the secret is permanently deleted (7-30, default 30). Set to 0 for immediate deletion.',
19
+ required: false,
20
+ }),
21
+ forceDeleteWithoutRecovery: pieces_framework_1.Property.Checkbox({
22
+ displayName: 'Force Delete Without Recovery',
23
+ description: 'If enabled, the secret is deleted immediately without a recovery window',
24
+ required: false,
25
+ }),
26
+ },
27
+ run(_a) {
28
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
29
+ var _b;
30
+ const client = new client_secrets_manager_1.SecretsManagerClient({
31
+ region: auth.props.region,
32
+ credentials: {
33
+ accessKeyId: auth.props.accessKeyId,
34
+ secretAccessKey: auth.props.secretAccessKey,
35
+ },
36
+ });
37
+ try {
38
+ const command = new client_secrets_manager_1.DeleteSecretCommand({
39
+ SecretId: propsValue.secretId,
40
+ RecoveryWindowInDays: propsValue.recoveryWindowInDays,
41
+ ForceDeleteWithoutRecovery: propsValue.forceDeleteWithoutRecovery,
42
+ });
43
+ const response = yield client.send(command);
44
+ return response;
45
+ }
46
+ catch (error) {
47
+ throw new Error(`Failed to delete secret: ${(_b = error.message) !== null && _b !== void 0 ? _b : 'Unknown error'}`);
48
+ }
49
+ });
50
+ },
51
+ });
52
+ //# sourceMappingURL=delete-secret.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-secret.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/amazon-secrets-manager/src/lib/actions/delete-secret.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,4EAGyC;AACzC,yCAAuD;AACvD,2CAAmD;AAEtC,QAAA,YA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CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const findSecret: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>, {
6
+ filterKey: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
+ filterValue: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
+ maxResults: import("@activepieces/pieces-framework").NumberProperty<false>;
9
+ sortBy: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
10
+ sortOrder: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
11
+ }>;
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findSecret = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
7
+ const auth_1 = require("../common/auth");
8
+ exports.findSecret = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.awsSecretsManagerAuth,
10
+ name: 'findSecret',
11
+ displayName: 'Find Secret',
12
+ description: 'Finds an existing secret using filters.',
13
+ props: {
14
+ filterKey: pieces_framework_1.Property.StaticDropdown({
15
+ displayName: 'Filter Key',
16
+ description: 'The field to filter by',
17
+ required: true,
18
+ options: {
19
+ options: [
20
+ { label: 'Name', value: 'name' },
21
+ { label: 'Description', value: 'description' },
22
+ { label: 'Tag Key', value: 'tag-key' },
23
+ { label: 'Tag Value', value: 'tag-value' },
24
+ { label: 'Primary Region', value: 'primary-region' },
25
+ { label: 'Owning Service', value: 'owning-service' },
26
+ { label: 'All', value: 'all' },
27
+ ],
28
+ },
29
+ }),
30
+ filterValue: pieces_framework_1.Property.ShortText({
31
+ displayName: 'Filter Value',
32
+ description: 'The value to search for',
33
+ required: true,
34
+ }),
35
+ maxResults: pieces_framework_1.Property.Number({
36
+ displayName: 'Max Results',
37
+ description: 'Maximum number of results to return (1-100)',
38
+ required: false,
39
+ }),
40
+ sortBy: pieces_framework_1.Property.StaticDropdown({
41
+ displayName: 'Sort By',
42
+ description: 'Sort results by',
43
+ required: false,
44
+ options: {
45
+ options: [
46
+ { label: 'Created Date', value: 'created-date' },
47
+ { label: 'Last Accessed Date', value: 'last-accessed-date' },
48
+ { label: 'Last Changed Date', value: 'last-changed-date' },
49
+ { label: 'Name', value: 'name' },
50
+ ],
51
+ },
52
+ }),
53
+ sortOrder: pieces_framework_1.Property.StaticDropdown({
54
+ displayName: 'Sort Order',
55
+ description: 'Sort order for results',
56
+ required: false,
57
+ options: {
58
+ options: [
59
+ { label: 'Ascending', value: 'asc' },
60
+ { label: 'Descending', value: 'desc' },
61
+ ],
62
+ },
63
+ }),
64
+ },
65
+ run(_a) {
66
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
67
+ var _b;
68
+ const client = new client_secrets_manager_1.SecretsManagerClient({
69
+ region: auth.props.region,
70
+ credentials: {
71
+ accessKeyId: auth.props.accessKeyId,
72
+ secretAccessKey: auth.props.secretAccessKey,
73
+ },
74
+ });
75
+ try {
76
+ const command = new client_secrets_manager_1.ListSecretsCommand({
77
+ Filters: [
78
+ {
79
+ Key: propsValue.filterKey,
80
+ Values: [propsValue.filterValue],
81
+ },
82
+ ],
83
+ MaxResults: propsValue.maxResults,
84
+ SortBy: propsValue.sortBy,
85
+ SortOrder: propsValue.sortOrder,
86
+ });
87
+ const response = yield client.send(command);
88
+ return response;
89
+ }
90
+ catch (error) {
91
+ throw new Error(`Failed to find secret: ${(_b = error.message) !== null && _b !== void 0 ? _b : 'Unknown error'}`);
92
+ }
93
+ });
94
+ },
95
+ });
96
+ //# sourceMappingURL=find-secret.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-secret.js","sourceRoot":"","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AS,EAAE,UAAU,CAAC,SAAgB;iBACvC,CAAC,CAAC;gBAEH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAE5C,OAAO,QAAQ,CAAC;YAClB,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CACb,0BAA0B,MAAA,KAAK,CAAC,OAAO,mCAAI,eAAe,EAAE,CAC7D,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare const getARandomPassword: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>, {
6
+ passwordLength: import("@activepieces/pieces-framework").NumberProperty<false>;
7
+ excludeCharacters: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ excludeNumbers: import("@activepieces/pieces-framework").CheckboxProperty<false>;
9
+ excludePunctuation: import("@activepieces/pieces-framework").CheckboxProperty<false>;
10
+ excludeUppercase: import("@activepieces/pieces-framework").CheckboxProperty<false>;
11
+ excludeLowercase: import("@activepieces/pieces-framework").CheckboxProperty<false>;
12
+ includeSpace: import("@activepieces/pieces-framework").CheckboxProperty<false>;
13
+ requireEachIncludedType: import("@activepieces/pieces-framework").CheckboxProperty<false>;
14
+ }>;
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getARandomPassword = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
7
+ const auth_1 = require("../common/auth");
8
+ exports.getARandomPassword = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.awsSecretsManagerAuth,
10
+ name: 'getARandomPassword',
11
+ displayName: 'Generate Random Password',
12
+ description: 'Generates a random password using AWS Secrets Manager.',
13
+ props: {
14
+ passwordLength: pieces_framework_1.Property.Number({
15
+ displayName: 'Password Length',
16
+ description: 'The length of the password (default: 32)',
17
+ required: false,
18
+ }),
19
+ excludeCharacters: pieces_framework_1.Property.ShortText({
20
+ displayName: 'Exclude Characters',
21
+ description: 'Characters to exclude from the password',
22
+ required: false,
23
+ }),
24
+ excludeNumbers: pieces_framework_1.Property.Checkbox({
25
+ displayName: 'Exclude Numbers',
26
+ description: 'Exclude numbers from the password',
27
+ required: false,
28
+ }),
29
+ excludePunctuation: pieces_framework_1.Property.Checkbox({
30
+ displayName: 'Exclude Punctuation',
31
+ description: 'Exclude punctuation from the password',
32
+ required: false,
33
+ }),
34
+ excludeUppercase: pieces_framework_1.Property.Checkbox({
35
+ displayName: 'Exclude Uppercase',
36
+ description: 'Exclude uppercase letters from the password',
37
+ required: false,
38
+ }),
39
+ excludeLowercase: pieces_framework_1.Property.Checkbox({
40
+ displayName: 'Exclude Lowercase',
41
+ description: 'Exclude lowercase letters from the password',
42
+ required: false,
43
+ }),
44
+ includeSpace: pieces_framework_1.Property.Checkbox({
45
+ displayName: 'Include Space',
46
+ description: 'Include space character in the password',
47
+ required: false,
48
+ }),
49
+ requireEachIncludedType: pieces_framework_1.Property.Checkbox({
50
+ displayName: 'Require Each Included Type',
51
+ description: 'Require at least one of each included character type',
52
+ required: false,
53
+ }),
54
+ },
55
+ run(_a) {
56
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
57
+ var _b;
58
+ const client = new client_secrets_manager_1.SecretsManagerClient({
59
+ region: auth.props.region,
60
+ credentials: {
61
+ accessKeyId: auth.props.accessKeyId,
62
+ secretAccessKey: auth.props.secretAccessKey,
63
+ },
64
+ });
65
+ try {
66
+ const command = new client_secrets_manager_1.GetRandomPasswordCommand({
67
+ PasswordLength: propsValue.passwordLength,
68
+ ExcludeCharacters: propsValue.excludeCharacters,
69
+ ExcludeNumbers: propsValue.excludeNumbers,
70
+ ExcludePunctuation: propsValue.excludePunctuation,
71
+ ExcludeUppercase: propsValue.excludeUppercase,
72
+ ExcludeLowercase: propsValue.excludeLowercase,
73
+ IncludeSpace: propsValue.includeSpace,
74
+ RequireEachIncludedType: propsValue.requireEachIncludedType,
75
+ });
76
+ const response = yield client.send(command);
77
+ return response;
78
+ }
79
+ catch (error) {
80
+ throw new Error(`Failed to generate random password: ${(_b = error.message) !== null && _b !== void 0 ? _b : 'Unknown error'}`);
81
+ }
82
+ });
83
+ },
84
+ });
85
+ //# sourceMappingURL=get-a-random-password.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-a-random-password.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/amazon-secrets-manager/src/lib/actions/get-a-random-password.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,4EAGyC;AACzC,yCAAuD;AAE1C,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,4BAAqB;IAC3B,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,wDAAwD;IACrE,KAAK,EAAE;QACL,cAAc,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC9B,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACpC,WAAW,EAAE,oBAAoB;YACjC,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAChC,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,kBAAkB,EAAE,2BAAQ,CAAC,QAA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U,CAAC,gBAAgB;oBAC7C,YAAY,EAAE,UAAU,CAAC,YAAY;oBACrC,uBAAuB,EAAE,UAAU,CAAC,uBAAuB;iBAC5D,CAAC,CAAC;gBAEH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAE5C,OAAO,QAAQ,CAAC;YAClB,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CACb,uCACE,MAAA,KAAK,CAAC,OAAO,mCAAI,eACnB,EAAE,CACH,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const getSecretValue: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>, {
6
+ secretId: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
10
+ }>>;
11
+ versionId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
12
+ versionStage: import("@activepieces/pieces-framework").ShortTextProperty<false>;
13
+ }>;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSecretValue = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
7
+ const auth_1 = require("../common/auth");
8
+ const props_1 = require("../common/props");
9
+ exports.getSecretValue = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.awsSecretsManagerAuth,
11
+ name: 'getSecretValue',
12
+ displayName: 'Get Secret Value',
13
+ description: 'Retrieves a secret value.',
14
+ props: {
15
+ secretId: props_1.secretIdDropdown,
16
+ versionId: pieces_framework_1.Property.ShortText({
17
+ displayName: 'Version ID',
18
+ description: 'The unique identifier of the version (optional)',
19
+ required: false,
20
+ }),
21
+ versionStage: pieces_framework_1.Property.ShortText({
22
+ displayName: 'Version Stage',
23
+ description: 'The staging label to retrieve (defaults to AWSCURRENT)',
24
+ required: false,
25
+ }),
26
+ },
27
+ run(_a) {
28
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
29
+ var _b;
30
+ const client = new client_secrets_manager_1.SecretsManagerClient({
31
+ region: auth.props.region,
32
+ credentials: {
33
+ accessKeyId: auth.props.accessKeyId,
34
+ secretAccessKey: auth.props.secretAccessKey,
35
+ },
36
+ });
37
+ try {
38
+ const command = new client_secrets_manager_1.GetSecretValueCommand({
39
+ SecretId: propsValue.secretId,
40
+ VersionId: propsValue.versionId,
41
+ VersionStage: propsValue.versionStage,
42
+ });
43
+ const response = yield client.send(command);
44
+ return response;
45
+ }
46
+ catch (error) {
47
+ throw new Error(`Failed to retrieve secret: ${(_b = error.message) !== null && _b !== void 0 ? _b : 'Unknown error'}`);
48
+ }
49
+ });
50
+ },
51
+ });
52
+ //# sourceMappingURL=get-secret-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-secret-value.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/amazon-secrets-manager/src/lib/actions/get-secret-value.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,4EAGyC;AACzC,yCAAuD;AACvD,2CAAmD;AAEtC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,4BAAqB;IAC3B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,2BAA2B;IACxC,KAAK,EAAE;QACL,QAAQ,EAAE,wBAAgB;QAC1B,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,wDAAwD;YACrE,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;;YAC5B,MAAM,MAAM,GAAG,IAAI,6CAAoB,CAAC;gBACtC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;gBACzB,WAAW,EAAE;oBACX,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;oBACnC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe;iBAC5C;aACF,CAAC,CAAC;YAEH,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,IAAI,8CAAqB,CAAC;oBACxC,QAAQ,EAAE,UAAU,CAAC,QAAQ;oBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;oBAC/B,YAAY,EAAE,UAAU,CAAC,YAAY;iBACtC,CAAC,CAAC;gBAEH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAE5C,OAAO,QAAQ,CAAC;YAClB,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CACb,8BAA8B,MAAA,KAAK,CAAC,OAAO,mCAAI,eAAe,EAAE,CACjE,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare const updateSecret: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>, {
6
+ secretId: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
10
+ }>>;
11
+ secretValue: import("@activepieces/pieces-framework").LongTextProperty<true>;
12
+ description: import("@activepieces/pieces-framework").LongTextProperty<false>;
13
+ clientRequestToken: import("@activepieces/pieces-framework").ShortTextProperty<false>;
14
+ }>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateSecret = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
7
+ const auth_1 = require("../common/auth");
8
+ const props_1 = require("../common/props");
9
+ exports.updateSecret = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.awsSecretsManagerAuth,
11
+ name: 'updateSecret',
12
+ displayName: 'Update Secret',
13
+ description: 'Updates an existing secret.',
14
+ props: {
15
+ secretId: props_1.secretIdDropdown,
16
+ secretValue: pieces_framework_1.Property.LongText({
17
+ displayName: 'Secret Value',
18
+ description: 'The new secret value (text)',
19
+ required: true,
20
+ }),
21
+ description: pieces_framework_1.Property.LongText({
22
+ displayName: 'Description',
23
+ description: 'Updated description of the secret (optional)',
24
+ required: false,
25
+ }),
26
+ clientRequestToken: pieces_framework_1.Property.ShortText({
27
+ displayName: 'Client Request Token',
28
+ description: 'A unique token to ensure idempotency (optional)',
29
+ required: false,
30
+ }),
31
+ },
32
+ run(_a) {
33
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
34
+ var _b;
35
+ const client = new client_secrets_manager_1.SecretsManagerClient({
36
+ region: auth.props.region,
37
+ credentials: {
38
+ accessKeyId: auth.props.accessKeyId,
39
+ secretAccessKey: auth.props.secretAccessKey,
40
+ },
41
+ });
42
+ try {
43
+ const command = new client_secrets_manager_1.UpdateSecretCommand({
44
+ SecretId: propsValue.secretId,
45
+ SecretString: propsValue.secretValue,
46
+ Description: propsValue.description,
47
+ ClientRequestToken: propsValue.clientRequestToken,
48
+ });
49
+ const response = yield client.send(command);
50
+ return response;
51
+ }
52
+ catch (error) {
53
+ throw new Error(`Failed to update secret: ${(_b = error.message) !== null && _b !== void 0 ? _b : 'Unknown error'}`);
54
+ }
55
+ });
56
+ },
57
+ });
58
+ //# sourceMappingURL=update-secret.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-secret.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/amazon-secrets-manager/src/lib/actions/update-secret.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,4EAGyC;AACzC,yCAAuD;AACvD,2CAAmD;AAEtC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,4BAAqB;IAC3B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,QAAQ,EAAE,wBAAgB;QAC1B,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,kBAAkB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrC,WAAW,EAAE,sBAAsB;YACnC,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;;YAC5B,MAAM,MAAM,GAAG,IAAI,6CAAoB,CAAC;gBACtC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;gBACzB,WAAW,EAAE;oBACX,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;oBACnC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe;iBAC5C;aACF,CAAC,CAAC;YAEH,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,IAAI,4CAAmB,CAAC;oBACtC,QAAQ,EAAE,UAAU,CAAC,QAAQ;oBAC7B,YAAY,EAAE,UAAU,CAAC,WAAW;oBACpC,WAAW,EAAE,UAAU,CAAC,WAAW;oBACnC,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;iBAClD,CAAC,CAAC;gBAEH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAE5C,OAAO,QAAQ,CAAC;YAClB,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CACb,4BAA4B,MAAA,KAAK,CAAC,OAAO,mCAAI,eAAe,EAAE,CAC/D,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const awsSecretsManagerAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>;
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.awsSecretsManagerAuth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
7
+ exports.awsSecretsManagerAuth = pieces_framework_1.PieceAuth.CustomAuth({
8
+ description: '',
9
+ props: {
10
+ accessKeyId: pieces_framework_1.PieceAuth.SecretText({
11
+ displayName: 'Access Key ID',
12
+ required: true,
13
+ }),
14
+ secretAccessKey: pieces_framework_1.PieceAuth.SecretText({
15
+ displayName: 'Secret Access Key',
16
+ required: true,
17
+ }),
18
+ region: pieces_framework_1.Property.StaticDropdown({
19
+ displayName: 'Region',
20
+ options: {
21
+ options: [
22
+ {
23
+ label: 'Default',
24
+ value: 'us-east-1',
25
+ },
26
+ {
27
+ label: 'US East (N. Virginia) [us-east-1]',
28
+ value: 'us-east-1',
29
+ },
30
+ {
31
+ label: 'US East (Ohio) [us-east-2]',
32
+ value: 'us-east-2',
33
+ },
34
+ {
35
+ label: 'US West (N. California) [us-west-1]',
36
+ value: 'us-west-1',
37
+ },
38
+ {
39
+ label: 'US West (Oregon) [us-west-2]',
40
+ value: 'us-west-2',
41
+ },
42
+ {
43
+ label: 'Africa (Cape Town) [af-south-1]',
44
+ value: 'af-south-1',
45
+ },
46
+ {
47
+ label: 'Asia Pacific (Hong Kong) [ap-east-1]',
48
+ value: 'ap-east-1',
49
+ },
50
+ {
51
+ label: 'Asia Pacific (Mumbai) [ap-south-1]',
52
+ value: 'ap-south-1',
53
+ },
54
+ {
55
+ label: 'Asia Pacific (Osaka-Local) [ap-northeast-3]',
56
+ value: 'ap-northeast-3',
57
+ },
58
+ {
59
+ label: 'Asia Pacific (Seoul) [ap-northeast-2]',
60
+ value: 'ap-northeast-2',
61
+ },
62
+ {
63
+ label: 'Asia Pacific (Singapore) [ap-southeast-1]',
64
+ value: 'ap-southeast-1',
65
+ },
66
+ {
67
+ label: 'Asia Pacific (Sydney) [ap-southeast-2]',
68
+ value: 'ap-southeast-2',
69
+ },
70
+ {
71
+ label: 'Asia Pacific (Tokyo) [ap-northeast-1]',
72
+ value: 'ap-northeast-1',
73
+ },
74
+ {
75
+ label: 'Canada (Central) [ca-central-1]',
76
+ value: 'ca-central-1',
77
+ },
78
+ {
79
+ label: 'Europe (Frankfurt) [eu-central-1]',
80
+ value: 'eu-central-1',
81
+ },
82
+ {
83
+ label: 'Europe (Ireland) [eu-west-1]',
84
+ value: 'eu-west-1',
85
+ },
86
+ {
87
+ label: 'Europe (London) [eu-west-2]',
88
+ value: 'eu-west-2',
89
+ },
90
+ {
91
+ label: 'Europe (Milan) [eu-south-1]',
92
+ value: 'eu-south-1',
93
+ },
94
+ {
95
+ label: 'Europe (Paris) [eu-west-3]',
96
+ value: 'eu-west-3',
97
+ },
98
+ {
99
+ label: 'Europe (Stockholm) [eu-north-1]',
100
+ value: 'eu-north-1',
101
+ },
102
+ {
103
+ label: 'Middle East (Bahrain) [me-south-1]',
104
+ value: 'me-south-1',
105
+ },
106
+ {
107
+ label: 'South America (São Paulo) [sa-east-1]',
108
+ value: 'sa-east-1',
109
+ },
110
+ {
111
+ label: 'Europe (Spain) [eu-south-2]',
112
+ value: 'eu-south-2',
113
+ },
114
+ {
115
+ label: 'Asia Pacific (Hyderabad) [ap-south-2]',
116
+ value: 'ap-south-2',
117
+ },
118
+ {
119
+ label: 'Asia Pacific (Jakarta) [ap-southeast-3]',
120
+ value: 'ap-southeast-3',
121
+ },
122
+ {
123
+ label: 'Asia Pacific (Melbourne) [ap-southeast-4]',
124
+ value: 'ap-southeast-4',
125
+ },
126
+ {
127
+ label: 'China (Beijing) [cn-north-1]',
128
+ value: 'cn-north-1',
129
+ },
130
+ {
131
+ label: 'China (Ningxia) [cn-northwest-1]',
132
+ value: 'cn-northwest-1',
133
+ },
134
+ {
135
+ label: 'Europe (Zurich) [eu-central-2]',
136
+ value: 'eu-central-2',
137
+ },
138
+ {
139
+ label: 'Middle East (UAE) [me-central-1]',
140
+ value: 'me-central-1',
141
+ },
142
+ ],
143
+ },
144
+ required: true,
145
+ }),
146
+ },
147
+ validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
148
+ var _b, _c;
149
+ try {
150
+ const client = new client_secrets_manager_1.SecretsManagerClient({
151
+ region: auth.region,
152
+ credentials: {
153
+ accessKeyId: auth.accessKeyId,
154
+ secretAccessKey: auth.secretAccessKey,
155
+ },
156
+ });
157
+ yield client.send(new client_secrets_manager_1.ListSecretsCommand({ MaxResults: 1 }));
158
+ return { valid: true };
159
+ }
160
+ catch (error) {
161
+ return {
162
+ valid: false,
163
+ error: `AWS credential validation failed: ${(_b = error.name) !== null && _b !== void 0 ? _b : 'Unknown error'} - ${(_c = error.message) !== null && _c !== void 0 ? _c : ''}`,
164
+ };
165
+ }
166
+ }),
167
+ required: true,
168
+ });
169
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/amazon-secrets-manager/src/lib/common/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAAqE;AACrE,4EAGyC;AAE5B,QAAA,qBAAqB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACxD,WAAW,EAAE,EAAE;IACf,KAAK,EAAE;QACL,WAAW,EAAE,4BAAS,CAAC,UAAU,CAAC;YAChC,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,eAAe,EAAE,4BAAS,CAAC,UAAU,CAAC;YACpC,WAAW,EAAE,mBAAmB;YAChC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC9B,WAAW,EAAE,QAAQ;YACrB,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,SAAS;wBAChB,KAAK,EAAE,WAAW;qBACnB;oBACD;wBACE,KAAK,EAAE,mCAAmC;wBAC1C,KAAK,EAAE,WAAW;qBACnB;oBACD;wBACE,KAAK,EAAE,4BAA4B;wBACnC,KAAK,EAAE,WAAW;qBACnB;oBACD;wBACE,K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AC;IACH,CAAC,CAAA;IACD,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const secretIdDropdown: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.secretIdDropdown = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
7
+ const auth_1 = require("./auth");
8
+ exports.secretIdDropdown = pieces_framework_1.Property.Dropdown({
9
+ auth: auth_1.awsSecretsManagerAuth,
10
+ displayName: 'Secret ID or ARN',
11
+ description: 'The name or ARN of the secret',
12
+ required: true,
13
+ refreshers: ['auth'],
14
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
15
+ var _b, _c;
16
+ if (!auth) {
17
+ return {
18
+ disabled: true,
19
+ options: [],
20
+ placeholder: 'Connect AWS account first',
21
+ };
22
+ }
23
+ try {
24
+ const client = new client_secrets_manager_1.SecretsManagerClient({
25
+ region: auth.props.region,
26
+ credentials: {
27
+ accessKeyId: auth.props.accessKeyId,
28
+ secretAccessKey: auth.props.secretAccessKey,
29
+ },
30
+ });
31
+ const options = [];
32
+ let nextToken;
33
+ do {
34
+ const response = yield client.send(new client_secrets_manager_1.ListSecretsCommand({ NextToken: nextToken }));
35
+ options.push(...((_b = response.SecretList) !== null && _b !== void 0 ? _b : []).map((secret) => {
36
+ var _a, _b, _c, _d;
37
+ return ({
38
+ label: (_b = (_a = secret.Name) !== null && _a !== void 0 ? _a : secret.ARN) !== null && _b !== void 0 ? _b : '',
39
+ value: (_d = (_c = secret.ARN) !== null && _c !== void 0 ? _c : secret.Name) !== null && _d !== void 0 ? _d : '',
40
+ });
41
+ }));
42
+ nextToken = response.NextToken;
43
+ } while (nextToken);
44
+ return {
45
+ disabled: false,
46
+ options,
47
+ placeholder: 'Select a secret',
48
+ };
49
+ }
50
+ catch (error) {
51
+ return {
52
+ disabled: true,
53
+ options: [],
54
+ placeholder: `Error loading secrets: ${(_c = error.message) !== null && _c !== void 0 ? _c : 'Unknown error'}`,
55
+ };
56
+ }
57
+ }),
58
+ });
59
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/amazon-secrets-manager/src/lib/common/props.ts"],"names":[],"mappings":";;;;AAAA,qEAA0D;AAC1D,4EAGyC;AACzC,iCAA+C;AAElC,QAAA,gBAAgB,GAAG,2BAAQ,CAAC,QAAQ,CAI/C;IACA,IAAI,EAAE,4BAAqB;IAC3B,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,+BAA+B;IAC5C,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;;QACtB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;gBACL,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,2BAA2B;aACzC,CAAC;QACJ,CAAC;QAED,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,6CAAoB,CAAC;gBACtC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;gBACzB,WAAW,EAAE;oBACX,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;oBACnC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe;iBAC5C;aACF,CAAC,CAAC;YAEH,MAAM,OAAO,GAA4C,EAAE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