@automate.ax/catalog 0.116.0 → 0.119.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/dist/catalog.d.ts +44 -2
- package/dist/catalog.js +28 -2
- package/dist/triggers/google.d.ts +59 -6
- package/dist/triggers/google.js +46 -10
- package/dist/triggers/index.d.ts +418 -12
- package/dist/triggers/microsoft.d.ts +153 -0
- package/dist/triggers/microsoft.js +115 -0
- package/package.json +1 -1
- package/src/catalog.ts +29 -2
- package/src/triggers/google.ts +47 -10
- package/src/triggers/microsoft.ts +203 -0
|
@@ -1,4 +1,53 @@
|
|
|
1
|
+
import type { IntegrationAccountRequirement } from "../types.js";
|
|
1
2
|
export declare const microsoftTriggerDefinitions: {
|
|
3
|
+
readonly outlookMessageEvent: {
|
|
4
|
+
readonly account: {
|
|
5
|
+
readonly connectionOptions: readonly [{
|
|
6
|
+
readonly requiredScopes: readonly [{
|
|
7
|
+
readonly requirements: readonly ["Mail.ReadWrite", "Mail.Read"];
|
|
8
|
+
readonly type: "or";
|
|
9
|
+
}];
|
|
10
|
+
}];
|
|
11
|
+
readonly serviceId: "microsoft";
|
|
12
|
+
};
|
|
13
|
+
readonly type: "outlook.message.changed";
|
|
14
|
+
};
|
|
15
|
+
readonly outlookMessageCreated: {
|
|
16
|
+
readonly account: {
|
|
17
|
+
readonly connectionOptions: readonly [{
|
|
18
|
+
readonly requiredScopes: readonly [{
|
|
19
|
+
readonly requirements: readonly ["Mail.ReadWrite", "Mail.Read"];
|
|
20
|
+
readonly type: "or";
|
|
21
|
+
}];
|
|
22
|
+
}];
|
|
23
|
+
readonly serviceId: "microsoft";
|
|
24
|
+
};
|
|
25
|
+
readonly type: "outlook.message.created";
|
|
26
|
+
};
|
|
27
|
+
readonly outlookMessageDeleted: {
|
|
28
|
+
readonly account: {
|
|
29
|
+
readonly connectionOptions: readonly [{
|
|
30
|
+
readonly requiredScopes: readonly [{
|
|
31
|
+
readonly requirements: readonly ["Mail.ReadWrite", "Mail.Read"];
|
|
32
|
+
readonly type: "or";
|
|
33
|
+
}];
|
|
34
|
+
}];
|
|
35
|
+
readonly serviceId: "microsoft";
|
|
36
|
+
};
|
|
37
|
+
readonly type: "outlook.message.deleted";
|
|
38
|
+
};
|
|
39
|
+
readonly outlookMessageUpdated: {
|
|
40
|
+
readonly account: {
|
|
41
|
+
readonly connectionOptions: readonly [{
|
|
42
|
+
readonly requiredScopes: readonly [{
|
|
43
|
+
readonly requirements: readonly ["Mail.ReadWrite", "Mail.Read"];
|
|
44
|
+
readonly type: "or";
|
|
45
|
+
}];
|
|
46
|
+
}];
|
|
47
|
+
readonly serviceId: "microsoft";
|
|
48
|
+
};
|
|
49
|
+
readonly type: "outlook.message.updated";
|
|
50
|
+
};
|
|
2
51
|
readonly outlookEmailReceived: {
|
|
3
52
|
readonly account: {
|
|
4
53
|
readonly connectionOptions: readonly [{
|
|
@@ -24,6 +73,110 @@ export declare const microsoftTriggerDefinitions: {
|
|
|
24
73
|
readonly name: "Microsoft Teams channel message posted";
|
|
25
74
|
readonly type: "teams.channel.message.posted";
|
|
26
75
|
};
|
|
76
|
+
readonly teamsChannelEvent: {
|
|
77
|
+
account: IntegrationAccountRequirement<string>;
|
|
78
|
+
type: "teams.channel.changed";
|
|
79
|
+
};
|
|
80
|
+
readonly teamsChannelCreated: {
|
|
81
|
+
account: IntegrationAccountRequirement<string>;
|
|
82
|
+
type: "teams.channel.created";
|
|
83
|
+
};
|
|
84
|
+
readonly teamsChannelDeleted: {
|
|
85
|
+
account: IntegrationAccountRequirement<string>;
|
|
86
|
+
type: "teams.channel.deleted";
|
|
87
|
+
};
|
|
88
|
+
readonly teamsChannelUpdated: {
|
|
89
|
+
account: IntegrationAccountRequirement<string>;
|
|
90
|
+
type: "teams.channel.updated";
|
|
91
|
+
};
|
|
92
|
+
readonly teamsTeamEvent: {
|
|
93
|
+
account: IntegrationAccountRequirement<string>;
|
|
94
|
+
type: "teams.team.changed";
|
|
95
|
+
};
|
|
96
|
+
readonly teamsTeamDeleted: {
|
|
97
|
+
account: IntegrationAccountRequirement<string>;
|
|
98
|
+
type: "teams.team.deleted";
|
|
99
|
+
};
|
|
100
|
+
readonly teamsTeamUpdated: {
|
|
101
|
+
account: IntegrationAccountRequirement<string>;
|
|
102
|
+
type: "teams.team.updated";
|
|
103
|
+
};
|
|
104
|
+
readonly teamsTeamMemberAdded: {
|
|
105
|
+
account: IntegrationAccountRequirement<string>;
|
|
106
|
+
type: "teams.team.member.added";
|
|
107
|
+
};
|
|
108
|
+
readonly teamsTeamMemberEvent: {
|
|
109
|
+
account: IntegrationAccountRequirement<string>;
|
|
110
|
+
type: "teams.team.member.changed";
|
|
111
|
+
};
|
|
112
|
+
readonly teamsTeamMemberRemoved: {
|
|
113
|
+
account: IntegrationAccountRequirement<string>;
|
|
114
|
+
type: "teams.team.member.removed";
|
|
115
|
+
};
|
|
116
|
+
readonly teamsTeamMemberUpdated: {
|
|
117
|
+
account: IntegrationAccountRequirement<string>;
|
|
118
|
+
type: "teams.team.member.updated";
|
|
119
|
+
};
|
|
120
|
+
readonly teamsChannelMemberAdded: {
|
|
121
|
+
account: IntegrationAccountRequirement<string>;
|
|
122
|
+
type: "teams.channel.member.added";
|
|
123
|
+
};
|
|
124
|
+
readonly teamsChannelMemberEvent: {
|
|
125
|
+
account: IntegrationAccountRequirement<string>;
|
|
126
|
+
type: "teams.channel.member.changed";
|
|
127
|
+
};
|
|
128
|
+
readonly teamsChannelMemberRemoved: {
|
|
129
|
+
account: IntegrationAccountRequirement<string>;
|
|
130
|
+
type: "teams.channel.member.removed";
|
|
131
|
+
};
|
|
132
|
+
readonly teamsChannelMemberUpdated: {
|
|
133
|
+
account: IntegrationAccountRequirement<string>;
|
|
134
|
+
type: "teams.channel.member.updated";
|
|
135
|
+
};
|
|
136
|
+
readonly teamsChannelMessageEvent: {
|
|
137
|
+
account: IntegrationAccountRequirement<string>;
|
|
138
|
+
type: "teams.channel.message.changed";
|
|
139
|
+
};
|
|
140
|
+
readonly teamsChannelMessageDeleted: {
|
|
141
|
+
account: IntegrationAccountRequirement<string>;
|
|
142
|
+
type: "teams.channel.message.deleted";
|
|
143
|
+
};
|
|
144
|
+
readonly teamsChannelMessageUpdated: {
|
|
145
|
+
account: IntegrationAccountRequirement<string>;
|
|
146
|
+
type: "teams.channel.message.updated";
|
|
147
|
+
};
|
|
148
|
+
readonly teamsChatEvent: {
|
|
149
|
+
account: IntegrationAccountRequirement<string>;
|
|
150
|
+
type: "teams.chat.changed";
|
|
151
|
+
};
|
|
152
|
+
readonly teamsChatMemberAdded: {
|
|
153
|
+
account: IntegrationAccountRequirement<string>;
|
|
154
|
+
type: "teams.chat.member.added";
|
|
155
|
+
};
|
|
156
|
+
readonly teamsChatMemberEvent: {
|
|
157
|
+
account: IntegrationAccountRequirement<string>;
|
|
158
|
+
type: "teams.chat.member.changed";
|
|
159
|
+
};
|
|
160
|
+
readonly teamsChatMemberRemoved: {
|
|
161
|
+
account: IntegrationAccountRequirement<string>;
|
|
162
|
+
type: "teams.chat.member.removed";
|
|
163
|
+
};
|
|
164
|
+
readonly teamsChatMessageEvent: {
|
|
165
|
+
account: IntegrationAccountRequirement<string>;
|
|
166
|
+
type: "teams.chat.message.changed";
|
|
167
|
+
};
|
|
168
|
+
readonly teamsChatMessageDeleted: {
|
|
169
|
+
account: IntegrationAccountRequirement<string>;
|
|
170
|
+
type: "teams.chat.message.deleted";
|
|
171
|
+
};
|
|
172
|
+
readonly teamsChatMessageUpdated: {
|
|
173
|
+
account: IntegrationAccountRequirement<string>;
|
|
174
|
+
type: "teams.chat.message.updated";
|
|
175
|
+
};
|
|
176
|
+
readonly teamsChatUpdated: {
|
|
177
|
+
account: IntegrationAccountRequirement<string>;
|
|
178
|
+
type: "teams.chat.updated";
|
|
179
|
+
};
|
|
27
180
|
readonly teamsChatMessagePosted: {
|
|
28
181
|
readonly account: {
|
|
29
182
|
readonly connectionOptions: readonly [{
|
|
@@ -28,6 +28,53 @@ const TEAMS_CHANNEL_MESSAGE_ACCOUNT = {
|
|
|
28
28
|
],
|
|
29
29
|
serviceId: "microsoft",
|
|
30
30
|
};
|
|
31
|
+
const TEAMS_TEAM_ACCOUNT = {
|
|
32
|
+
connectionOptions: [{ requiredScopes: ["Team.ReadBasic.All"] }],
|
|
33
|
+
serviceId: "microsoft",
|
|
34
|
+
};
|
|
35
|
+
const TEAMS_CHANNEL_ACCOUNT = {
|
|
36
|
+
connectionOptions: [
|
|
37
|
+
{
|
|
38
|
+
requiredScopes: [
|
|
39
|
+
{
|
|
40
|
+
requirements: ["Team.ReadBasic.All", "Channel.ReadBasic.All"],
|
|
41
|
+
type: "and",
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
serviceId: "microsoft",
|
|
47
|
+
};
|
|
48
|
+
const TEAMS_CHANNEL_MEMBER_ACCOUNT = {
|
|
49
|
+
connectionOptions: [
|
|
50
|
+
{
|
|
51
|
+
requiredScopes: [
|
|
52
|
+
{
|
|
53
|
+
requirements: [
|
|
54
|
+
"Team.ReadBasic.All",
|
|
55
|
+
"Channel.ReadBasic.All",
|
|
56
|
+
"ChannelMember.Read.All",
|
|
57
|
+
],
|
|
58
|
+
type: "and",
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
serviceId: "microsoft",
|
|
64
|
+
};
|
|
65
|
+
const TEAMS_TEAM_MEMBER_ACCOUNT = {
|
|
66
|
+
connectionOptions: [
|
|
67
|
+
{
|
|
68
|
+
requiredScopes: [
|
|
69
|
+
{
|
|
70
|
+
requirements: ["Team.ReadBasic.All", "TeamMember.Read.All"],
|
|
71
|
+
type: "and",
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
serviceId: "microsoft",
|
|
77
|
+
};
|
|
31
78
|
const TEAMS_CHAT_MESSAGE_ACCOUNT = {
|
|
32
79
|
connectionOptions: [
|
|
33
80
|
{
|
|
@@ -41,7 +88,40 @@ const TEAMS_CHAT_MESSAGE_ACCOUNT = {
|
|
|
41
88
|
],
|
|
42
89
|
serviceId: "microsoft",
|
|
43
90
|
};
|
|
91
|
+
const TEAMS_CHAT_ACCOUNT = {
|
|
92
|
+
connectionOptions: [{ requiredScopes: ["Chat.ReadBasic"] }],
|
|
93
|
+
serviceId: "microsoft",
|
|
94
|
+
};
|
|
95
|
+
const TEAMS_CHAT_MEMBER_ACCOUNT = {
|
|
96
|
+
connectionOptions: [
|
|
97
|
+
{
|
|
98
|
+
requiredScopes: [
|
|
99
|
+
{
|
|
100
|
+
requirements: ["ChatMember.ReadWrite", "ChatMember.Read"],
|
|
101
|
+
type: "or",
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
serviceId: "microsoft",
|
|
107
|
+
};
|
|
44
108
|
export const microsoftTriggerDefinitions = {
|
|
109
|
+
outlookMessageEvent: {
|
|
110
|
+
account: OUTLOOK_ACCOUNT,
|
|
111
|
+
type: "outlook.message.changed",
|
|
112
|
+
},
|
|
113
|
+
outlookMessageCreated: {
|
|
114
|
+
account: OUTLOOK_ACCOUNT,
|
|
115
|
+
type: "outlook.message.created",
|
|
116
|
+
},
|
|
117
|
+
outlookMessageDeleted: {
|
|
118
|
+
account: OUTLOOK_ACCOUNT,
|
|
119
|
+
type: "outlook.message.deleted",
|
|
120
|
+
},
|
|
121
|
+
outlookMessageUpdated: {
|
|
122
|
+
account: OUTLOOK_ACCOUNT,
|
|
123
|
+
type: "outlook.message.updated",
|
|
124
|
+
},
|
|
45
125
|
outlookEmailReceived: {
|
|
46
126
|
account: OUTLOOK_ACCOUNT,
|
|
47
127
|
type: "outlook.email.received",
|
|
@@ -51,9 +131,44 @@ export const microsoftTriggerDefinitions = {
|
|
|
51
131
|
name: "Microsoft Teams channel message posted",
|
|
52
132
|
type: "teams.channel.message.posted",
|
|
53
133
|
},
|
|
134
|
+
teamsChannelEvent: microsoftChangeTrigger("teams.channel.changed", TEAMS_CHANNEL_ACCOUNT),
|
|
135
|
+
teamsChannelCreated: microsoftChangeTrigger("teams.channel.created", TEAMS_CHANNEL_ACCOUNT),
|
|
136
|
+
teamsChannelDeleted: microsoftChangeTrigger("teams.channel.deleted", TEAMS_CHANNEL_ACCOUNT),
|
|
137
|
+
teamsChannelUpdated: microsoftChangeTrigger("teams.channel.updated", TEAMS_CHANNEL_ACCOUNT),
|
|
138
|
+
teamsTeamEvent: microsoftChangeTrigger("teams.team.changed", TEAMS_TEAM_ACCOUNT),
|
|
139
|
+
teamsTeamDeleted: microsoftChangeTrigger("teams.team.deleted", TEAMS_TEAM_ACCOUNT),
|
|
140
|
+
teamsTeamUpdated: microsoftChangeTrigger("teams.team.updated", TEAMS_TEAM_ACCOUNT),
|
|
141
|
+
teamsTeamMemberAdded: microsoftChangeTrigger("teams.team.member.added", TEAMS_TEAM_MEMBER_ACCOUNT),
|
|
142
|
+
teamsTeamMemberEvent: microsoftChangeTrigger("teams.team.member.changed", TEAMS_TEAM_MEMBER_ACCOUNT),
|
|
143
|
+
teamsTeamMemberRemoved: microsoftChangeTrigger("teams.team.member.removed", TEAMS_TEAM_MEMBER_ACCOUNT),
|
|
144
|
+
teamsTeamMemberUpdated: microsoftChangeTrigger("teams.team.member.updated", TEAMS_TEAM_MEMBER_ACCOUNT),
|
|
145
|
+
teamsChannelMemberAdded: microsoftChangeTrigger("teams.channel.member.added", TEAMS_CHANNEL_MEMBER_ACCOUNT),
|
|
146
|
+
teamsChannelMemberEvent: microsoftChangeTrigger("teams.channel.member.changed", TEAMS_CHANNEL_MEMBER_ACCOUNT),
|
|
147
|
+
teamsChannelMemberRemoved: microsoftChangeTrigger("teams.channel.member.removed", TEAMS_CHANNEL_MEMBER_ACCOUNT),
|
|
148
|
+
teamsChannelMemberUpdated: microsoftChangeTrigger("teams.channel.member.updated", TEAMS_CHANNEL_MEMBER_ACCOUNT),
|
|
149
|
+
teamsChannelMessageEvent: microsoftChangeTrigger("teams.channel.message.changed", TEAMS_CHANNEL_MESSAGE_ACCOUNT),
|
|
150
|
+
teamsChannelMessageDeleted: microsoftChangeTrigger("teams.channel.message.deleted", TEAMS_CHANNEL_MESSAGE_ACCOUNT),
|
|
151
|
+
teamsChannelMessageUpdated: microsoftChangeTrigger("teams.channel.message.updated", TEAMS_CHANNEL_MESSAGE_ACCOUNT),
|
|
152
|
+
teamsChatEvent: microsoftChangeTrigger("teams.chat.changed", TEAMS_CHAT_ACCOUNT),
|
|
153
|
+
teamsChatMemberAdded: microsoftChangeTrigger("teams.chat.member.added", TEAMS_CHAT_MEMBER_ACCOUNT),
|
|
154
|
+
teamsChatMemberEvent: microsoftChangeTrigger("teams.chat.member.changed", TEAMS_CHAT_MEMBER_ACCOUNT),
|
|
155
|
+
teamsChatMemberRemoved: microsoftChangeTrigger("teams.chat.member.removed", TEAMS_CHAT_MEMBER_ACCOUNT),
|
|
156
|
+
teamsChatMessageEvent: microsoftChangeTrigger("teams.chat.message.changed", TEAMS_CHAT_MESSAGE_ACCOUNT),
|
|
157
|
+
teamsChatMessageDeleted: microsoftChangeTrigger("teams.chat.message.deleted", TEAMS_CHAT_MESSAGE_ACCOUNT),
|
|
158
|
+
teamsChatMessageUpdated: microsoftChangeTrigger("teams.chat.message.updated", TEAMS_CHAT_MESSAGE_ACCOUNT),
|
|
159
|
+
teamsChatUpdated: microsoftChangeTrigger("teams.chat.updated", TEAMS_CHAT_ACCOUNT),
|
|
54
160
|
teamsChatMessagePosted: {
|
|
55
161
|
account: TEAMS_CHAT_MESSAGE_ACCOUNT,
|
|
56
162
|
name: "Microsoft Teams chat message posted",
|
|
57
163
|
type: "teams.chat.message.posted",
|
|
58
164
|
},
|
|
59
165
|
};
|
|
166
|
+
/**
|
|
167
|
+
* Builds one Microsoft change-trigger definition without widening its type.
|
|
168
|
+
*
|
|
169
|
+
* @param type - Stable integration event type.
|
|
170
|
+
* @param account - Microsoft account and scope requirement.
|
|
171
|
+
*/
|
|
172
|
+
function microsoftChangeTrigger(type, account) {
|
|
173
|
+
return { account, type };
|
|
174
|
+
}
|
package/package.json
CHANGED
package/src/catalog.ts
CHANGED
|
@@ -548,10 +548,37 @@ export const stripeService = defineApiKeyService({
|
|
|
548
548
|
})
|
|
549
549
|
|
|
550
550
|
export const tidycalService = defineIntegrationService({
|
|
551
|
-
connectionMethods: [
|
|
552
|
-
|
|
551
|
+
connectionMethods: [
|
|
552
|
+
{ id: "oauth", name: "OAuth", type: "redirect" },
|
|
553
|
+
{
|
|
554
|
+
credentialUrl: "https://tidycal.com/integrations/advanced",
|
|
555
|
+
fields: [
|
|
556
|
+
{
|
|
557
|
+
input: "password",
|
|
558
|
+
label: "Personal access token",
|
|
559
|
+
name: "apiKey",
|
|
560
|
+
placeholder: "Paste your TidyCal personal access token",
|
|
561
|
+
required: true,
|
|
562
|
+
},
|
|
563
|
+
],
|
|
564
|
+
id: "personal-access-token",
|
|
565
|
+
name: "Personal access token",
|
|
566
|
+
type: "form",
|
|
567
|
+
},
|
|
568
|
+
],
|
|
569
|
+
connectionNotice: {
|
|
570
|
+
action: {
|
|
571
|
+
href: "https://help.tidycal.com/article/739-faq",
|
|
572
|
+
label: "Review API requirements",
|
|
573
|
+
},
|
|
574
|
+
description:
|
|
575
|
+
"TidyCal API access requires an Individual, Agency, or Pro plan.",
|
|
576
|
+
title: "Paid TidyCal plan required",
|
|
577
|
+
},
|
|
578
|
+
description: "Connect TidyCal with OAuth or a personal access token.",
|
|
553
579
|
id: "tidycal",
|
|
554
580
|
name: "TidyCal",
|
|
581
|
+
preferredConnectionMethodId: "oauth",
|
|
555
582
|
})
|
|
556
583
|
|
|
557
584
|
export const togetheraiService = defineApiKeyService({
|
package/src/triggers/google.ts
CHANGED
|
@@ -18,6 +18,25 @@ const GMAIL_ACCOUNT = {
|
|
|
18
18
|
serviceId: "google",
|
|
19
19
|
} as const satisfies IntegrationAccountRequirement
|
|
20
20
|
|
|
21
|
+
const GMAIL_DELETION_ACCOUNT = {
|
|
22
|
+
connectionOptions: [
|
|
23
|
+
{
|
|
24
|
+
requiredScopes: [
|
|
25
|
+
{
|
|
26
|
+
requirements: [
|
|
27
|
+
"https://mail.google.com/",
|
|
28
|
+
"https://www.googleapis.com/auth/gmail.modify",
|
|
29
|
+
"https://www.googleapis.com/auth/gmail.readonly",
|
|
30
|
+
"https://www.googleapis.com/auth/gmail.metadata",
|
|
31
|
+
],
|
|
32
|
+
type: "or",
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
serviceId: "google",
|
|
38
|
+
} as const satisfies IntegrationAccountRequirement
|
|
39
|
+
|
|
21
40
|
const GOOGLE_CALENDAR_ACCOUNT = {
|
|
22
41
|
connectionOptions: [
|
|
23
42
|
{
|
|
@@ -25,9 +44,13 @@ const GOOGLE_CALENDAR_ACCOUNT = {
|
|
|
25
44
|
{
|
|
26
45
|
requirements: [
|
|
27
46
|
"https://www.googleapis.com/auth/calendar",
|
|
47
|
+
"https://www.googleapis.com/auth/calendar.app.created",
|
|
28
48
|
"https://www.googleapis.com/auth/calendar.readonly",
|
|
29
49
|
"https://www.googleapis.com/auth/calendar.events",
|
|
50
|
+
"https://www.googleapis.com/auth/calendar.events.freebusy",
|
|
30
51
|
"https://www.googleapis.com/auth/calendar.events.owned",
|
|
52
|
+
"https://www.googleapis.com/auth/calendar.events.owned.readonly",
|
|
53
|
+
"https://www.googleapis.com/auth/calendar.events.public.readonly",
|
|
31
54
|
"https://www.googleapis.com/auth/calendar.events.readonly",
|
|
32
55
|
],
|
|
33
56
|
type: "or",
|
|
@@ -62,16 +85,6 @@ const GOOGLE_FORM_RESPONSES_ACCOUNT = {
|
|
|
62
85
|
connectionOptions: [
|
|
63
86
|
{
|
|
64
87
|
requiredScopes: [
|
|
65
|
-
{
|
|
66
|
-
requirements: [
|
|
67
|
-
"https://www.googleapis.com/auth/drive",
|
|
68
|
-
"https://www.googleapis.com/auth/drive.file",
|
|
69
|
-
"https://www.googleapis.com/auth/drive.readonly",
|
|
70
|
-
"https://www.googleapis.com/auth/forms.body",
|
|
71
|
-
"https://www.googleapis.com/auth/forms.body.readonly",
|
|
72
|
-
],
|
|
73
|
-
type: "or",
|
|
74
|
-
},
|
|
75
88
|
{
|
|
76
89
|
requirements: [
|
|
77
90
|
{
|
|
@@ -141,6 +154,24 @@ export const googleTriggerDefinitions = {
|
|
|
141
154
|
icon: "gmail",
|
|
142
155
|
type: "gmail.label.removed",
|
|
143
156
|
},
|
|
157
|
+
gmailMailboxChanged: {
|
|
158
|
+
account: GMAIL_ACCOUNT,
|
|
159
|
+
icon: "gmail",
|
|
160
|
+
name: "Gmail mailbox changed",
|
|
161
|
+
type: "gmail.mailbox.changed",
|
|
162
|
+
},
|
|
163
|
+
gmailMessageAdded: {
|
|
164
|
+
account: GMAIL_ACCOUNT,
|
|
165
|
+
icon: "gmail",
|
|
166
|
+
name: "Gmail message added",
|
|
167
|
+
type: "gmail.message.added",
|
|
168
|
+
},
|
|
169
|
+
gmailMessageDeleted: {
|
|
170
|
+
account: GMAIL_DELETION_ACCOUNT,
|
|
171
|
+
icon: "gmail",
|
|
172
|
+
name: "Gmail message deleted",
|
|
173
|
+
type: "gmail.message.deleted",
|
|
174
|
+
},
|
|
144
175
|
gmailMessageReceived: {
|
|
145
176
|
account: GMAIL_ACCOUNT,
|
|
146
177
|
icon: "gmail",
|
|
@@ -159,6 +190,12 @@ export const googleTriggerDefinitions = {
|
|
|
159
190
|
name: "Google Calendar event created",
|
|
160
191
|
type: "googleCalendar.event.created",
|
|
161
192
|
},
|
|
193
|
+
googleCalendarEventChanged: {
|
|
194
|
+
account: GOOGLE_CALENDAR_ACCOUNT,
|
|
195
|
+
icon: "google-calendar",
|
|
196
|
+
name: "Google Calendar event changed",
|
|
197
|
+
type: "googleCalendar.event.changed",
|
|
198
|
+
},
|
|
162
199
|
googleCalendarEventDeleted: {
|
|
163
200
|
account: GOOGLE_CALENDAR_ACCOUNT,
|
|
164
201
|
icon: "google-calendar",
|
|
@@ -32,6 +32,57 @@ const TEAMS_CHANNEL_MESSAGE_ACCOUNT = {
|
|
|
32
32
|
serviceId: "microsoft",
|
|
33
33
|
} as const satisfies IntegrationAccountRequirement
|
|
34
34
|
|
|
35
|
+
const TEAMS_TEAM_ACCOUNT = {
|
|
36
|
+
connectionOptions: [{ requiredScopes: ["Team.ReadBasic.All"] }],
|
|
37
|
+
serviceId: "microsoft",
|
|
38
|
+
} as const satisfies IntegrationAccountRequirement
|
|
39
|
+
|
|
40
|
+
const TEAMS_CHANNEL_ACCOUNT = {
|
|
41
|
+
connectionOptions: [
|
|
42
|
+
{
|
|
43
|
+
requiredScopes: [
|
|
44
|
+
{
|
|
45
|
+
requirements: ["Team.ReadBasic.All", "Channel.ReadBasic.All"],
|
|
46
|
+
type: "and",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
serviceId: "microsoft",
|
|
52
|
+
} as const satisfies IntegrationAccountRequirement
|
|
53
|
+
|
|
54
|
+
const TEAMS_CHANNEL_MEMBER_ACCOUNT = {
|
|
55
|
+
connectionOptions: [
|
|
56
|
+
{
|
|
57
|
+
requiredScopes: [
|
|
58
|
+
{
|
|
59
|
+
requirements: [
|
|
60
|
+
"Team.ReadBasic.All",
|
|
61
|
+
"Channel.ReadBasic.All",
|
|
62
|
+
"ChannelMember.Read.All",
|
|
63
|
+
],
|
|
64
|
+
type: "and",
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
serviceId: "microsoft",
|
|
70
|
+
} as const satisfies IntegrationAccountRequirement
|
|
71
|
+
|
|
72
|
+
const TEAMS_TEAM_MEMBER_ACCOUNT = {
|
|
73
|
+
connectionOptions: [
|
|
74
|
+
{
|
|
75
|
+
requiredScopes: [
|
|
76
|
+
{
|
|
77
|
+
requirements: ["Team.ReadBasic.All", "TeamMember.Read.All"],
|
|
78
|
+
type: "and",
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
serviceId: "microsoft",
|
|
84
|
+
} as const satisfies IntegrationAccountRequirement
|
|
85
|
+
|
|
35
86
|
const TEAMS_CHAT_MESSAGE_ACCOUNT = {
|
|
36
87
|
connectionOptions: [
|
|
37
88
|
{
|
|
@@ -46,7 +97,42 @@ const TEAMS_CHAT_MESSAGE_ACCOUNT = {
|
|
|
46
97
|
serviceId: "microsoft",
|
|
47
98
|
} as const satisfies IntegrationAccountRequirement
|
|
48
99
|
|
|
100
|
+
const TEAMS_CHAT_ACCOUNT = {
|
|
101
|
+
connectionOptions: [{ requiredScopes: ["Chat.ReadBasic"] }],
|
|
102
|
+
serviceId: "microsoft",
|
|
103
|
+
} as const satisfies IntegrationAccountRequirement
|
|
104
|
+
|
|
105
|
+
const TEAMS_CHAT_MEMBER_ACCOUNT = {
|
|
106
|
+
connectionOptions: [
|
|
107
|
+
{
|
|
108
|
+
requiredScopes: [
|
|
109
|
+
{
|
|
110
|
+
requirements: ["ChatMember.ReadWrite", "ChatMember.Read"],
|
|
111
|
+
type: "or",
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
serviceId: "microsoft",
|
|
117
|
+
} as const satisfies IntegrationAccountRequirement
|
|
118
|
+
|
|
49
119
|
export const microsoftTriggerDefinitions = {
|
|
120
|
+
outlookMessageEvent: {
|
|
121
|
+
account: OUTLOOK_ACCOUNT,
|
|
122
|
+
type: "outlook.message.changed",
|
|
123
|
+
},
|
|
124
|
+
outlookMessageCreated: {
|
|
125
|
+
account: OUTLOOK_ACCOUNT,
|
|
126
|
+
type: "outlook.message.created",
|
|
127
|
+
},
|
|
128
|
+
outlookMessageDeleted: {
|
|
129
|
+
account: OUTLOOK_ACCOUNT,
|
|
130
|
+
type: "outlook.message.deleted",
|
|
131
|
+
},
|
|
132
|
+
outlookMessageUpdated: {
|
|
133
|
+
account: OUTLOOK_ACCOUNT,
|
|
134
|
+
type: "outlook.message.updated",
|
|
135
|
+
},
|
|
50
136
|
outlookEmailReceived: {
|
|
51
137
|
account: OUTLOOK_ACCOUNT,
|
|
52
138
|
type: "outlook.email.received",
|
|
@@ -56,9 +142,126 @@ export const microsoftTriggerDefinitions = {
|
|
|
56
142
|
name: "Microsoft Teams channel message posted",
|
|
57
143
|
type: "teams.channel.message.posted",
|
|
58
144
|
},
|
|
145
|
+
teamsChannelEvent: microsoftChangeTrigger(
|
|
146
|
+
"teams.channel.changed",
|
|
147
|
+
TEAMS_CHANNEL_ACCOUNT,
|
|
148
|
+
),
|
|
149
|
+
teamsChannelCreated: microsoftChangeTrigger(
|
|
150
|
+
"teams.channel.created",
|
|
151
|
+
TEAMS_CHANNEL_ACCOUNT,
|
|
152
|
+
),
|
|
153
|
+
teamsChannelDeleted: microsoftChangeTrigger(
|
|
154
|
+
"teams.channel.deleted",
|
|
155
|
+
TEAMS_CHANNEL_ACCOUNT,
|
|
156
|
+
),
|
|
157
|
+
teamsChannelUpdated: microsoftChangeTrigger(
|
|
158
|
+
"teams.channel.updated",
|
|
159
|
+
TEAMS_CHANNEL_ACCOUNT,
|
|
160
|
+
),
|
|
161
|
+
teamsTeamEvent: microsoftChangeTrigger(
|
|
162
|
+
"teams.team.changed",
|
|
163
|
+
TEAMS_TEAM_ACCOUNT,
|
|
164
|
+
),
|
|
165
|
+
teamsTeamDeleted: microsoftChangeTrigger(
|
|
166
|
+
"teams.team.deleted",
|
|
167
|
+
TEAMS_TEAM_ACCOUNT,
|
|
168
|
+
),
|
|
169
|
+
teamsTeamUpdated: microsoftChangeTrigger(
|
|
170
|
+
"teams.team.updated",
|
|
171
|
+
TEAMS_TEAM_ACCOUNT,
|
|
172
|
+
),
|
|
173
|
+
teamsTeamMemberAdded: microsoftChangeTrigger(
|
|
174
|
+
"teams.team.member.added",
|
|
175
|
+
TEAMS_TEAM_MEMBER_ACCOUNT,
|
|
176
|
+
),
|
|
177
|
+
teamsTeamMemberEvent: microsoftChangeTrigger(
|
|
178
|
+
"teams.team.member.changed",
|
|
179
|
+
TEAMS_TEAM_MEMBER_ACCOUNT,
|
|
180
|
+
),
|
|
181
|
+
teamsTeamMemberRemoved: microsoftChangeTrigger(
|
|
182
|
+
"teams.team.member.removed",
|
|
183
|
+
TEAMS_TEAM_MEMBER_ACCOUNT,
|
|
184
|
+
),
|
|
185
|
+
teamsTeamMemberUpdated: microsoftChangeTrigger(
|
|
186
|
+
"teams.team.member.updated",
|
|
187
|
+
TEAMS_TEAM_MEMBER_ACCOUNT,
|
|
188
|
+
),
|
|
189
|
+
teamsChannelMemberAdded: microsoftChangeTrigger(
|
|
190
|
+
"teams.channel.member.added",
|
|
191
|
+
TEAMS_CHANNEL_MEMBER_ACCOUNT,
|
|
192
|
+
),
|
|
193
|
+
teamsChannelMemberEvent: microsoftChangeTrigger(
|
|
194
|
+
"teams.channel.member.changed",
|
|
195
|
+
TEAMS_CHANNEL_MEMBER_ACCOUNT,
|
|
196
|
+
),
|
|
197
|
+
teamsChannelMemberRemoved: microsoftChangeTrigger(
|
|
198
|
+
"teams.channel.member.removed",
|
|
199
|
+
TEAMS_CHANNEL_MEMBER_ACCOUNT,
|
|
200
|
+
),
|
|
201
|
+
teamsChannelMemberUpdated: microsoftChangeTrigger(
|
|
202
|
+
"teams.channel.member.updated",
|
|
203
|
+
TEAMS_CHANNEL_MEMBER_ACCOUNT,
|
|
204
|
+
),
|
|
205
|
+
teamsChannelMessageEvent: microsoftChangeTrigger(
|
|
206
|
+
"teams.channel.message.changed",
|
|
207
|
+
TEAMS_CHANNEL_MESSAGE_ACCOUNT,
|
|
208
|
+
),
|
|
209
|
+
teamsChannelMessageDeleted: microsoftChangeTrigger(
|
|
210
|
+
"teams.channel.message.deleted",
|
|
211
|
+
TEAMS_CHANNEL_MESSAGE_ACCOUNT,
|
|
212
|
+
),
|
|
213
|
+
teamsChannelMessageUpdated: microsoftChangeTrigger(
|
|
214
|
+
"teams.channel.message.updated",
|
|
215
|
+
TEAMS_CHANNEL_MESSAGE_ACCOUNT,
|
|
216
|
+
),
|
|
217
|
+
teamsChatEvent: microsoftChangeTrigger(
|
|
218
|
+
"teams.chat.changed",
|
|
219
|
+
TEAMS_CHAT_ACCOUNT,
|
|
220
|
+
),
|
|
221
|
+
teamsChatMemberAdded: microsoftChangeTrigger(
|
|
222
|
+
"teams.chat.member.added",
|
|
223
|
+
TEAMS_CHAT_MEMBER_ACCOUNT,
|
|
224
|
+
),
|
|
225
|
+
teamsChatMemberEvent: microsoftChangeTrigger(
|
|
226
|
+
"teams.chat.member.changed",
|
|
227
|
+
TEAMS_CHAT_MEMBER_ACCOUNT,
|
|
228
|
+
),
|
|
229
|
+
teamsChatMemberRemoved: microsoftChangeTrigger(
|
|
230
|
+
"teams.chat.member.removed",
|
|
231
|
+
TEAMS_CHAT_MEMBER_ACCOUNT,
|
|
232
|
+
),
|
|
233
|
+
teamsChatMessageEvent: microsoftChangeTrigger(
|
|
234
|
+
"teams.chat.message.changed",
|
|
235
|
+
TEAMS_CHAT_MESSAGE_ACCOUNT,
|
|
236
|
+
),
|
|
237
|
+
teamsChatMessageDeleted: microsoftChangeTrigger(
|
|
238
|
+
"teams.chat.message.deleted",
|
|
239
|
+
TEAMS_CHAT_MESSAGE_ACCOUNT,
|
|
240
|
+
),
|
|
241
|
+
teamsChatMessageUpdated: microsoftChangeTrigger(
|
|
242
|
+
"teams.chat.message.updated",
|
|
243
|
+
TEAMS_CHAT_MESSAGE_ACCOUNT,
|
|
244
|
+
),
|
|
245
|
+
teamsChatUpdated: microsoftChangeTrigger(
|
|
246
|
+
"teams.chat.updated",
|
|
247
|
+
TEAMS_CHAT_ACCOUNT,
|
|
248
|
+
),
|
|
59
249
|
teamsChatMessagePosted: {
|
|
60
250
|
account: TEAMS_CHAT_MESSAGE_ACCOUNT,
|
|
61
251
|
name: "Microsoft Teams chat message posted",
|
|
62
252
|
type: "teams.chat.message.posted",
|
|
63
253
|
},
|
|
64
254
|
} as const satisfies Record<string, TriggerDefinition>
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Builds one Microsoft change-trigger definition without widening its type.
|
|
258
|
+
*
|
|
259
|
+
* @param type - Stable integration event type.
|
|
260
|
+
* @param account - Microsoft account and scope requirement.
|
|
261
|
+
*/
|
|
262
|
+
function microsoftChangeTrigger<const TType extends string>(
|
|
263
|
+
type: TType,
|
|
264
|
+
account: IntegrationAccountRequirement,
|
|
265
|
+
) {
|
|
266
|
+
return { account, type }
|
|
267
|
+
}
|