terse-types 0.0.42 → 0.0.45
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/Configs.d.ts +5 -0
- package/dist/Configs.js +2 -1
- package/dist/FrontendRoutes.json +6 -5
- package/dist/FrontendRoutesBuilder.d.ts +2 -1
- package/dist/ToolsTypes.d.ts +20 -0
- package/dist/ToolsTypes.js +11 -0
- package/dist/TriggerPresenters.js +37 -7
- package/dist/Triggers.d.ts +247 -0
- package/dist/Triggers.js +25 -1
- package/dist/types.d.ts +459 -0
- package/dist/types.js +3 -0
- package/package.json +1 -1
- package/dist/ACL.d.ts +0 -375
- package/dist/ACL.js +0 -105
- package/dist/ACLPolicy.d.ts +0 -17
- package/dist/ACLPolicy.js +0 -18
- package/dist/OrganizationMetadata.d.ts +0 -6
- package/dist/OrganizationMetadata.js +0 -10
- package/dist/getConfigACLRules.d.ts +0 -10
- package/dist/getConfigACLRules.js +0 -0
package/dist/Configs.d.ts
CHANGED
|
@@ -243,6 +243,7 @@ export declare const GitHubEventType: {
|
|
|
243
243
|
readonly PR_MERGED: "pull_request.merged";
|
|
244
244
|
readonly PR_CLOSED: "pull_request.closed";
|
|
245
245
|
readonly PR_SYNCHRONIZE: "pull_request.synchronize";
|
|
246
|
+
readonly ISSUE_COMMENT_CREATED: "issue_comment.created";
|
|
246
247
|
};
|
|
247
248
|
export declare const gitHubEventTypeSchema: z.ZodEnum<{
|
|
248
249
|
readonly PUSH: "push";
|
|
@@ -250,6 +251,7 @@ export declare const gitHubEventTypeSchema: z.ZodEnum<{
|
|
|
250
251
|
readonly PR_MERGED: "pull_request.merged";
|
|
251
252
|
readonly PR_CLOSED: "pull_request.closed";
|
|
252
253
|
readonly PR_SYNCHRONIZE: "pull_request.synchronize";
|
|
254
|
+
readonly ISSUE_COMMENT_CREATED: "issue_comment.created";
|
|
253
255
|
}>;
|
|
254
256
|
export type GitHubEventType = z.infer<typeof gitHubEventTypeSchema>;
|
|
255
257
|
export declare const LinearEventType: {
|
|
@@ -561,6 +563,7 @@ export declare const GitHubConfigSchema: z.ZodObject<{
|
|
|
561
563
|
readonly PR_MERGED: "pull_request.merged";
|
|
562
564
|
readonly PR_CLOSED: "pull_request.closed";
|
|
563
565
|
readonly PR_SYNCHRONIZE: "pull_request.synchronize";
|
|
566
|
+
readonly ISSUE_COMMENT_CREATED: "issue_comment.created";
|
|
564
567
|
}>>>;
|
|
565
568
|
}, z.core.$strip>;
|
|
566
569
|
export type GitHubConfigData = z.infer<typeof GitHubConfigSchema>;
|
|
@@ -1041,6 +1044,7 @@ export declare const configDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1041
1044
|
readonly PR_MERGED: "pull_request.merged";
|
|
1042
1045
|
readonly PR_CLOSED: "pull_request.closed";
|
|
1043
1046
|
readonly PR_SYNCHRONIZE: "pull_request.synchronize";
|
|
1047
|
+
readonly ISSUE_COMMENT_CREATED: "issue_comment.created";
|
|
1044
1048
|
}>>>;
|
|
1045
1049
|
}, z.core.$strip>, z.ZodObject<{
|
|
1046
1050
|
integrationId: z.ZodString;
|
|
@@ -1248,6 +1252,7 @@ export declare const triggerConfigDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1248
1252
|
readonly PR_MERGED: "pull_request.merged";
|
|
1249
1253
|
readonly PR_CLOSED: "pull_request.closed";
|
|
1250
1254
|
readonly PR_SYNCHRONIZE: "pull_request.synchronize";
|
|
1255
|
+
readonly ISSUE_COMMENT_CREATED: "issue_comment.created";
|
|
1251
1256
|
}>>>;
|
|
1252
1257
|
}, z.core.$strip>, z.ZodObject<{
|
|
1253
1258
|
integrationId: z.ZodLiteral<"system">;
|
package/dist/Configs.js
CHANGED
|
@@ -250,7 +250,8 @@ export const GitHubEventType = {
|
|
|
250
250
|
PR_OPENED: "pull_request.opened",
|
|
251
251
|
PR_MERGED: "pull_request.merged",
|
|
252
252
|
PR_CLOSED: "pull_request.closed",
|
|
253
|
-
PR_SYNCHRONIZE: "pull_request.synchronize"
|
|
253
|
+
PR_SYNCHRONIZE: "pull_request.synchronize",
|
|
254
|
+
ISSUE_COMMENT_CREATED: "issue_comment.created"
|
|
254
255
|
};
|
|
255
256
|
export const gitHubEventTypeSchema = z.enum(GitHubEventType);
|
|
256
257
|
export const LinearEventType = {
|
package/dist/FrontendRoutes.json
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
"ERROR": "/oauth/error"
|
|
7
7
|
},
|
|
8
8
|
"ONBOARD": "/onboard",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
9
|
+
"JOBS": {
|
|
10
|
+
"LIST": "/app/jobs",
|
|
11
|
+
"BY_ID": "/app/jobs/:id",
|
|
12
|
+
"IMPROVEMENTS": "/app/jobs/:id?tab=improvements",
|
|
13
|
+
"ALERTS": "/app/jobs/:id?tab=setup§ion=alerts",
|
|
14
|
+
"RUN_HISTORY": "/app/jobs/:id?tab=history&runId=:runId"
|
|
14
15
|
},
|
|
15
16
|
"PROJECTS": {
|
|
16
17
|
"BY_ID": "/app/projects/:id",
|
package/dist/ToolsTypes.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ConfigType } from "./Configs.js";
|
|
3
|
+
export declare const toolDefinitionSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
displayName: z.ZodString;
|
|
6
|
+
description: z.ZodString;
|
|
7
|
+
integration: z.ZodString;
|
|
8
|
+
isReadOnly: z.ZodBoolean;
|
|
9
|
+
supportsApproval: z.ZodBoolean;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ToolDefinition = z.infer<typeof toolDefinitionSchema>;
|
|
12
|
+
export declare const toolDefinitionsResponseSchema: z.ZodObject<{
|
|
13
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
displayName: z.ZodString;
|
|
16
|
+
description: z.ZodString;
|
|
17
|
+
integration: z.ZodString;
|
|
18
|
+
isReadOnly: z.ZodBoolean;
|
|
19
|
+
supportsApproval: z.ZodBoolean;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type ToolDefinitionsResponse = z.infer<typeof toolDefinitionsResponseSchema>;
|
|
3
23
|
export type TerseToolSource = "skill";
|
|
4
24
|
export interface TerseTool {
|
|
5
25
|
name: string;
|
package/dist/ToolsTypes.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { configTypeEnum } from "./Configs.js";
|
|
3
|
+
export const toolDefinitionSchema = z.object({
|
|
4
|
+
name: z.string(),
|
|
5
|
+
displayName: z.string(),
|
|
6
|
+
description: z.string(),
|
|
7
|
+
integration: z.string(),
|
|
8
|
+
isReadOnly: z.boolean(),
|
|
9
|
+
supportsApproval: z.boolean()
|
|
10
|
+
});
|
|
11
|
+
export const toolDefinitionsResponseSchema = z.object({
|
|
12
|
+
tools: z.array(toolDefinitionSchema)
|
|
13
|
+
});
|
|
3
14
|
export const getToolsThatRequireApprovalsRequestSchema = z.object({
|
|
4
15
|
skills: z.array(configTypeEnum)
|
|
5
16
|
});
|
|
@@ -133,7 +133,8 @@ function formatGithubTrigger(event) {
|
|
|
133
133
|
"pull_request.opened": "Pull Request Opened",
|
|
134
134
|
"pull_request.synchronize": "Pull Request Updated (new commits added)",
|
|
135
135
|
"pull_request.closed": "Pull Request Closed",
|
|
136
|
-
"pull_request.merged": "Pull Request Merged"
|
|
136
|
+
"pull_request.merged": "Pull Request Merged",
|
|
137
|
+
"issue_comment.created": "Issue Comment Created"
|
|
137
138
|
};
|
|
138
139
|
const eventDescription = eventTypeDescriptions[event.eventType] || event.eventType;
|
|
139
140
|
const repoInfo = [
|
|
@@ -143,9 +144,10 @@ function formatGithubTrigger(event) {
|
|
|
143
144
|
`View on GitHub: https://github.com/${event.repository.owner}/${event.repository.name}`
|
|
144
145
|
].join("\n");
|
|
145
146
|
const senderInfo = [`Actor: ${event.sender.login}`, ...(event.sender.email ? [`Email: ${event.sender.email}`] : [])].join("\n");
|
|
146
|
-
const
|
|
147
|
+
const branch = event.eventType === "issue_comment.created" ? undefined : event.branch;
|
|
148
|
+
const branchInfo = branch ? `Branch: ${branch}` : null;
|
|
147
149
|
let prInfo = "";
|
|
148
|
-
if (event.pullRequest) {
|
|
150
|
+
if (event.eventType !== "issue_comment.created" && event.pullRequest) {
|
|
149
151
|
const pr = event.pullRequest;
|
|
150
152
|
const author = pr.author ?? pr.user;
|
|
151
153
|
const prLines = [
|
|
@@ -161,11 +163,30 @@ function formatGithubTrigger(event) {
|
|
|
161
163
|
}
|
|
162
164
|
prInfo = prLines.join("\n");
|
|
163
165
|
}
|
|
166
|
+
let commentInfo = "";
|
|
167
|
+
if (event.eventType === "issue_comment.created") {
|
|
168
|
+
const c = event.comment;
|
|
169
|
+
const target = event.issue;
|
|
170
|
+
const kind = target.isPullRequest ? "Pull Request" : "Issue";
|
|
171
|
+
const targetLines = [
|
|
172
|
+
`${kind} #${target.number}: ${target.title}`,
|
|
173
|
+
`State: ${target.state}`,
|
|
174
|
+
`Author: ${target.author.login}${target.author.email ? ` (${target.author.email})` : ""}`,
|
|
175
|
+
`View: ${target.url}`
|
|
176
|
+
];
|
|
177
|
+
if (target.body) {
|
|
178
|
+
targetLines.push(`\nDescription:\n${indentMultiline(target.body)}`);
|
|
179
|
+
}
|
|
180
|
+
prInfo = targetLines.join("\n");
|
|
181
|
+
const commentLines = [`Comment #${c.id} by ${c.author.login}${c.author.email ? ` (${c.author.email})` : ""}`, `Posted: ${c.createdAt}`, `URL: ${c.url}`, `\nBody:\n${indentMultiline(c.body)}`];
|
|
182
|
+
commentInfo = commentLines.join("\n");
|
|
183
|
+
}
|
|
164
184
|
let commitsInfo = "";
|
|
165
|
-
|
|
185
|
+
const commits = event.eventType === "issue_comment.created" ? [] : event.commits;
|
|
186
|
+
if (commits.length > 0) {
|
|
166
187
|
const commitLines = [];
|
|
167
|
-
commitLines.push(`Commits (${
|
|
168
|
-
|
|
188
|
+
commitLines.push(`Commits (${commits.length}):`);
|
|
189
|
+
commits.forEach((commit, index) => {
|
|
169
190
|
const shortSha = commit.sha.substring(0, 7);
|
|
170
191
|
const commitUrl = `https://github.com/${event.repository.owner}/${event.repository.name}/commit/${commit.sha}`;
|
|
171
192
|
commitLines.push(`\n${index + 1}. Commit ${shortSha}: ${commit.message || commit.name || ""}`);
|
|
@@ -178,12 +199,14 @@ function formatGithubTrigger(event) {
|
|
|
178
199
|
});
|
|
179
200
|
commitsInfo = commitLines.join("\n");
|
|
180
201
|
}
|
|
202
|
+
const targetSectionLabel = event.eventType === "issue_comment.created" ? (event.issue.isPullRequest ? "Pull Request Information" : "Issue Information") : "Pull Request Information";
|
|
181
203
|
return [
|
|
182
204
|
`Incoming GitHub Event: ${eventDescription}`,
|
|
183
205
|
`\nRepository Information:\n${indentMultiline(repoInfo)}`,
|
|
184
206
|
`\nActor Information:\n${indentMultiline(senderInfo)}`,
|
|
185
207
|
...(branchInfo ? [`\nBranch Information:\n${indentMultiline(branchInfo)}`] : []),
|
|
186
|
-
...(prInfo ? [`\
|
|
208
|
+
...(prInfo ? [`\n${targetSectionLabel}:\n${indentMultiline(prInfo)}`] : []),
|
|
209
|
+
...(commentInfo ? [`\nComment Information:\n${indentMultiline(commentInfo)}`] : []),
|
|
187
210
|
...(commitsInfo ? [`\n${commitsInfo}`] : [])
|
|
188
211
|
].join("\n\n");
|
|
189
212
|
}
|
|
@@ -239,6 +262,13 @@ function truncateForDisplay(value, maxLength) {
|
|
|
239
262
|
return value.length > maxLength ? `${value.slice(0, maxLength - 1)}…` : value;
|
|
240
263
|
}
|
|
241
264
|
function formatGithubDisplay(event) {
|
|
265
|
+
if (event.eventType === "issue_comment.created") {
|
|
266
|
+
const kind = event.issue.isPullRequest ? "PR" : "Issue";
|
|
267
|
+
return {
|
|
268
|
+
title: `Comment on #${event.issue.number} ${truncateForDisplay(event.issue.title, 80)}`,
|
|
269
|
+
subtitle: `${event.repository.owner}/${event.repository.name} · ${kind} comment by ${event.sender.login}`
|
|
270
|
+
};
|
|
271
|
+
}
|
|
242
272
|
if (event.pullRequest) {
|
|
243
273
|
return {
|
|
244
274
|
title: `#${event.pullRequest.number} ${truncateForDisplay(event.pullRequest.title, 80)}`,
|
package/dist/Triggers.d.ts
CHANGED
|
@@ -448,6 +448,78 @@ export declare const GithubPRMergedTriggerSchema: z.ZodObject<{
|
|
|
448
448
|
eventType: z.ZodLiteral<"pull_request.merged">;
|
|
449
449
|
}, z.core.$strip>;
|
|
450
450
|
export type GithubPRMergedTrigger = z.infer<typeof GithubPRMergedTriggerSchema>;
|
|
451
|
+
export declare const issueCommentTargetSchema: z.ZodObject<{
|
|
452
|
+
id: z.ZodNumber;
|
|
453
|
+
number: z.ZodNumber;
|
|
454
|
+
title: z.ZodString;
|
|
455
|
+
body: z.ZodOptional<z.ZodString>;
|
|
456
|
+
state: z.ZodEnum<{
|
|
457
|
+
open: "open";
|
|
458
|
+
closed: "closed";
|
|
459
|
+
}>;
|
|
460
|
+
url: z.ZodString;
|
|
461
|
+
author: z.ZodObject<{
|
|
462
|
+
login: z.ZodString;
|
|
463
|
+
email: z.ZodOptional<z.ZodString>;
|
|
464
|
+
}, z.core.$strip>;
|
|
465
|
+
isPullRequest: z.ZodBoolean;
|
|
466
|
+
}, z.core.$strip>;
|
|
467
|
+
export declare const issueCommentSchema: z.ZodObject<{
|
|
468
|
+
id: z.ZodNumber;
|
|
469
|
+
body: z.ZodString;
|
|
470
|
+
author: z.ZodObject<{
|
|
471
|
+
login: z.ZodString;
|
|
472
|
+
email: z.ZodOptional<z.ZodString>;
|
|
473
|
+
}, z.core.$strip>;
|
|
474
|
+
url: z.ZodString;
|
|
475
|
+
createdAt: z.ZodString;
|
|
476
|
+
updatedAt: z.ZodString;
|
|
477
|
+
}, z.core.$strip>;
|
|
478
|
+
export declare const GithubIssueCommentCreatedTriggerSchema: z.ZodObject<{
|
|
479
|
+
integrationType: z.ZodLiteral<IntegrationType.GITHUB>;
|
|
480
|
+
username: z.ZodString;
|
|
481
|
+
installationId: z.ZodNumber;
|
|
482
|
+
repositoryName: z.ZodString;
|
|
483
|
+
repository: z.ZodObject<{
|
|
484
|
+
id: z.ZodNumber;
|
|
485
|
+
name: z.ZodString;
|
|
486
|
+
owner: z.ZodString;
|
|
487
|
+
defaultBranch: z.ZodString;
|
|
488
|
+
}, z.core.$strip>;
|
|
489
|
+
sender: z.ZodObject<{
|
|
490
|
+
login: z.ZodString;
|
|
491
|
+
email: z.ZodOptional<z.ZodString>;
|
|
492
|
+
}, z.core.$strip>;
|
|
493
|
+
eventType: z.ZodLiteral<"issue_comment.created">;
|
|
494
|
+
issue: z.ZodObject<{
|
|
495
|
+
id: z.ZodNumber;
|
|
496
|
+
number: z.ZodNumber;
|
|
497
|
+
title: z.ZodString;
|
|
498
|
+
body: z.ZodOptional<z.ZodString>;
|
|
499
|
+
state: z.ZodEnum<{
|
|
500
|
+
open: "open";
|
|
501
|
+
closed: "closed";
|
|
502
|
+
}>;
|
|
503
|
+
url: z.ZodString;
|
|
504
|
+
author: z.ZodObject<{
|
|
505
|
+
login: z.ZodString;
|
|
506
|
+
email: z.ZodOptional<z.ZodString>;
|
|
507
|
+
}, z.core.$strip>;
|
|
508
|
+
isPullRequest: z.ZodBoolean;
|
|
509
|
+
}, z.core.$strip>;
|
|
510
|
+
comment: z.ZodObject<{
|
|
511
|
+
id: z.ZodNumber;
|
|
512
|
+
body: z.ZodString;
|
|
513
|
+
author: z.ZodObject<{
|
|
514
|
+
login: z.ZodString;
|
|
515
|
+
email: z.ZodOptional<z.ZodString>;
|
|
516
|
+
}, z.core.$strip>;
|
|
517
|
+
url: z.ZodString;
|
|
518
|
+
createdAt: z.ZodString;
|
|
519
|
+
updatedAt: z.ZodString;
|
|
520
|
+
}, z.core.$strip>;
|
|
521
|
+
}, z.core.$strip>;
|
|
522
|
+
export type GithubIssueCommentCreatedTrigger = z.infer<typeof GithubIssueCommentCreatedTriggerSchema>;
|
|
451
523
|
export declare const GithubPRTriggerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
452
524
|
integrationType: z.ZodLiteral<IntegrationType.GITHUB>;
|
|
453
525
|
username: z.ZodString;
|
|
@@ -909,6 +981,49 @@ export declare const GithubTriggerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
909
981
|
}, z.core.$strip>>;
|
|
910
982
|
}, z.core.$strip>>;
|
|
911
983
|
eventType: z.ZodLiteral<"pull_request.merged">;
|
|
984
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
985
|
+
integrationType: z.ZodLiteral<IntegrationType.GITHUB>;
|
|
986
|
+
username: z.ZodString;
|
|
987
|
+
installationId: z.ZodNumber;
|
|
988
|
+
repositoryName: z.ZodString;
|
|
989
|
+
repository: z.ZodObject<{
|
|
990
|
+
id: z.ZodNumber;
|
|
991
|
+
name: z.ZodString;
|
|
992
|
+
owner: z.ZodString;
|
|
993
|
+
defaultBranch: z.ZodString;
|
|
994
|
+
}, z.core.$strip>;
|
|
995
|
+
sender: z.ZodObject<{
|
|
996
|
+
login: z.ZodString;
|
|
997
|
+
email: z.ZodOptional<z.ZodString>;
|
|
998
|
+
}, z.core.$strip>;
|
|
999
|
+
eventType: z.ZodLiteral<"issue_comment.created">;
|
|
1000
|
+
issue: z.ZodObject<{
|
|
1001
|
+
id: z.ZodNumber;
|
|
1002
|
+
number: z.ZodNumber;
|
|
1003
|
+
title: z.ZodString;
|
|
1004
|
+
body: z.ZodOptional<z.ZodString>;
|
|
1005
|
+
state: z.ZodEnum<{
|
|
1006
|
+
open: "open";
|
|
1007
|
+
closed: "closed";
|
|
1008
|
+
}>;
|
|
1009
|
+
url: z.ZodString;
|
|
1010
|
+
author: z.ZodObject<{
|
|
1011
|
+
login: z.ZodString;
|
|
1012
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1013
|
+
}, z.core.$strip>;
|
|
1014
|
+
isPullRequest: z.ZodBoolean;
|
|
1015
|
+
}, z.core.$strip>;
|
|
1016
|
+
comment: z.ZodObject<{
|
|
1017
|
+
id: z.ZodNumber;
|
|
1018
|
+
body: z.ZodString;
|
|
1019
|
+
author: z.ZodObject<{
|
|
1020
|
+
login: z.ZodString;
|
|
1021
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1022
|
+
}, z.core.$strip>;
|
|
1023
|
+
url: z.ZodString;
|
|
1024
|
+
createdAt: z.ZodString;
|
|
1025
|
+
updatedAt: z.ZodString;
|
|
1026
|
+
}, z.core.$strip>;
|
|
912
1027
|
}, z.core.$strip>], "eventType">;
|
|
913
1028
|
export type GithubTrigger = z.infer<typeof GithubTriggerSchema>;
|
|
914
1029
|
export declare const GmailParsedAttachmentSchema: z.ZodObject<{
|
|
@@ -1104,6 +1219,7 @@ export declare const TriggerTypeSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
|
1104
1219
|
readonly PR_MERGED: "pull_request.merged";
|
|
1105
1220
|
readonly PR_CLOSED: "pull_request.closed";
|
|
1106
1221
|
readonly PR_SYNCHRONIZE: "pull_request.synchronize";
|
|
1222
|
+
readonly ISSUE_COMMENT_CREATED: "issue_comment.created";
|
|
1107
1223
|
}>, z.ZodEnum<{
|
|
1108
1224
|
readonly ISSUE_CREATED: "issue.created";
|
|
1109
1225
|
readonly ISSUE_UPDATED: "issue.updated";
|
|
@@ -1176,6 +1292,7 @@ export declare const baseTriggerSchema: z.ZodObject<{
|
|
|
1176
1292
|
readonly PR_MERGED: "pull_request.merged";
|
|
1177
1293
|
readonly PR_CLOSED: "pull_request.closed";
|
|
1178
1294
|
readonly PR_SYNCHRONIZE: "pull_request.synchronize";
|
|
1295
|
+
readonly ISSUE_COMMENT_CREATED: "issue_comment.created";
|
|
1179
1296
|
}>, z.ZodEnum<{
|
|
1180
1297
|
readonly ISSUE_CREATED: "issue.created";
|
|
1181
1298
|
readonly ISSUE_UPDATED: "issue.updated";
|
|
@@ -5456,6 +5573,49 @@ export declare const TriggerSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion
|
|
|
5456
5573
|
}, z.core.$strip>>;
|
|
5457
5574
|
}, z.core.$strip>>;
|
|
5458
5575
|
eventType: z.ZodLiteral<"pull_request.merged">;
|
|
5576
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5577
|
+
integrationType: z.ZodLiteral<IntegrationType.GITHUB>;
|
|
5578
|
+
username: z.ZodString;
|
|
5579
|
+
installationId: z.ZodNumber;
|
|
5580
|
+
repositoryName: z.ZodString;
|
|
5581
|
+
repository: z.ZodObject<{
|
|
5582
|
+
id: z.ZodNumber;
|
|
5583
|
+
name: z.ZodString;
|
|
5584
|
+
owner: z.ZodString;
|
|
5585
|
+
defaultBranch: z.ZodString;
|
|
5586
|
+
}, z.core.$strip>;
|
|
5587
|
+
sender: z.ZodObject<{
|
|
5588
|
+
login: z.ZodString;
|
|
5589
|
+
email: z.ZodOptional<z.ZodString>;
|
|
5590
|
+
}, z.core.$strip>;
|
|
5591
|
+
eventType: z.ZodLiteral<"issue_comment.created">;
|
|
5592
|
+
issue: z.ZodObject<{
|
|
5593
|
+
id: z.ZodNumber;
|
|
5594
|
+
number: z.ZodNumber;
|
|
5595
|
+
title: z.ZodString;
|
|
5596
|
+
body: z.ZodOptional<z.ZodString>;
|
|
5597
|
+
state: z.ZodEnum<{
|
|
5598
|
+
open: "open";
|
|
5599
|
+
closed: "closed";
|
|
5600
|
+
}>;
|
|
5601
|
+
url: z.ZodString;
|
|
5602
|
+
author: z.ZodObject<{
|
|
5603
|
+
login: z.ZodString;
|
|
5604
|
+
email: z.ZodOptional<z.ZodString>;
|
|
5605
|
+
}, z.core.$strip>;
|
|
5606
|
+
isPullRequest: z.ZodBoolean;
|
|
5607
|
+
}, z.core.$strip>;
|
|
5608
|
+
comment: z.ZodObject<{
|
|
5609
|
+
id: z.ZodNumber;
|
|
5610
|
+
body: z.ZodString;
|
|
5611
|
+
author: z.ZodObject<{
|
|
5612
|
+
login: z.ZodString;
|
|
5613
|
+
email: z.ZodOptional<z.ZodString>;
|
|
5614
|
+
}, z.core.$strip>;
|
|
5615
|
+
url: z.ZodString;
|
|
5616
|
+
createdAt: z.ZodString;
|
|
5617
|
+
updatedAt: z.ZodString;
|
|
5618
|
+
}, z.core.$strip>;
|
|
5459
5619
|
}, z.core.$strip>], "eventType">, z.ZodObject<{
|
|
5460
5620
|
integrationType: z.ZodLiteral<IntegrationType.GMAIL>;
|
|
5461
5621
|
eventType: z.ZodEnum<{
|
|
@@ -7419,6 +7579,49 @@ export declare const TriggerArraySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodDi
|
|
|
7419
7579
|
}, z.core.$strip>>;
|
|
7420
7580
|
}, z.core.$strip>>;
|
|
7421
7581
|
eventType: z.ZodLiteral<"pull_request.merged">;
|
|
7582
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7583
|
+
integrationType: z.ZodLiteral<IntegrationType.GITHUB>;
|
|
7584
|
+
username: z.ZodString;
|
|
7585
|
+
installationId: z.ZodNumber;
|
|
7586
|
+
repositoryName: z.ZodString;
|
|
7587
|
+
repository: z.ZodObject<{
|
|
7588
|
+
id: z.ZodNumber;
|
|
7589
|
+
name: z.ZodString;
|
|
7590
|
+
owner: z.ZodString;
|
|
7591
|
+
defaultBranch: z.ZodString;
|
|
7592
|
+
}, z.core.$strip>;
|
|
7593
|
+
sender: z.ZodObject<{
|
|
7594
|
+
login: z.ZodString;
|
|
7595
|
+
email: z.ZodOptional<z.ZodString>;
|
|
7596
|
+
}, z.core.$strip>;
|
|
7597
|
+
eventType: z.ZodLiteral<"issue_comment.created">;
|
|
7598
|
+
issue: z.ZodObject<{
|
|
7599
|
+
id: z.ZodNumber;
|
|
7600
|
+
number: z.ZodNumber;
|
|
7601
|
+
title: z.ZodString;
|
|
7602
|
+
body: z.ZodOptional<z.ZodString>;
|
|
7603
|
+
state: z.ZodEnum<{
|
|
7604
|
+
open: "open";
|
|
7605
|
+
closed: "closed";
|
|
7606
|
+
}>;
|
|
7607
|
+
url: z.ZodString;
|
|
7608
|
+
author: z.ZodObject<{
|
|
7609
|
+
login: z.ZodString;
|
|
7610
|
+
email: z.ZodOptional<z.ZodString>;
|
|
7611
|
+
}, z.core.$strip>;
|
|
7612
|
+
isPullRequest: z.ZodBoolean;
|
|
7613
|
+
}, z.core.$strip>;
|
|
7614
|
+
comment: z.ZodObject<{
|
|
7615
|
+
id: z.ZodNumber;
|
|
7616
|
+
body: z.ZodString;
|
|
7617
|
+
author: z.ZodObject<{
|
|
7618
|
+
login: z.ZodString;
|
|
7619
|
+
email: z.ZodOptional<z.ZodString>;
|
|
7620
|
+
}, z.core.$strip>;
|
|
7621
|
+
url: z.ZodString;
|
|
7622
|
+
createdAt: z.ZodString;
|
|
7623
|
+
updatedAt: z.ZodString;
|
|
7624
|
+
}, z.core.$strip>;
|
|
7422
7625
|
}, z.core.$strip>], "eventType">, z.ZodObject<{
|
|
7423
7626
|
integrationType: z.ZodLiteral<IntegrationType.GMAIL>;
|
|
7424
7627
|
eventType: z.ZodEnum<{
|
|
@@ -9093,6 +9296,7 @@ export declare const serializedEventSchema: z.ZodObject<{
|
|
|
9093
9296
|
readonly PR_MERGED: "pull_request.merged";
|
|
9094
9297
|
readonly PR_CLOSED: "pull_request.closed";
|
|
9095
9298
|
readonly PR_SYNCHRONIZE: "pull_request.synchronize";
|
|
9299
|
+
readonly ISSUE_COMMENT_CREATED: "issue_comment.created";
|
|
9096
9300
|
}>, z.ZodEnum<{
|
|
9097
9301
|
readonly ISSUE_CREATED: "issue.created";
|
|
9098
9302
|
readonly ISSUE_UPDATED: "issue.updated";
|
|
@@ -9457,6 +9661,49 @@ export declare const serializedEventSchema: z.ZodObject<{
|
|
|
9457
9661
|
}, z.core.$strip>>;
|
|
9458
9662
|
}, z.core.$strip>>;
|
|
9459
9663
|
eventType: z.ZodLiteral<"pull_request.merged">;
|
|
9664
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9665
|
+
integrationType: z.ZodLiteral<IntegrationType.GITHUB>;
|
|
9666
|
+
username: z.ZodString;
|
|
9667
|
+
installationId: z.ZodNumber;
|
|
9668
|
+
repositoryName: z.ZodString;
|
|
9669
|
+
repository: z.ZodObject<{
|
|
9670
|
+
id: z.ZodNumber;
|
|
9671
|
+
name: z.ZodString;
|
|
9672
|
+
owner: z.ZodString;
|
|
9673
|
+
defaultBranch: z.ZodString;
|
|
9674
|
+
}, z.core.$strip>;
|
|
9675
|
+
sender: z.ZodObject<{
|
|
9676
|
+
login: z.ZodString;
|
|
9677
|
+
email: z.ZodOptional<z.ZodString>;
|
|
9678
|
+
}, z.core.$strip>;
|
|
9679
|
+
eventType: z.ZodLiteral<"issue_comment.created">;
|
|
9680
|
+
issue: z.ZodObject<{
|
|
9681
|
+
id: z.ZodNumber;
|
|
9682
|
+
number: z.ZodNumber;
|
|
9683
|
+
title: z.ZodString;
|
|
9684
|
+
body: z.ZodOptional<z.ZodString>;
|
|
9685
|
+
state: z.ZodEnum<{
|
|
9686
|
+
open: "open";
|
|
9687
|
+
closed: "closed";
|
|
9688
|
+
}>;
|
|
9689
|
+
url: z.ZodString;
|
|
9690
|
+
author: z.ZodObject<{
|
|
9691
|
+
login: z.ZodString;
|
|
9692
|
+
email: z.ZodOptional<z.ZodString>;
|
|
9693
|
+
}, z.core.$strip>;
|
|
9694
|
+
isPullRequest: z.ZodBoolean;
|
|
9695
|
+
}, z.core.$strip>;
|
|
9696
|
+
comment: z.ZodObject<{
|
|
9697
|
+
id: z.ZodNumber;
|
|
9698
|
+
body: z.ZodString;
|
|
9699
|
+
author: z.ZodObject<{
|
|
9700
|
+
login: z.ZodString;
|
|
9701
|
+
email: z.ZodOptional<z.ZodString>;
|
|
9702
|
+
}, z.core.$strip>;
|
|
9703
|
+
url: z.ZodString;
|
|
9704
|
+
createdAt: z.ZodString;
|
|
9705
|
+
updatedAt: z.ZodString;
|
|
9706
|
+
}, z.core.$strip>;
|
|
9460
9707
|
}, z.core.$strip>], "eventType">, z.ZodObject<{
|
|
9461
9708
|
integrationType: z.ZodLiteral<IntegrationType.GMAIL>;
|
|
9462
9709
|
eventType: z.ZodEnum<{
|
package/dist/Triggers.js
CHANGED
|
@@ -125,13 +125,37 @@ export const GithubPRClosedTriggerSchema = GithubPRTriggerBaseSchema.extend({
|
|
|
125
125
|
export const GithubPRMergedTriggerSchema = GithubPRTriggerBaseSchema.extend({
|
|
126
126
|
eventType: z.literal(GitHubEventType.PR_MERGED)
|
|
127
127
|
});
|
|
128
|
+
export const issueCommentTargetSchema = z.object({
|
|
129
|
+
id: z.number(),
|
|
130
|
+
number: z.number(),
|
|
131
|
+
title: z.string(),
|
|
132
|
+
body: z.string().optional(),
|
|
133
|
+
state: z.enum(["open", "closed"]),
|
|
134
|
+
url: z.string(),
|
|
135
|
+
author: pullRequestUserSchema,
|
|
136
|
+
isPullRequest: z.boolean()
|
|
137
|
+
});
|
|
138
|
+
export const issueCommentSchema = z.object({
|
|
139
|
+
id: z.number(),
|
|
140
|
+
body: z.string(),
|
|
141
|
+
author: pullRequestUserSchema,
|
|
142
|
+
url: z.string(),
|
|
143
|
+
createdAt: z.string(),
|
|
144
|
+
updatedAt: z.string()
|
|
145
|
+
});
|
|
146
|
+
export const GithubIssueCommentCreatedTriggerSchema = GithubTriggerBaseSchema.extend({
|
|
147
|
+
eventType: z.literal(GitHubEventType.ISSUE_COMMENT_CREATED),
|
|
148
|
+
issue: issueCommentTargetSchema,
|
|
149
|
+
comment: issueCommentSchema
|
|
150
|
+
});
|
|
128
151
|
export const GithubPRTriggerSchema = z.discriminatedUnion("eventType", [GithubPROpenedTriggerSchema, GithubPRSynchronizedTriggerSchema, GithubPRClosedTriggerSchema, GithubPRMergedTriggerSchema]);
|
|
129
152
|
export const GithubTriggerSchema = z.discriminatedUnion("eventType", [
|
|
130
153
|
GithubPushTriggerSchema,
|
|
131
154
|
GithubPROpenedTriggerSchema,
|
|
132
155
|
GithubPRSynchronizedTriggerSchema,
|
|
133
156
|
GithubPRClosedTriggerSchema,
|
|
134
|
-
GithubPRMergedTriggerSchema
|
|
157
|
+
GithubPRMergedTriggerSchema,
|
|
158
|
+
GithubIssueCommentCreatedTriggerSchema
|
|
135
159
|
]);
|
|
136
160
|
export const GmailParsedAttachmentSchema = z.object({
|
|
137
161
|
attachmentId: z.string(),
|