@pipedream/qualetics 0.0.1 → 0.1.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
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
The Qualetics API provides data intelligence as a service, allowing you to transform your data into actionable insights. With this API, you can perform advanced data analysis, predict trends, and generate reports to make informed decisions swiftly. On Pipedream, Qualetics can be integrated into workflows to automate data analysis, connect with other services for enriched data operations, and trigger actions based on the insights derived.
|
|
4
|
+
|
|
5
|
+
# Example Use Cases
|
|
6
|
+
|
|
7
|
+
- **Automated Data Analysis and Reporting**: Schedule a Pipedream workflow to pull data from your apps, send it to the Qualetics API for analysis, and compile the results into a report. This could be automatically emailed to stakeholders using a service like SendGrid or saved to Google Sheets for easy access and sharing.
|
|
8
|
+
|
|
9
|
+
- **Real-time Data Monitoring and Alerts**: Create a Pipedream workflow that listens to signals from your product or service, sends this data to Qualetics for analysis, and uses the results to trigger alerts. For instance, when key performance indicators drop below a certain threshold, an alert could be sent via Slack to your team.
|
|
10
|
+
|
|
11
|
+
- **Enhanced Customer Experience with Predictive Analytics**: Leverage the Qualetics API to predict customer behavior by analyzing historical data. Integrate this with a CRM tool like Salesforce on Pipedream to flag high-value customers or potential churn risks, enabling proactive engagement or tailored marketing campaigns.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import qualetics from "../../qualetics.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "qualetics-run-data-machine",
|
|
5
|
+
name: "Run Data Machine",
|
|
6
|
+
description: "Initiates a previously designed data machine within Qualetics, executing the specific analytical tasks it was built for. [See the documentation](https://docs.qualetics.com/data-machines)",
|
|
7
|
+
version: "0.0.2",
|
|
8
|
+
annotations: {
|
|
9
|
+
destructiveHint: false,
|
|
10
|
+
openWorldHint: true,
|
|
11
|
+
readOnlyHint: false,
|
|
12
|
+
},
|
|
13
|
+
type: "action",
|
|
14
|
+
props: {
|
|
15
|
+
qualetics,
|
|
16
|
+
dataMachineId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
qualetics,
|
|
19
|
+
"dataMachineId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
input: {
|
|
23
|
+
type: "string",
|
|
24
|
+
label: "Input",
|
|
25
|
+
description: "Input for the data machine",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
async run({ $ }) {
|
|
29
|
+
const response = await this.qualetics.initiateDataMachine({
|
|
30
|
+
$,
|
|
31
|
+
params: {
|
|
32
|
+
id: this.dataMachineId,
|
|
33
|
+
},
|
|
34
|
+
data: JSON.stringify({
|
|
35
|
+
input: this.input,
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
if (response?.status === "Completed") {
|
|
39
|
+
$.export("$summary", `Successfully initiated Data Machine with ID: ${this.dataMachineId}`);
|
|
40
|
+
}
|
|
41
|
+
return response;
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import qualetics from "../../qualetics.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "qualetics-send-data",
|
|
5
|
+
name: "Send Data",
|
|
6
|
+
description: "Send an event with data to the system. [See the documentation](https://docs.qualetics.com/rest-api-integration-to-send-data)",
|
|
7
|
+
version: "0.0.3",
|
|
8
|
+
annotations: {
|
|
9
|
+
destructiveHint: false,
|
|
10
|
+
openWorldHint: true,
|
|
11
|
+
readOnlyHint: false,
|
|
12
|
+
},
|
|
13
|
+
type: "action",
|
|
14
|
+
ai: "optimized",
|
|
15
|
+
props: {
|
|
16
|
+
qualetics,
|
|
17
|
+
actor: {
|
|
18
|
+
type: "object",
|
|
19
|
+
label: "Actor",
|
|
20
|
+
description: "Actor data to send. Example: `{\"type\":\"User\",\"id\":\"js1234\"}`",
|
|
21
|
+
},
|
|
22
|
+
action: {
|
|
23
|
+
type: "object",
|
|
24
|
+
label: "Action",
|
|
25
|
+
description: "Action data to send. Example: `{\"type\":\"ButtonClick\"}`",
|
|
26
|
+
},
|
|
27
|
+
context: {
|
|
28
|
+
type: "object",
|
|
29
|
+
label: "Context",
|
|
30
|
+
description: "Context data to send. Example: `{\"type\":\"Button\",\"name\":\"Button1\"}`",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
parseObj(obj) {
|
|
35
|
+
if (typeof obj === "string") {
|
|
36
|
+
return JSON.parse(obj);
|
|
37
|
+
}
|
|
38
|
+
return obj;
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
async run({ $ }) {
|
|
42
|
+
const response = await this.qualetics.sendData({
|
|
43
|
+
$,
|
|
44
|
+
data: JSON.stringify({
|
|
45
|
+
actor: this.parseObj(this.actor),
|
|
46
|
+
action: this.parseObj(this.action),
|
|
47
|
+
context: this.parseObj(this.context),
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
if (response?.Status === "Success") {
|
|
51
|
+
$.export("$summary", "Successfully sent data.");
|
|
52
|
+
}
|
|
53
|
+
return response;
|
|
54
|
+
},
|
|
55
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/qualetics",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Pipedream Qualetics Components",
|
|
5
5
|
"main": "qualetics.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -11,5 +11,8 @@
|
|
|
11
11
|
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@pipedream/platform": "^1.6.8"
|
|
14
17
|
}
|
|
15
18
|
}
|
package/qualetics.app.mjs
CHANGED
|
@@ -1,11 +1,48 @@
|
|
|
1
|
+
import { axios } from "@pipedream/platform";
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
type: "app",
|
|
3
5
|
app: "qualetics",
|
|
4
|
-
propDefinitions: {
|
|
6
|
+
propDefinitions: {
|
|
7
|
+
dataMachineId: {
|
|
8
|
+
type: "string",
|
|
9
|
+
label: "Data Machine ID",
|
|
10
|
+
description: "The ID of the Data Machine to initiate",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
5
13
|
methods: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
_makeRequest(opts = {}) {
|
|
15
|
+
const {
|
|
16
|
+
$ = this,
|
|
17
|
+
...otherOpts
|
|
18
|
+
} = opts;
|
|
19
|
+
return axios($, {
|
|
20
|
+
...otherOpts,
|
|
21
|
+
headers: {
|
|
22
|
+
"Authorization": `Bearer ${this.$auth.oauth_access_token}`,
|
|
23
|
+
"Content-Type": "application/json",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
initiateDataMachine(opts = {}) {
|
|
28
|
+
return this._makeRequest({
|
|
29
|
+
method: "POST",
|
|
30
|
+
url: "https://mlapi.qualetics.com/api/datamachine/init",
|
|
31
|
+
...opts,
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
sendData({
|
|
35
|
+
params, ...opts
|
|
36
|
+
}) {
|
|
37
|
+
return this._makeRequest({
|
|
38
|
+
method: "POST",
|
|
39
|
+
url: "https://mq.qualetics.com/api/sendmessage",
|
|
40
|
+
params: {
|
|
41
|
+
...params,
|
|
42
|
+
"client_id": `${this.$auth.app_prefix}`,
|
|
43
|
+
},
|
|
44
|
+
...opts,
|
|
45
|
+
});
|
|
9
46
|
},
|
|
10
47
|
},
|
|
11
|
-
};
|
|
48
|
+
};
|