@oneuptime/common 9.2.10 → 9.2.11
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/Server/Types/Workflow/Components/Discord/SendMessageToChannel.ts +108 -0
- package/Server/Types/Workflow/Components/Index.ts +2 -0
- package/Types/Workflow/ComponentID.ts +1 -0
- package/Types/Workflow/Components/Discord.ts +68 -0
- package/Types/Workflow/Components.ts +7 -0
- package/build/dist/Server/Types/Workflow/Components/Discord/SendMessageToChannel.js +92 -0
- package/build/dist/Server/Types/Workflow/Components/Discord/SendMessageToChannel.js.map +1 -0
- package/build/dist/Server/Types/Workflow/Components/Index.js +2 -0
- package/build/dist/Server/Types/Workflow/Components/Index.js.map +1 -1
- package/build/dist/Types/Workflow/ComponentID.js +1 -0
- package/build/dist/Types/Workflow/ComponentID.js.map +1 -1
- package/build/dist/Types/Workflow/Components/Discord.js +61 -0
- package/build/dist/Types/Workflow/Components/Discord.js.map +1 -0
- package/build/dist/Types/Workflow/Components.js +7 -0
- package/build/dist/Types/Workflow/Components.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import ComponentCode, { RunOptions, RunReturnType } from "../../ComponentCode";
|
|
2
|
+
import HTTPErrorResponse from "../../../../../Types/API/HTTPErrorResponse";
|
|
3
|
+
import HTTPResponse from "../../../../../Types/API/HTTPResponse";
|
|
4
|
+
import URL from "../../../../../Types/API/URL";
|
|
5
|
+
import APIException from "../../../../../Types/Exception/ApiException";
|
|
6
|
+
import BadDataException from "../../../../../Types/Exception/BadDataException";
|
|
7
|
+
import { JSONObject } from "../../../../../Types/JSON";
|
|
8
|
+
import ComponentMetadata, {
|
|
9
|
+
Port,
|
|
10
|
+
} from "../../../../../Types/Workflow/Component";
|
|
11
|
+
import ComponentID from "../../../../../Types/Workflow/ComponentID";
|
|
12
|
+
import DiscordComponents from "../../../../../Types/Workflow/Components/Discord";
|
|
13
|
+
import API from "../../../../../Utils/API";
|
|
14
|
+
import CaptureSpan from "../../../../Utils/Telemetry/CaptureSpan";
|
|
15
|
+
|
|
16
|
+
export default class SendMessageToChannel extends ComponentCode {
|
|
17
|
+
public constructor() {
|
|
18
|
+
super();
|
|
19
|
+
|
|
20
|
+
const Component: ComponentMetadata | undefined = DiscordComponents.find(
|
|
21
|
+
(i: ComponentMetadata) => {
|
|
22
|
+
return i.id === ComponentID.DiscordSendMessageToChannel;
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
if (!Component) {
|
|
27
|
+
throw new BadDataException("Component not found.");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
this.setMetadata(Component);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@CaptureSpan()
|
|
34
|
+
public override async run(
|
|
35
|
+
args: JSONObject,
|
|
36
|
+
options: RunOptions,
|
|
37
|
+
): Promise<RunReturnType> {
|
|
38
|
+
const successPort: Port | undefined = this.getMetadata().outPorts.find(
|
|
39
|
+
(p: Port) => {
|
|
40
|
+
return p.id === "success";
|
|
41
|
+
},
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
if (!successPort) {
|
|
45
|
+
throw options.onError(new BadDataException("Success port not found"));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const errorPort: Port | undefined = this.getMetadata().outPorts.find(
|
|
49
|
+
(p: Port) => {
|
|
50
|
+
return p.id === "error";
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
if (!errorPort) {
|
|
55
|
+
throw options.onError(new BadDataException("Error port not found"));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (!args["text"]) {
|
|
59
|
+
throw options.onError(new BadDataException("Discord message not found"));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (!args["webhook-url"]) {
|
|
63
|
+
throw options.onError(
|
|
64
|
+
new BadDataException("Discord Webhook URL not found"),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
args["webhook-url"] = URL.fromString(
|
|
69
|
+
args["webhook-url"]?.toString() as string,
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
let apiResult: HTTPResponse<JSONObject> | HTTPErrorResponse | null = null;
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
// https://discord.com/developers/docs/resources/webhook#execute-webhook
|
|
76
|
+
apiResult = await API.post({
|
|
77
|
+
url: args["webhook-url"] as URL,
|
|
78
|
+
data: {
|
|
79
|
+
content: args["text"] as string,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
if (apiResult instanceof HTTPErrorResponse) {
|
|
84
|
+
return Promise.resolve({
|
|
85
|
+
returnValues: {
|
|
86
|
+
error: apiResult.message || "Server Error.",
|
|
87
|
+
},
|
|
88
|
+
executePort: errorPort,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return Promise.resolve({
|
|
92
|
+
returnValues: {},
|
|
93
|
+
executePort: successPort,
|
|
94
|
+
});
|
|
95
|
+
} catch (err) {
|
|
96
|
+
if (err instanceof HTTPErrorResponse) {
|
|
97
|
+
return Promise.resolve({
|
|
98
|
+
returnValues: {
|
|
99
|
+
error: err.message || "Server Error.",
|
|
100
|
+
},
|
|
101
|
+
executePort: errorPort,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
throw options.onError(new APIException("Something wrong happened."));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -17,6 +17,7 @@ import OnUpdateBaseModel from "./BaseModel/OnUpdateBaseModel";
|
|
|
17
17
|
import UpdateManyBaseModel from "./BaseModel/UpdateManyBaseModel";
|
|
18
18
|
import UpdateOneBaseModel from "./BaseModel/UpdateOneBaseModel";
|
|
19
19
|
import IfElse from "./Conditions/IfElse";
|
|
20
|
+
import DiscordSendMessageToChannel from "./Discord/SendMessageToChannel";
|
|
20
21
|
import Email from "./Email";
|
|
21
22
|
import JsonToText from "./JSON/JsonToText";
|
|
22
23
|
import MergeJSON from "./JSON/MergeJson";
|
|
@@ -37,6 +38,7 @@ import ApiPatch from "./API/Patch";
|
|
|
37
38
|
const Components: Dictionary<ComponentCode> = {
|
|
38
39
|
[ComponentID.Webhook]: new WebhookTrigger(),
|
|
39
40
|
[ComponentID.SlackSendMessageToChannel]: new SlackSendMessageToChannel(),
|
|
41
|
+
[ComponentID.DiscordSendMessageToChannel]: new DiscordSendMessageToChannel(),
|
|
40
42
|
[ComponentID.MicrosoftTeamsSendMessageToChannel]:
|
|
41
43
|
new MicrosoftTeamsSendMessageToChannel(),
|
|
42
44
|
[ComponentID.Log]: new Log(),
|
|
@@ -3,6 +3,7 @@ enum ComponentID {
|
|
|
3
3
|
Log = "log",
|
|
4
4
|
SlackSendMessageToChannel = "slack-send-message-to-channel",
|
|
5
5
|
MicrosoftTeamsSendMessageToChannel = "microsoft-teams-send-message-to-channel",
|
|
6
|
+
DiscordSendMessageToChannel = "discord-send-message-to-channel",
|
|
6
7
|
Schedule = "schedule",
|
|
7
8
|
JavaScriptCode = "javascript",
|
|
8
9
|
Manual = "manual",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import IconProp from "../../Icon/IconProp";
|
|
2
|
+
import ComponentID from "../ComponentID";
|
|
3
|
+
import ComponentMetadata, {
|
|
4
|
+
ComponentInputType,
|
|
5
|
+
ComponentType,
|
|
6
|
+
} from "./../Component";
|
|
7
|
+
|
|
8
|
+
const components: Array<ComponentMetadata> = [
|
|
9
|
+
{
|
|
10
|
+
id: ComponentID.DiscordSendMessageToChannel,
|
|
11
|
+
title: "Send Message to Discord",
|
|
12
|
+
category: "Discord",
|
|
13
|
+
description: "Send message to Discord channel",
|
|
14
|
+
iconProp: IconProp.SendMessage,
|
|
15
|
+
componentType: ComponentType.Component,
|
|
16
|
+
arguments: [
|
|
17
|
+
{
|
|
18
|
+
id: "webhook-url",
|
|
19
|
+
name: "Discord Incoming Webhook URL",
|
|
20
|
+
description:
|
|
21
|
+
"Need help creating a webhook? Check docs here: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks",
|
|
22
|
+
type: ComponentInputType.URL,
|
|
23
|
+
required: true,
|
|
24
|
+
placeholder:
|
|
25
|
+
"https://discord.com/api/webhooks/1234567890/XXXXXXXXXXXXXXXXXXXXXXXX",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "text",
|
|
29
|
+
name: "Message Text",
|
|
30
|
+
description: "Message to send to Discord.",
|
|
31
|
+
type: ComponentInputType.LongText,
|
|
32
|
+
required: true,
|
|
33
|
+
placeholder: "Test Discord message from OneUptime",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
returnValues: [
|
|
37
|
+
{
|
|
38
|
+
id: "error",
|
|
39
|
+
name: "Error",
|
|
40
|
+
description: "Error, if there is any.",
|
|
41
|
+
type: ComponentInputType.Text,
|
|
42
|
+
required: false,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
inPorts: [
|
|
46
|
+
{
|
|
47
|
+
title: "In",
|
|
48
|
+
description:
|
|
49
|
+
"Please connect components to this port for this component to work.",
|
|
50
|
+
id: "in",
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
outPorts: [
|
|
54
|
+
{
|
|
55
|
+
title: "Success",
|
|
56
|
+
description: "This is executed when the message is successfully posted",
|
|
57
|
+
id: "success",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
title: "Error",
|
|
61
|
+
description: "This is executed when there is an error",
|
|
62
|
+
id: "error",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
export default components;
|
|
@@ -2,6 +2,7 @@ import IconProp from "../Icon/IconProp";
|
|
|
2
2
|
import ComponentMetadata, { ComponentCategory } from "./Component";
|
|
3
3
|
import APIComponents from "./Components/API";
|
|
4
4
|
import ConditionComponents from "./Components/Condition";
|
|
5
|
+
import DiscordComponents from "./Components/Discord";
|
|
5
6
|
import EmailComponents from "./Components/Email";
|
|
6
7
|
import JsonComponents from "./Components/JSON";
|
|
7
8
|
import JavaScriptComponents from "./Components/JavaScript";
|
|
@@ -18,6 +19,7 @@ const components: Array<ComponentMetadata> = [
|
|
|
18
19
|
...APIComponents,
|
|
19
20
|
...ScheduleComponents,
|
|
20
21
|
...SlackComponents,
|
|
22
|
+
...DiscordComponents,
|
|
21
23
|
...ConditionComponents,
|
|
22
24
|
...JsonComponents,
|
|
23
25
|
...JavaScriptComponents,
|
|
@@ -46,6 +48,11 @@ export const Categories: Array<ComponentCategory> = [
|
|
|
46
48
|
description: "Integrate OneUptime with your Slack team.",
|
|
47
49
|
icon: IconProp.SendMessage,
|
|
48
50
|
},
|
|
51
|
+
{
|
|
52
|
+
name: "Discord",
|
|
53
|
+
description: "Integrate OneUptime with your Discord server.",
|
|
54
|
+
icon: IconProp.SendMessage,
|
|
55
|
+
},
|
|
49
56
|
{
|
|
50
57
|
name: "Microsoft Teams",
|
|
51
58
|
description: "Integrate OneUptime with your Microsoft Teams.",
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import ComponentCode from "../../ComponentCode";
|
|
11
|
+
import HTTPErrorResponse from "../../../../../Types/API/HTTPErrorResponse";
|
|
12
|
+
import URL from "../../../../../Types/API/URL";
|
|
13
|
+
import APIException from "../../../../../Types/Exception/ApiException";
|
|
14
|
+
import BadDataException from "../../../../../Types/Exception/BadDataException";
|
|
15
|
+
import ComponentID from "../../../../../Types/Workflow/ComponentID";
|
|
16
|
+
import DiscordComponents from "../../../../../Types/Workflow/Components/Discord";
|
|
17
|
+
import API from "../../../../../Utils/API";
|
|
18
|
+
import CaptureSpan from "../../../../Utils/Telemetry/CaptureSpan";
|
|
19
|
+
export default class SendMessageToChannel extends ComponentCode {
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
const Component = DiscordComponents.find((i) => {
|
|
23
|
+
return i.id === ComponentID.DiscordSendMessageToChannel;
|
|
24
|
+
});
|
|
25
|
+
if (!Component) {
|
|
26
|
+
throw new BadDataException("Component not found.");
|
|
27
|
+
}
|
|
28
|
+
this.setMetadata(Component);
|
|
29
|
+
}
|
|
30
|
+
async run(args, options) {
|
|
31
|
+
var _a;
|
|
32
|
+
const successPort = this.getMetadata().outPorts.find((p) => {
|
|
33
|
+
return p.id === "success";
|
|
34
|
+
});
|
|
35
|
+
if (!successPort) {
|
|
36
|
+
throw options.onError(new BadDataException("Success port not found"));
|
|
37
|
+
}
|
|
38
|
+
const errorPort = this.getMetadata().outPorts.find((p) => {
|
|
39
|
+
return p.id === "error";
|
|
40
|
+
});
|
|
41
|
+
if (!errorPort) {
|
|
42
|
+
throw options.onError(new BadDataException("Error port not found"));
|
|
43
|
+
}
|
|
44
|
+
if (!args["text"]) {
|
|
45
|
+
throw options.onError(new BadDataException("Discord message not found"));
|
|
46
|
+
}
|
|
47
|
+
if (!args["webhook-url"]) {
|
|
48
|
+
throw options.onError(new BadDataException("Discord Webhook URL not found"));
|
|
49
|
+
}
|
|
50
|
+
args["webhook-url"] = URL.fromString((_a = args["webhook-url"]) === null || _a === void 0 ? void 0 : _a.toString());
|
|
51
|
+
let apiResult = null;
|
|
52
|
+
try {
|
|
53
|
+
// https://discord.com/developers/docs/resources/webhook#execute-webhook
|
|
54
|
+
apiResult = await API.post({
|
|
55
|
+
url: args["webhook-url"],
|
|
56
|
+
data: {
|
|
57
|
+
content: args["text"],
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
if (apiResult instanceof HTTPErrorResponse) {
|
|
61
|
+
return Promise.resolve({
|
|
62
|
+
returnValues: {
|
|
63
|
+
error: apiResult.message || "Server Error.",
|
|
64
|
+
},
|
|
65
|
+
executePort: errorPort,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return Promise.resolve({
|
|
69
|
+
returnValues: {},
|
|
70
|
+
executePort: successPort,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
catch (err) {
|
|
74
|
+
if (err instanceof HTTPErrorResponse) {
|
|
75
|
+
return Promise.resolve({
|
|
76
|
+
returnValues: {
|
|
77
|
+
error: err.message || "Server Error.",
|
|
78
|
+
},
|
|
79
|
+
executePort: errorPort,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
throw options.onError(new APIException("Something wrong happened."));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
__decorate([
|
|
87
|
+
CaptureSpan(),
|
|
88
|
+
__metadata("design:type", Function),
|
|
89
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
90
|
+
__metadata("design:returntype", Promise)
|
|
91
|
+
], SendMessageToChannel.prototype, "run", null);
|
|
92
|
+
//# sourceMappingURL=SendMessageToChannel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SendMessageToChannel.js","sourceRoot":"","sources":["../../../../../../../Server/Types/Workflow/Components/Discord/SendMessageToChannel.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,aAA4C,MAAM,qBAAqB,CAAC;AAC/E,OAAO,iBAAiB,MAAM,4CAA4C,CAAC;AAE3E,OAAO,GAAG,MAAM,8BAA8B,CAAC;AAC/C,OAAO,YAA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IAAI,eAAe;qBACtC;oBACD,WAAW,EAAE,SAAS;iBACvB,CAAC,CAAC;YACL,CAAC;YAED,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,2BAA2B,CAAC,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;CACF;AA1EuB;IADrB,WAAW,EAAE;;;;+CA0Eb"}
|
|
@@ -16,6 +16,7 @@ import OnUpdateBaseModel from "./BaseModel/OnUpdateBaseModel";
|
|
|
16
16
|
import UpdateManyBaseModel from "./BaseModel/UpdateManyBaseModel";
|
|
17
17
|
import UpdateOneBaseModel from "./BaseModel/UpdateOneBaseModel";
|
|
18
18
|
import IfElse from "./Conditions/IfElse";
|
|
19
|
+
import DiscordSendMessageToChannel from "./Discord/SendMessageToChannel";
|
|
19
20
|
import Email from "./Email";
|
|
20
21
|
import JsonToText from "./JSON/JsonToText";
|
|
21
22
|
import MergeJSON from "./JSON/MergeJson";
|
|
@@ -33,6 +34,7 @@ import ApiPatch from "./API/Patch";
|
|
|
33
34
|
const Components = {
|
|
34
35
|
[ComponentID.Webhook]: new WebhookTrigger(),
|
|
35
36
|
[ComponentID.SlackSendMessageToChannel]: new SlackSendMessageToChannel(),
|
|
37
|
+
[ComponentID.DiscordSendMessageToChannel]: new DiscordSendMessageToChannel(),
|
|
36
38
|
[ComponentID.MicrosoftTeamsSendMessageToChannel]: new MicrosoftTeamsSendMessageToChannel(),
|
|
37
39
|
[ComponentID.Log]: new Log(),
|
|
38
40
|
[ComponentID.Schedule]: new Schedule(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Index.js","sourceRoot":"","sources":["../../../../../../Server/Types/Workflow/Components/Index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAChE,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAE/C,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,OAAO,MA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GAAG,IAAI,iBAAiB,CACxD,gBAAuB,CACxB,CAAC;QACF,UAAU,CAAC,GAAG,OAAO,aAAa,CAAC,GAAG,IAAI,kBAAkB,CAC1D,gBAAuB,CACxB,CAAC;QACF,UAAU,CAAC,GAAG,OAAO,cAAc,CAAC,GAAG,IAAI,mBAAmB,CAC5D,gBAAuB,CACxB,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;QAClC,UAAU,CAAC,GAAG,OAAO,YAAY,CAAC,GAAG,IAAI,iBAAiB,CACxD,gBAAuB,CACxB,CAAC;QACF,UAAU,CAAC,GAAG,OAAO,aAAa,CAAC,GAAG,IAAI,kBAAkB,CAC1D,gBAAuB,CACxB,CAAC;QACF,UAAU,CAAC,GAAG,OAAO,cAAc,CAAC,GAAG,IAAI,mBAAmB,CAC5D,gBAAuB,CACxB,CAAC;IACJ,CAAC;AACH,CAAC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -4,6 +4,7 @@ var ComponentID;
|
|
|
4
4
|
ComponentID["Log"] = "log";
|
|
5
5
|
ComponentID["SlackSendMessageToChannel"] = "slack-send-message-to-channel";
|
|
6
6
|
ComponentID["MicrosoftTeamsSendMessageToChannel"] = "microsoft-teams-send-message-to-channel";
|
|
7
|
+
ComponentID["DiscordSendMessageToChannel"] = "discord-send-message-to-channel";
|
|
7
8
|
ComponentID["Schedule"] = "schedule";
|
|
8
9
|
ComponentID["JavaScriptCode"] = "javascript";
|
|
9
10
|
ComponentID["Manual"] = "manual";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentID.js","sourceRoot":"","sources":["../../../../Types/Workflow/ComponentID.ts"],"names":[],"mappings":"AAAA,IAAK,
|
|
1
|
+
{"version":3,"file":"ComponentID.js","sourceRoot":"","sources":["../../../../Types/Workflow/ComponentID.ts"],"names":[],"mappings":"AAAA,IAAK,WAmBJ;AAnBD,WAAK,WAAW;IACd,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,0EAA2D,CAAA;IAC3D,6FAA8E,CAAA;IAC9E,8EAA+D,CAAA;IAC/D,oCAAqB,CAAA;IACrB,4CAA6B,CAAA;IAC7B,gCAAiB,CAAA;IACjB,0CAA2B,CAAA;IAC3B,0CAA2B,CAAA;IAC3B,uCAAwB,CAAA;IACxB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,mCAAoB,CAAA;IACpB,uCAAwB,CAAA;IACxB,qCAAsB,CAAA;IACtB,uCAAwB,CAAA;IACxB,iCAAkB,CAAA;AACpB,CAAC,EAnBI,WAAW,KAAX,WAAW,QAmBf;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import IconProp from "../../Icon/IconProp";
|
|
2
|
+
import ComponentID from "../ComponentID";
|
|
3
|
+
import { ComponentInputType, ComponentType, } from "./../Component";
|
|
4
|
+
const components = [
|
|
5
|
+
{
|
|
6
|
+
id: ComponentID.DiscordSendMessageToChannel,
|
|
7
|
+
title: "Send Message to Discord",
|
|
8
|
+
category: "Discord",
|
|
9
|
+
description: "Send message to Discord channel",
|
|
10
|
+
iconProp: IconProp.SendMessage,
|
|
11
|
+
componentType: ComponentType.Component,
|
|
12
|
+
arguments: [
|
|
13
|
+
{
|
|
14
|
+
id: "webhook-url",
|
|
15
|
+
name: "Discord Incoming Webhook URL",
|
|
16
|
+
description: "Need help creating a webhook? Check docs here: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks",
|
|
17
|
+
type: ComponentInputType.URL,
|
|
18
|
+
required: true,
|
|
19
|
+
placeholder: "https://discord.com/api/webhooks/1234567890/XXXXXXXXXXXXXXXXXXXXXXXX",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "text",
|
|
23
|
+
name: "Message Text",
|
|
24
|
+
description: "Message to send to Discord.",
|
|
25
|
+
type: ComponentInputType.LongText,
|
|
26
|
+
required: true,
|
|
27
|
+
placeholder: "Test Discord message from OneUptime",
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
returnValues: [
|
|
31
|
+
{
|
|
32
|
+
id: "error",
|
|
33
|
+
name: "Error",
|
|
34
|
+
description: "Error, if there is any.",
|
|
35
|
+
type: ComponentInputType.Text,
|
|
36
|
+
required: false,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
inPorts: [
|
|
40
|
+
{
|
|
41
|
+
title: "In",
|
|
42
|
+
description: "Please connect components to this port for this component to work.",
|
|
43
|
+
id: "in",
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
outPorts: [
|
|
47
|
+
{
|
|
48
|
+
title: "Success",
|
|
49
|
+
description: "This is executed when the message is successfully posted",
|
|
50
|
+
id: "success",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: "Error",
|
|
54
|
+
description: "This is executed when there is an error",
|
|
55
|
+
id: "error",
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
export default components;
|
|
61
|
+
//# sourceMappingURL=Discord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Discord.js","sourceRoot":"","sources":["../../../../../Types/Workflow/Components/Discord.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAA0B,EACxB,kBAAkB,EAClB,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,MAAM,UAAU,GAA6B;IAC3C;QACE,EAAE,EAAE,WAAW,CAAC,2BAA2B;QAC3C,KAAK,EAAE,yBAAyB;QAChC,QAAQ,EAAE,SAAS;QACnB,WAAW,EAAE,iCAAiC;QAC9C,QAAQ,EAAE,QAAQ,CAAC,WAAW;QAC9B,aAAa,EAAE,aAAa,CAAC,SAAS;QACtC,SAAS,EAAE;YACT;gBACE,EAAE,EAAE,aAAa;gBACjB,IAAI,EAAE,8BAA8B;gBACpC,WAAW,EACT,0HAA0H;gBAC5H,IAAI,EAAE,kBAAkB,CAAC,GAAG;gBAC5B,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,sEAAsE;aACzE;YACD;gBACE,EAAE,EAAE,MAAM;gBACV,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,6BAA6B;gBAC1C,IAAI,EAAE,kBAAkB,CAAC,QAAQ;gBACjC,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,qCAAqC;aACnD;SACF;QACD,YAAY,EAAE;YACZ;gBACE,EAAE,EAAE,OAAO;gBACX,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,yBAAyB;gBACtC,IAAI,EAAE,kBAAkB,CAAC,IAAI;gBAC7B,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,IAAI;gBACX,WAAW,EACT,oEAAoE;gBACtE,EAAE,EAAE,IAAI;aACT;SACF;QACD,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,0DAA0D;gBACvE,EAAE,EAAE,SAAS;aACd;YACD;gBACE,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,yCAAyC;gBACtD,EAAE,EAAE,OAAO;aACZ;SACF;KACF;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import IconProp from "../Icon/IconProp";
|
|
2
2
|
import APIComponents from "./Components/API";
|
|
3
3
|
import ConditionComponents from "./Components/Condition";
|
|
4
|
+
import DiscordComponents from "./Components/Discord";
|
|
4
5
|
import EmailComponents from "./Components/Email";
|
|
5
6
|
import JsonComponents from "./Components/JSON";
|
|
6
7
|
import JavaScriptComponents from "./Components/JavaScript";
|
|
@@ -16,6 +17,7 @@ const components = [
|
|
|
16
17
|
...APIComponents,
|
|
17
18
|
...ScheduleComponents,
|
|
18
19
|
...SlackComponents,
|
|
20
|
+
...DiscordComponents,
|
|
19
21
|
...ConditionComponents,
|
|
20
22
|
...JsonComponents,
|
|
21
23
|
...JavaScriptComponents,
|
|
@@ -42,6 +44,11 @@ export const Categories = [
|
|
|
42
44
|
description: "Integrate OneUptime with your Slack team.",
|
|
43
45
|
icon: IconProp.SendMessage,
|
|
44
46
|
},
|
|
47
|
+
{
|
|
48
|
+
name: "Discord",
|
|
49
|
+
description: "Integrate OneUptime with your Discord server.",
|
|
50
|
+
icon: IconProp.SendMessage,
|
|
51
|
+
},
|
|
45
52
|
{
|
|
46
53
|
name: "Microsoft Teams",
|
|
47
54
|
description: "Integrate OneUptime with your Microsoft Teams.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Components.js","sourceRoot":"","sources":["../../../../Types/Workflow/Components.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AAExC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AACnE,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAEvD,MAAM,UAAU,GAA6B;IAC3C,GAAG,aAAa;IAChB,GAAG,aAAa;IAChB,GAAG,kBAAkB;IACrB,GAAG,eAAe;IAClB,GAAG,mBAAmB;IACtB,GAAG,cAAc;IACjB,GAAG,oBAAoB;IACvB,GAAG,eAAe;IAClB,GAAG,iBAAiB;IACpB,GAAG,kBAAkB;IACrB,GAAG,gBAAgB;IACnB,GAAG,wBAAwB;CAC5B,CAAC;AAEF,eAAe,UAAU,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAA6B;IAClD;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,qDAAqD;QAClE,IAAI,EAAE,QAAQ,CAAC,QAAQ;KACxB;IACD;QACE,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,wCAAwC;QACrD,IAAI,EAAE,QAAQ,CAAC,KAAK;KACrB;IACD;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,2CAA2C;QACxD,IAAI,EAAE,QAAQ,CAAC,WAAW;KAC3B;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,gDAAgD;QAC7D,IAAI,EAAE,QAAQ,CAAC,WAAW;KAC3B;IACD;QACE,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,8BAA8B;QAC3C,IAAI,EAAE,QAAQ,CAAC,SAAS;KACzB;IACD;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,mCAAmC;QAChD,IAAI,EAAE,QAAQ,CAAC,IAAI;KACpB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,QAAQ,CAAC,IAAI;KACpB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,QAAQ,CAAC,KAAK;KACrB;IACD;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,QAAQ,CAAC,KAAK;KACrB;IACD;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,QAAQ,CAAC,MAAM;KACtB;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Components.js","sourceRoot":"","sources":["../../../../Types/Workflow/Components.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AAEx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