@taskmagic/apps-pushbullet 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 +47 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +36 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/send-a-link.d.ts +5 -0
- package/src/lib/actions/send-a-link.js +44 -0
- package/src/lib/actions/send-a-link.js.map +1 -0
- package/src/lib/actions/send-a-note.d.ts +4 -0
- package/src/lib/actions/send-a-note.js +36 -0
- package/src/lib/actions/send-a-note.js.map +1 -0
- package/src/lib/common/auth.d.ts +1 -0
- package/src/lib/common/auth.js +14 -0
- package/src/lib/common/auth.js.map +1 -0
- package/src/lib/common/client.d.ts +3 -0
- package/src/lib/common/client.js +27 -0
- package/src/lib/common/client.js.map +1 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@taskmagic/apps-pushbullet",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@anthropic-ai/sdk": "0.33.1",
|
|
6
|
+
"@sinclair/typebox": "0.34.11",
|
|
7
|
+
"axios": "1.17.0",
|
|
8
|
+
"axios-retry": "4.4.1",
|
|
9
|
+
"deepmerge-ts": "7.1.0",
|
|
10
|
+
"mime-types": "2.1.35",
|
|
11
|
+
"nanoid": "3.3.8",
|
|
12
|
+
"openai": "4.67.1",
|
|
13
|
+
"replicate": "0.34.1",
|
|
14
|
+
"semver": "7.6.0",
|
|
15
|
+
"zod": "3.25.76",
|
|
16
|
+
"@taskmagic/pieces-common": "0.4.4",
|
|
17
|
+
"@taskmagic/pieces-framework": "0.7.46",
|
|
18
|
+
"@taskmagic/shared": "0.10.171",
|
|
19
|
+
"tslib": "1.14.1"
|
|
20
|
+
},
|
|
21
|
+
"overrides": {
|
|
22
|
+
"cross-spawn": "7.0.6",
|
|
23
|
+
"elliptic": "^6.6.1",
|
|
24
|
+
"fast-xml-parser": "^4.4.1",
|
|
25
|
+
"protobufjs": "^7.5.5",
|
|
26
|
+
"tmp": "^0.2.4",
|
|
27
|
+
"koa": "^2.16.4",
|
|
28
|
+
"picomatch": "^4.0.4",
|
|
29
|
+
"langsmith": "^0.6.0",
|
|
30
|
+
"serialize-javascript": "^6.0.2",
|
|
31
|
+
"elevenlabs": {
|
|
32
|
+
"form-data": "^4.0.4"
|
|
33
|
+
},
|
|
34
|
+
"@tryfabric/martian": {
|
|
35
|
+
"@notionhq/client": "$@notionhq/client"
|
|
36
|
+
},
|
|
37
|
+
"vite": {
|
|
38
|
+
"rollup": "npm:@rollup/wasm-node@^4.61.1"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"resolutions": {
|
|
42
|
+
"rollup": "npm:@rollup/wasm-node@^4.61.1"
|
|
43
|
+
},
|
|
44
|
+
"types": "./src/index.d.ts",
|
|
45
|
+
"main": "./src/index.js",
|
|
46
|
+
"type": "commonjs"
|
|
47
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pushbullet: import("@taskmagic/pieces-framework").Piece<import("@taskmagic/pieces-framework").SecretTextProperty<true>>;
|
package/src/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pushbullet = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
6
|
+
const shared_1 = require("@taskmagic/shared");
|
|
7
|
+
const pieces_common_1 = require("@taskmagic/pieces-common");
|
|
8
|
+
const auth_1 = require("./lib/common/auth");
|
|
9
|
+
const client_1 = require("./lib/common/client");
|
|
10
|
+
const send_a_link_1 = require("./lib/actions/send-a-link");
|
|
11
|
+
const send_a_note_1 = require("./lib/actions/send-a-note");
|
|
12
|
+
exports.pushbullet = (0, pieces_framework_1.createPiece)({
|
|
13
|
+
displayName: 'Pushbullet',
|
|
14
|
+
description: 'Cross-device notification service',
|
|
15
|
+
categories: [shared_1.PieceCategory.COMMUNICATION],
|
|
16
|
+
auth: auth_1.pushbulletAuth,
|
|
17
|
+
minimumSupportedRelease: '0.30.0',
|
|
18
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/pushbullet.png',
|
|
19
|
+
authors: ['sanket-a11y'],
|
|
20
|
+
actions: [
|
|
21
|
+
send_a_link_1.sendALink,
|
|
22
|
+
send_a_note_1.sendANote,
|
|
23
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
24
|
+
auth: auth_1.pushbulletAuth,
|
|
25
|
+
baseUrl: () => client_1.BASE_URL,
|
|
26
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
+
return {
|
|
28
|
+
Authorization: `Bearer ${auth}`,
|
|
29
|
+
'Content-Type': 'application/json',
|
|
30
|
+
};
|
|
31
|
+
}),
|
|
32
|
+
}),
|
|
33
|
+
],
|
|
34
|
+
triggers: [],
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/pushbullet/src/index.ts"],"names":[],"mappings":";;;;AAAA,kEAA0D;AAC1D,8CAAkD;AAClD,4DAAqE;AACrE,4CAAmD;AACnD,gDAA+C;AAC/C,2DAAsD;AACtD,2DAAsD;AAEzC,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC;IACpC,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,mCAAmC;IAChD,UAAU,EAAE,CAAC,sBAAa,CAAC,aAAa,CAAC;IACzC,IAAI,EAAE,qBAAc;IACpB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,oDAAoD;IAC7D,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,OAAO,EAAE;QACP,uBAAS;QACT,uBAAS;QACT,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,qBAAc;YACpB,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAQ;YACvB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,OAAO;oBACL,aAAa,EAAE,UAAU,IAAc,EAAE;oBACzC,cAAc,EAAE,kBAAkB;iBACnC,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const sendALink: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
url: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
title: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
body: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendALink = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const client_1 = require("../common/client");
|
|
8
|
+
const pieces_common_1 = require("@taskmagic/pieces-common");
|
|
9
|
+
exports.sendALink = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.pushbulletAuth,
|
|
11
|
+
name: 'sendALink',
|
|
12
|
+
displayName: 'Send a Link',
|
|
13
|
+
description: 'Send a link notification',
|
|
14
|
+
props: {
|
|
15
|
+
url: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'URL to send',
|
|
17
|
+
description: '',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
title: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Title',
|
|
22
|
+
description: '',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
body: pieces_framework_1.Property.ShortText({
|
|
26
|
+
displayName: 'Body',
|
|
27
|
+
description: '',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
run(context) {
|
|
32
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const { url, title, body } = context.propsValue;
|
|
34
|
+
const response = yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.POST, '/pushes', {
|
|
35
|
+
type: 'link',
|
|
36
|
+
url,
|
|
37
|
+
title,
|
|
38
|
+
body,
|
|
39
|
+
});
|
|
40
|
+
return response;
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=send-a-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-a-link.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/pushbullet/src/lib/actions/send-a-link.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,yCAAgD;AAChD,6CAA+C;AAC/C,4DAAsD;AAEzC,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,0BAA0B;IACvC,KAAK,EAAE;QACL,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEhD,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAc,EACtB,0BAAU,CAAC,IAAI,EACf,SAAS,EACT;gBACE,IAAI,EAAE,MAAM;gBACZ,GAAG;gBACH,KAAK;gBACL,IAAI;aACL,CACF,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const sendANote: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
title: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
body: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendANote = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const client_1 = require("../common/client");
|
|
8
|
+
const pieces_common_1 = require("@taskmagic/pieces-common");
|
|
9
|
+
exports.sendANote = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.pushbulletAuth,
|
|
11
|
+
name: 'sendANote',
|
|
12
|
+
displayName: 'Send a Note',
|
|
13
|
+
description: 'Send me a text notification',
|
|
14
|
+
props: {
|
|
15
|
+
title: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Note Title',
|
|
17
|
+
description: '',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
body: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Note Body',
|
|
22
|
+
description: '',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
run(context) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.POST, '/pushes', {
|
|
29
|
+
type: 'note',
|
|
30
|
+
title: context.propsValue.title,
|
|
31
|
+
body: context.propsValue.body,
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=send-a-note.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-a-note.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/pushbullet/src/lib/actions/send-a-note.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,yCAAgD;AAChD,6CAA+C;AAC/C,4DAAsD;AAEzC,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,IAAA,oBAAW,EACtB,OAAO,CAAC,IAAc,EACtB,0BAAU,CAAC,IAAI,EACf,SAAS,EACT;gBACE,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC/B,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;aAC9B,CACF,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pushbulletAuth: import("@taskmagic/pieces-framework").SecretTextProperty<true>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pushbulletAuth = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
5
|
+
const authHelpDescription = `
|
|
6
|
+
1. Login to your Pushbullet Dashboard.
|
|
7
|
+
2. Go to **https://www.pushbullet.com/#settings/account**.
|
|
8
|
+
3. **Create Access Token** then copy to the clipboard and paste it.`;
|
|
9
|
+
exports.pushbulletAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
10
|
+
displayName: 'API Token',
|
|
11
|
+
description: authHelpDescription,
|
|
12
|
+
required: true,
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/pushbullet/src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,kEAAwD;AAExD,MAAM,mBAAmB,GAAG;;;qEAGyC,CAAC;AAEzD,QAAA,cAAc,GAAG,4BAAS,CAAC,UAAU,CAAC;IACjD,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,mBAAmB;IAChC,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BASE_URL = void 0;
|
|
4
|
+
exports.makeRequest = makeRequest;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const pieces_common_1 = require("@taskmagic/pieces-common");
|
|
7
|
+
exports.BASE_URL = `https://api.pushbullet.com/v2`;
|
|
8
|
+
function makeRequest(access_token, method, path, body) {
|
|
9
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
try {
|
|
11
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
12
|
+
method,
|
|
13
|
+
url: `${exports.BASE_URL}${path}`,
|
|
14
|
+
headers: {
|
|
15
|
+
Authorization: `Bearer ${access_token}`,
|
|
16
|
+
'Content-Type': 'application/json',
|
|
17
|
+
},
|
|
18
|
+
body,
|
|
19
|
+
});
|
|
20
|
+
return response.body;
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
throw new Error(`Unexpected error: ${error.message || String(error)}`);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/pushbullet/src/lib/common/client.ts"],"names":[],"mappings":";;;AAIA,kCAoBC;;AAxBD,4DAAkE;AAErD,QAAA,QAAQ,GAAG,+BAA+B,CAAC;AAExD,SAAsB,WAAW,CAC/B,YAAoB,EACpB,MAAkB,EAClB,IAAY,EACZ,IAAc;;QAEd,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM;gBACN,GAAG,EAAE,GAAG,gBAAQ,GAAG,IAAI,EAAE;gBACzB,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,YAAY,EAAE;oBACvC,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI;aACL,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,qBAAqB,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CAAA"}
|