@pipedream/jobnimbus 0.1.0 → 1.0.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/README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# Overview
|
|
2
2
|
|
|
3
|
-
Jobnimbus API can
|
|
4
|
-
information.
|
|
3
|
+
The Jobnimbus API allows for the creation of complex workflows revolving around job and customer management within the construction and contracting industries. With this API, users can automate tasks such as updating job statuses, managing contacts, and creating tasks or appointments. This streamlines the process of moving a job from lead to completion, ensuring communication and record-keeping are seamless.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
# Example Use Cases
|
|
7
6
|
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
-
|
|
7
|
+
- **Automated Job Status Updates**: Trigger a Pipedream workflow whenever a job status is updated in Jobnimbus to send a custom notification via SMS or email through Twilio or SendGrid. This keeps team members in the loop in real-time about job progress.
|
|
8
|
+
|
|
9
|
+
- **Dynamic Contact Import**: When a new contact is added to a Google Sheet, use Pipedream to automatically create a corresponding contact in Jobnimbus. This ensures your customer database is always synchronized and up-to-date without manual entry.
|
|
10
|
+
|
|
11
|
+
- **Task Management with Calendar Integration**: On creation of a new task in Jobnimbus, trigger a Pipedream workflow to add an event to a Google Calendar, inviting all relevant team members. This automation helps in scheduling and making sure everyone is aware of their assignments.
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import app from "../../jobnimbus.app.mjs";
|
|
2
2
|
import utils from "../../common/utils.mjs";
|
|
3
3
|
import { attachmentTypes } from "../../common/constants.mjs";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
ConfigurationError, getFileStream,
|
|
6
|
+
} from "@pipedream/platform";
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
key: "jobnimbus-create-attachment",
|
|
9
|
-
version: "0.0
|
|
10
|
+
version: "1.0.0",
|
|
10
11
|
type: "action",
|
|
11
12
|
name: "Create Attachment",
|
|
12
13
|
description: "Creates an attachment. [See the documentation](https://documenter.getpostman.com/view/3919598/S11PpG4x#5f3f485b-91f9-4ed9-912c-99a07987ac6c)",
|
|
13
14
|
props: {
|
|
14
15
|
app,
|
|
15
|
-
|
|
16
|
+
file: {
|
|
16
17
|
type: "string",
|
|
17
|
-
label: "File Path",
|
|
18
|
-
description: "The file to upload
|
|
18
|
+
label: "File Path or URL",
|
|
19
|
+
description: "The file to upload. Provide a file URL or a path to a file in the `/tmp` directory.",
|
|
19
20
|
},
|
|
20
21
|
type: {
|
|
21
22
|
type: "string",
|
|
@@ -43,22 +44,34 @@ export default {
|
|
|
43
44
|
optional: true,
|
|
44
45
|
},
|
|
45
46
|
},
|
|
47
|
+
methods: {
|
|
48
|
+
streamToBase64(stream) {
|
|
49
|
+
return new Promise((resolve, reject) => {
|
|
50
|
+
const chunks = [];
|
|
51
|
+
stream.on("data", (chunk) => chunks.push(chunk));
|
|
52
|
+
stream.on("end", () => {
|
|
53
|
+
const buffer = Buffer.concat(chunks);
|
|
54
|
+
resolve(buffer.toString("base64"));
|
|
55
|
+
});
|
|
56
|
+
stream.on("error", reject);
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
},
|
|
46
60
|
async run ({ $ }) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
throw new ConfigurationError("`File Path` must be a valid file path!");
|
|
61
|
+
if (!this.file) {
|
|
62
|
+
throw new ConfigurationError("The `File Path or URL` prop is required.");
|
|
50
63
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
|
|
65
|
+
const stream = await getFileStream(this.file);
|
|
66
|
+
const fileData = await this.streamToBase64(stream);
|
|
67
|
+
|
|
55
68
|
const data = {
|
|
56
69
|
...utils.extractProps(this, {
|
|
57
70
|
customerIdFromContacts: "customer",
|
|
58
71
|
}),
|
|
59
72
|
data: fileData,
|
|
60
73
|
};
|
|
61
|
-
delete data
|
|
74
|
+
delete data.file;
|
|
62
75
|
const resp = await this.app.createAttachment({
|
|
63
76
|
$,
|
|
64
77
|
data,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/jobnimbus",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Pipedream Jobnimbus Components",
|
|
5
5
|
"main": "jobnimbus.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
],
|
|
10
10
|
"homepage": "https://pipedream.com/apps/jobnimbus",
|
|
11
11
|
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@pipedream/platform": "^1.5.1"
|
|
14
|
-
},
|
|
15
12
|
"publishConfig": {
|
|
16
13
|
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@pipedream/platform": "^3.1.0"
|
|
17
17
|
}
|
|
18
18
|
}
|