@divyacon/piece-google-cloud-storage 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.MIT-AP +24 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actions/clone-object.d.ts +9 -0
- package/dist/lib/actions/clone-object.d.ts.map +1 -0
- package/dist/lib/actions/clone-object.js +77 -0
- package/dist/lib/actions/clone-object.js.map +1 -0
- package/dist/lib/actions/create-bucket-acl.d.ts +7 -0
- package/dist/lib/actions/create-bucket-acl.d.ts.map +1 -0
- package/dist/lib/actions/create-bucket-acl.js +60 -0
- package/dist/lib/actions/create-bucket-acl.js.map +1 -0
- package/dist/lib/actions/create-bucket-default-object-acl.d.ts +7 -0
- package/dist/lib/actions/create-bucket-default-object-acl.d.ts.map +1 -0
- package/dist/lib/actions/create-bucket-default-object-acl.js +60 -0
- package/dist/lib/actions/create-bucket-default-object-acl.js.map +1 -0
- package/dist/lib/actions/create-bucket.d.ts +10 -0
- package/dist/lib/actions/create-bucket.d.ts.map +1 -0
- package/dist/lib/actions/create-bucket.js +80 -0
- package/dist/lib/actions/create-bucket.js.map +1 -0
- package/dist/lib/actions/create-object-acl.d.ts +9 -0
- package/dist/lib/actions/create-object-acl.d.ts.map +1 -0
- package/dist/lib/actions/create-object-acl.js +72 -0
- package/dist/lib/actions/create-object-acl.js.map +1 -0
- package/dist/lib/actions/delete-bucket-acl.d.ts +6 -0
- package/dist/lib/actions/delete-bucket-acl.d.ts.map +1 -0
- package/dist/lib/actions/delete-bucket-acl.js +56 -0
- package/dist/lib/actions/delete-bucket-acl.js.map +1 -0
- package/dist/lib/actions/delete-bucket-default-object-acl.d.ts +6 -0
- package/dist/lib/actions/delete-bucket-default-object-acl.d.ts.map +1 -0
- package/dist/lib/actions/delete-bucket-default-object-acl.js +56 -0
- package/dist/lib/actions/delete-bucket-default-object-acl.js.map +1 -0
- package/dist/lib/actions/delete-empty-bucket.d.ts +5 -0
- package/dist/lib/actions/delete-empty-bucket.d.ts.map +1 -0
- package/dist/lib/actions/delete-empty-bucket.js +50 -0
- package/dist/lib/actions/delete-empty-bucket.js.map +1 -0
- package/dist/lib/actions/delete-object-acl.d.ts +8 -0
- package/dist/lib/actions/delete-object-acl.d.ts.map +1 -0
- package/dist/lib/actions/delete-object-acl.js +71 -0
- package/dist/lib/actions/delete-object-acl.js.map +1 -0
- package/dist/lib/actions/delete-object.d.ts +7 -0
- package/dist/lib/actions/delete-object.d.ts.map +1 -0
- package/dist/lib/actions/delete-object.js +66 -0
- package/dist/lib/actions/delete-object.js.map +1 -0
- package/dist/lib/actions/search-buckets.d.ts +9 -0
- package/dist/lib/actions/search-buckets.d.ts.map +1 -0
- package/dist/lib/actions/search-buckets.js +96 -0
- package/dist/lib/actions/search-buckets.js.map +1 -0
- package/dist/lib/actions/search-objects.d.ts +12 -0
- package/dist/lib/actions/search-objects.d.ts.map +1 -0
- package/dist/lib/actions/search-objects.js +105 -0
- package/dist/lib/actions/search-objects.js.map +1 -0
- package/dist/lib/common/auth.d.ts +2 -0
- package/dist/lib/common/auth.d.ts.map +1 -0
- package/dist/lib/common/auth.js +20 -0
- package/dist/lib/common/auth.js.map +1 -0
- package/dist/lib/common/client.d.ts +9 -0
- package/dist/lib/common/client.d.ts.map +1 -0
- package/dist/lib/common/client.js +48 -0
- package/dist/lib/common/client.js.map +1 -0
- package/dist/lib/common/props.d.ts +12 -0
- package/dist/lib/common/props.d.ts.map +1 -0
- package/dist/lib/common/props.js +231 -0
- package/dist/lib/common/props.js.map +1 -0
- package/dist/lib/triggers/new-object-created.d.ts +19 -0
- package/dist/lib/triggers/new-object-created.d.ts.map +1 -0
- package/dist/lib/triggers/new-object-created.js +127 -0
- package/dist/lib/triggers/new-object-created.js.map +1 -0
- package/dist/lib/triggers/object-updated.d.ts +19 -0
- package/dist/lib/triggers/object-updated.d.ts.map +1 -0
- package/dist/lib/triggers/object-updated.js +127 -0
- package/dist/lib/triggers/object-updated.js.map +1 -0
- package/package.json +43 -3
- package/src/index.ts +46 -0
- package/src/lib/actions/clone-object.ts +75 -0
- package/src/lib/actions/create-bucket-acl.ts +58 -0
- package/src/lib/actions/create-bucket-default-object-acl.ts +58 -0
- package/src/lib/actions/create-bucket.ts +75 -0
- package/src/lib/actions/create-object-acl.ts +81 -0
- package/src/lib/actions/delete-bucket-acl.ts +52 -0
- package/src/lib/actions/delete-bucket-default-object-acl.ts +52 -0
- package/src/lib/actions/delete-empty-bucket.ts +42 -0
- package/src/lib/actions/delete-object-acl.ts +64 -0
- package/src/lib/actions/delete-object.ts +59 -0
- package/src/lib/actions/search-buckets.ts +92 -0
- package/src/lib/actions/search-objects.ts +101 -0
- package/src/lib/common/auth.ts +15 -0
- package/src/lib/common/client.ts +63 -0
- package/src/lib/common/props.ts +249 -0
- package/src/lib/triggers/new-object-created.ts +174 -0
- package/src/lib/triggers/object-updated.ts +174 -0
- package/README.md +0 -3
package/LICENSE.MIT-AP
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Activepieces AB
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Derived helpers in this folder are adapted from Activepieces (MIT) for use
|
|
24
|
+
inside CX without depending on @activepieces/* packages at runtime.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,kBAAkB,gJA0B7B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Vendored from Activepieces packages/pieces/community/google-cloud-storage/src/index.ts (MIT).
|
|
3
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.googleCloudStorage = void 0;
|
|
6
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
7
|
+
const pieces_framework_2 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("./lib/common/auth");
|
|
9
|
+
const create_bucket_1 = require("./lib/actions/create-bucket");
|
|
10
|
+
const delete_empty_bucket_1 = require("./lib/actions/delete-empty-bucket");
|
|
11
|
+
const clone_object_1 = require("./lib/actions/clone-object");
|
|
12
|
+
const delete_object_1 = require("./lib/actions/delete-object");
|
|
13
|
+
const search_objects_1 = require("./lib/actions/search-objects");
|
|
14
|
+
const search_buckets_1 = require("./lib/actions/search-buckets");
|
|
15
|
+
const create_object_acl_1 = require("./lib/actions/create-object-acl");
|
|
16
|
+
const delete_object_acl_1 = require("./lib/actions/delete-object-acl");
|
|
17
|
+
const create_bucket_acl_1 = require("./lib/actions/create-bucket-acl");
|
|
18
|
+
const delete_bucket_acl_1 = require("./lib/actions/delete-bucket-acl");
|
|
19
|
+
const create_bucket_default_object_acl_1 = require("./lib/actions/create-bucket-default-object-acl");
|
|
20
|
+
const delete_bucket_default_object_acl_1 = require("./lib/actions/delete-bucket-default-object-acl");
|
|
21
|
+
const new_object_created_1 = require("./lib/triggers/new-object-created");
|
|
22
|
+
const object_updated_1 = require("./lib/triggers/object-updated");
|
|
23
|
+
exports.googleCloudStorage = (0, pieces_framework_1.createPiece)({
|
|
24
|
+
displayName: "Google Cloud Storage",
|
|
25
|
+
description: "Automate file storage operations with Google Cloud Storage. Upload, download, manage buckets, set permissions, and monitor changes with real-time triggers.",
|
|
26
|
+
auth: auth_1.googleCloudStorageAuth,
|
|
27
|
+
minimumSupportedRelease: '0.36.1',
|
|
28
|
+
logoUrl: "https://cdn.activepieces.com/pieces/google-cloud-storage.png",
|
|
29
|
+
authors: ["sparkybug"],
|
|
30
|
+
categories: [pieces_framework_2.PieceCategory.CONTENT_AND_FILES],
|
|
31
|
+
actions: [
|
|
32
|
+
create_bucket_1.createBucket,
|
|
33
|
+
delete_empty_bucket_1.deleteEmptyBucket,
|
|
34
|
+
clone_object_1.cloneObject,
|
|
35
|
+
delete_object_1.deleteObject,
|
|
36
|
+
search_objects_1.searchObjects,
|
|
37
|
+
search_buckets_1.searchBuckets,
|
|
38
|
+
create_object_acl_1.createObjectAcl,
|
|
39
|
+
delete_object_acl_1.deleteObjectAcl,
|
|
40
|
+
create_bucket_acl_1.createBucketAcl,
|
|
41
|
+
delete_bucket_acl_1.deleteBucketAcl,
|
|
42
|
+
create_bucket_default_object_acl_1.createBucketDefaultObjectAcl,
|
|
43
|
+
delete_bucket_default_object_acl_1.deleteBucketDefaultObjectAcl,
|
|
44
|
+
],
|
|
45
|
+
triggers: [
|
|
46
|
+
new_object_created_1.newObjectCreated,
|
|
47
|
+
object_updated_1.objectUpdated,
|
|
48
|
+
],
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gGAAgG;AAChG,qEAAqE;;;AAErE,gEAAwD;AACxD,gEAA0D;AAC1D,4CAA2D;AAC3D,+DAA2D;AAC3D,2EAAsE;AACtE,6DAAyD;AACzD,+DAA2D;AAC3D,iEAA6D;AAC7D,iEAA6D;AAC7D,uEAAkE;AAClE,uEAAkE;AAClE,uEAAkE;AAClE,uEAAkE;AAClE,qGAA8F;AAC9F,qGAA8F;AAC9F,0EAAqE;AACrE,kEAA8D;AAEjD,QAAA,kBAAkB,GAAG,IAAA,8BAAW,EAAC;IAC5C,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,6JAA6J;IAC1K,IAAI,EAAE,6BAAsB;IAC5B,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,8DAA8D;IACvE,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,UAAU,EAAE,CAAC,gCAAa,CAAC,iBAAiB,CAAC;IAC7C,OAAO,EAAE;QACP,4BAAY;QACZ,uCAAiB;QACjB,0BAAW;QACX,4BAAY;QACZ,8BAAa;QACb,8BAAa;QACb,mCAAe;QACf,mCAAe;QACf,mCAAe;QACf,mCAAe;QACf,+DAA4B;QAC5B,+DAA4B;KAC7B;IACD,QAAQ,EAAE;QACR,qCAAgB;QAChB,8BAAa;KACd;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const cloneObject: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
2
|
+
projectId: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
3
|
+
sourceBucket: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
4
|
+
sourceObject: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
5
|
+
destBucket: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
6
|
+
destObject: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
metadataOverrides: import("@agnocon/pieces-framework").ObjectProperty<false>;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=clone-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone-object.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/clone-object.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW;;;;;;;EAoEtB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cloneObject = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-cloud-storage/src/lib/actions/clone-object.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const client_1 = require("../common/client");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
12
|
+
exports.cloneObject = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleCloudStorageAuth,
|
|
14
|
+
name: 'clone_object',
|
|
15
|
+
displayName: 'Clone Object',
|
|
16
|
+
description: 'Copy / clone an object (file) to a new location (same or different bucket), optionally overriding metadata. Perfect for duplicating files as backup or version.',
|
|
17
|
+
audience: 'both',
|
|
18
|
+
aiMetadata: { description: 'Copies an existing object to a destination bucket/name (same or different bucket), optionally overriding metadata such as contentType or cacheControl. Use to duplicate a file for backups or to move data between buckets. Not idempotent: it writes a new destination object on each call, creating a fresh generation. Requires the source bucket/object and a destination bucket and object name.', idempotent: false },
|
|
19
|
+
props: {
|
|
20
|
+
projectId: props_1.projectIdProperty,
|
|
21
|
+
sourceBucket: props_1.bucketDropdown,
|
|
22
|
+
sourceObject: (0, props_1.objectDropdown)('sourceBucket'),
|
|
23
|
+
destBucket: props_1.bucketDropdown,
|
|
24
|
+
destObject: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Destination Object Name',
|
|
26
|
+
description: 'Name for the copied object (must be valid object name)',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
metadataOverrides: pieces_framework_1.Property.Object({
|
|
30
|
+
displayName: 'Metadata Overrides',
|
|
31
|
+
description: 'Optional metadata and properties to override in the copied object (contentType, cacheControl, contentDisposition, etc.)',
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
34
|
+
},
|
|
35
|
+
run(context) {
|
|
36
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
var _a, _b, _c, _d, _e;
|
|
38
|
+
const { sourceBucket, sourceObject, destBucket, destObject, metadataOverrides } = context.propsValue;
|
|
39
|
+
const auth = context.auth;
|
|
40
|
+
const body = metadataOverrides || undefined;
|
|
41
|
+
try {
|
|
42
|
+
const response = yield client_1.gcsCommon.makeRequest(pieces_common_1.HttpMethod.POST, `/b/${sourceBucket}/o/${encodeURIComponent(sourceObject)}/copyTo/b/${destBucket}/o/${encodeURIComponent(destObject)}`, auth.access_token, body);
|
|
43
|
+
return {
|
|
44
|
+
success: true,
|
|
45
|
+
source: {
|
|
46
|
+
bucket: sourceBucket,
|
|
47
|
+
object: sourceObject,
|
|
48
|
+
},
|
|
49
|
+
destination: {
|
|
50
|
+
bucket: destBucket,
|
|
51
|
+
object: destObject,
|
|
52
|
+
},
|
|
53
|
+
object: response,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
|
|
58
|
+
throw new Error(`Source object "${sourceObject}" not found in bucket "${sourceBucket}".`);
|
|
59
|
+
}
|
|
60
|
+
if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
|
|
61
|
+
throw new Error('Access denied. Check permissions for source and destination buckets.');
|
|
62
|
+
}
|
|
63
|
+
if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 412) {
|
|
64
|
+
throw new Error('Precondition failed. Source object may have been modified.');
|
|
65
|
+
}
|
|
66
|
+
if (((_d = error.response) === null || _d === void 0 ? void 0 : _d.status) === 409) {
|
|
67
|
+
throw new Error(`Destination object "${destObject}" already exists in bucket "${destBucket}".`);
|
|
68
|
+
}
|
|
69
|
+
if (((_e = error.response) === null || _e === void 0 ? void 0 : _e.status) === 400) {
|
|
70
|
+
throw new Error('Invalid request. Check object names and bucket configurations.');
|
|
71
|
+
}
|
|
72
|
+
throw new Error(`Failed to clone object: ${error.message || 'Unknown error'}`);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=clone-object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone-object.js","sourceRoot":"","sources":["../../../src/lib/actions/clone-object.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const createBucketAcl: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
2
|
+
projectId: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
3
|
+
bucket: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
4
|
+
entity: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
role: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=create-bucket-acl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-bucket-acl.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-bucket-acl.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe;;;;;EAmD1B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBucketAcl = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-cloud-storage/src/lib/actions/create-bucket-acl.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const client_1 = require("../common/client");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
12
|
+
exports.createBucketAcl = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleCloudStorageAuth,
|
|
14
|
+
name: 'create_bucket_acl',
|
|
15
|
+
displayName: 'Create Bucket ACL',
|
|
16
|
+
description: 'Add an ACL entry at bucket level. Perfect for granting permission to manage the bucket.',
|
|
17
|
+
audience: 'both',
|
|
18
|
+
aiMetadata: { description: 'Grants an entity (user, group, domain, or special scope) a role on a bucket\'s own access-control list. Use to let someone read or manage the bucket itself. Not idempotent: adding an entry that already exists fails. Only works on buckets using fine-grained ACLs, not uniform bucket-level access; requires bucket, entity, and role.', idempotent: false },
|
|
19
|
+
props: {
|
|
20
|
+
projectId: props_1.projectIdProperty,
|
|
21
|
+
bucket: props_1.bucketDropdown,
|
|
22
|
+
entity: props_1.aclEntityProperty,
|
|
23
|
+
role: props_1.bucketAclRoleProperty,
|
|
24
|
+
},
|
|
25
|
+
run(context) {
|
|
26
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
var _a, _b, _c, _d;
|
|
28
|
+
const { bucket, entity, role } = context.propsValue;
|
|
29
|
+
const auth = context.auth;
|
|
30
|
+
const aclEntry = {
|
|
31
|
+
entity,
|
|
32
|
+
role,
|
|
33
|
+
};
|
|
34
|
+
try {
|
|
35
|
+
const response = yield client_1.gcsCommon.makeRequest(pieces_common_1.HttpMethod.POST, `/b/${bucket}/acl`, auth.access_token, aclEntry);
|
|
36
|
+
return {
|
|
37
|
+
success: true,
|
|
38
|
+
bucket,
|
|
39
|
+
acl: response,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
|
|
44
|
+
throw new Error('Bad request. This bucket may have uniform bucket-level access enabled, which doesn\'t support bucket ACLs. Use IAM policies instead.');
|
|
45
|
+
}
|
|
46
|
+
if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
|
|
47
|
+
throw new Error('Access denied. You need storage.buckets.update permission to modify bucket ACLs.');
|
|
48
|
+
}
|
|
49
|
+
if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 404) {
|
|
50
|
+
throw new Error(`Bucket "${bucket}" not found.`);
|
|
51
|
+
}
|
|
52
|
+
if (((_d = error.response) === null || _d === void 0 ? void 0 : _d.status) === 409) {
|
|
53
|
+
throw new Error(`ACL entry for entity "${entity}" already exists on bucket "${bucket}".`);
|
|
54
|
+
}
|
|
55
|
+
throw new Error(`Failed to create bucket ACL: ${error.message || 'Unknown error'}`);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=create-bucket-acl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-bucket-acl.js","sourceRoot":"","sources":["../../../src/lib/actions/create-bucket-acl.ts"],"names":[],"mappings":";;;;AAAA,wHAAwH;AACxH,qEAAqE;AACrE,gEAA8E;AAC9E,yCAAwD;AACxD,6CAA6C;AAC7C,2CAA8G;AAC9G,0DAAoD;AAEvC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,6BAAsB;IAC5B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,yFAAyF;IACtG,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,4UAA4U,EAAE,UAAU,EAAE,KAAK,EAAE;IAC5X,KAAK,EAAE;QACL,SAAS,EAAE,yBAAiB;QAC5B,MAAM,EAAE,sBAAc;QACtB,MAAM,EAAE,yBAAiB;QACzB,IAAI,EAAE,6BAAqB;KAC5B;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACpD,MAAM,IAAI,GAAG,OAAO,CAAC,IAA2B,CAAC;YAEjD,MAAM,QAAQ,GAAG;gBACf,MAAM;gBACN,IAAI;aACL,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,kBAAS,CAAC,WAAW,CAC1C,0BAAU,CAAC,IAAI,EACf,MAAM,MAAM,MAAM,EAClB,IAAI,CAAC,YAAY,EACjB,QAAQ,CACT,CAAC;gBAEF,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,MAAM;oBACN,GAAG,EAAE,QAAQ;iBACd,CAAC;YACJ,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,sIAAsI,CAAC,CAAC;gBAC1J,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;gBACtG,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,WAAW,MAAM,cAAc,CAAC,CAAC;gBACnD,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,MAAM,+BAA+B,MAAM,IAAI,CAAC,CAAC;gBAC5F,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,KAAK,CAAC,OAAO,IAAI,eAAe,EAAE,CAAC,CAAC;YACtF,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const createBucketDefaultObjectAcl: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
2
|
+
projectId: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
3
|
+
bucket: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
4
|
+
entity: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
role: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=create-bucket-default-object-acl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-bucket-default-object-acl.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-bucket-default-object-acl.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,4BAA4B;;;;;EAmDvC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBucketDefaultObjectAcl = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-cloud-storage/src/lib/actions/create-bucket-default-object-acl.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const client_1 = require("../common/client");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
12
|
+
exports.createBucketDefaultObjectAcl = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleCloudStorageAuth,
|
|
14
|
+
name: 'create_bucket_default_object_acl',
|
|
15
|
+
displayName: 'Create Bucket Default Object ACL',
|
|
16
|
+
description: 'Set default ACLs for new objects added to a bucket. Perfect for automatically assigning permissions to new uploads.',
|
|
17
|
+
audience: 'both',
|
|
18
|
+
aiMetadata: { description: 'Adds an entry to a bucket\'s default object ACL, which is applied automatically to objects later uploaded without their own ACL. Use to pre-set permissions for future uploads. Not idempotent: adding an entry that already exists fails, and it does not affect existing objects. Only works on buckets using fine-grained ACLs, not uniform bucket-level access; requires bucket, entity, and role.', idempotent: false },
|
|
19
|
+
props: {
|
|
20
|
+
projectId: props_1.projectIdProperty,
|
|
21
|
+
bucket: props_1.bucketDropdown,
|
|
22
|
+
entity: props_1.aclEntityProperty,
|
|
23
|
+
role: props_1.objectAclRoleProperty,
|
|
24
|
+
},
|
|
25
|
+
run(context) {
|
|
26
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
var _a, _b, _c, _d;
|
|
28
|
+
const { bucket, entity, role } = context.propsValue;
|
|
29
|
+
const auth = context.auth;
|
|
30
|
+
const aclEntry = {
|
|
31
|
+
entity,
|
|
32
|
+
role,
|
|
33
|
+
};
|
|
34
|
+
try {
|
|
35
|
+
const response = yield client_1.gcsCommon.makeRequest(pieces_common_1.HttpMethod.POST, `/b/${bucket}/defaultObjectAcl`, auth.access_token, aclEntry);
|
|
36
|
+
return {
|
|
37
|
+
success: true,
|
|
38
|
+
bucket,
|
|
39
|
+
acl: response,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
|
|
44
|
+
throw new Error('Bad request. This bucket may have uniform bucket-level access enabled, which doesn\'t support default object ACLs. Use IAM policies instead.');
|
|
45
|
+
}
|
|
46
|
+
if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
|
|
47
|
+
throw new Error('Access denied. You need storage.buckets.update permission to modify bucket default object ACLs.');
|
|
48
|
+
}
|
|
49
|
+
if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 404) {
|
|
50
|
+
throw new Error(`Bucket "${bucket}" not found.`);
|
|
51
|
+
}
|
|
52
|
+
if (((_d = error.response) === null || _d === void 0 ? void 0 : _d.status) === 409) {
|
|
53
|
+
throw new Error(`Default object ACL entry for entity "${entity}" already exists on bucket "${bucket}".`);
|
|
54
|
+
}
|
|
55
|
+
throw new Error(`Failed to create bucket default object ACL: ${error.message || 'Unknown error'}`);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=create-bucket-default-object-acl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-bucket-default-object-acl.js","sourceRoot":"","sources":["../../../src/lib/actions/create-bucket-default-object-acl.ts"],"names":[],"mappings":";;;;AAAA,uIAAuI;AACvI,qEAAqE;AACrE,gEAA8E;AAC9E,yCAAwD;AACxD,6CAA6C;AAC7C,2CAA8G;AAC9G,0DAAoD;AAEvC,QAAA,4BAA4B,GAAG,IAAA,+BAAY,EAAC;IACvD,IAAI,EAAE,6BAAsB;IAC5B,IAAI,EAAE,kCAAkC;IACxC,WAAW,EAAE,kCAAkC;IAC/C,WAAW,EAAE,qHAAqH;IAClI,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,wYAAwY,EAAE,UAAU,EAAE,KAAK,EAAE;IACxb,KAAK,EAAE;QACL,SAAS,EAAE,yBAAiB;QAC5B,MAAM,EAAE,sBAAc;QACtB,MAAM,EAAE,yBAAiB;QACzB,IAAI,EAAE,6BAAqB;KAC5B;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACpD,MAAM,IAAI,GAAG,OAAO,CAAC,IAA2B,CAAC;YAEjD,MAAM,QAAQ,GAAG;gBACf,MAAM;gBACN,IAAI;aACL,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,kBAAS,CAAC,WAAW,CAC1C,0BAAU,CAAC,IAAI,EACf,MAAM,MAAM,mBAAmB,EAC/B,IAAI,CAAC,YAAY,EACjB,QAAQ,CACT,CAAC;gBAEF,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,MAAM;oBACN,GAAG,EAAE,QAAQ;iBACd,CAAC;YACJ,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,8IAA8I,CAAC,CAAC;gBAClK,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,iGAAiG,CAAC,CAAC;gBACrH,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,WAAW,MAAM,cAAc,CAAC,CAAC;gBACnD,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,wCAAwC,MAAM,+BAA+B,MAAM,IAAI,CAAC,CAAC;gBAC3G,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,+CAA+C,KAAK,CAAC,OAAO,IAAI,eAAe,EAAE,CAAC,CAAC;YACrG,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const createBucket: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
2
|
+
projectId: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
3
|
+
name: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
location: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
|
|
5
|
+
storageClass: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
|
|
6
|
+
versioning: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
7
|
+
uniformBucketLevelAccess: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
8
|
+
labels: import("@agnocon/pieces-framework").ObjectProperty<false>;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=create-bucket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-bucket.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-bucket.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;EAoEvB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBucket = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-cloud-storage/src/lib/actions/create-bucket.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const client_1 = require("../common/client");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
12
|
+
exports.createBucket = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleCloudStorageAuth,
|
|
14
|
+
name: 'create_bucket',
|
|
15
|
+
displayName: 'Create Bucket',
|
|
16
|
+
description: 'Create a new bucket in a specified location/configuration. Perfect for automating storage provisioning for new projects.',
|
|
17
|
+
audience: 'both',
|
|
18
|
+
aiMetadata: { description: 'Creates a new Cloud Storage bucket in the given project, with optional location, storage class, versioning, uniform bucket-level access, and labels. Use to provision storage before uploading objects. Not idempotent: bucket names are globally unique, so re-running with the same name fails. Requires a project ID and a globally-unique bucket name.', idempotent: false },
|
|
19
|
+
props: {
|
|
20
|
+
projectId: props_1.projectIdProperty,
|
|
21
|
+
name: props_1.bucketNameProperty,
|
|
22
|
+
location: props_1.locationProperty,
|
|
23
|
+
storageClass: props_1.storageClassProperty,
|
|
24
|
+
versioning: pieces_framework_1.Property.Checkbox({
|
|
25
|
+
displayName: 'Enable Versioning',
|
|
26
|
+
required: false,
|
|
27
|
+
}),
|
|
28
|
+
uniformBucketLevelAccess: pieces_framework_1.Property.Checkbox({
|
|
29
|
+
displayName: 'Uniform Bucket Level Access',
|
|
30
|
+
required: false,
|
|
31
|
+
}),
|
|
32
|
+
labels: pieces_framework_1.Property.Object({
|
|
33
|
+
displayName: 'Labels',
|
|
34
|
+
description: 'Key-value pairs for bucket labels',
|
|
35
|
+
required: false,
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
run(context) {
|
|
39
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
var _a, _b, _c;
|
|
41
|
+
const { projectId, name, location, storageClass, versioning, uniformBucketLevelAccess, labels } = context.propsValue;
|
|
42
|
+
const auth = context.auth;
|
|
43
|
+
const bucketConfig = {
|
|
44
|
+
name,
|
|
45
|
+
location: location || 'US',
|
|
46
|
+
storageClass: storageClass || 'STANDARD',
|
|
47
|
+
};
|
|
48
|
+
if (versioning) {
|
|
49
|
+
bucketConfig.versioning = { enabled: true };
|
|
50
|
+
}
|
|
51
|
+
if (uniformBucketLevelAccess !== undefined) {
|
|
52
|
+
bucketConfig.iamConfiguration = {
|
|
53
|
+
uniformBucketLevelAccess: {
|
|
54
|
+
enabled: uniformBucketLevelAccess,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if (labels) {
|
|
59
|
+
bucketConfig.labels = labels;
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
const response = yield client_1.gcsCommon.makeRequest(pieces_common_1.HttpMethod.POST, `/b?project=${projectId}`, auth.access_token, bucketConfig);
|
|
63
|
+
return response;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 409) {
|
|
67
|
+
throw new Error(`Bucket "${name}" already exists. Bucket names must be globally unique.`);
|
|
68
|
+
}
|
|
69
|
+
if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
|
|
70
|
+
throw new Error('Access denied. Check your permissions for the selected project.');
|
|
71
|
+
}
|
|
72
|
+
if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 400) {
|
|
73
|
+
throw new Error('Invalid bucket configuration. Check bucket name format and project settings.');
|
|
74
|
+
}
|
|
75
|
+
throw new Error(`Failed to create bucket: ${error.message || 'Unknown error'}`);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=create-bucket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-bucket.js","sourceRoot":"","sources":["../../../src/lib/actions/create-bucket.ts"],"names":[],"mappings":";;;;AAAA,oHAAoH;AACpH,qEAAqE;AACrE,gEAAwF;AACxF,yCAAwD;AACxD,6CAA6C;AAC7C,2CAAgH;AAChH,0DAAoD;AAEvC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,6BAAsB;IAC5B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,0HAA0H;IACvI,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,4VAA4V,EAAE,UAAU,EAAE,KAAK,EAAE;IAC5Y,KAAK,EAAE;QACL,SAAS,EAAE,yBAAiB;QAC5B,IAAI,EAAE,0BAAkB;QACxB,QAAQ,EAAE,wBAAgB;QAC1B,YAAY,EAAE,4BAAoB;QAClC,UAAU,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC5B,WAAW,EAAE,mBAAmB;YAChC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,wBAAwB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC1C,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACrH,MAAM,IAAI,GAAG,OAAO,CAAC,IAA2B,CAAC;YAEjD,MAAM,YAAY,GAAQ;gBACxB,IAAI;gBACJ,QAAQ,EAAE,QAAQ,IAAI,IAAI;gBAC1B,YAAY,EAAE,YAAY,IAAI,UAAU;aACzC,CAAC;YAEF,IAAI,UAAU,EAAE,CAAC;gBACf,YAAY,CAAC,UAAU,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAC9C,CAAC;YAED,IAAI,wBAAwB,KAAK,SAAS,EAAE,CAAC;gBAC3C,YAAY,CAAC,gBAAgB,GAAG;oBAC9B,wBAAwB,EAAE;wBACxB,OAAO,EAAE,wBAAwB;qBAClC;iBACF,CAAC;YACJ,CAAC;YAED,IAAI,MAAM,EAAE,CAAC;gBACX,YAAY,CAAC,MAAM,GAAG,MAAM,CAAC;YAC/B,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,kBAAS,CAAC,WAAW,CAAC,0BAAU,CAAC,IAAI,EAAE,cAAc,SAAS,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;gBAC1H,OAAO,QAAQ,CAAC;YAClB,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,WAAW,IAAI,yDAAyD,CAAC,CAAC;gBAC5F,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;gBACrF,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;gBAClG,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,4BAA4B,KAAK,CAAC,OAAO,IAAI,eAAe,EAAE,CAAC,CAAC;YAClF,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const createObjectAcl: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
2
|
+
projectId: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
3
|
+
bucket: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
4
|
+
object: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
5
|
+
entity: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
role: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
+
generation: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=create-object-acl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-object-acl.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-object-acl.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,eAAe;;;;;;;EAgE1B,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createObjectAcl = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-cloud-storage/src/lib/actions/create-object-acl.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const client_1 = require("../common/client");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
12
|
+
exports.createObjectAcl = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleCloudStorageAuth,
|
|
14
|
+
name: 'create_object_acl',
|
|
15
|
+
displayName: 'Create Object ACL',
|
|
16
|
+
description: 'Add an ACL entry to an object (grant a permission). Perfect for granting read/write access to a user or group.',
|
|
17
|
+
audience: 'both',
|
|
18
|
+
aiMetadata: { description: 'Grants an entity (user, group, domain, or special scope) a role on a single object\'s access-control list, optionally targeting a specific generation. Use to give read or owner access to one file. Not idempotent: adding an entry that already exists fails. Only works on buckets using fine-grained ACLs, not uniform bucket-level access; requires bucket, object, entity, and role.', idempotent: false },
|
|
19
|
+
props: {
|
|
20
|
+
projectId: props_1.projectIdProperty,
|
|
21
|
+
bucket: props_1.bucketDropdown,
|
|
22
|
+
object: (0, props_1.objectDropdown)('bucket'),
|
|
23
|
+
entity: props_1.aclEntityProperty,
|
|
24
|
+
role: props_1.objectAclRoleProperty,
|
|
25
|
+
generation: pieces_framework_1.Property.Number({
|
|
26
|
+
displayName: 'Generation',
|
|
27
|
+
description: 'Optional generation number for versioned objects',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
run(context) {
|
|
32
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
var _a, _b, _c, _d;
|
|
34
|
+
const { bucket, object, entity, role, generation } = context.propsValue;
|
|
35
|
+
const auth = context.auth;
|
|
36
|
+
const aclEntry = {
|
|
37
|
+
entity,
|
|
38
|
+
role,
|
|
39
|
+
};
|
|
40
|
+
let path = `/b/${bucket}/o/${encodeURIComponent(object)}/acl`;
|
|
41
|
+
if (generation) {
|
|
42
|
+
path += `?generation=${generation}`;
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const response = yield client_1.gcsCommon.makeRequest(pieces_common_1.HttpMethod.POST, path, auth.access_token, aclEntry);
|
|
46
|
+
return {
|
|
47
|
+
success: true,
|
|
48
|
+
bucket,
|
|
49
|
+
object,
|
|
50
|
+
generation: generation || 'latest',
|
|
51
|
+
acl: response,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
|
|
56
|
+
throw new Error('Bad request. This bucket may have uniform bucket-level access enabled, which doesn\'t support object ACLs. Use IAM policies instead.');
|
|
57
|
+
}
|
|
58
|
+
if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
|
|
59
|
+
throw new Error('Access denied. You need storage.objects.setIamPolicy permission or OWNER ACL permission on the object.');
|
|
60
|
+
}
|
|
61
|
+
if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 404) {
|
|
62
|
+
throw new Error(`Object "${object}" not found in bucket "${bucket}".`);
|
|
63
|
+
}
|
|
64
|
+
if (((_d = error.response) === null || _d === void 0 ? void 0 : _d.status) === 409) {
|
|
65
|
+
throw new Error(`ACL entry for entity "${entity}" already exists on this object.`);
|
|
66
|
+
}
|
|
67
|
+
throw new Error(`Failed to create object ACL: ${error.message || 'Unknown error'}`);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=create-object-acl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-object-acl.js","sourceRoot":"","sources":["../../../src/lib/actions/create-object-acl.ts"],"names":[],"mappings":";;;;AAAA,wHAAwH;AACxH,qEAAqE;AACrE,gEAImC;AACnC,yCAAwD;AACxD,6CAA6C;AAC7C,2CAMyB;AACzB,0DAAoD;AAEvC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,6BAAsB;IAC5B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,gHAAgH;IAC7H,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,4XAA4X,EAAE,UAAU,EAAE,KAAK,EAAE;IAC5a,KAAK,EAAE;QACL,SAAS,EAAE,yBAAiB;QAC5B,MAAM,EAAE,sBAAc;QACtB,MAAM,EAAE,IAAA,sBAAc,EAAC,QAAQ,CAAC;QAChC,MAAM,EAAE,yBAAiB;QACzB,IAAI,EAAE,6BAAqB;QAC3B,UAAU,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC1B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACxE,MAAM,IAAI,GAAG,OAAO,CAAC,IAA2B,CAAC;YAEjD,MAAM,QAAQ,GAAG;gBACf,MAAM;gBACN,IAAI;aACL,CAAC;YAEF,IAAI,IAAI,GAAG,MAAM,MAAM,MAAM,kBAAkB,CAAC,MAAgB,CAAC,MAAM,CAAC;YACxE,IAAI,UAAU,EAAE,CAAC;gBACf,IAAI,IAAI,eAAe,UAAU,EAAE,CAAC;YACtC,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,kBAAS,CAAC,WAAW,CAC1C,0BAAU,CAAC,IAAI,EACf,IAAI,EACJ,IAAI,CAAC,YAAY,EACjB,QAAQ,CACT,CAAC;gBAEF,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,MAAM;oBACN,MAAM;oBACN,UAAU,EAAE,UAAU,IAAI,QAAQ;oBAClC,GAAG,EAAE,QAAQ;iBACd,CAAC;YACJ,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,sIAAsI,CAAC,CAAC;gBAC1J,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,wGAAwG,CAAC,CAAC;gBAC5H,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,WAAW,MAAM,0BAA0B,MAAM,IAAI,CAAC,CAAC;gBACzE,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,MAAM,kCAAkC,CAAC,CAAC;gBACrF,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,KAAK,CAAC,OAAO,IAAI,eAAe,EAAE,CAAC,CAAC;YACtF,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const deleteBucketAcl: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
2
|
+
projectId: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
3
|
+
bucket: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
4
|
+
entity: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=delete-bucket-acl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-bucket-acl.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/delete-bucket-acl.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe;;;;EA6C1B,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteBucketAcl = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/google-cloud-storage/src/lib/actions/delete-bucket-acl.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const client_1 = require("../common/client");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
12
|
+
exports.deleteBucketAcl = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.googleCloudStorageAuth,
|
|
14
|
+
name: 'delete_bucket_acl',
|
|
15
|
+
displayName: 'Delete Bucket ACL',
|
|
16
|
+
description: 'Remove an ACL entry from a bucket. Perfect for revoking access for a user or group.',
|
|
17
|
+
audience: 'both',
|
|
18
|
+
aiMetadata: { description: 'Removes an entity\'s entry from a bucket\'s own access-control list. Use to revoke a user or group\'s access to the bucket. Not idempotent: the first call removes the entry and a repeat fails because it no longer exists. Only works on buckets using fine-grained ACLs, not uniform bucket-level access; requires bucket and entity.', idempotent: false },
|
|
19
|
+
props: {
|
|
20
|
+
projectId: props_1.projectIdProperty,
|
|
21
|
+
bucket: props_1.bucketDropdown,
|
|
22
|
+
entity: props_1.aclEntityProperty,
|
|
23
|
+
},
|
|
24
|
+
run(context) {
|
|
25
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
27
|
+
const { bucket, entity } = context.propsValue;
|
|
28
|
+
const auth = context.auth;
|
|
29
|
+
try {
|
|
30
|
+
yield client_1.gcsCommon.makeRequest(pieces_common_1.HttpMethod.DELETE, `/b/${bucket}/acl/${encodeURIComponent(entity)}`, auth.access_token);
|
|
31
|
+
return {
|
|
32
|
+
success: true,
|
|
33
|
+
bucket,
|
|
34
|
+
entity,
|
|
35
|
+
message: `ACL entry for entity "${entity}" removed successfully from bucket "${bucket}"`,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
|
|
40
|
+
throw new Error('Bad request. This bucket may have uniform bucket-level access enabled, which doesn\'t support bucket ACLs. Use IAM policies instead.');
|
|
41
|
+
}
|
|
42
|
+
if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
|
|
43
|
+
throw new Error('Access denied. You need storage.buckets.update permission to modify bucket ACLs.');
|
|
44
|
+
}
|
|
45
|
+
if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 404) {
|
|
46
|
+
if ((_g = (_f = (_e = (_d = error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f.message) === null || _g === void 0 ? void 0 : _g.includes('ACL')) {
|
|
47
|
+
throw new Error(`ACL entry for entity "${entity}" not found on bucket "${bucket}".`);
|
|
48
|
+
}
|
|
49
|
+
throw new Error(`Bucket "${bucket}" not found.`);
|
|
50
|
+
}
|
|
51
|
+
throw new Error(`Failed to delete bucket ACL: ${error.message || 'Unknown error'}`);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=delete-bucket-acl.js.map
|