@activepieces/piece-azure-blob-storage 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 +7 -0
- package/package.json +22 -0
- package/src/i18n/translation.json +50 -0
- package/src/index.d.ts +6 -0
- package/src/index.js +64 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/add-tags-to-blob.d.ts +10 -0
- package/src/lib/actions/add-tags-to-blob.js +51 -0
- package/src/lib/actions/add-tags-to-blob.js.map +1 -0
- package/src/lib/actions/create-blob.d.ts +10 -0
- package/src/lib/actions/create-blob.js +43 -0
- package/src/lib/actions/create-blob.js.map +1 -0
- package/src/lib/actions/create-container.d.ts +5 -0
- package/src/lib/actions/create-container.js +30 -0
- package/src/lib/actions/create-container.js.map +1 -0
- package/src/lib/actions/delete-blob.d.ts +8 -0
- package/src/lib/actions/delete-blob.js +34 -0
- package/src/lib/actions/delete-blob.js.map +1 -0
- package/src/lib/actions/delete-container.d.ts +7 -0
- package/src/lib/actions/delete-container.js +26 -0
- package/src/lib/actions/delete-container.js.map +1 -0
- package/src/lib/actions/find-blobs.d.ts +8 -0
- package/src/lib/actions/find-blobs.js +54 -0
- package/src/lib/actions/find-blobs.js.map +1 -0
- package/src/lib/actions/list-blobs.d.ts +9 -0
- package/src/lib/actions/list-blobs.js +65 -0
- package/src/lib/actions/list-blobs.js.map +1 -0
- package/src/lib/actions/list-containers.d.ts +7 -0
- package/src/lib/actions/list-containers.js +69 -0
- package/src/lib/actions/list-containers.js.map +1 -0
- package/src/lib/actions/read-blob.d.ts +8 -0
- package/src/lib/actions/read-blob.js +57 -0
- package/src/lib/actions/read-blob.js.map +1 -0
- package/src/lib/common.d.ts +3 -0
- package/src/lib/common.js +51 -0
- package/src/lib/common.js.map +1 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@activepieces/piece-azure-blob-storage",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"types": "./src/index.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@azure/identity": "4.13.0",
|
|
9
|
+
"@azure/storage-blob": "12.29.1",
|
|
10
|
+
"@sinclair/typebox": "0.34.11",
|
|
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.22.2",
|
|
17
|
+
"@activepieces/shared": "0.30.3"
|
|
18
|
+
},
|
|
19
|
+
"resolutions": {
|
|
20
|
+
"rollup": "npm:@rollup/wasm-node"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Endpoint": "Endpoint",
|
|
3
|
+
"Connection String": "Connection String",
|
|
4
|
+
"The endpoint URL for your Azure Blob Storage account, example: https://<account_name>.blob.core.windows.net": "The endpoint URL for your Azure Blob Storage account, example: https://<account_name>.blob.core.windows.net",
|
|
5
|
+
"The connection string for your Azure Storage account.": "The connection string for your Azure Storage account.",
|
|
6
|
+
"Authenticate with Azure Blob Storage using Account Name and Account Key": "Authenticate with Azure Blob Storage using Account Name and Account Key",
|
|
7
|
+
"List Containers": "List Containers",
|
|
8
|
+
"Create Container": "Create Container",
|
|
9
|
+
"Delete Container": "Delete Container",
|
|
10
|
+
"List Blobs": "List Blobs",
|
|
11
|
+
"Create Blob": "Create Blob",
|
|
12
|
+
"Read Blob": "Read Blob",
|
|
13
|
+
"Delete Blob": "Delete Blob",
|
|
14
|
+
"Add Tags to Blob": "Add Tags to Blob",
|
|
15
|
+
"Find Blobs": "Find Blobs",
|
|
16
|
+
"List Containers in the Azure Blob Storage account": "List Containers in the Azure Blob Storage account",
|
|
17
|
+
"Create a new container": "Create a new container",
|
|
18
|
+
"Delete a container": "Delete a container",
|
|
19
|
+
"List Blobs in the specified Azure Blob Storage container": "List Blobs in the specified Azure Blob Storage container",
|
|
20
|
+
"Create a new Blob in the specified location": "Create a new Blob in the specified location",
|
|
21
|
+
"Read the Blob at the specified lcoation": "Read the Blob at the specified lcoation",
|
|
22
|
+
"Delete the Blob at the specified location": "Delete the Blob at the specified location",
|
|
23
|
+
"Add Tags to the Blob at the specified location": "Add Tags to the Blob at the specified location",
|
|
24
|
+
"Find Blobs based on their tags": "Find Blobs based on their tags",
|
|
25
|
+
"Include Deleted Containers": "Include Deleted Containers",
|
|
26
|
+
"Include System Containers": "Include System Containers",
|
|
27
|
+
"Prefix Filter": "Prefix Filter",
|
|
28
|
+
"Container Name": "Container Name",
|
|
29
|
+
"Container": "Container",
|
|
30
|
+
"Include Snapshots": "Include Snapshots",
|
|
31
|
+
"Blob Name": "Blob Name",
|
|
32
|
+
"File": "File",
|
|
33
|
+
"Tags": "Tags",
|
|
34
|
+
"Keep Existing Tags": "Keep Existing Tags",
|
|
35
|
+
"Whether to include deleted containers in the list": "Whether to include deleted containers in the list",
|
|
36
|
+
"Whether to include system containers in the list": "Whether to include system containers in the list",
|
|
37
|
+
"Filter containers by prefix": "Filter containers by prefix",
|
|
38
|
+
"The name for the newly created container": "The name for the newly created container",
|
|
39
|
+
"Select the container": "Select the container",
|
|
40
|
+
"Whether to include snapshots in the list": "Whether to include snapshots in the list",
|
|
41
|
+
"Filter blobs by prefix": "Filter blobs by prefix",
|
|
42
|
+
"The name of the blob to create": "The name of the blob to create",
|
|
43
|
+
"The file to upload as a blob": "The file to upload as a blob",
|
|
44
|
+
"Optional tags to associate with the blob": "Optional tags to associate with the blob",
|
|
45
|
+
"The name of the blob to read": "The name of the blob to read",
|
|
46
|
+
"The name of the blob to add tags to": "The name of the blob to add tags to",
|
|
47
|
+
"The tags to add to the blob": "The tags to add to the blob",
|
|
48
|
+
"Whether to keep existing tags on the blob": "Whether to keep existing tags on the blob",
|
|
49
|
+
"The tags to filter blobs by": "The tags to filter blobs by"
|
|
50
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const azureBlobStorageAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
export declare const azureBlobStorage: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>>;
|
package/src/index.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.azureBlobStorage = exports.azureBlobStorageAuth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const list_containers_1 = require("./lib/actions/list-containers");
|
|
7
|
+
const list_blobs_1 = require("./lib/actions/list-blobs");
|
|
8
|
+
const create_blob_1 = require("./lib/actions/create-blob");
|
|
9
|
+
const read_blob_1 = require("./lib/actions/read-blob");
|
|
10
|
+
const delete_blob_1 = require("./lib/actions/delete-blob");
|
|
11
|
+
const add_tags_to_blob_1 = require("./lib/actions/add-tags-to-blob");
|
|
12
|
+
const find_blobs_1 = require("./lib/actions/find-blobs");
|
|
13
|
+
const create_container_1 = require("./lib/actions/create-container");
|
|
14
|
+
const delete_container_1 = require("./lib/actions/delete-container");
|
|
15
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
16
|
+
exports.azureBlobStorageAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
17
|
+
displayName: 'Azure Blob Storage Auth',
|
|
18
|
+
description: 'Authenticate with Azure Blob Storage using Account Name and Account Key',
|
|
19
|
+
props: {
|
|
20
|
+
connectionString: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Connection String',
|
|
22
|
+
description: "You can obtain it from 'Security + networking -> Access Keys' menu.",
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
required: true,
|
|
27
|
+
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
28
|
+
try {
|
|
29
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
30
|
+
yield blobServiceClient.getAccountInfo();
|
|
31
|
+
return {
|
|
32
|
+
valid: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
catch (_b) {
|
|
36
|
+
return {
|
|
37
|
+
valid: false,
|
|
38
|
+
error: 'Invalid Connection String',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
exports.azureBlobStorage = (0, pieces_framework_1.createPiece)({
|
|
44
|
+
displayName: 'Azure Blob Storage',
|
|
45
|
+
auth: exports.azureBlobStorageAuth,
|
|
46
|
+
minimumSupportedRelease: '0.36.1',
|
|
47
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/azure-blob-storage.png',
|
|
48
|
+
authors: ['Daniel-Klippa'],
|
|
49
|
+
actions: [
|
|
50
|
+
// Container actions
|
|
51
|
+
list_containers_1.listContainers,
|
|
52
|
+
create_container_1.createContainer,
|
|
53
|
+
delete_container_1.deleteContainer,
|
|
54
|
+
// Blob actions
|
|
55
|
+
list_blobs_1.listBlobs,
|
|
56
|
+
create_blob_1.createBlob,
|
|
57
|
+
read_blob_1.readBlob,
|
|
58
|
+
delete_blob_1.deleteBlob,
|
|
59
|
+
add_tags_to_blob_1.addTagsToBlob,
|
|
60
|
+
find_blobs_1.findBlobs,
|
|
61
|
+
],
|
|
62
|
+
triggers: [],
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/azure-blob-storage/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,mEAA+D;AAC/D,yDAAqD;AACrD,2DAAuD;AACvD,uDAAmD;AACnD,2DAAuD;AACvD,qEAA+D;AAC/D,yDAAqD;AACrD,qEAAiE;AACjE,qEAAiE;AACjE,sDAAwD;AAE3C,QAAA,oBAAoB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACvD,WAAW,EAAE,yBAAyB;IACtC,WAAW,EACT,yEAAyE;IAC3E,KAAK,EAAE;QACL,gBAAgB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACnC,WAAW,EAAE,mBAAmB;YAChC,WAAW,EACT,qEAAqE;YACvE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,iBAAiB,GAAG,gCAAiB,CAAC,oBAAoB,CAC9D,IAAI,CAAC,gBAAgB,CACtB,CAAC;YACF,MAAM,iBAAiB,CAAC,cAAc,EAAE,CAAC;YAEzC,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,WAAM,CAAC;YACP,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,2BAA2B;aACnC,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,IAAA,8BAAW,EAAC;IAC1C,WAAW,EAAE,oBAAoB;IACjC,IAAI,EAAE,4BAAoB;IAC1B,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,4DAA4D;IACrE,OAAO,EAAE,CAAC,eAAe,CAAC;IAC1B,OAAO,EAAE;QACP,oBAAoB;QACpB,gCAAc;QACd,kCAAe;QACf,kCAAe;QAEf,eAAe;QACf,sBAAS;QACT,wBAAU;QACV,oBAAQ;QACR,wBAAU;QACV,gCAAa;QACb,sBAAS;KACV;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const addTagsToBlob: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
container: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>>;
|
|
7
|
+
blobName: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
tags: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
9
|
+
keepExistingTags: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addTagsToBlob = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.addTagsToBlob = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.azureBlobStorageAuth,
|
|
11
|
+
name: 'addTagsToBlob',
|
|
12
|
+
displayName: 'Add Tags to Blob',
|
|
13
|
+
description: 'Adds Tags to the Blob at the specified location',
|
|
14
|
+
props: {
|
|
15
|
+
container: common_1.containerProp,
|
|
16
|
+
blobName: pieces_framework_1.Property.ShortText({
|
|
17
|
+
displayName: 'Blob Name',
|
|
18
|
+
description: 'The name of the blob to add tags to',
|
|
19
|
+
required: true,
|
|
20
|
+
}),
|
|
21
|
+
tags: pieces_framework_1.Property.Object({
|
|
22
|
+
displayName: 'Tags',
|
|
23
|
+
description: 'The tags to add to the blob',
|
|
24
|
+
required: false,
|
|
25
|
+
defaultValue: {},
|
|
26
|
+
}),
|
|
27
|
+
keepExistingTags: pieces_framework_1.Property.Checkbox({
|
|
28
|
+
displayName: 'Keep Existing Tags',
|
|
29
|
+
description: 'Whether to keep existing tags on the blob',
|
|
30
|
+
required: false,
|
|
31
|
+
defaultValue: false,
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
run(context) {
|
|
35
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const { container, blobName, tags, keepExistingTags } = context.propsValue;
|
|
37
|
+
const auth = context.auth.props;
|
|
38
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
39
|
+
const containerClient = blobServiceClient.getContainerClient(container);
|
|
40
|
+
const blobClient = containerClient.getBlockBlobClient(blobName);
|
|
41
|
+
let newtags = tags;
|
|
42
|
+
if (keepExistingTags) {
|
|
43
|
+
const previousTagResponse = yield blobClient.getTags();
|
|
44
|
+
newtags = Object.assign(Object.assign({}, previousTagResponse.tags), newtags);
|
|
45
|
+
}
|
|
46
|
+
;
|
|
47
|
+
return yield blobClient.setTags(newtags);
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=add-tags-to-blob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-tags-to-blob.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/actions/add-tags-to-blob.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAmD;AACnD,sDAA8D;AAC9D,sCAA0C;AAE7B,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,4BAAoB;IAC1B,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CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const createBlob: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
container: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>>;
|
|
7
|
+
blobName: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
file: import("@activepieces/pieces-framework").FileProperty<true>;
|
|
9
|
+
tags: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBlob = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.createBlob = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.azureBlobStorageAuth,
|
|
11
|
+
name: 'createBlob',
|
|
12
|
+
displayName: 'Create Blob',
|
|
13
|
+
description: 'Creates a new Blob in the specified location',
|
|
14
|
+
props: {
|
|
15
|
+
container: common_1.containerProp,
|
|
16
|
+
blobName: pieces_framework_1.Property.ShortText({
|
|
17
|
+
displayName: 'Blob Name',
|
|
18
|
+
description: 'The name of the blob to create',
|
|
19
|
+
required: true,
|
|
20
|
+
}),
|
|
21
|
+
file: pieces_framework_1.Property.File({
|
|
22
|
+
displayName: 'File',
|
|
23
|
+
description: 'The file to upload as a blob',
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
tags: pieces_framework_1.Property.Object({
|
|
27
|
+
displayName: 'Tags',
|
|
28
|
+
description: 'Optional tags to associate with the blob',
|
|
29
|
+
required: false,
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
32
|
+
run(context) {
|
|
33
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const { container, blobName, file, tags } = context.propsValue;
|
|
35
|
+
const auth = context.auth.props;
|
|
36
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
37
|
+
const containerClient = blobServiceClient.getContainerClient(container);
|
|
38
|
+
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
|
39
|
+
return yield blockBlobClient.uploadData(file.data, { tags: tags });
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=create-blob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-blob.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/actions/create-blob.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAmD;AACnD,sDAA8D;AAC9D,sCAA0C;AAE7B,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,4BAAoB;IAC1B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,8CAA8C;IAC3D,KAAK,EAAE;QACH,SAAS,EAAE,sBAAa;QACxB,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,IAAI,CAAC;YAClB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACpB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAEhC,MAAM,iBAAiB,GAAG,gCAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACxF,MAAM,eAAe,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;YACxE,MAAM,eAAe,GAAG,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YAErE,OAAO,MAAM,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAY,EAAE,CAAC,CAAC;QAC7E,CAAC;KAAA;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const createContainer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
containerName: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createContainer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
8
|
+
exports.createContainer = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: index_1.azureBlobStorageAuth,
|
|
10
|
+
name: 'createContainer',
|
|
11
|
+
displayName: 'Create Container',
|
|
12
|
+
description: 'Creates a new container',
|
|
13
|
+
props: {
|
|
14
|
+
containerName: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Container Name',
|
|
16
|
+
description: 'The name for the newly created container',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
run(context) {
|
|
21
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const { containerName } = context.propsValue;
|
|
23
|
+
const auth = context.auth.props;
|
|
24
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
25
|
+
const { containerCreateResponse, containerClient } = yield blobServiceClient.createContainer(containerName);
|
|
26
|
+
return Object.assign(Object.assign({}, containerCreateResponse), { containerName: containerClient.containerName, accountName: containerClient.accountName });
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=create-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-container.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/actions/create-container.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAmD;AACnD,sDAAwD;AAE3C,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,4BAAoB;IAC1B,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,yBAAyB;IACtC,KAAK,EAAE;QACL,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC7C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAEhC,MAAM,iBAAiB,GAAG,gCAAiB,CAAC,oBAAoB,CAC9D,IAAI,CAAC,gBAAgB,CACtB,CAAC;YACF,MAAM,EAAE,uBAAuB,EAAE,eAAe,EAAE,GAChD,MAAM,iBAAiB,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YAEzD,uCACK,uBAAuB,KAC1B,aAAa,EAAE,eAAe,CAAC,aAAa,EAC5C,WAAW,EAAE,eAAe,CAAC,WAAW,IACxC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const deleteBlob: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
container: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>>;
|
|
7
|
+
blobName: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteBlob = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.deleteBlob = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.azureBlobStorageAuth,
|
|
11
|
+
name: 'deleteBlob',
|
|
12
|
+
displayName: 'Delete Blob',
|
|
13
|
+
description: 'Deletes the Blob at the specified location',
|
|
14
|
+
props: {
|
|
15
|
+
container: common_1.containerProp,
|
|
16
|
+
blobName: pieces_framework_1.Property.ShortText({
|
|
17
|
+
displayName: 'Blob Name',
|
|
18
|
+
description: 'The name of the blob to create',
|
|
19
|
+
required: true,
|
|
20
|
+
})
|
|
21
|
+
},
|
|
22
|
+
run(context) {
|
|
23
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const { container, blobName } = context.propsValue;
|
|
25
|
+
const auth = context.auth.props;
|
|
26
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
27
|
+
const containerClient = blobServiceClient.getContainerClient(container);
|
|
28
|
+
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
|
29
|
+
const _a = yield blockBlobClient.deleteIfExists(), { _response } = _a, rest = tslib_1.__rest(_a, ["_response"]);
|
|
30
|
+
return rest;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=delete-blob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-blob.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/actions/delete-blob.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAmD;AACnD,sDAAwD;AACxD,sCAA0C;AAE7B,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,4BAAoB;IAC1B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,4CAA4C;IACzD,KAAK,EAAE;QACH,SAAS,EAAE,sBAAa;QACxB,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACnD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAEhC,MAAM,iBAAiB,GAAG,gCAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACxF,MAAM,eAAe,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;YACxE,MAAM,eAAe,GAAG,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YAErE,MAAM,KAAuB,MAAM,eAAe,CAAC,cAAc,EAAE,EAA7D,EAAC,SAAS,OAAmD,EAA/C,IAAI,sBAAlB,aAAmB,CAA0C,CAAC;YAEpE,OAAO,IAAI,CAAC;QAEd,CAAC;KAAA;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const deleteContainer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
container: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>>;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteContainer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.deleteContainer = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.azureBlobStorageAuth,
|
|
11
|
+
name: 'deleteContainer',
|
|
12
|
+
displayName: 'Delete Container',
|
|
13
|
+
description: 'Deletes an existing container',
|
|
14
|
+
props: {
|
|
15
|
+
container: common_1.containerProp,
|
|
16
|
+
},
|
|
17
|
+
run(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const { container } = context.propsValue;
|
|
20
|
+
const auth = context.auth.props;
|
|
21
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
22
|
+
return yield blobServiceClient.deleteContainer(container);
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=delete-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-container.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/actions/delete-container.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,uCAAmD;AACnD,sDAAwD;AACxD,sCAA0C;AAE7B,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,4BAAoB;IAC1B,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,+BAA+B;IAC5C,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;KACzB;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACzC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAEhC,MAAM,iBAAiB,GAAG,gCAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACxF,OAAO,MAAM,iBAAiB,CAAC,eAAe,CAAC,SAAS,CAAC,CAAA;QAC3D,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const findBlobs: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
container: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>>;
|
|
7
|
+
tags: import("@activepieces/pieces-framework").ObjectProperty<true>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findBlobs = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.findBlobs = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.azureBlobStorageAuth,
|
|
11
|
+
name: 'findBlobs',
|
|
12
|
+
displayName: 'Find Blobs',
|
|
13
|
+
description: 'Finds Blobs based on their tags',
|
|
14
|
+
props: {
|
|
15
|
+
container: common_1.containerProp,
|
|
16
|
+
tags: pieces_framework_1.Property.Object({
|
|
17
|
+
displayName: 'Tags',
|
|
18
|
+
description: 'The tags to filter blobs by',
|
|
19
|
+
required: true,
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
run(context) {
|
|
23
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
var _a, e_1, _b, _c;
|
|
25
|
+
const { container, tags } = context.propsValue;
|
|
26
|
+
const auth = context.auth.props;
|
|
27
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
28
|
+
const containerClient = blobServiceClient.getContainerClient(container);
|
|
29
|
+
const tagExpressions = Object.entries(tags).map(([key, value]) => `${key}='${value}'`);
|
|
30
|
+
const tagQuery = tagExpressions.join(' AND ');
|
|
31
|
+
const blobs = [];
|
|
32
|
+
try {
|
|
33
|
+
for (var _d = true, _e = tslib_1.__asyncValues(containerClient.findBlobsByTags(tagQuery)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
34
|
+
_c = _f.value;
|
|
35
|
+
_d = false;
|
|
36
|
+
const blob = _c;
|
|
37
|
+
blobs.push({
|
|
38
|
+
name: blob.name
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
43
|
+
finally {
|
|
44
|
+
try {
|
|
45
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
46
|
+
}
|
|
47
|
+
finally { if (e_1) throw e_1.error; }
|
|
48
|
+
}
|
|
49
|
+
;
|
|
50
|
+
return blobs;
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=find-blobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-blobs.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/actions/find-blobs.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAmD;AACnD,sDAAwD;AACxD,sCAA0C;AAE7B,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,4BAAoB;IAC1B,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,iCAAiC;IAC9C,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,IAAI,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACpB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAEhC,MAAM,iBAAiB,GAAG,gCAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACxF,MAAM,eAAe,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;YAExE,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,KAAK,GAAG,CAAC,CAAC;YACvF,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAE9C,MAAM,KAAK,GAAG,EAAE,CAAC;;gBACjB,KAAyB,eAAA,KAAA,sBAAA,eAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAA,IAAA,sDAAE,CAAC;oBAA5C,cAAyC;oBAAzC,WAAyC;oBAAvD,MAAM,IAAI,KAAA,CAAA;oBACnB,KAAK,CAAC,IAAI,CAAC;wBACT,IAAI,EAAE,IAAI,CAAC,IAAI;qBAChB,CAAC,CAAC;gBACL,CAAC;;;;;;;;;YAAA,CAAC;YAEF,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const listBlobs: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
container: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>>;
|
|
7
|
+
includeSnapshots: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
8
|
+
prefix: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listBlobs = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.listBlobs = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.azureBlobStorageAuth,
|
|
11
|
+
name: 'listBlobs',
|
|
12
|
+
displayName: 'List Blobs',
|
|
13
|
+
description: 'List Blobs in the specified Azure Blob Storage container',
|
|
14
|
+
props: {
|
|
15
|
+
container: common_1.containerProp,
|
|
16
|
+
includeSnapshots: pieces_framework_1.Property.Checkbox({
|
|
17
|
+
displayName: 'Include Snapshots',
|
|
18
|
+
description: 'Whether to include snapshots in the list',
|
|
19
|
+
required: false,
|
|
20
|
+
defaultValue: false,
|
|
21
|
+
}),
|
|
22
|
+
prefix: pieces_framework_1.Property.ShortText({
|
|
23
|
+
displayName: 'Prefix Filter',
|
|
24
|
+
description: 'Filter blobs by prefix',
|
|
25
|
+
required: false,
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
run(context) {
|
|
29
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
var _a, e_1, _b, _c;
|
|
31
|
+
const { container, includeSnapshots, prefix } = context.propsValue;
|
|
32
|
+
const auth = context.auth.props;
|
|
33
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
34
|
+
const containerClient = blobServiceClient.getContainerClient(container);
|
|
35
|
+
const options = {
|
|
36
|
+
includeSnapshots: includeSnapshots,
|
|
37
|
+
includeMetadata: true,
|
|
38
|
+
prefix: prefix,
|
|
39
|
+
};
|
|
40
|
+
const blobs = [];
|
|
41
|
+
try {
|
|
42
|
+
for (var _d = true, _e = tslib_1.__asyncValues(containerClient.listBlobsFlat(options)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
43
|
+
_c = _f.value;
|
|
44
|
+
_d = false;
|
|
45
|
+
const blob = _c;
|
|
46
|
+
blobs.push({
|
|
47
|
+
name: blob.name,
|
|
48
|
+
properties: blob.properties,
|
|
49
|
+
metadata: blob.metadata,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
54
|
+
finally {
|
|
55
|
+
try {
|
|
56
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
57
|
+
}
|
|
58
|
+
finally { if (e_1) throw e_1.error; }
|
|
59
|
+
}
|
|
60
|
+
;
|
|
61
|
+
return blobs;
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=list-blobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-blobs.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/actions/list-blobs.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAmD;AACnD,sDAAwD;AACxD,sCAA0C;AAE7B,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,4BAAoB;IAC1B,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,0DAA0D;IACvE,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,gBAAgB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YA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framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
includeDeleted: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
5
|
+
includeSystem: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
6
|
+
prefix: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listContainers = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
8
|
+
exports.listContainers = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: index_1.azureBlobStorageAuth,
|
|
10
|
+
name: 'listContainers',
|
|
11
|
+
displayName: 'List Containers',
|
|
12
|
+
description: 'List Containers in the Azure Blob Storage account',
|
|
13
|
+
props: {
|
|
14
|
+
includeDeleted: pieces_framework_1.Property.Checkbox({
|
|
15
|
+
displayName: 'Include Deleted Containers',
|
|
16
|
+
description: 'Whether to include deleted containers in the list',
|
|
17
|
+
required: false,
|
|
18
|
+
defaultValue: false,
|
|
19
|
+
}),
|
|
20
|
+
includeSystem: pieces_framework_1.Property.Checkbox({
|
|
21
|
+
displayName: 'Include System Containers',
|
|
22
|
+
description: 'Whether to include system containers in the list',
|
|
23
|
+
required: false,
|
|
24
|
+
defaultValue: true,
|
|
25
|
+
}),
|
|
26
|
+
prefix: pieces_framework_1.Property.ShortText({
|
|
27
|
+
displayName: 'Prefix Filter',
|
|
28
|
+
description: 'Filter containers by prefix',
|
|
29
|
+
required: false,
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
32
|
+
run(context) {
|
|
33
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
var _a, e_1, _b, _c;
|
|
35
|
+
const { includeDeleted, includeSystem, prefix } = context.propsValue;
|
|
36
|
+
const auth = context.auth.props;
|
|
37
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
38
|
+
const options = {
|
|
39
|
+
includeDeleted: includeDeleted,
|
|
40
|
+
includeMetadata: true,
|
|
41
|
+
includeSystem: includeSystem,
|
|
42
|
+
prefix: prefix,
|
|
43
|
+
};
|
|
44
|
+
const containers = [];
|
|
45
|
+
try {
|
|
46
|
+
for (var _d = true, _e = tslib_1.__asyncValues(blobServiceClient.listContainers(options)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
47
|
+
_c = _f.value;
|
|
48
|
+
_d = false;
|
|
49
|
+
const container = _c;
|
|
50
|
+
containers.push({
|
|
51
|
+
name: container.name,
|
|
52
|
+
properties: container.properties,
|
|
53
|
+
metadata: container.metadata,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
58
|
+
finally {
|
|
59
|
+
try {
|
|
60
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
61
|
+
}
|
|
62
|
+
finally { if (e_1) throw e_1.error; }
|
|
63
|
+
}
|
|
64
|
+
;
|
|
65
|
+
return containers;
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=list-containers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-containers.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/actions/list-containers.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAmD;AACnD,sDAAwD;AAE3C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,4BAAoB;IAC1B,IAAI,EAAE,gBAAgB;IAC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AAQ,EAAE,SAAS,CAAC,QAAQ;qBAC7B,CAAC,CAAC;gBACL,CAAC;;;;;;;;;YAAA,CAAC;YAEF,OAAO,UAAU,CAAC;QACpB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const readBlob: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
container: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
connectionString: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>>;
|
|
7
|
+
blobName: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readBlob = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
function streamToBuffer(readableStream) {
|
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
+
return new Promise((resolve, reject) => {
|
|
12
|
+
const chunks = [];
|
|
13
|
+
readableStream.on('data', (data) => {
|
|
14
|
+
chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data));
|
|
15
|
+
});
|
|
16
|
+
readableStream.on('end', () => {
|
|
17
|
+
resolve(Buffer.concat(chunks));
|
|
18
|
+
});
|
|
19
|
+
readableStream.on('error', reject);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
;
|
|
24
|
+
exports.readBlob = (0, pieces_framework_1.createAction)({
|
|
25
|
+
auth: index_1.azureBlobStorageAuth,
|
|
26
|
+
name: 'readBlob',
|
|
27
|
+
displayName: 'Read Blob',
|
|
28
|
+
description: 'Read the Blob at the specified lcoation',
|
|
29
|
+
props: {
|
|
30
|
+
container: common_1.containerProp,
|
|
31
|
+
blobName: pieces_framework_1.Property.ShortText({
|
|
32
|
+
displayName: 'Blob Name',
|
|
33
|
+
description: 'The name of the blob to read',
|
|
34
|
+
required: true,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
run(context) {
|
|
38
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const { container, blobName } = context.propsValue;
|
|
40
|
+
const auth = context.auth.props;
|
|
41
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.connectionString);
|
|
42
|
+
const containerClient = blobServiceClient.getContainerClient(container);
|
|
43
|
+
const blobClient = containerClient.getBlobClient(blobName);
|
|
44
|
+
const downloadBlockBlobResponse = yield blobClient.download();
|
|
45
|
+
if (downloadBlockBlobResponse.readableStreamBody) {
|
|
46
|
+
return yield context.files.write({
|
|
47
|
+
fileName: blobName.split('/').pop() || 'downloaded_blob',
|
|
48
|
+
data: yield streamToBuffer(downloadBlockBlobResponse.readableStreamBody)
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
throw new Error('Failed to read blob stream');
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=read-blob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-blob.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/actions/read-blob.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAmD;AACnD,sDAAwD;AACxD,sCAA0C;AAE1C,SAAe,cAAc,CAAC,cAAqC;;QACjE,OAAO,IAAI,OAAO,CAA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E,MAAM,UAAU,GAAG,eAAe,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAE3D,MAAM,yBAAyB,GAAG,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC9D,IAAI,yBAAyB,CAAC,kBAAkB,EAAE,CAAC;gBACjD,OAAO,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;oBAC/B,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,iBAAiB;oBACxD,IAAI,EAAE,MAAM,cAAc,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;iBACzE,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAChD,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.containerProp = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const storage_blob_1 = require("@azure/storage-blob");
|
|
7
|
+
const __1 = require("..");
|
|
8
|
+
exports.containerProp = pieces_framework_1.Property.Dropdown({
|
|
9
|
+
displayName: 'Container',
|
|
10
|
+
description: 'Select the container',
|
|
11
|
+
required: true,
|
|
12
|
+
auth: __1.azureBlobStorageAuth,
|
|
13
|
+
refreshers: ['auth'],
|
|
14
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
15
|
+
var _b, e_1, _c, _d;
|
|
16
|
+
if (!auth) {
|
|
17
|
+
return {
|
|
18
|
+
disabled: true,
|
|
19
|
+
options: [],
|
|
20
|
+
placeholder: 'Please authenticate first',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
;
|
|
24
|
+
const blobServiceClient = storage_blob_1.BlobServiceClient.fromConnectionString(auth.props.connectionString);
|
|
25
|
+
const containers = [];
|
|
26
|
+
try {
|
|
27
|
+
for (var _e = true, _f = tslib_1.__asyncValues(blobServiceClient.listContainers()), _g; _g = yield _f.next(), _b = _g.done, !_b; _e = true) {
|
|
28
|
+
_d = _g.value;
|
|
29
|
+
_e = false;
|
|
30
|
+
const container = _d;
|
|
31
|
+
containers.push({
|
|
32
|
+
label: container.name,
|
|
33
|
+
value: container.name,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
38
|
+
finally {
|
|
39
|
+
try {
|
|
40
|
+
if (!_e && !_b && (_c = _f.return)) yield _c.call(_f);
|
|
41
|
+
}
|
|
42
|
+
finally { if (e_1) throw e_1.error; }
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
disabled: false,
|
|
46
|
+
options: containers,
|
|
47
|
+
placeholder: 'Select a container',
|
|
48
|
+
};
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/community/azure-blob-storage/src/lib/common.ts"],"names":[],"mappings":";;;;AAAA,qEAA0D;AAC1D,sDAAwD;AACxD,0BAA0C;AAE7B,QAAA,aAAa,GAAG,2BAAQ,CAAC,QAAQ,CAAC;IAC3C,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,sBAAsB;IACnC,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,wBAAoB;IAC1B,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;;QACpB,IAAI,CAAC,IAAI,EAAE,CAAC;YACR,OAAO;gBACH,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,2BAA2B;aAC3C,CAAC;QACN,CAAC;QAAA,CAAC;QAEF,MAAM,iBAAiB,GAAG,gCAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAC9F,MAAM,UAAU,GAAG,EAAE,CAAC;;YACtB,KAA8B,eAAA,KAAA,sBAAA,iBAAiB,CAAC,cAAc,EAAE,CAAA,IAAA,sDAAE,CAAC;gBAArC,cAAkC;gBAAlC,WAAkC;gBAArD,MAAM,SAAS,KAAA,CAAA;gBACtB,UAAU,CAAC,IAAI,CAAC;oBACZ,KAAK,EAAE,SAAS,CAAC,IAAI;oBACrB,KAAK,EAAE,SAAS,CAAC,IAAI;iBACxB,CAAC,CAAC;YACP,CAAC;;;;;;;;;QAED,OAAO;YACH,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,UAAU;YACnB,WAAW,EAAE,oBAAoB;SACpC,CAAA;IACL,CAAC,CAAA;CACJ,CAAC,CAAA"}
|