Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions components/brosix/.gitignore

This file was deleted.

28 changes: 28 additions & 0 deletions components/brosix/actions/send-message/send-message.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import app from "../../brosix.app.mjs";

export default {
key: "brosix-send-message",
name: "Send Message",
description: "Send a message with Brosix. [See the documentation](https://help.brosix.com/notifications-api/)",
version: "0.0.1",
type: "action",
props: {
app,
msg: {
propDefinition: [
app,
"msg",
],
},
},
async run({ $ }) {
const response = await this.app.sendMessage({
$,
params: {
msg: this.msg,
},
});
$.export("$summary", "Successfully sent the message");
return response;
},
};
13 changes: 0 additions & 13 deletions components/brosix/app/brosix.app.ts

This file was deleted.

42 changes: 42 additions & 0 deletions components/brosix/brosix.app.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { axios } from "@pipedream/platform";

export default {
type: "app",
app: "brosix",
propDefinitions: {
msg: {
type: "string",
label: "Message",
description: "The message that will be sent",
},
},
methods: {
_baseUrl() {
return "https://box-n2.brosix.com/api/v1";
},
async _makeRequest(opts = {}) {
const {
$ = this,
path,
params,
...otherOpts
} = opts;
return axios($, {
...otherOpts,
url: this._baseUrl() + path,
params: {
"apikey": `${this.$auth.api_key}`,
...params,
},
});
},

async sendMessage(args = {}) {
return this._makeRequest({
path: "/message/send/",
method: "post",
...args,
});
},
},
};
10 changes: 5 additions & 5 deletions components/brosix/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "@pipedream/brosix",
"version": "0.0.3",
"version": "0.1.0",
"description": "Pipedream Brosix Components",
"main": "dist/app/brosix.app.mjs",
"main": "brosix.app.mjs",
"keywords": [
"pipedream",
"brosix"
],
"files": [
"dist"
],
"homepage": "https://pipedream.com/apps/brosix",
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.0.3"
}
}
6 changes: 5 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading