@trigger.dev/linear 3.0.0-beta.7 → 3.0.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/index.js +1340 -1771
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1342 -1773
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6,7 +6,6 @@ var zod = require('zod');
|
|
|
6
6
|
var node_buffer = require('node:buffer');
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
9
|
var __export = (target, all) => {
|
|
11
10
|
for (var name in all)
|
|
12
11
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -987,89 +986,43 @@ var reactionUpdated = {
|
|
|
987
986
|
};
|
|
988
987
|
|
|
989
988
|
// src/utils.ts
|
|
990
|
-
var onCommentProperties =
|
|
989
|
+
var onCommentProperties = (payload) => {
|
|
991
990
|
return [
|
|
992
|
-
{
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
},
|
|
996
|
-
{
|
|
997
|
-
label: "Issue ID",
|
|
998
|
-
text: payload.data.issueId
|
|
999
|
-
},
|
|
1000
|
-
{
|
|
1001
|
-
label: "Issue Title",
|
|
1002
|
-
text: payload.data.issue.title,
|
|
1003
|
-
url: payload.url ?? void 0
|
|
1004
|
-
}
|
|
991
|
+
{ label: "Comment ID", text: payload.data.id },
|
|
992
|
+
{ label: "Issue ID", text: payload.data.issueId },
|
|
993
|
+
{ label: "Issue Title", text: payload.data.issue.title, url: payload.url ?? void 0 }
|
|
1005
994
|
];
|
|
1006
|
-
}
|
|
1007
|
-
var onIssueProperties =
|
|
995
|
+
};
|
|
996
|
+
var onIssueProperties = (payload) => {
|
|
1008
997
|
return [
|
|
1009
|
-
{
|
|
1010
|
-
label: "Issue ID",
|
|
1011
|
-
text: payload.data.id
|
|
1012
|
-
},
|
|
998
|
+
{ label: "Issue ID", text: payload.data.id },
|
|
1013
999
|
{
|
|
1014
1000
|
label: "Issue",
|
|
1015
1001
|
text: `[${payload.data.team.key}-${payload.data.number}] ${payload.data.title}`,
|
|
1016
1002
|
url: payload.url ?? void 0
|
|
1017
1003
|
}
|
|
1018
1004
|
];
|
|
1019
|
-
}
|
|
1020
|
-
var queryProperties =
|
|
1005
|
+
};
|
|
1006
|
+
var queryProperties = (query) => {
|
|
1021
1007
|
return [
|
|
1022
|
-
...query.after ? [
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
] : []
|
|
1028
|
-
...query.before ? [
|
|
1029
|
-
{
|
|
1030
|
-
label: "Before",
|
|
1031
|
-
text: query.before
|
|
1032
|
-
}
|
|
1033
|
-
] : [],
|
|
1034
|
-
...query.first ? [
|
|
1035
|
-
{
|
|
1036
|
-
label: "First",
|
|
1037
|
-
text: String(query.first)
|
|
1038
|
-
}
|
|
1039
|
-
] : [],
|
|
1040
|
-
...query.last ? [
|
|
1041
|
-
{
|
|
1042
|
-
label: "Last",
|
|
1043
|
-
text: String(query.last)
|
|
1044
|
-
}
|
|
1045
|
-
] : [],
|
|
1046
|
-
...query.orderBy ? [
|
|
1047
|
-
{
|
|
1048
|
-
label: "Order by",
|
|
1049
|
-
text: query.orderBy
|
|
1050
|
-
}
|
|
1051
|
-
] : [],
|
|
1052
|
-
...query.includeArchived ? [
|
|
1053
|
-
{
|
|
1054
|
-
label: "Include archived",
|
|
1055
|
-
text: String(query.includeArchived)
|
|
1056
|
-
}
|
|
1057
|
-
] : []
|
|
1008
|
+
...query.after ? [{ label: "After", text: query.after }] : [],
|
|
1009
|
+
...query.before ? [{ label: "Before", text: query.before }] : [],
|
|
1010
|
+
...query.first ? [{ label: "First", text: String(query.first) }] : [],
|
|
1011
|
+
...query.last ? [{ label: "Last", text: String(query.last) }] : [],
|
|
1012
|
+
...query.orderBy ? [{ label: "Order by", text: query.orderBy }] : [],
|
|
1013
|
+
...query.includeArchived ? [{ label: "Include archived", text: String(query.includeArchived) }] : []
|
|
1058
1014
|
];
|
|
1059
|
-
}
|
|
1060
|
-
var updatedFromProperties =
|
|
1015
|
+
};
|
|
1016
|
+
var updatedFromProperties = (payload) => {
|
|
1061
1017
|
if (payload.action !== "update")
|
|
1062
1018
|
return [];
|
|
1063
1019
|
return [
|
|
1064
1020
|
{
|
|
1065
1021
|
label: "Updated Keys",
|
|
1066
|
-
text: Object.keys(payload.updatedFrom).filter((key) => ![
|
|
1067
|
-
"editedAt",
|
|
1068
|
-
"updatedAt"
|
|
1069
|
-
].includes(key)).join(", ")
|
|
1022
|
+
text: Object.keys(payload.updatedFrom).filter((key) => !["editedAt", "updatedAt"].includes(key)).join(", ")
|
|
1070
1023
|
}
|
|
1071
1024
|
];
|
|
1072
|
-
}
|
|
1025
|
+
};
|
|
1073
1026
|
|
|
1074
1027
|
// src/events.ts
|
|
1075
1028
|
var onAttachment = {
|
|
@@ -1077,21 +1030,11 @@ var onAttachment = {
|
|
|
1077
1030
|
title: "On Attachment",
|
|
1078
1031
|
source: "linear.app",
|
|
1079
1032
|
icon: "linear",
|
|
1080
|
-
examples: [
|
|
1081
|
-
attachmentCreated,
|
|
1082
|
-
attachmentRemoved,
|
|
1083
|
-
attachmentUpdated
|
|
1084
|
-
],
|
|
1033
|
+
examples: [attachmentCreated, attachmentRemoved, attachmentUpdated],
|
|
1085
1034
|
parsePayload: (payload) => payload,
|
|
1086
1035
|
runProperties: (payload) => [
|
|
1087
|
-
{
|
|
1088
|
-
|
|
1089
|
-
text: payload.action
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
label: "Attachment ID",
|
|
1093
|
-
text: payload.data.id
|
|
1094
|
-
}
|
|
1036
|
+
{ label: "Event action", text: payload.action },
|
|
1037
|
+
{ label: "Attachment ID", text: payload.data.id }
|
|
1095
1038
|
]
|
|
1096
1039
|
};
|
|
1097
1040
|
var onAttachmentCreated = {
|
|
@@ -1100,20 +1043,11 @@ var onAttachmentCreated = {
|
|
|
1100
1043
|
source: "linear.app",
|
|
1101
1044
|
icon: "linear",
|
|
1102
1045
|
filter: {
|
|
1103
|
-
action: [
|
|
1104
|
-
"create"
|
|
1105
|
-
]
|
|
1046
|
+
action: ["create"]
|
|
1106
1047
|
},
|
|
1107
|
-
examples: [
|
|
1108
|
-
attachmentCreated
|
|
1109
|
-
],
|
|
1048
|
+
examples: [attachmentCreated],
|
|
1110
1049
|
parsePayload: (payload) => payload,
|
|
1111
|
-
runProperties: (payload) => [
|
|
1112
|
-
{
|
|
1113
|
-
label: "Attachment ID",
|
|
1114
|
-
text: payload.data.id
|
|
1115
|
-
}
|
|
1116
|
-
]
|
|
1050
|
+
runProperties: (payload) => [{ label: "Attachment ID", text: payload.data.id }]
|
|
1117
1051
|
};
|
|
1118
1052
|
var onAttachmentRemoved = {
|
|
1119
1053
|
name: "Attachment",
|
|
@@ -1121,20 +1055,11 @@ var onAttachmentRemoved = {
|
|
|
1121
1055
|
source: "linear.app",
|
|
1122
1056
|
icon: "linear",
|
|
1123
1057
|
filter: {
|
|
1124
|
-
action: [
|
|
1125
|
-
"remove"
|
|
1126
|
-
]
|
|
1058
|
+
action: ["remove"]
|
|
1127
1059
|
},
|
|
1128
|
-
examples: [
|
|
1129
|
-
attachmentRemoved
|
|
1130
|
-
],
|
|
1060
|
+
examples: [attachmentRemoved],
|
|
1131
1061
|
parsePayload: (payload) => payload,
|
|
1132
|
-
runProperties: (payload) => [
|
|
1133
|
-
{
|
|
1134
|
-
label: "Attachment ID",
|
|
1135
|
-
text: payload.data.id
|
|
1136
|
-
}
|
|
1137
|
-
]
|
|
1062
|
+
runProperties: (payload) => [{ label: "Attachment ID", text: payload.data.id }]
|
|
1138
1063
|
};
|
|
1139
1064
|
var onAttachmentUpdated = {
|
|
1140
1065
|
name: "Attachment",
|
|
@@ -1142,37 +1067,21 @@ var onAttachmentUpdated = {
|
|
|
1142
1067
|
source: "linear.app",
|
|
1143
1068
|
icon: "linear",
|
|
1144
1069
|
filter: {
|
|
1145
|
-
action: [
|
|
1146
|
-
"update"
|
|
1147
|
-
]
|
|
1070
|
+
action: ["update"]
|
|
1148
1071
|
},
|
|
1149
|
-
examples: [
|
|
1150
|
-
attachmentUpdated
|
|
1151
|
-
],
|
|
1072
|
+
examples: [attachmentUpdated],
|
|
1152
1073
|
parsePayload: (payload) => payload,
|
|
1153
|
-
runProperties: (payload) => [
|
|
1154
|
-
{
|
|
1155
|
-
label: "Attachment ID",
|
|
1156
|
-
text: payload.data.id
|
|
1157
|
-
}
|
|
1158
|
-
]
|
|
1074
|
+
runProperties: (payload) => [{ label: "Attachment ID", text: payload.data.id }]
|
|
1159
1075
|
};
|
|
1160
1076
|
var onComment = {
|
|
1161
1077
|
name: "Comment",
|
|
1162
1078
|
title: "On Comment",
|
|
1163
1079
|
source: "linear.app",
|
|
1164
1080
|
icon: "linear",
|
|
1165
|
-
examples: [
|
|
1166
|
-
commentCreated,
|
|
1167
|
-
commentRemoved,
|
|
1168
|
-
commentUpdated
|
|
1169
|
-
],
|
|
1081
|
+
examples: [commentCreated, commentRemoved, commentUpdated],
|
|
1170
1082
|
parsePayload: (payload) => payload,
|
|
1171
1083
|
runProperties: (payload) => [
|
|
1172
|
-
{
|
|
1173
|
-
label: "Event action",
|
|
1174
|
-
text: payload.action
|
|
1175
|
-
},
|
|
1084
|
+
{ label: "Event action", text: payload.action },
|
|
1176
1085
|
...onCommentProperties(payload),
|
|
1177
1086
|
...updatedFromProperties(payload)
|
|
1178
1087
|
]
|
|
@@ -1183,13 +1092,9 @@ var onCommentCreated = {
|
|
|
1183
1092
|
source: "linear.app",
|
|
1184
1093
|
icon: "linear",
|
|
1185
1094
|
filter: {
|
|
1186
|
-
action: [
|
|
1187
|
-
"create"
|
|
1188
|
-
]
|
|
1095
|
+
action: ["create"]
|
|
1189
1096
|
},
|
|
1190
|
-
examples: [
|
|
1191
|
-
commentCreated
|
|
1192
|
-
],
|
|
1097
|
+
examples: [commentCreated],
|
|
1193
1098
|
parsePayload: (payload) => payload,
|
|
1194
1099
|
runProperties: (payload) => onCommentProperties(payload)
|
|
1195
1100
|
};
|
|
@@ -1199,13 +1104,9 @@ var onCommentRemoved = {
|
|
|
1199
1104
|
source: "linear.app",
|
|
1200
1105
|
icon: "linear",
|
|
1201
1106
|
filter: {
|
|
1202
|
-
action: [
|
|
1203
|
-
"remove"
|
|
1204
|
-
]
|
|
1107
|
+
action: ["remove"]
|
|
1205
1108
|
},
|
|
1206
|
-
examples: [
|
|
1207
|
-
commentRemoved
|
|
1208
|
-
],
|
|
1109
|
+
examples: [commentRemoved],
|
|
1209
1110
|
parsePayload: (payload) => payload,
|
|
1210
1111
|
runProperties: (payload) => onCommentProperties(payload)
|
|
1211
1112
|
};
|
|
@@ -1215,39 +1116,22 @@ var onCommentUpdated = {
|
|
|
1215
1116
|
source: "linear.app",
|
|
1216
1117
|
icon: "linear",
|
|
1217
1118
|
filter: {
|
|
1218
|
-
action: [
|
|
1219
|
-
"update"
|
|
1220
|
-
]
|
|
1119
|
+
action: ["update"]
|
|
1221
1120
|
},
|
|
1222
|
-
examples: [
|
|
1223
|
-
commentUpdated
|
|
1224
|
-
],
|
|
1121
|
+
examples: [commentUpdated],
|
|
1225
1122
|
parsePayload: (payload) => payload,
|
|
1226
|
-
runProperties: (payload) => [
|
|
1227
|
-
...onCommentProperties(payload),
|
|
1228
|
-
...updatedFromProperties(payload)
|
|
1229
|
-
]
|
|
1123
|
+
runProperties: (payload) => [...onCommentProperties(payload), ...updatedFromProperties(payload)]
|
|
1230
1124
|
};
|
|
1231
1125
|
var onCycle = {
|
|
1232
1126
|
name: "Cycle",
|
|
1233
1127
|
title: "On Cycle",
|
|
1234
1128
|
source: "linear.app",
|
|
1235
1129
|
icon: "linear",
|
|
1236
|
-
examples: [
|
|
1237
|
-
cycleCreated,
|
|
1238
|
-
cycleRemoved,
|
|
1239
|
-
cycleUpdated
|
|
1240
|
-
],
|
|
1130
|
+
examples: [cycleCreated, cycleRemoved, cycleUpdated],
|
|
1241
1131
|
parsePayload: (payload) => payload,
|
|
1242
1132
|
runProperties: (payload) => [
|
|
1243
|
-
{
|
|
1244
|
-
|
|
1245
|
-
text: payload.action
|
|
1246
|
-
},
|
|
1247
|
-
{
|
|
1248
|
-
label: "Cycle ID",
|
|
1249
|
-
text: payload.data.id
|
|
1250
|
-
}
|
|
1133
|
+
{ label: "Event action", text: payload.action },
|
|
1134
|
+
{ label: "Cycle ID", text: payload.data.id }
|
|
1251
1135
|
]
|
|
1252
1136
|
};
|
|
1253
1137
|
var onCycleCreated = {
|
|
@@ -1256,20 +1140,11 @@ var onCycleCreated = {
|
|
|
1256
1140
|
source: "linear.app",
|
|
1257
1141
|
icon: "linear",
|
|
1258
1142
|
filter: {
|
|
1259
|
-
action: [
|
|
1260
|
-
"create"
|
|
1261
|
-
]
|
|
1143
|
+
action: ["create"]
|
|
1262
1144
|
},
|
|
1263
|
-
examples: [
|
|
1264
|
-
cycleCreated
|
|
1265
|
-
],
|
|
1145
|
+
examples: [cycleCreated],
|
|
1266
1146
|
parsePayload: (payload) => payload,
|
|
1267
|
-
runProperties: (payload) => [
|
|
1268
|
-
{
|
|
1269
|
-
label: "Cycle ID",
|
|
1270
|
-
text: payload.data.id
|
|
1271
|
-
}
|
|
1272
|
-
]
|
|
1147
|
+
runProperties: (payload) => [{ label: "Cycle ID", text: payload.data.id }]
|
|
1273
1148
|
};
|
|
1274
1149
|
var onCycleRemoved = {
|
|
1275
1150
|
name: "Cycle",
|
|
@@ -1277,20 +1152,11 @@ var onCycleRemoved = {
|
|
|
1277
1152
|
source: "linear.app",
|
|
1278
1153
|
icon: "linear",
|
|
1279
1154
|
filter: {
|
|
1280
|
-
action: [
|
|
1281
|
-
"remove"
|
|
1282
|
-
]
|
|
1155
|
+
action: ["remove"]
|
|
1283
1156
|
},
|
|
1284
|
-
examples: [
|
|
1285
|
-
cycleRemoved
|
|
1286
|
-
],
|
|
1157
|
+
examples: [cycleRemoved],
|
|
1287
1158
|
parsePayload: (payload) => payload,
|
|
1288
|
-
runProperties: (payload) => [
|
|
1289
|
-
{
|
|
1290
|
-
label: "Cycle ID",
|
|
1291
|
-
text: payload.data.id
|
|
1292
|
-
}
|
|
1293
|
-
]
|
|
1159
|
+
runProperties: (payload) => [{ label: "Cycle ID", text: payload.data.id }]
|
|
1294
1160
|
};
|
|
1295
1161
|
var onCycleUpdated = {
|
|
1296
1162
|
name: "Cycle",
|
|
@@ -1298,37 +1164,21 @@ var onCycleUpdated = {
|
|
|
1298
1164
|
source: "linear.app",
|
|
1299
1165
|
icon: "linear",
|
|
1300
1166
|
filter: {
|
|
1301
|
-
action: [
|
|
1302
|
-
"update"
|
|
1303
|
-
]
|
|
1167
|
+
action: ["update"]
|
|
1304
1168
|
},
|
|
1305
|
-
examples: [
|
|
1306
|
-
cycleUpdated
|
|
1307
|
-
],
|
|
1169
|
+
examples: [cycleUpdated],
|
|
1308
1170
|
parsePayload: (payload) => payload,
|
|
1309
|
-
runProperties: (payload) => [
|
|
1310
|
-
{
|
|
1311
|
-
label: "Cycle ID",
|
|
1312
|
-
text: payload.data.id
|
|
1313
|
-
}
|
|
1314
|
-
]
|
|
1171
|
+
runProperties: (payload) => [{ label: "Cycle ID", text: payload.data.id }]
|
|
1315
1172
|
};
|
|
1316
1173
|
var onIssue = {
|
|
1317
1174
|
name: "Issue",
|
|
1318
1175
|
title: "On Issue",
|
|
1319
1176
|
source: "linear.app",
|
|
1320
1177
|
icon: "linear",
|
|
1321
|
-
examples: [
|
|
1322
|
-
issueCreated,
|
|
1323
|
-
issueRemoved,
|
|
1324
|
-
issueUpdated
|
|
1325
|
-
],
|
|
1178
|
+
examples: [issueCreated, issueRemoved, issueUpdated],
|
|
1326
1179
|
parsePayload: (payload) => payload,
|
|
1327
1180
|
runProperties: (payload) => [
|
|
1328
|
-
{
|
|
1329
|
-
label: "Event action",
|
|
1330
|
-
text: payload.action
|
|
1331
|
-
},
|
|
1181
|
+
{ label: "Event action", text: payload.action },
|
|
1332
1182
|
...onIssueProperties(payload),
|
|
1333
1183
|
...updatedFromProperties(payload)
|
|
1334
1184
|
]
|
|
@@ -1339,13 +1189,9 @@ var onIssueCreated = {
|
|
|
1339
1189
|
source: "linear.app",
|
|
1340
1190
|
icon: "linear",
|
|
1341
1191
|
filter: {
|
|
1342
|
-
action: [
|
|
1343
|
-
"create"
|
|
1344
|
-
]
|
|
1192
|
+
action: ["create"]
|
|
1345
1193
|
},
|
|
1346
|
-
examples: [
|
|
1347
|
-
issueCreated
|
|
1348
|
-
],
|
|
1194
|
+
examples: [issueCreated],
|
|
1349
1195
|
parsePayload: (payload) => payload,
|
|
1350
1196
|
runProperties: (payload) => onIssueProperties(payload)
|
|
1351
1197
|
};
|
|
@@ -1355,13 +1201,9 @@ var onIssueRemoved = {
|
|
|
1355
1201
|
source: "linear.app",
|
|
1356
1202
|
icon: "linear",
|
|
1357
1203
|
filter: {
|
|
1358
|
-
action: [
|
|
1359
|
-
"remove"
|
|
1360
|
-
]
|
|
1204
|
+
action: ["remove"]
|
|
1361
1205
|
},
|
|
1362
|
-
examples: [
|
|
1363
|
-
issueRemoved
|
|
1364
|
-
],
|
|
1206
|
+
examples: [issueRemoved],
|
|
1365
1207
|
parsePayload: (payload) => payload,
|
|
1366
1208
|
runProperties: (payload) => onIssueProperties(payload)
|
|
1367
1209
|
};
|
|
@@ -1371,39 +1213,22 @@ var onIssueUpdated = {
|
|
|
1371
1213
|
source: "linear.app",
|
|
1372
1214
|
icon: "linear",
|
|
1373
1215
|
filter: {
|
|
1374
|
-
action: [
|
|
1375
|
-
"update"
|
|
1376
|
-
]
|
|
1216
|
+
action: ["update"]
|
|
1377
1217
|
},
|
|
1378
|
-
examples: [
|
|
1379
|
-
issueUpdated
|
|
1380
|
-
],
|
|
1218
|
+
examples: [issueUpdated],
|
|
1381
1219
|
parsePayload: (payload) => payload,
|
|
1382
|
-
runProperties: (payload) => [
|
|
1383
|
-
...onIssueProperties(payload),
|
|
1384
|
-
...updatedFromProperties(payload)
|
|
1385
|
-
]
|
|
1220
|
+
runProperties: (payload) => [...onIssueProperties(payload), ...updatedFromProperties(payload)]
|
|
1386
1221
|
};
|
|
1387
1222
|
var onIssueLabel = {
|
|
1388
1223
|
name: "IssueLabel",
|
|
1389
1224
|
title: "On IssueLabel",
|
|
1390
1225
|
source: "linear.app",
|
|
1391
1226
|
icon: "linear",
|
|
1392
|
-
examples: [
|
|
1393
|
-
issueLabelCreated,
|
|
1394
|
-
issueLabelRemoved,
|
|
1395
|
-
issueLabelUpdated
|
|
1396
|
-
],
|
|
1227
|
+
examples: [issueLabelCreated, issueLabelRemoved, issueLabelUpdated],
|
|
1397
1228
|
parsePayload: (payload) => payload,
|
|
1398
1229
|
runProperties: (payload) => [
|
|
1399
|
-
{
|
|
1400
|
-
|
|
1401
|
-
text: payload.action
|
|
1402
|
-
},
|
|
1403
|
-
{
|
|
1404
|
-
label: "IssueLabel ID",
|
|
1405
|
-
text: payload.data.id
|
|
1406
|
-
}
|
|
1230
|
+
{ label: "Event action", text: payload.action },
|
|
1231
|
+
{ label: "IssueLabel ID", text: payload.data.id }
|
|
1407
1232
|
]
|
|
1408
1233
|
};
|
|
1409
1234
|
var onIssueLabelCreated = {
|
|
@@ -1412,20 +1237,11 @@ var onIssueLabelCreated = {
|
|
|
1412
1237
|
source: "linear.app",
|
|
1413
1238
|
icon: "linear",
|
|
1414
1239
|
filter: {
|
|
1415
|
-
action: [
|
|
1416
|
-
"create"
|
|
1417
|
-
]
|
|
1240
|
+
action: ["create"]
|
|
1418
1241
|
},
|
|
1419
|
-
examples: [
|
|
1420
|
-
issueLabelCreated
|
|
1421
|
-
],
|
|
1242
|
+
examples: [issueLabelCreated],
|
|
1422
1243
|
parsePayload: (payload) => payload,
|
|
1423
|
-
runProperties: (payload) => [
|
|
1424
|
-
{
|
|
1425
|
-
label: "IssueLabel ID",
|
|
1426
|
-
text: payload.data.id
|
|
1427
|
-
}
|
|
1428
|
-
]
|
|
1244
|
+
runProperties: (payload) => [{ label: "IssueLabel ID", text: payload.data.id }]
|
|
1429
1245
|
};
|
|
1430
1246
|
var onIssueLabelRemoved = {
|
|
1431
1247
|
name: "IssueLabel",
|
|
@@ -1433,20 +1249,11 @@ var onIssueLabelRemoved = {
|
|
|
1433
1249
|
source: "linear.app",
|
|
1434
1250
|
icon: "linear",
|
|
1435
1251
|
filter: {
|
|
1436
|
-
action: [
|
|
1437
|
-
"remove"
|
|
1438
|
-
]
|
|
1252
|
+
action: ["remove"]
|
|
1439
1253
|
},
|
|
1440
|
-
examples: [
|
|
1441
|
-
issueLabelRemoved
|
|
1442
|
-
],
|
|
1254
|
+
examples: [issueLabelRemoved],
|
|
1443
1255
|
parsePayload: (payload) => payload,
|
|
1444
|
-
runProperties: (payload) => [
|
|
1445
|
-
{
|
|
1446
|
-
label: "IssueLabel ID",
|
|
1447
|
-
text: payload.data.id
|
|
1448
|
-
}
|
|
1449
|
-
]
|
|
1256
|
+
runProperties: (payload) => [{ label: "IssueLabel ID", text: payload.data.id }]
|
|
1450
1257
|
};
|
|
1451
1258
|
var onIssueLabelUpdated = {
|
|
1452
1259
|
name: "IssueLabel",
|
|
@@ -1454,20 +1261,11 @@ var onIssueLabelUpdated = {
|
|
|
1454
1261
|
source: "linear.app",
|
|
1455
1262
|
icon: "linear",
|
|
1456
1263
|
filter: {
|
|
1457
|
-
action: [
|
|
1458
|
-
"update"
|
|
1459
|
-
]
|
|
1264
|
+
action: ["update"]
|
|
1460
1265
|
},
|
|
1461
|
-
examples: [
|
|
1462
|
-
issueLabelUpdated
|
|
1463
|
-
],
|
|
1266
|
+
examples: [issueLabelUpdated],
|
|
1464
1267
|
parsePayload: (payload) => payload,
|
|
1465
|
-
runProperties: (payload) => [
|
|
1466
|
-
{
|
|
1467
|
-
label: "IssueLabel ID",
|
|
1468
|
-
text: payload.data.id
|
|
1469
|
-
}
|
|
1470
|
-
]
|
|
1268
|
+
runProperties: (payload) => [{ label: "IssueLabel ID", text: payload.data.id }]
|
|
1471
1269
|
};
|
|
1472
1270
|
var onIssueSLA = {
|
|
1473
1271
|
name: "IssueSLA",
|
|
@@ -1476,14 +1274,8 @@ var onIssueSLA = {
|
|
|
1476
1274
|
icon: "linear",
|
|
1477
1275
|
parsePayload: (payload) => payload,
|
|
1478
1276
|
runProperties: (payload) => [
|
|
1479
|
-
{
|
|
1480
|
-
|
|
1481
|
-
text: payload.action
|
|
1482
|
-
},
|
|
1483
|
-
{
|
|
1484
|
-
label: "Issue ID",
|
|
1485
|
-
text: payload.issueData.id
|
|
1486
|
-
}
|
|
1277
|
+
{ label: "SLA action", text: payload.action },
|
|
1278
|
+
{ label: "Issue ID", text: payload.issueData.id }
|
|
1487
1279
|
]
|
|
1488
1280
|
};
|
|
1489
1281
|
var onIssueSLASet = {
|
|
@@ -1492,17 +1284,10 @@ var onIssueSLASet = {
|
|
|
1492
1284
|
source: "linear.app",
|
|
1493
1285
|
icon: "linear",
|
|
1494
1286
|
filter: {
|
|
1495
|
-
action: [
|
|
1496
|
-
"set"
|
|
1497
|
-
]
|
|
1287
|
+
action: ["set"]
|
|
1498
1288
|
},
|
|
1499
1289
|
parsePayload: (payload) => payload,
|
|
1500
|
-
runProperties: (payload) => [
|
|
1501
|
-
{
|
|
1502
|
-
label: "Issue ID",
|
|
1503
|
-
text: payload.issueData.id
|
|
1504
|
-
}
|
|
1505
|
-
]
|
|
1290
|
+
runProperties: (payload) => [{ label: "Issue ID", text: payload.issueData.id }]
|
|
1506
1291
|
};
|
|
1507
1292
|
var onIssueSLABreached = {
|
|
1508
1293
|
name: "IssueSLA",
|
|
@@ -1510,17 +1295,10 @@ var onIssueSLABreached = {
|
|
|
1510
1295
|
source: "linear.app",
|
|
1511
1296
|
icon: "linear",
|
|
1512
1297
|
filter: {
|
|
1513
|
-
action: [
|
|
1514
|
-
"breached"
|
|
1515
|
-
]
|
|
1298
|
+
action: ["breached"]
|
|
1516
1299
|
},
|
|
1517
1300
|
parsePayload: (payload) => payload,
|
|
1518
|
-
runProperties: (payload) => [
|
|
1519
|
-
{
|
|
1520
|
-
label: "Issue ID",
|
|
1521
|
-
text: payload.issueData.id
|
|
1522
|
-
}
|
|
1523
|
-
]
|
|
1301
|
+
runProperties: (payload) => [{ label: "Issue ID", text: payload.issueData.id }]
|
|
1524
1302
|
};
|
|
1525
1303
|
var onIssueSLAHighRisk = {
|
|
1526
1304
|
name: "IssueSLA",
|
|
@@ -1528,43 +1306,22 @@ var onIssueSLAHighRisk = {
|
|
|
1528
1306
|
source: "linear.app",
|
|
1529
1307
|
icon: "linear",
|
|
1530
1308
|
filter: {
|
|
1531
|
-
action: [
|
|
1532
|
-
"highRisk"
|
|
1533
|
-
]
|
|
1309
|
+
action: ["highRisk"]
|
|
1534
1310
|
},
|
|
1535
1311
|
parsePayload: (payload) => payload,
|
|
1536
|
-
runProperties: (payload) => [
|
|
1537
|
-
{
|
|
1538
|
-
label: "Issue ID",
|
|
1539
|
-
text: payload.issueData.id
|
|
1540
|
-
}
|
|
1541
|
-
]
|
|
1312
|
+
runProperties: (payload) => [{ label: "Issue ID", text: payload.issueData.id }]
|
|
1542
1313
|
};
|
|
1543
1314
|
var onProject = {
|
|
1544
1315
|
name: "Project",
|
|
1545
1316
|
title: "On Project",
|
|
1546
1317
|
source: "linear.app",
|
|
1547
1318
|
icon: "linear",
|
|
1548
|
-
examples: [
|
|
1549
|
-
projectCreated,
|
|
1550
|
-
projectRemoved,
|
|
1551
|
-
projectUpdated
|
|
1552
|
-
],
|
|
1319
|
+
examples: [projectCreated, projectRemoved, projectUpdated],
|
|
1553
1320
|
parsePayload: (payload) => payload,
|
|
1554
1321
|
runProperties: (payload) => [
|
|
1555
|
-
{
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
},
|
|
1559
|
-
{
|
|
1560
|
-
label: "Project ID",
|
|
1561
|
-
text: payload.data.id
|
|
1562
|
-
},
|
|
1563
|
-
{
|
|
1564
|
-
label: "Project Name",
|
|
1565
|
-
text: payload.data.name,
|
|
1566
|
-
url: payload.url ?? void 0
|
|
1567
|
-
},
|
|
1322
|
+
{ label: "Event action", text: payload.action },
|
|
1323
|
+
{ label: "Project ID", text: payload.data.id },
|
|
1324
|
+
{ label: "Project Name", text: payload.data.name, url: payload.url ?? void 0 },
|
|
1568
1325
|
...updatedFromProperties(payload)
|
|
1569
1326
|
]
|
|
1570
1327
|
};
|
|
@@ -1574,24 +1331,13 @@ var onProjectCreated = {
|
|
|
1574
1331
|
source: "linear.app",
|
|
1575
1332
|
icon: "linear",
|
|
1576
1333
|
filter: {
|
|
1577
|
-
action: [
|
|
1578
|
-
"create"
|
|
1579
|
-
]
|
|
1334
|
+
action: ["create"]
|
|
1580
1335
|
},
|
|
1581
|
-
examples: [
|
|
1582
|
-
projectCreated
|
|
1583
|
-
],
|
|
1336
|
+
examples: [projectCreated],
|
|
1584
1337
|
parsePayload: (payload) => payload,
|
|
1585
1338
|
runProperties: (payload) => [
|
|
1586
|
-
{
|
|
1587
|
-
|
|
1588
|
-
text: payload.data.id
|
|
1589
|
-
},
|
|
1590
|
-
{
|
|
1591
|
-
label: "Project Name",
|
|
1592
|
-
text: payload.data.name,
|
|
1593
|
-
url: payload.url ?? void 0
|
|
1594
|
-
}
|
|
1339
|
+
{ label: "Project ID", text: payload.data.id },
|
|
1340
|
+
{ label: "Project Name", text: payload.data.name, url: payload.url ?? void 0 }
|
|
1595
1341
|
]
|
|
1596
1342
|
};
|
|
1597
1343
|
var onProjectRemoved = {
|
|
@@ -1600,24 +1346,13 @@ var onProjectRemoved = {
|
|
|
1600
1346
|
source: "linear.app",
|
|
1601
1347
|
icon: "linear",
|
|
1602
1348
|
filter: {
|
|
1603
|
-
action: [
|
|
1604
|
-
"remove"
|
|
1605
|
-
]
|
|
1349
|
+
action: ["remove"]
|
|
1606
1350
|
},
|
|
1607
|
-
examples: [
|
|
1608
|
-
projectRemoved
|
|
1609
|
-
],
|
|
1351
|
+
examples: [projectRemoved],
|
|
1610
1352
|
parsePayload: (payload) => payload,
|
|
1611
1353
|
runProperties: (payload) => [
|
|
1612
|
-
{
|
|
1613
|
-
|
|
1614
|
-
text: payload.data.id
|
|
1615
|
-
},
|
|
1616
|
-
{
|
|
1617
|
-
label: "Project Name",
|
|
1618
|
-
text: payload.data.name,
|
|
1619
|
-
url: payload.url ?? void 0
|
|
1620
|
-
}
|
|
1354
|
+
{ label: "Project ID", text: payload.data.id },
|
|
1355
|
+
{ label: "Project Name", text: payload.data.name, url: payload.url ?? void 0 }
|
|
1621
1356
|
]
|
|
1622
1357
|
};
|
|
1623
1358
|
var onProjectUpdated = {
|
|
@@ -1626,24 +1361,13 @@ var onProjectUpdated = {
|
|
|
1626
1361
|
source: "linear.app",
|
|
1627
1362
|
icon: "linear",
|
|
1628
1363
|
filter: {
|
|
1629
|
-
action: [
|
|
1630
|
-
"update"
|
|
1631
|
-
]
|
|
1364
|
+
action: ["update"]
|
|
1632
1365
|
},
|
|
1633
|
-
examples: [
|
|
1634
|
-
projectUpdated
|
|
1635
|
-
],
|
|
1366
|
+
examples: [projectUpdated],
|
|
1636
1367
|
parsePayload: (payload) => payload,
|
|
1637
1368
|
runProperties: (payload) => [
|
|
1638
|
-
{
|
|
1639
|
-
|
|
1640
|
-
text: payload.data.id
|
|
1641
|
-
},
|
|
1642
|
-
{
|
|
1643
|
-
label: "Project Name",
|
|
1644
|
-
text: payload.data.name,
|
|
1645
|
-
url: payload.url ?? void 0
|
|
1646
|
-
},
|
|
1369
|
+
{ label: "Project ID", text: payload.data.id },
|
|
1370
|
+
{ label: "Project Name", text: payload.data.name, url: payload.url ?? void 0 },
|
|
1647
1371
|
...updatedFromProperties(payload)
|
|
1648
1372
|
]
|
|
1649
1373
|
};
|
|
@@ -1652,21 +1376,11 @@ var onProjectUpdate = {
|
|
|
1652
1376
|
title: "On ProjectUpdate",
|
|
1653
1377
|
source: "linear.app",
|
|
1654
1378
|
icon: "linear",
|
|
1655
|
-
examples: [
|
|
1656
|
-
projectUpdateCreated,
|
|
1657
|
-
projectUpdateRemoved,
|
|
1658
|
-
projectUpdateUpdated
|
|
1659
|
-
],
|
|
1379
|
+
examples: [projectUpdateCreated, projectUpdateRemoved, projectUpdateUpdated],
|
|
1660
1380
|
parsePayload: (payload) => payload,
|
|
1661
1381
|
runProperties: (payload) => [
|
|
1662
|
-
{
|
|
1663
|
-
|
|
1664
|
-
text: payload.action
|
|
1665
|
-
},
|
|
1666
|
-
{
|
|
1667
|
-
label: "ProjectUpdate ID",
|
|
1668
|
-
text: payload.data.id
|
|
1669
|
-
}
|
|
1382
|
+
{ label: "Event action", text: payload.action },
|
|
1383
|
+
{ label: "ProjectUpdate ID", text: payload.data.id }
|
|
1670
1384
|
]
|
|
1671
1385
|
};
|
|
1672
1386
|
var onProjectUpdateCreated = {
|
|
@@ -1675,20 +1389,11 @@ var onProjectUpdateCreated = {
|
|
|
1675
1389
|
source: "linear.app",
|
|
1676
1390
|
icon: "linear",
|
|
1677
1391
|
filter: {
|
|
1678
|
-
action: [
|
|
1679
|
-
"create"
|
|
1680
|
-
]
|
|
1392
|
+
action: ["create"]
|
|
1681
1393
|
},
|
|
1682
|
-
examples: [
|
|
1683
|
-
projectUpdateCreated
|
|
1684
|
-
],
|
|
1394
|
+
examples: [projectUpdateCreated],
|
|
1685
1395
|
parsePayload: (payload) => payload,
|
|
1686
|
-
runProperties: (payload) => [
|
|
1687
|
-
{
|
|
1688
|
-
label: "ProjectUpdate ID",
|
|
1689
|
-
text: payload.data.id
|
|
1690
|
-
}
|
|
1691
|
-
]
|
|
1396
|
+
runProperties: (payload) => [{ label: "ProjectUpdate ID", text: payload.data.id }]
|
|
1692
1397
|
};
|
|
1693
1398
|
var onProjectUpdateRemoved = {
|
|
1694
1399
|
name: "ProjectUpdate",
|
|
@@ -1696,20 +1401,11 @@ var onProjectUpdateRemoved = {
|
|
|
1696
1401
|
source: "linear.app",
|
|
1697
1402
|
icon: "linear",
|
|
1698
1403
|
filter: {
|
|
1699
|
-
action: [
|
|
1700
|
-
"remove"
|
|
1701
|
-
]
|
|
1404
|
+
action: ["remove"]
|
|
1702
1405
|
},
|
|
1703
|
-
examples: [
|
|
1704
|
-
projectUpdateRemoved
|
|
1705
|
-
],
|
|
1406
|
+
examples: [projectUpdateRemoved],
|
|
1706
1407
|
parsePayload: (payload) => payload,
|
|
1707
|
-
runProperties: (payload) => [
|
|
1708
|
-
{
|
|
1709
|
-
label: "ProjectUpdate ID",
|
|
1710
|
-
text: payload.data.id
|
|
1711
|
-
}
|
|
1712
|
-
]
|
|
1408
|
+
runProperties: (payload) => [{ label: "ProjectUpdate ID", text: payload.data.id }]
|
|
1713
1409
|
};
|
|
1714
1410
|
var onProjectUpdateUpdated = {
|
|
1715
1411
|
name: "ProjectUpdate",
|
|
@@ -1717,41 +1413,22 @@ var onProjectUpdateUpdated = {
|
|
|
1717
1413
|
source: "linear.app",
|
|
1718
1414
|
icon: "linear",
|
|
1719
1415
|
filter: {
|
|
1720
|
-
action: [
|
|
1721
|
-
"update"
|
|
1722
|
-
]
|
|
1416
|
+
action: ["update"]
|
|
1723
1417
|
},
|
|
1724
|
-
examples: [
|
|
1725
|
-
projectUpdateUpdated
|
|
1726
|
-
],
|
|
1418
|
+
examples: [projectUpdateUpdated],
|
|
1727
1419
|
parsePayload: (payload) => payload,
|
|
1728
|
-
runProperties: (payload) => [
|
|
1729
|
-
{
|
|
1730
|
-
label: "ProjectUpdate ID",
|
|
1731
|
-
text: payload.data.id
|
|
1732
|
-
}
|
|
1733
|
-
]
|
|
1420
|
+
runProperties: (payload) => [{ label: "ProjectUpdate ID", text: payload.data.id }]
|
|
1734
1421
|
};
|
|
1735
1422
|
var onReaction = {
|
|
1736
1423
|
name: "Reaction",
|
|
1737
1424
|
title: "On Reaction",
|
|
1738
1425
|
source: "linear.app",
|
|
1739
1426
|
icon: "linear",
|
|
1740
|
-
examples: [
|
|
1741
|
-
reactionCreated,
|
|
1742
|
-
reactionRemoved,
|
|
1743
|
-
reactionUpdated
|
|
1744
|
-
],
|
|
1427
|
+
examples: [reactionCreated, reactionRemoved, reactionUpdated],
|
|
1745
1428
|
parsePayload: (payload) => payload,
|
|
1746
1429
|
runProperties: (payload) => [
|
|
1747
|
-
{
|
|
1748
|
-
|
|
1749
|
-
text: payload.action
|
|
1750
|
-
},
|
|
1751
|
-
{
|
|
1752
|
-
label: "Reaction ID",
|
|
1753
|
-
text: payload.data.id
|
|
1754
|
-
}
|
|
1430
|
+
{ label: "Event action", text: payload.action },
|
|
1431
|
+
{ label: "Reaction ID", text: payload.data.id }
|
|
1755
1432
|
]
|
|
1756
1433
|
};
|
|
1757
1434
|
var onReactionCreated = {
|
|
@@ -1760,20 +1437,11 @@ var onReactionCreated = {
|
|
|
1760
1437
|
source: "linear.app",
|
|
1761
1438
|
icon: "linear",
|
|
1762
1439
|
filter: {
|
|
1763
|
-
action: [
|
|
1764
|
-
"create"
|
|
1765
|
-
]
|
|
1440
|
+
action: ["create"]
|
|
1766
1441
|
},
|
|
1767
|
-
examples: [
|
|
1768
|
-
reactionCreated
|
|
1769
|
-
],
|
|
1442
|
+
examples: [reactionCreated],
|
|
1770
1443
|
parsePayload: (payload) => payload,
|
|
1771
|
-
runProperties: (payload) => [
|
|
1772
|
-
{
|
|
1773
|
-
label: "Reaction ID",
|
|
1774
|
-
text: payload.data.id
|
|
1775
|
-
}
|
|
1776
|
-
]
|
|
1444
|
+
runProperties: (payload) => [{ label: "Reaction ID", text: payload.data.id }]
|
|
1777
1445
|
};
|
|
1778
1446
|
var onReactionRemoved = {
|
|
1779
1447
|
name: "Reaction",
|
|
@@ -1781,20 +1449,11 @@ var onReactionRemoved = {
|
|
|
1781
1449
|
source: "linear.app",
|
|
1782
1450
|
icon: "linear",
|
|
1783
1451
|
filter: {
|
|
1784
|
-
action: [
|
|
1785
|
-
"remove"
|
|
1786
|
-
]
|
|
1452
|
+
action: ["remove"]
|
|
1787
1453
|
},
|
|
1788
|
-
examples: [
|
|
1789
|
-
reactionRemoved
|
|
1790
|
-
],
|
|
1454
|
+
examples: [reactionRemoved],
|
|
1791
1455
|
parsePayload: (payload) => payload,
|
|
1792
|
-
runProperties: (payload) => [
|
|
1793
|
-
{
|
|
1794
|
-
label: "Reaction ID",
|
|
1795
|
-
text: payload.data.id
|
|
1796
|
-
}
|
|
1797
|
-
]
|
|
1456
|
+
runProperties: (payload) => [{ label: "Reaction ID", text: payload.data.id }]
|
|
1798
1457
|
};
|
|
1799
1458
|
var onReactionUpdated = {
|
|
1800
1459
|
name: "Reaction",
|
|
@@ -1802,20 +1461,11 @@ var onReactionUpdated = {
|
|
|
1802
1461
|
source: "linear.app",
|
|
1803
1462
|
icon: "linear",
|
|
1804
1463
|
filter: {
|
|
1805
|
-
action: [
|
|
1806
|
-
"update"
|
|
1807
|
-
]
|
|
1464
|
+
action: ["update"]
|
|
1808
1465
|
},
|
|
1809
|
-
examples: [
|
|
1810
|
-
reactionUpdated
|
|
1811
|
-
],
|
|
1466
|
+
examples: [reactionUpdated],
|
|
1812
1467
|
parsePayload: (payload) => payload,
|
|
1813
|
-
runProperties: (payload) => [
|
|
1814
|
-
{
|
|
1815
|
-
label: "Reaction ID",
|
|
1816
|
-
text: payload.data.id
|
|
1817
|
-
}
|
|
1818
|
-
]
|
|
1468
|
+
runProperties: (payload) => [{ label: "Reaction ID", text: payload.data.id }]
|
|
1819
1469
|
};
|
|
1820
1470
|
zod.z.union([
|
|
1821
1471
|
zod.z.literal("Attachment"),
|
|
@@ -1855,10 +1505,7 @@ var IssueLabelDataSchema = zod.z.object({
|
|
|
1855
1505
|
});
|
|
1856
1506
|
var IssueDataSchema = zod.z.object({
|
|
1857
1507
|
archivedAt: zod.z.coerce.date().optional().nullable(),
|
|
1858
|
-
assignee: zod.z.object({
|
|
1859
|
-
id: zod.z.string(),
|
|
1860
|
-
name: zod.z.string()
|
|
1861
|
-
}).optional().nullable(),
|
|
1508
|
+
assignee: zod.z.object({ id: zod.z.string(), name: zod.z.string() }).optional().nullable(),
|
|
1862
1509
|
assigneeId: zod.z.string().optional().nullable(),
|
|
1863
1510
|
autoArchivedAt: zod.z.coerce.date().optional().nullable(),
|
|
1864
1511
|
autoClosedAt: zod.z.coerce.date().optional().nullable(),
|
|
@@ -1870,15 +1517,12 @@ var IssueDataSchema = zod.z.object({
|
|
|
1870
1517
|
cycleId: zod.z.string().optional().nullable(),
|
|
1871
1518
|
description: zod.z.string().optional().nullable(),
|
|
1872
1519
|
dueDate: zod.z.coerce.date().optional().nullable(),
|
|
1520
|
+
// timeless
|
|
1873
1521
|
estimate: zod.z.number().optional().nullable(),
|
|
1874
1522
|
favoriteId: zod.z.string().optional().nullable(),
|
|
1875
1523
|
id: zod.z.string(),
|
|
1876
1524
|
labelIds: zod.z.array(zod.z.string()),
|
|
1877
|
-
labels: zod.z.array(IssueLabelDataSchema.pick({
|
|
1878
|
-
id: true,
|
|
1879
|
-
color: true,
|
|
1880
|
-
name: true
|
|
1881
|
-
})),
|
|
1525
|
+
labels: zod.z.array(IssueLabelDataSchema.pick({ id: true, color: true, name: true })),
|
|
1882
1526
|
number: zod.z.number(),
|
|
1883
1527
|
parentId: zod.z.string().optional().nullable(),
|
|
1884
1528
|
previousIdentifiers: zod.z.array(zod.z.string()),
|
|
@@ -1886,21 +1530,12 @@ var IssueDataSchema = zod.z.object({
|
|
|
1886
1530
|
priorityLabel: zod.z.string(),
|
|
1887
1531
|
projectId: zod.z.string().optional().nullable(),
|
|
1888
1532
|
sortOrder: zod.z.number(),
|
|
1889
|
-
state: zod.z.object({
|
|
1890
|
-
id: zod.z.string(),
|
|
1891
|
-
color: zod.z.string(),
|
|
1892
|
-
name: zod.z.string(),
|
|
1893
|
-
type: zod.z.string()
|
|
1894
|
-
}),
|
|
1533
|
+
state: zod.z.object({ id: zod.z.string(), color: zod.z.string(), name: zod.z.string(), type: zod.z.string() }),
|
|
1895
1534
|
startedAt: zod.z.coerce.date().optional().nullable(),
|
|
1896
1535
|
stateId: zod.z.string(),
|
|
1897
1536
|
subIssueSortOrder: zod.z.number().optional().nullable(),
|
|
1898
1537
|
subscriberIds: zod.z.array(zod.z.string()),
|
|
1899
|
-
team: zod.z.object({
|
|
1900
|
-
id: zod.z.string(),
|
|
1901
|
-
key: zod.z.string(),
|
|
1902
|
-
name: zod.z.string()
|
|
1903
|
-
}),
|
|
1538
|
+
team: zod.z.object({ id: zod.z.string(), key: zod.z.string(), name: zod.z.string() }),
|
|
1904
1539
|
teamId: zod.z.string(),
|
|
1905
1540
|
title: zod.z.string(),
|
|
1906
1541
|
trashed: zod.z.boolean().optional().nullable(),
|
|
@@ -1915,10 +1550,12 @@ var AttachmentDataSchema = zod.z.object({
|
|
|
1915
1550
|
id: zod.z.string(),
|
|
1916
1551
|
issueId: zod.z.string(),
|
|
1917
1552
|
metadata: zod.z.object({}).passthrough(),
|
|
1553
|
+
// JSONObject
|
|
1918
1554
|
source: zod.z.object({
|
|
1919
1555
|
type: zod.z.string().nullable(),
|
|
1920
1556
|
imageUrl: zod.z.string().url().nullable()
|
|
1921
1557
|
}).passthrough().partial().nullable(),
|
|
1558
|
+
// JSONObject
|
|
1922
1559
|
sourceType: zod.z.string().optional().nullable(),
|
|
1923
1560
|
subtitle: zod.z.string().optional().nullable(),
|
|
1924
1561
|
title: zod.z.string(),
|
|
@@ -1932,13 +1569,11 @@ var CommentDataSchema = zod.z.object({
|
|
|
1932
1569
|
createdAt: zod.z.coerce.date(),
|
|
1933
1570
|
editedAt: zod.z.string().optional().nullable(),
|
|
1934
1571
|
id: zod.z.string(),
|
|
1935
|
-
issue: IssueDataSchema.pick({
|
|
1936
|
-
id: true,
|
|
1937
|
-
title: true
|
|
1938
|
-
}),
|
|
1572
|
+
issue: IssueDataSchema.pick({ id: true, title: true }),
|
|
1939
1573
|
issueId: zod.z.string(),
|
|
1940
1574
|
parentId: zod.z.string().optional().nullable(),
|
|
1941
1575
|
reactionData: zod.z.array(zod.z.object({}).passthrough()),
|
|
1576
|
+
// JSONObject
|
|
1942
1577
|
updatedAt: zod.z.coerce.date(),
|
|
1943
1578
|
userId: zod.z.string().optional().nullable()
|
|
1944
1579
|
});
|
|
@@ -1949,14 +1584,12 @@ var ReactionDataSchema = zod.z.object({
|
|
|
1949
1584
|
body: true,
|
|
1950
1585
|
userId: true
|
|
1951
1586
|
}).optional().nullable(),
|
|
1587
|
+
// missing from official schema
|
|
1952
1588
|
createdAt: zod.z.coerce.date(),
|
|
1953
1589
|
emoji: zod.z.string(),
|
|
1954
1590
|
id: zod.z.string(),
|
|
1955
1591
|
updatedAt: zod.z.coerce.date(),
|
|
1956
|
-
user: zod.z.object({
|
|
1957
|
-
id: zod.z.string(),
|
|
1958
|
-
name: zod.z.string()
|
|
1959
|
-
}).optional().nullable(),
|
|
1592
|
+
user: zod.z.object({ id: zod.z.string(), name: zod.z.string() }).optional().nullable(),
|
|
1960
1593
|
userId: zod.z.string().optional().nullable()
|
|
1961
1594
|
});
|
|
1962
1595
|
var MilestoneDataSchema = zod.z.object({
|
|
@@ -1968,6 +1601,7 @@ var MilestoneDataSchema = zod.z.object({
|
|
|
1968
1601
|
projectId: zod.z.string().optional().nullable(),
|
|
1969
1602
|
sortOrder: zod.z.number(),
|
|
1970
1603
|
targetDate: zod.z.coerce.date().optional().nullable(),
|
|
1604
|
+
// timeless
|
|
1971
1605
|
updatedAt: zod.z.coerce.date()
|
|
1972
1606
|
});
|
|
1973
1607
|
var RoadmapDataSchema = zod.z.object({
|
|
@@ -2004,18 +1638,16 @@ var ProjectDataSchema = zod.z.object({
|
|
|
2004
1638
|
issueCountHistory: zod.z.array(zod.z.number()),
|
|
2005
1639
|
leadId: zod.z.string(),
|
|
2006
1640
|
memberIds: zod.z.array(zod.z.string()),
|
|
2007
|
-
milestones: zod.z.array(MilestoneDataSchema.pick({
|
|
2008
|
-
|
|
2009
|
-
name: true
|
|
2010
|
-
})),
|
|
1641
|
+
milestones: zod.z.array(MilestoneDataSchema.pick({ id: true, name: true })),
|
|
1642
|
+
// at projectMilestones key in official schema
|
|
2011
1643
|
name: zod.z.string(),
|
|
2012
1644
|
progress: zod.z.number().optional().nullable(),
|
|
1645
|
+
// missing, should be NonNullable
|
|
2013
1646
|
projectUpdateRemindersPausedUntilAt: zod.z.coerce.date().optional().nullable(),
|
|
2014
|
-
roadmaps: zod.z.array(RoadmapDataSchema.pick({
|
|
2015
|
-
|
|
2016
|
-
name: true
|
|
2017
|
-
})).optional().nullable(),
|
|
1647
|
+
roadmaps: zod.z.array(RoadmapDataSchema.pick({ id: true, name: true })).optional().nullable(),
|
|
1648
|
+
// missing from official schema
|
|
2018
1649
|
scope: zod.z.number().optional().nullable(),
|
|
1650
|
+
// missing, should be NonNullable
|
|
2019
1651
|
scopeHistory: zod.z.array(zod.z.number()),
|
|
2020
1652
|
slackIssueComments: zod.z.boolean(),
|
|
2021
1653
|
slackIssueStatuses: zod.z.boolean(),
|
|
@@ -2023,9 +1655,11 @@ var ProjectDataSchema = zod.z.object({
|
|
|
2023
1655
|
slugId: zod.z.string(),
|
|
2024
1656
|
sortOrder: zod.z.number(),
|
|
2025
1657
|
startDate: zod.z.coerce.date().optional().nullable(),
|
|
1658
|
+
// timeless
|
|
2026
1659
|
startedAt: zod.z.coerce.date().optional().nullable(),
|
|
2027
1660
|
state: zod.z.string(),
|
|
2028
1661
|
targetDate: zod.z.coerce.date().optional().nullable(),
|
|
1662
|
+
// timeless
|
|
2029
1663
|
teamIds: zod.z.array(zod.z.string()),
|
|
2030
1664
|
trashed: zod.z.boolean().optional().nullable(),
|
|
2031
1665
|
updatedAt: zod.z.coerce.date()
|
|
@@ -2039,20 +1673,13 @@ var ProjectUpdateDataSchema = zod.z.object({
|
|
|
2039
1673
|
health: zod.z.string(),
|
|
2040
1674
|
id: zod.z.string(),
|
|
2041
1675
|
infoSnapshot: zod.z.object({}).passthrough().optional().nullable(),
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
name: true
|
|
2045
|
-
}),
|
|
1676
|
+
// JSONObject, marked as "internal"
|
|
1677
|
+
project: ProjectDataSchema.pick({ id: true, name: true }),
|
|
2046
1678
|
projectId: zod.z.string(),
|
|
2047
|
-
roadmaps: zod.z.array(RoadmapDataSchema.pick({
|
|
2048
|
-
|
|
2049
|
-
name: true
|
|
2050
|
-
})).optional().nullable(),
|
|
1679
|
+
roadmaps: zod.z.array(RoadmapDataSchema.pick({ id: true, name: true })).optional().nullable(),
|
|
1680
|
+
// missing from official schema
|
|
2051
1681
|
updatedAt: zod.z.coerce.date(),
|
|
2052
|
-
user: zod.z.object({
|
|
2053
|
-
id: zod.z.string(),
|
|
2054
|
-
name: zod.z.string()
|
|
2055
|
-
}),
|
|
1682
|
+
user: zod.z.object({ id: zod.z.string(), name: zod.z.string() }),
|
|
2056
1683
|
userId: zod.z.string()
|
|
2057
1684
|
});
|
|
2058
1685
|
var CycleDataSchema = zod.z.object({
|
|
@@ -2070,6 +1697,7 @@ var CycleDataSchema = zod.z.object({
|
|
|
2070
1697
|
name: zod.z.string().optional().nullable(),
|
|
2071
1698
|
number: zod.z.number(),
|
|
2072
1699
|
progress: zod.z.number().optional().nullable(),
|
|
1700
|
+
// missing, should be NonNullable
|
|
2073
1701
|
scopeHistory: zod.z.array(zod.z.number()),
|
|
2074
1702
|
startsAt: zod.z.coerce.date(),
|
|
2075
1703
|
teamId: zod.z.string(),
|
|
@@ -2079,6 +1707,7 @@ var CycleDataSchema = zod.z.object({
|
|
|
2079
1707
|
var WebhookPayloadBaseSchema = zod.z.object({
|
|
2080
1708
|
createdAt: zod.z.coerce.date(),
|
|
2081
1709
|
organizationId: zod.z.string().optional().nullable(),
|
|
1710
|
+
// missing from official schema - workspace id?
|
|
2082
1711
|
url: zod.z.string().url().optional().nullable(),
|
|
2083
1712
|
webhookId: zod.z.string(),
|
|
2084
1713
|
webhookTimestamp: zod.z.coerce.date()
|
|
@@ -2240,111 +1869,97 @@ var WebhookPayloadSchema = zod.z.union([
|
|
|
2240
1869
|
ProjectUpdateEventSchema,
|
|
2241
1870
|
ReactionEventSchema
|
|
2242
1871
|
]);
|
|
2243
|
-
var
|
|
1872
|
+
var Webhooks = class {
|
|
2244
1873
|
constructor(runTask) {
|
|
2245
1874
|
this.runTask = runTask;
|
|
2246
1875
|
}
|
|
2247
1876
|
webhook(key, params) {
|
|
2248
|
-
return this.runTask(
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
});
|
|
1877
|
+
return this.runTask(
|
|
1878
|
+
key,
|
|
1879
|
+
async (client, task, io) => {
|
|
1880
|
+
return serializeLinearOutput(await client.webhook(params.id));
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
name: "Get Webhook",
|
|
1884
|
+
params,
|
|
1885
|
+
properties: [{ label: "Webhook ID", text: params.id }]
|
|
1886
|
+
}
|
|
1887
|
+
);
|
|
2260
1888
|
}
|
|
2261
1889
|
webhooks(key, params) {
|
|
2262
|
-
return this.runTask(
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
1890
|
+
return this.runTask(
|
|
1891
|
+
key,
|
|
1892
|
+
async (client, task, io) => {
|
|
1893
|
+
let connections = await client.webhooks(params);
|
|
1894
|
+
const hooks = connections.nodes;
|
|
1895
|
+
while (connections.pageInfo.hasNextPage) {
|
|
1896
|
+
connections = await connections.fetchNext();
|
|
1897
|
+
hooks.push(...connections.nodes);
|
|
1898
|
+
}
|
|
1899
|
+
return serializeLinearOutput(hooks);
|
|
1900
|
+
},
|
|
1901
|
+
{
|
|
1902
|
+
name: "List Webhooks",
|
|
1903
|
+
params,
|
|
1904
|
+
properties: queryProperties(params ?? {})
|
|
1905
|
+
}
|
|
1906
|
+
);
|
|
2275
1907
|
}
|
|
2276
1908
|
createWebhook(key, params) {
|
|
2277
|
-
return this.runTask(
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
allPublicTeams: !params.teamId
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
label: "
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
label: "Resource Types",
|
|
2296
|
-
text: params.resourceTypes.join(", ")
|
|
2297
|
-
}
|
|
2298
|
-
]
|
|
2299
|
-
});
|
|
1909
|
+
return this.runTask(
|
|
1910
|
+
key,
|
|
1911
|
+
async (client, task, io) => {
|
|
1912
|
+
const payload = await client.createWebhook({ ...params, allPublicTeams: !params.teamId });
|
|
1913
|
+
return serializeLinearOutput({
|
|
1914
|
+
...payload,
|
|
1915
|
+
webhook: await payload.webhook
|
|
1916
|
+
});
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
name: "Create Webhook",
|
|
1920
|
+
params,
|
|
1921
|
+
properties: [
|
|
1922
|
+
{ label: "Webhook URL", text: params.url },
|
|
1923
|
+
{ label: "Resource Types", text: params.resourceTypes.join(", ") }
|
|
1924
|
+
]
|
|
1925
|
+
}
|
|
1926
|
+
);
|
|
2300
1927
|
}
|
|
2301
1928
|
deleteWebhook(key, params) {
|
|
2302
|
-
return this.runTask(
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
});
|
|
1929
|
+
return this.runTask(
|
|
1930
|
+
key,
|
|
1931
|
+
async (client, task, io) => {
|
|
1932
|
+
return serializeLinearOutput(await client.deleteWebhook(params.id));
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
name: "Delete Webhook",
|
|
1936
|
+
params,
|
|
1937
|
+
properties: [{ label: "Webhook ID", text: params.id }]
|
|
1938
|
+
}
|
|
1939
|
+
);
|
|
2314
1940
|
}
|
|
2315
1941
|
updateWebhook(key, params) {
|
|
2316
|
-
return this.runTask(
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
{
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
] : [],
|
|
2336
|
-
...params.input.resourceTypes ? [
|
|
2337
|
-
{
|
|
2338
|
-
label: "Resource Types",
|
|
2339
|
-
text: params.input.resourceTypes.join(", ")
|
|
2340
|
-
}
|
|
2341
|
-
] : []
|
|
2342
|
-
]
|
|
2343
|
-
});
|
|
1942
|
+
return this.runTask(
|
|
1943
|
+
key,
|
|
1944
|
+
async (client, task) => {
|
|
1945
|
+
const payload = await client.updateWebhook(params.id, params.input);
|
|
1946
|
+
return serializeLinearOutput({
|
|
1947
|
+
...payload,
|
|
1948
|
+
webhook: await payload.webhook
|
|
1949
|
+
});
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
name: "Update Webhook",
|
|
1953
|
+
params,
|
|
1954
|
+
properties: [
|
|
1955
|
+
{ label: "Webhook ID", text: params.id },
|
|
1956
|
+
...params.input.url ? [{ label: "Webhook URL", text: params.input.url }] : [],
|
|
1957
|
+
...params.input.resourceTypes ? [{ label: "Resource Types", text: params.input.resourceTypes.join(", ") }] : []
|
|
1958
|
+
]
|
|
1959
|
+
}
|
|
1960
|
+
);
|
|
2344
1961
|
}
|
|
2345
1962
|
};
|
|
2346
|
-
__name(_Webhooks, "Webhooks");
|
|
2347
|
-
var Webhooks = _Webhooks;
|
|
2348
1963
|
function createTrigger(source, event, params) {
|
|
2349
1964
|
return new sdk$1.ExternalSourceTrigger({
|
|
2350
1965
|
event,
|
|
@@ -2353,7 +1968,6 @@ function createTrigger(source, event, params) {
|
|
|
2353
1968
|
options: {}
|
|
2354
1969
|
});
|
|
2355
1970
|
}
|
|
2356
|
-
__name(createTrigger, "createTrigger");
|
|
2357
1971
|
var WebhookRegistrationDataSchema = zod.z.object({
|
|
2358
1972
|
success: zod.z.literal(true),
|
|
2359
1973
|
webhook: zod.z.object({
|
|
@@ -2374,16 +1988,15 @@ function createWebhookEventSource(integration) {
|
|
|
2374
1988
|
register: async (event, io, ctx) => {
|
|
2375
1989
|
const { params, source: httpSource, options } = event;
|
|
2376
1990
|
const webhookData = WebhookRegistrationDataSchema.safeParse(httpSource.data);
|
|
2377
|
-
const allEvents = Array.from(/* @__PURE__ */ new Set([
|
|
2378
|
-
...options.event.desired,
|
|
2379
|
-
...options.event.missing
|
|
2380
|
-
]));
|
|
1991
|
+
const allEvents = Array.from(/* @__PURE__ */ new Set([...options.event.desired, ...options.event.missing]));
|
|
2381
1992
|
const registeredOptions = {
|
|
2382
1993
|
event: allEvents
|
|
2383
1994
|
};
|
|
2384
1995
|
const label = `trigger.${params.teamId ? params.teamId : "all"}`;
|
|
2385
1996
|
if (httpSource.active && webhookData.success) {
|
|
2386
|
-
const hasMissingOptions = Object.values(options).some(
|
|
1997
|
+
const hasMissingOptions = Object.values(options).some(
|
|
1998
|
+
(option) => option.missing.length > 0
|
|
1999
|
+
);
|
|
2387
2000
|
if (!hasMissingOptions)
|
|
2388
2001
|
return;
|
|
2389
2002
|
const updatedWebhook = await io.integration.updateWebhook("update-webhook", {
|
|
@@ -2432,14 +2045,10 @@ function createWebhookEventSource(integration) {
|
|
|
2432
2045
|
}
|
|
2433
2046
|
});
|
|
2434
2047
|
}
|
|
2435
|
-
__name(createWebhookEventSource, "createWebhookEventSource");
|
|
2436
2048
|
async function webhookHandler(event, logger, integration) {
|
|
2437
2049
|
logger.debug("[@trigger.dev/linear] Handling webhook payload");
|
|
2438
2050
|
const { rawEvent: request, source } = event;
|
|
2439
|
-
const LINEAR_IPS = [
|
|
2440
|
-
"35.231.147.226",
|
|
2441
|
-
"35.243.134.228"
|
|
2442
|
-
];
|
|
2051
|
+
const LINEAR_IPS = ["35.231.147.226", "35.243.134.228"];
|
|
2443
2052
|
const clientIp = request.headers.get("cf-connecting-ip") ?? (request.headers.get("x-real-ip") ?? request.headers.get("x-forwarded-for") ?? // default to allowing request if expected headers missing
|
|
2444
2053
|
LINEAR_IPS[0]).split(",")[0];
|
|
2445
2054
|
if (!LINEAR_IPS.includes(clientIp)) {
|
|
@@ -2450,15 +2059,11 @@ async function webhookHandler(event, logger, integration) {
|
|
|
2450
2059
|
const payloadEvent = request.headers.get("Linear-Event");
|
|
2451
2060
|
if (!payloadUuid || !payloadEvent) {
|
|
2452
2061
|
logger.debug("[@trigger.dev/linear] Missing required Linear headers");
|
|
2453
|
-
return {
|
|
2454
|
-
events: []
|
|
2455
|
-
};
|
|
2062
|
+
return { events: [] };
|
|
2456
2063
|
}
|
|
2457
2064
|
if (!request.body) {
|
|
2458
2065
|
logger.debug("[@trigger.dev/linear] No body found");
|
|
2459
|
-
return {
|
|
2460
|
-
events: []
|
|
2461
|
-
};
|
|
2066
|
+
return { events: [] };
|
|
2462
2067
|
}
|
|
2463
2068
|
const signature = request.headers.get(sdk.LINEAR_WEBHOOK_SIGNATURE_HEADER);
|
|
2464
2069
|
if (!signature) {
|
|
@@ -2485,14 +2090,13 @@ async function webhookHandler(event, logger, integration) {
|
|
|
2485
2090
|
]
|
|
2486
2091
|
};
|
|
2487
2092
|
}
|
|
2488
|
-
__name(webhookHandler, "webhookHandler");
|
|
2489
2093
|
|
|
2490
2094
|
// src/index.ts
|
|
2491
2095
|
var _webhooks, webhooks_get;
|
|
2492
2096
|
var _Linear = class _Linear {
|
|
2493
2097
|
constructor(options) {
|
|
2494
|
-
__privateAdd(this, _webhooks);
|
|
2495
2098
|
this.options = options;
|
|
2099
|
+
__privateAdd(this, _webhooks);
|
|
2496
2100
|
this.webhook = __privateGet(this, _webhooks, webhooks_get).webhook;
|
|
2497
2101
|
this.webhooks = __privateGet(this, _webhooks, webhooks_get).webhooks;
|
|
2498
2102
|
this.createWebhook = __privateGet(this, _webhooks, webhooks_get).createWebhook;
|
|
@@ -2510,10 +2114,7 @@ var _Linear = class _Linear {
|
|
|
2510
2114
|
return this._options.id;
|
|
2511
2115
|
}
|
|
2512
2116
|
get metadata() {
|
|
2513
|
-
return {
|
|
2514
|
-
id: "linear",
|
|
2515
|
-
name: "Linear"
|
|
2516
|
-
};
|
|
2117
|
+
return { id: "linear", name: "Linear" };
|
|
2517
2118
|
}
|
|
2518
2119
|
get source() {
|
|
2519
2120
|
return createWebhookEventSource(this);
|
|
@@ -2543,1339 +2144,1309 @@ var _Linear = class _Linear {
|
|
|
2543
2144
|
throw new Error("No IO");
|
|
2544
2145
|
if (!this._connectionKey)
|
|
2545
2146
|
throw new Error("No connection key");
|
|
2546
|
-
return this._io.runTask(
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2147
|
+
return this._io.runTask(
|
|
2148
|
+
key,
|
|
2149
|
+
(task, io) => {
|
|
2150
|
+
if (!this._client)
|
|
2151
|
+
throw new Error("No client");
|
|
2152
|
+
return callback(this._client, task, io);
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
icon: "linear",
|
|
2156
|
+
retry: sdk$1.retry.standardBackoff,
|
|
2157
|
+
...options ?? {},
|
|
2158
|
+
connectionKey: this._connectionKey
|
|
2159
|
+
},
|
|
2160
|
+
errorCallback ?? onError
|
|
2161
|
+
);
|
|
2556
2162
|
}
|
|
2557
2163
|
async getAll(task, key, params = {}) {
|
|
2558
2164
|
const boundTask = task.bind(this);
|
|
2559
2165
|
let edges = await boundTask(`${key}-0`, params);
|
|
2560
2166
|
let nodes = edges.nodes;
|
|
2561
2167
|
for (let i = 1; edges.pageInfo.hasNextPage; i++) {
|
|
2562
|
-
edges = await boundTask(`${key}-${i}`, {
|
|
2563
|
-
...params,
|
|
2564
|
-
after: edges.pageInfo.endCursor
|
|
2565
|
-
});
|
|
2168
|
+
edges = await boundTask(`${key}-${i}`, { ...params, after: edges.pageInfo.endCursor });
|
|
2566
2169
|
nodes = nodes.concat(edges.nodes);
|
|
2567
2170
|
}
|
|
2568
2171
|
return nodes;
|
|
2569
2172
|
}
|
|
2570
2173
|
attachment(key, params) {
|
|
2571
|
-
return this.runTask(
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
});
|
|
2174
|
+
return this.runTask(
|
|
2175
|
+
key,
|
|
2176
|
+
async (client) => {
|
|
2177
|
+
const entity = await client.attachment(params.id);
|
|
2178
|
+
return serializeLinearOutput(entity);
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
name: "Get Attachment",
|
|
2182
|
+
params,
|
|
2183
|
+
properties: [{ label: "Attachment ID", text: params.id }]
|
|
2184
|
+
}
|
|
2185
|
+
);
|
|
2584
2186
|
}
|
|
2585
2187
|
attachments(key, params = {}) {
|
|
2586
|
-
return this.runTask(
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2188
|
+
return this.runTask(
|
|
2189
|
+
key,
|
|
2190
|
+
async (client) => {
|
|
2191
|
+
const edges = await client.attachments(params);
|
|
2192
|
+
return serializeLinearOutput(edges);
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
name: "Get Attachments",
|
|
2196
|
+
params,
|
|
2197
|
+
properties: queryProperties(params)
|
|
2198
|
+
}
|
|
2199
|
+
);
|
|
2594
2200
|
}
|
|
2595
2201
|
createAttachment(key, params) {
|
|
2596
|
-
return this.runTask(
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
label: "
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
label: "URL",
|
|
2613
|
-
text: params.url
|
|
2614
|
-
}
|
|
2615
|
-
]
|
|
2616
|
-
});
|
|
2202
|
+
return this.runTask(
|
|
2203
|
+
key,
|
|
2204
|
+
async (client) => {
|
|
2205
|
+
const payload = await client.createAttachment(params);
|
|
2206
|
+
return serializeLinearOutput(await payload.attachment);
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
name: "Create Attachment",
|
|
2210
|
+
params,
|
|
2211
|
+
properties: [
|
|
2212
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2213
|
+
{ label: "Title", text: params.title },
|
|
2214
|
+
{ label: "URL", text: params.url }
|
|
2215
|
+
]
|
|
2216
|
+
}
|
|
2217
|
+
);
|
|
2617
2218
|
}
|
|
2618
2219
|
deleteAttachment(key, params) {
|
|
2619
2220
|
return this.runTask(key, (client) => client.deleteAttachment(params.id), {
|
|
2620
2221
|
name: "Delete Attachment",
|
|
2621
2222
|
params,
|
|
2622
|
-
properties: [
|
|
2623
|
-
{
|
|
2624
|
-
label: "Attachment ID",
|
|
2625
|
-
text: params.id
|
|
2626
|
-
}
|
|
2627
|
-
]
|
|
2223
|
+
properties: [{ label: "Attachment ID", text: params.id }]
|
|
2628
2224
|
});
|
|
2629
2225
|
}
|
|
2630
2226
|
updateAttachment(key, params) {
|
|
2631
|
-
return this.runTask(
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
});
|
|
2227
|
+
return this.runTask(
|
|
2228
|
+
key,
|
|
2229
|
+
async (client) => {
|
|
2230
|
+
const payload = await client.updateAttachment(params.id, params.input);
|
|
2231
|
+
return serializeLinearOutput(await payload.attachment);
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
name: "Update Attachment",
|
|
2235
|
+
params,
|
|
2236
|
+
properties: [{ label: "Attachment ID", text: params.id }]
|
|
2237
|
+
}
|
|
2238
|
+
);
|
|
2644
2239
|
}
|
|
2645
2240
|
attachmentLinkDiscord(key, params) {
|
|
2646
|
-
return this.runTask(
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
label: "
|
|
2663
|
-
text: params.
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
]
|
|
2670
|
-
});
|
|
2241
|
+
return this.runTask(
|
|
2242
|
+
key,
|
|
2243
|
+
async (client) => {
|
|
2244
|
+
const payload = await client.attachmentLinkDiscord(
|
|
2245
|
+
params.channelId,
|
|
2246
|
+
params.issueId,
|
|
2247
|
+
params.messageId,
|
|
2248
|
+
params.url,
|
|
2249
|
+
params.variables
|
|
2250
|
+
);
|
|
2251
|
+
return serializeLinearOutput(await payload.attachment);
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
name: "Link Discord Message",
|
|
2255
|
+
params,
|
|
2256
|
+
properties: [
|
|
2257
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2258
|
+
{ label: "Channel ID", text: params.channelId },
|
|
2259
|
+
{ label: "Message ID", text: params.messageId },
|
|
2260
|
+
{ label: "URL", text: params.url }
|
|
2261
|
+
]
|
|
2262
|
+
}
|
|
2263
|
+
);
|
|
2671
2264
|
}
|
|
2672
2265
|
attachmentLinkFront(key, params) {
|
|
2673
|
-
return this.runTask(
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2266
|
+
return this.runTask(
|
|
2267
|
+
key,
|
|
2268
|
+
async (client) => {
|
|
2269
|
+
const payload = await client.attachmentLinkFront(
|
|
2270
|
+
params.conversationId,
|
|
2271
|
+
params.issueId,
|
|
2272
|
+
params.variables
|
|
2273
|
+
);
|
|
2274
|
+
return serializeLinearOutput(payload);
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
name: "Link Front Conversation",
|
|
2278
|
+
params,
|
|
2279
|
+
properties: [
|
|
2280
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2281
|
+
{ label: "Conversation ID", text: params.conversationId }
|
|
2282
|
+
]
|
|
2283
|
+
}
|
|
2284
|
+
);
|
|
2690
2285
|
}
|
|
2691
2286
|
attachmentLinkIntercom(key, params) {
|
|
2692
|
-
return this.runTask(
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2287
|
+
return this.runTask(
|
|
2288
|
+
key,
|
|
2289
|
+
async (client) => {
|
|
2290
|
+
const payload = await client.attachmentLinkIntercom(
|
|
2291
|
+
params.conversationId,
|
|
2292
|
+
params.issueId,
|
|
2293
|
+
params.variables
|
|
2294
|
+
);
|
|
2295
|
+
return serializeLinearOutput(await payload.attachment);
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
name: "Link Intercom Conversation",
|
|
2299
|
+
params,
|
|
2300
|
+
properties: [
|
|
2301
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2302
|
+
{ label: "Conversation ID", text: params.conversationId }
|
|
2303
|
+
]
|
|
2304
|
+
}
|
|
2305
|
+
);
|
|
2709
2306
|
}
|
|
2710
2307
|
attachmentLinkJiraIssue(key, params) {
|
|
2711
|
-
return this.runTask(
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
]
|
|
2727
|
-
});
|
|
2308
|
+
return this.runTask(
|
|
2309
|
+
key,
|
|
2310
|
+
async (client) => {
|
|
2311
|
+
const payload = await client.attachmentLinkJiraIssue(params.issueId, params.jiraIssueId);
|
|
2312
|
+
return serializeLinearOutput(await payload.attachment);
|
|
2313
|
+
},
|
|
2314
|
+
{
|
|
2315
|
+
name: "Link Jira Issue",
|
|
2316
|
+
params,
|
|
2317
|
+
properties: [
|
|
2318
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2319
|
+
{ label: "Jira Issue ID", text: params.jiraIssueId }
|
|
2320
|
+
]
|
|
2321
|
+
}
|
|
2322
|
+
);
|
|
2728
2323
|
}
|
|
2729
2324
|
attachmentLinkSlack(key, params) {
|
|
2730
|
-
return this.runTask(
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
label: "
|
|
2747
|
-
text: params.
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
]
|
|
2754
|
-
});
|
|
2325
|
+
return this.runTask(
|
|
2326
|
+
key,
|
|
2327
|
+
async (client) => {
|
|
2328
|
+
const payload = await client.attachmentLinkSlack(
|
|
2329
|
+
params.channel,
|
|
2330
|
+
params.issueId,
|
|
2331
|
+
params.latest,
|
|
2332
|
+
params.url,
|
|
2333
|
+
params.variables
|
|
2334
|
+
);
|
|
2335
|
+
return serializeLinearOutput(await payload.attachment);
|
|
2336
|
+
},
|
|
2337
|
+
{
|
|
2338
|
+
name: "Link Slack Message",
|
|
2339
|
+
params,
|
|
2340
|
+
properties: [
|
|
2341
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2342
|
+
{ label: "Channel", text: params.channel },
|
|
2343
|
+
{ label: "Latest", text: params.latest },
|
|
2344
|
+
{ label: "URL", text: params.url }
|
|
2345
|
+
]
|
|
2346
|
+
}
|
|
2347
|
+
);
|
|
2755
2348
|
}
|
|
2756
2349
|
attachmentLinkURL(key, params) {
|
|
2757
|
-
return this.runTask(
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2350
|
+
return this.runTask(
|
|
2351
|
+
key,
|
|
2352
|
+
async (client) => {
|
|
2353
|
+
const payload = await client.attachmentLinkURL(
|
|
2354
|
+
params.issueId,
|
|
2355
|
+
params.url,
|
|
2356
|
+
params.variables
|
|
2357
|
+
);
|
|
2358
|
+
return serializeLinearOutput(await payload.attachment);
|
|
2359
|
+
},
|
|
2360
|
+
{
|
|
2361
|
+
name: "Link URL",
|
|
2362
|
+
params,
|
|
2363
|
+
properties: [
|
|
2364
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2365
|
+
{ label: "URL", text: params.url }
|
|
2366
|
+
]
|
|
2367
|
+
}
|
|
2368
|
+
);
|
|
2774
2369
|
}
|
|
2775
2370
|
attachmentLinkZendesk(key, params) {
|
|
2776
|
-
return this.runTask(
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2371
|
+
return this.runTask(
|
|
2372
|
+
key,
|
|
2373
|
+
async (client) => {
|
|
2374
|
+
const payload = await client.attachmentLinkZendesk(
|
|
2375
|
+
params.issueId,
|
|
2376
|
+
params.ticketId,
|
|
2377
|
+
params.variables
|
|
2378
|
+
);
|
|
2379
|
+
return serializeLinearOutput(await payload.attachment);
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
name: "Link Zendesk Ticket",
|
|
2383
|
+
params,
|
|
2384
|
+
properties: [
|
|
2385
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2386
|
+
{ label: "Ticket ID", text: params.ticketId }
|
|
2387
|
+
]
|
|
2388
|
+
}
|
|
2389
|
+
);
|
|
2793
2390
|
}
|
|
2794
2391
|
comment(key, params) {
|
|
2795
|
-
return this.runTask(
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
});
|
|
2392
|
+
return this.runTask(
|
|
2393
|
+
key,
|
|
2394
|
+
async (client) => {
|
|
2395
|
+
const entity = await client.comment(params.id);
|
|
2396
|
+
return serializeLinearOutput(entity);
|
|
2397
|
+
},
|
|
2398
|
+
{
|
|
2399
|
+
name: "Get Comment",
|
|
2400
|
+
params,
|
|
2401
|
+
properties: [{ label: "Comment ID", text: params.id }]
|
|
2402
|
+
}
|
|
2403
|
+
);
|
|
2808
2404
|
}
|
|
2809
2405
|
comments(key, params = {}) {
|
|
2810
|
-
return this.runTask(
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2406
|
+
return this.runTask(
|
|
2407
|
+
key,
|
|
2408
|
+
async (client) => {
|
|
2409
|
+
const edges = await client.comments(params);
|
|
2410
|
+
return serializeLinearOutput(edges);
|
|
2411
|
+
},
|
|
2412
|
+
{
|
|
2413
|
+
name: "Get Comments",
|
|
2414
|
+
params,
|
|
2415
|
+
properties: queryProperties(params)
|
|
2416
|
+
}
|
|
2417
|
+
);
|
|
2818
2418
|
}
|
|
2819
2419
|
createComment(key, params) {
|
|
2820
|
-
return this.runTask(
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
]
|
|
2836
|
-
});
|
|
2420
|
+
return this.runTask(
|
|
2421
|
+
key,
|
|
2422
|
+
async (client) => {
|
|
2423
|
+
const payload = await client.createComment(params);
|
|
2424
|
+
return serializeLinearOutput(await payload.comment);
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
name: "Create Comment",
|
|
2428
|
+
params,
|
|
2429
|
+
properties: [
|
|
2430
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2431
|
+
{ label: "Body", text: params.body ?? "" }
|
|
2432
|
+
]
|
|
2433
|
+
}
|
|
2434
|
+
);
|
|
2837
2435
|
}
|
|
2838
2436
|
deleteComment(key, params) {
|
|
2839
2437
|
return this.runTask(key, (client) => client.deleteComment(params.id), {
|
|
2840
2438
|
name: "Delete Comment",
|
|
2841
2439
|
params,
|
|
2842
|
-
properties: [
|
|
2843
|
-
{
|
|
2844
|
-
label: "Comment ID",
|
|
2845
|
-
text: params.id
|
|
2846
|
-
}
|
|
2847
|
-
]
|
|
2440
|
+
properties: [{ label: "Comment ID", text: params.id }]
|
|
2848
2441
|
});
|
|
2849
2442
|
}
|
|
2850
2443
|
updateComment(key, params) {
|
|
2851
|
-
return this.runTask(
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
});
|
|
2444
|
+
return this.runTask(
|
|
2445
|
+
key,
|
|
2446
|
+
async (client) => {
|
|
2447
|
+
const payload = await client.updateComment(params.id, params.input);
|
|
2448
|
+
return serializeLinearOutput(await payload.comment);
|
|
2449
|
+
},
|
|
2450
|
+
{
|
|
2451
|
+
name: "Update Comment",
|
|
2452
|
+
params,
|
|
2453
|
+
properties: [{ label: "Comment ID", text: params.id }]
|
|
2454
|
+
}
|
|
2455
|
+
);
|
|
2864
2456
|
}
|
|
2865
2457
|
archiveCycle(key, params) {
|
|
2866
|
-
return this.runTask(
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
});
|
|
2458
|
+
return this.runTask(
|
|
2459
|
+
key,
|
|
2460
|
+
async (client) => {
|
|
2461
|
+
const payload = await client.archiveCycle(params.id);
|
|
2462
|
+
return serializeLinearOutput({
|
|
2463
|
+
...payload,
|
|
2464
|
+
entity: await payload.entity
|
|
2465
|
+
});
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
name: "Archive Cycle",
|
|
2469
|
+
params,
|
|
2470
|
+
properties: [{ label: "Cycle ID", text: params.id }]
|
|
2471
|
+
}
|
|
2472
|
+
);
|
|
2882
2473
|
}
|
|
2883
2474
|
createCycle(key, params) {
|
|
2884
|
-
return this.runTask(
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
label: "
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
label: "Ends at",
|
|
2901
|
-
text: params.endsAt.toISOString()
|
|
2902
|
-
}
|
|
2903
|
-
]
|
|
2904
|
-
});
|
|
2475
|
+
return this.runTask(
|
|
2476
|
+
key,
|
|
2477
|
+
async (client) => {
|
|
2478
|
+
const payload = await client.createCycle(params);
|
|
2479
|
+
return serializeLinearOutput(await payload.cycle);
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
name: "Create Cycle",
|
|
2483
|
+
params,
|
|
2484
|
+
properties: [
|
|
2485
|
+
{ label: "Team ID", text: params.teamId },
|
|
2486
|
+
{ label: "Start at", text: params.startsAt.toISOString() },
|
|
2487
|
+
{ label: "Ends at", text: params.endsAt.toISOString() }
|
|
2488
|
+
]
|
|
2489
|
+
}
|
|
2490
|
+
);
|
|
2905
2491
|
}
|
|
2906
2492
|
// deleteCycle() does not exist
|
|
2907
2493
|
updateCycle(key, params) {
|
|
2908
|
-
return this.runTask(
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
});
|
|
2494
|
+
return this.runTask(
|
|
2495
|
+
key,
|
|
2496
|
+
async (client) => {
|
|
2497
|
+
const payload = await client.updateCycle(params.id, params.input);
|
|
2498
|
+
return serializeLinearOutput(await payload.cycle);
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
name: "Update Cycle",
|
|
2502
|
+
params,
|
|
2503
|
+
properties: [{ label: "Cycle ID", text: params.id }]
|
|
2504
|
+
}
|
|
2505
|
+
);
|
|
2921
2506
|
}
|
|
2922
2507
|
document(key, params) {
|
|
2923
|
-
return this.runTask(
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
});
|
|
2508
|
+
return this.runTask(
|
|
2509
|
+
key,
|
|
2510
|
+
async (client) => {
|
|
2511
|
+
const entity = await client.document(params.id);
|
|
2512
|
+
return serializeLinearOutput(entity);
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
name: "Get Document",
|
|
2516
|
+
params,
|
|
2517
|
+
properties: [{ label: "Document ID", text: params.id }]
|
|
2518
|
+
}
|
|
2519
|
+
);
|
|
2936
2520
|
}
|
|
2937
2521
|
documents(key, params) {
|
|
2938
|
-
return this.runTask(
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2522
|
+
return this.runTask(
|
|
2523
|
+
key,
|
|
2524
|
+
async (client) => {
|
|
2525
|
+
const edges = await client.documents(params);
|
|
2526
|
+
return serializeLinearOutput(edges);
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
name: "Get Documents",
|
|
2530
|
+
params,
|
|
2531
|
+
properties: queryProperties(params)
|
|
2532
|
+
}
|
|
2533
|
+
);
|
|
2946
2534
|
}
|
|
2947
2535
|
createDocument(key, params) {
|
|
2948
|
-
return this.runTask(
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
]
|
|
2964
|
-
});
|
|
2536
|
+
return this.runTask(
|
|
2537
|
+
key,
|
|
2538
|
+
async (client) => {
|
|
2539
|
+
const payload = await client.createDocument(params);
|
|
2540
|
+
return serializeLinearOutput(await payload.document);
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
name: "Create Document",
|
|
2544
|
+
params,
|
|
2545
|
+
properties: [
|
|
2546
|
+
{ label: "Project ID", text: params.projectId },
|
|
2547
|
+
{ label: "Title", text: params.title }
|
|
2548
|
+
]
|
|
2549
|
+
}
|
|
2550
|
+
);
|
|
2965
2551
|
}
|
|
2966
2552
|
searchDocuments(key, params) {
|
|
2967
|
-
return this.runTask(
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
});
|
|
2553
|
+
return this.runTask(
|
|
2554
|
+
key,
|
|
2555
|
+
async (client) => {
|
|
2556
|
+
const payload = await client.searchDocuments(params.term, params.variables);
|
|
2557
|
+
return serializeLinearOutput(payload);
|
|
2558
|
+
},
|
|
2559
|
+
{
|
|
2560
|
+
name: "Search Documents",
|
|
2561
|
+
params,
|
|
2562
|
+
properties: [{ label: "Search Term", text: params.term }]
|
|
2563
|
+
}
|
|
2564
|
+
);
|
|
2980
2565
|
}
|
|
2981
2566
|
favorite(key, params) {
|
|
2982
|
-
return this.runTask(
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
});
|
|
2567
|
+
return this.runTask(
|
|
2568
|
+
key,
|
|
2569
|
+
async (client) => {
|
|
2570
|
+
const entity = await client.favorite(params.id);
|
|
2571
|
+
return serializeLinearOutput(entity);
|
|
2572
|
+
},
|
|
2573
|
+
{
|
|
2574
|
+
name: "Get Favorite",
|
|
2575
|
+
params,
|
|
2576
|
+
properties: [{ label: "Favorite ID", text: params.id }]
|
|
2577
|
+
}
|
|
2578
|
+
);
|
|
2995
2579
|
}
|
|
2996
2580
|
favorites(key, params = {}) {
|
|
2997
|
-
return this.runTask(
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
2581
|
+
return this.runTask(
|
|
2582
|
+
key,
|
|
2583
|
+
async (client) => {
|
|
2584
|
+
const edges = await client.favorites(params);
|
|
2585
|
+
return serializeLinearOutput(edges);
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
name: "Get Favorites",
|
|
2589
|
+
params,
|
|
2590
|
+
properties: queryProperties(params)
|
|
2591
|
+
}
|
|
2592
|
+
);
|
|
3005
2593
|
}
|
|
3006
2594
|
createFavorite(key, params) {
|
|
3007
|
-
return this.runTask(
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
2595
|
+
return this.runTask(
|
|
2596
|
+
key,
|
|
2597
|
+
async (client) => {
|
|
2598
|
+
const payload = await client.createFavorite(params);
|
|
2599
|
+
return serializeLinearOutput(await payload.favorite);
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
name: "Create Favorite",
|
|
2603
|
+
params
|
|
2604
|
+
}
|
|
2605
|
+
);
|
|
3014
2606
|
}
|
|
3015
2607
|
issue(key, params) {
|
|
3016
|
-
return this.runTask(
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
});
|
|
2608
|
+
return this.runTask(
|
|
2609
|
+
key,
|
|
2610
|
+
async (client) => {
|
|
2611
|
+
const entity = await client.issue(params.id);
|
|
2612
|
+
return serializeLinearOutput(entity);
|
|
2613
|
+
},
|
|
2614
|
+
{
|
|
2615
|
+
name: "Get Issue",
|
|
2616
|
+
params,
|
|
2617
|
+
properties: [{ label: "Issue ID", text: params.id }]
|
|
2618
|
+
}
|
|
2619
|
+
);
|
|
3029
2620
|
}
|
|
3030
2621
|
issues(key, params = {}) {
|
|
3031
|
-
return this.runTask(
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
2622
|
+
return this.runTask(
|
|
2623
|
+
key,
|
|
2624
|
+
async (client) => {
|
|
2625
|
+
const edges = await client.issues(params);
|
|
2626
|
+
return serializeLinearOutput(edges);
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
name: "Get Issues",
|
|
2630
|
+
params,
|
|
2631
|
+
properties: queryProperties(params)
|
|
2632
|
+
}
|
|
2633
|
+
);
|
|
3039
2634
|
}
|
|
3040
2635
|
archiveIssue(key, params) {
|
|
3041
|
-
return this.runTask(
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
});
|
|
2636
|
+
return this.runTask(
|
|
2637
|
+
key,
|
|
2638
|
+
async (client) => {
|
|
2639
|
+
const payload = await client.archiveIssue(params.id, params.variables);
|
|
2640
|
+
return serializeLinearOutput({
|
|
2641
|
+
...payload,
|
|
2642
|
+
entity: await payload.entity
|
|
2643
|
+
});
|
|
2644
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
name: "Archive Issue",
|
|
2647
|
+
params,
|
|
2648
|
+
properties: [{ label: "Issue ID", text: params.id }]
|
|
2649
|
+
}
|
|
2650
|
+
);
|
|
3057
2651
|
}
|
|
3058
2652
|
createIssue(key, params) {
|
|
3059
|
-
return this.runTask(
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
]
|
|
3075
|
-
});
|
|
2653
|
+
return this.runTask(
|
|
2654
|
+
key,
|
|
2655
|
+
async (client) => {
|
|
2656
|
+
const payload = await client.createIssue(params);
|
|
2657
|
+
return serializeLinearOutput(await payload.issue);
|
|
2658
|
+
},
|
|
2659
|
+
{
|
|
2660
|
+
name: "Create Issue",
|
|
2661
|
+
params,
|
|
2662
|
+
properties: [
|
|
2663
|
+
{ label: "Team ID", text: params.teamId },
|
|
2664
|
+
{ label: "Title", text: params.title }
|
|
2665
|
+
]
|
|
2666
|
+
}
|
|
2667
|
+
);
|
|
3076
2668
|
}
|
|
3077
2669
|
deleteIssue(key, params) {
|
|
3078
|
-
return this.runTask(
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
});
|
|
2670
|
+
return this.runTask(
|
|
2671
|
+
key,
|
|
2672
|
+
async (client) => {
|
|
2673
|
+
const payload = await client.deleteIssue(params.id);
|
|
2674
|
+
return serializeLinearOutput(await payload.entity);
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
name: "Delete Issue",
|
|
2678
|
+
params,
|
|
2679
|
+
properties: [{ label: "Issue ID", text: params.id }]
|
|
2680
|
+
}
|
|
2681
|
+
);
|
|
3091
2682
|
}
|
|
3092
2683
|
searchIssues(key, params) {
|
|
3093
|
-
return this.runTask(
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
});
|
|
2684
|
+
return this.runTask(
|
|
2685
|
+
key,
|
|
2686
|
+
async (client) => {
|
|
2687
|
+
const payload = await client.searchIssues(params.term, params.variables);
|
|
2688
|
+
return serializeLinearOutput(payload);
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
name: "Search Issues",
|
|
2692
|
+
params,
|
|
2693
|
+
properties: [{ label: "Search Term", text: params.term }]
|
|
2694
|
+
}
|
|
2695
|
+
);
|
|
3106
2696
|
}
|
|
3107
2697
|
updateIssue(key, params) {
|
|
3108
|
-
return this.runTask(
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
});
|
|
2698
|
+
return this.runTask(
|
|
2699
|
+
key,
|
|
2700
|
+
async (client) => {
|
|
2701
|
+
const payload = await client.updateIssue(params.id, params.input);
|
|
2702
|
+
return serializeLinearOutput(await payload.issue);
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
name: "Update Issue",
|
|
2706
|
+
params,
|
|
2707
|
+
properties: [{ label: "Issue ID", text: params.id }]
|
|
2708
|
+
}
|
|
2709
|
+
);
|
|
3121
2710
|
}
|
|
3122
2711
|
issueLabel(key, params) {
|
|
3123
|
-
return this.runTask(
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
});
|
|
2712
|
+
return this.runTask(
|
|
2713
|
+
key,
|
|
2714
|
+
async (client) => {
|
|
2715
|
+
const entity = await client.issueLabel(params.id);
|
|
2716
|
+
return serializeLinearOutput(entity);
|
|
2717
|
+
},
|
|
2718
|
+
{
|
|
2719
|
+
name: "Get IssueLabel",
|
|
2720
|
+
params,
|
|
2721
|
+
properties: [{ label: "IssueLabel ID", text: params.id }]
|
|
2722
|
+
}
|
|
2723
|
+
);
|
|
3136
2724
|
}
|
|
3137
2725
|
issueLabels(key, params = {}) {
|
|
3138
|
-
return this.runTask(
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
2726
|
+
return this.runTask(
|
|
2727
|
+
key,
|
|
2728
|
+
async (client) => {
|
|
2729
|
+
const edges = await client.issueLabels(params);
|
|
2730
|
+
return serializeLinearOutput(edges);
|
|
2731
|
+
},
|
|
2732
|
+
{
|
|
2733
|
+
name: "Get IssueLabels",
|
|
2734
|
+
params,
|
|
2735
|
+
properties: queryProperties(params)
|
|
2736
|
+
}
|
|
2737
|
+
);
|
|
3146
2738
|
}
|
|
3147
2739
|
createIssueLabel(key, params) {
|
|
3148
|
-
return this.runTask(
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
});
|
|
2740
|
+
return this.runTask(
|
|
2741
|
+
key,
|
|
2742
|
+
async (client) => {
|
|
2743
|
+
const payload = await client.createIssueLabel(params);
|
|
2744
|
+
return serializeLinearOutput(await payload.issueLabel);
|
|
2745
|
+
},
|
|
2746
|
+
{
|
|
2747
|
+
name: "Create IssueLabel",
|
|
2748
|
+
params,
|
|
2749
|
+
properties: [{ label: "Label name", text: params.name }]
|
|
2750
|
+
}
|
|
2751
|
+
);
|
|
3161
2752
|
}
|
|
3162
2753
|
deleteIssueLabel(key, params) {
|
|
3163
2754
|
return this.runTask(key, (client) => client.deleteIssueLabel(params.id), {
|
|
3164
2755
|
name: "Delete IssueLabel",
|
|
3165
2756
|
params,
|
|
3166
|
-
properties: [
|
|
3167
|
-
{
|
|
3168
|
-
label: "Label ID",
|
|
3169
|
-
text: params.id
|
|
3170
|
-
}
|
|
3171
|
-
]
|
|
2757
|
+
properties: [{ label: "Label ID", text: params.id }]
|
|
3172
2758
|
});
|
|
3173
2759
|
}
|
|
3174
2760
|
updateIssueLabel(key, params) {
|
|
3175
|
-
return this.runTask(
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
});
|
|
2761
|
+
return this.runTask(
|
|
2762
|
+
key,
|
|
2763
|
+
async (client) => {
|
|
2764
|
+
const payload = await client.updateIssueLabel(params.id, params.input);
|
|
2765
|
+
return serializeLinearOutput(await payload.issueLabel);
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
name: "Update IssueLabel",
|
|
2769
|
+
params,
|
|
2770
|
+
properties: [{ label: "Label ID", text: params.id }]
|
|
2771
|
+
}
|
|
2772
|
+
);
|
|
3188
2773
|
}
|
|
3189
2774
|
issuePriorityValues(key) {
|
|
3190
|
-
return this.runTask(
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
2775
|
+
return this.runTask(
|
|
2776
|
+
key,
|
|
2777
|
+
async (client) => {
|
|
2778
|
+
const entity = await client.issuePriorityValues;
|
|
2779
|
+
return serializeLinearOutput(entity);
|
|
2780
|
+
},
|
|
2781
|
+
{
|
|
2782
|
+
name: "Get Issue Priority Values"
|
|
2783
|
+
}
|
|
2784
|
+
);
|
|
3196
2785
|
}
|
|
3197
2786
|
issueRelation(key, params) {
|
|
3198
|
-
return this.runTask(
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
});
|
|
2787
|
+
return this.runTask(
|
|
2788
|
+
key,
|
|
2789
|
+
async (client) => {
|
|
2790
|
+
const entity = await client.issueRelation(params.id);
|
|
2791
|
+
return serializeLinearOutput(entity);
|
|
2792
|
+
},
|
|
2793
|
+
{
|
|
2794
|
+
name: "Get IssueRelation",
|
|
2795
|
+
params,
|
|
2796
|
+
properties: [{ label: "IssueRelation ID", text: params.id }]
|
|
2797
|
+
}
|
|
2798
|
+
);
|
|
3211
2799
|
}
|
|
3212
2800
|
issueRelations(key, params = {}) {
|
|
3213
|
-
return this.runTask(
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
2801
|
+
return this.runTask(
|
|
2802
|
+
key,
|
|
2803
|
+
async (client) => {
|
|
2804
|
+
const edges = await client.issueRelations(params);
|
|
2805
|
+
return serializeLinearOutput(edges);
|
|
2806
|
+
},
|
|
2807
|
+
{
|
|
2808
|
+
name: "Get IssueRelations",
|
|
2809
|
+
params,
|
|
2810
|
+
properties: queryProperties(params)
|
|
2811
|
+
}
|
|
2812
|
+
);
|
|
3221
2813
|
}
|
|
3222
2814
|
createIssueRelation(key, params) {
|
|
3223
|
-
return this.runTask(
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
label: "
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
label: "Relation Type",
|
|
3240
|
-
text: params.type
|
|
3241
|
-
}
|
|
3242
|
-
]
|
|
3243
|
-
});
|
|
2815
|
+
return this.runTask(
|
|
2816
|
+
key,
|
|
2817
|
+
async (client) => {
|
|
2818
|
+
const payload = await client.createIssueRelation(params);
|
|
2819
|
+
return serializeLinearOutput(await payload.issueRelation);
|
|
2820
|
+
},
|
|
2821
|
+
{
|
|
2822
|
+
name: "Create IssueRelation",
|
|
2823
|
+
params,
|
|
2824
|
+
properties: [
|
|
2825
|
+
{ label: "Issue ID", text: params.issueId },
|
|
2826
|
+
{ label: "Related Issue ID", text: params.relatedIssueId },
|
|
2827
|
+
{ label: "Relation Type", text: params.type }
|
|
2828
|
+
]
|
|
2829
|
+
}
|
|
2830
|
+
);
|
|
3244
2831
|
}
|
|
3245
2832
|
notification(key, params) {
|
|
3246
|
-
return this.runTask(
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
});
|
|
2833
|
+
return this.runTask(
|
|
2834
|
+
key,
|
|
2835
|
+
async (client) => {
|
|
2836
|
+
const entity = await client.notification(params.id);
|
|
2837
|
+
return serializeLinearOutput(entity);
|
|
2838
|
+
},
|
|
2839
|
+
{
|
|
2840
|
+
name: "Get Notification",
|
|
2841
|
+
params,
|
|
2842
|
+
properties: [{ label: "Notification ID", text: params.id }]
|
|
2843
|
+
}
|
|
2844
|
+
);
|
|
3259
2845
|
}
|
|
3260
2846
|
notifications(key, params = {}) {
|
|
3261
|
-
return this.runTask(
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
2847
|
+
return this.runTask(
|
|
2848
|
+
key,
|
|
2849
|
+
async (client) => {
|
|
2850
|
+
const edges = await client.notifications(params);
|
|
2851
|
+
return serializeLinearOutput(edges);
|
|
2852
|
+
},
|
|
2853
|
+
{
|
|
2854
|
+
name: "Get Notifications",
|
|
2855
|
+
params,
|
|
2856
|
+
properties: queryProperties(params)
|
|
2857
|
+
}
|
|
2858
|
+
);
|
|
3269
2859
|
}
|
|
3270
2860
|
archiveNotification(key, params) {
|
|
3271
|
-
return this.runTask(
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
});
|
|
2861
|
+
return this.runTask(
|
|
2862
|
+
key,
|
|
2863
|
+
async (client) => {
|
|
2864
|
+
const payload = await client.archiveNotification(params.id);
|
|
2865
|
+
return serializeLinearOutput(payload);
|
|
2866
|
+
},
|
|
2867
|
+
{
|
|
2868
|
+
name: "Archive Notification",
|
|
2869
|
+
params,
|
|
2870
|
+
properties: [{ label: "Notification ID", text: params.id }]
|
|
2871
|
+
}
|
|
2872
|
+
);
|
|
3284
2873
|
}
|
|
3285
2874
|
createNotificationSubscription(key, params) {
|
|
3286
|
-
return this.runTask(
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
2875
|
+
return this.runTask(
|
|
2876
|
+
key,
|
|
2877
|
+
async (client) => {
|
|
2878
|
+
const payload = await client.createNotificationSubscription(params.input);
|
|
2879
|
+
return serializeLinearOutput(payload);
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
name: "Create Notification Subscription",
|
|
2883
|
+
params
|
|
2884
|
+
}
|
|
2885
|
+
);
|
|
3293
2886
|
}
|
|
3294
2887
|
organization(key) {
|
|
3295
|
-
return this.runTask(
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
2888
|
+
return this.runTask(
|
|
2889
|
+
key,
|
|
2890
|
+
async (client) => {
|
|
2891
|
+
const entity = await client.organization;
|
|
2892
|
+
return serializeLinearOutput(entity);
|
|
2893
|
+
},
|
|
2894
|
+
{
|
|
2895
|
+
name: "Get Viewer's Organization"
|
|
2896
|
+
}
|
|
2897
|
+
);
|
|
3301
2898
|
}
|
|
3302
2899
|
createOrganizationFromOnboarding(key, params) {
|
|
3303
|
-
return this.runTask(
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
text: params.input.
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
2900
|
+
return this.runTask(
|
|
2901
|
+
key,
|
|
2902
|
+
async (client) => {
|
|
2903
|
+
const payload = await client.createOrganizationFromOnboarding(
|
|
2904
|
+
params.input,
|
|
2905
|
+
params.variables
|
|
2906
|
+
);
|
|
2907
|
+
return serializeLinearOutput(await payload.organization);
|
|
2908
|
+
},
|
|
2909
|
+
{
|
|
2910
|
+
name: "Create Organization",
|
|
2911
|
+
params,
|
|
2912
|
+
properties: [
|
|
2913
|
+
{ label: "Name", text: params.input.name },
|
|
2914
|
+
{ label: "URL Key", text: params.input.urlKey }
|
|
2915
|
+
]
|
|
2916
|
+
}
|
|
2917
|
+
);
|
|
3320
2918
|
}
|
|
3321
2919
|
/** WARNING: Causes internal server errors on Linear's side, regardless of input. */
|
|
3322
2920
|
createOrganizationInvite(key, params) {
|
|
3323
|
-
return this.runTask(
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
});
|
|
2921
|
+
return this.runTask(
|
|
2922
|
+
key,
|
|
2923
|
+
async (client) => {
|
|
2924
|
+
const payload = await client.createOrganizationInvite(params.input);
|
|
2925
|
+
return serializeLinearOutput(await payload.organizationInvite);
|
|
2926
|
+
},
|
|
2927
|
+
{
|
|
2928
|
+
name: "Create Organization Invite",
|
|
2929
|
+
params,
|
|
2930
|
+
properties: [{ label: "Invitee Email", text: params.input.email }]
|
|
2931
|
+
}
|
|
2932
|
+
);
|
|
3336
2933
|
}
|
|
3337
2934
|
project(key, params) {
|
|
3338
|
-
return this.runTask(
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
});
|
|
2935
|
+
return this.runTask(
|
|
2936
|
+
key,
|
|
2937
|
+
async (client) => {
|
|
2938
|
+
const entity = await client.project(params.id);
|
|
2939
|
+
return serializeLinearOutput(entity);
|
|
2940
|
+
},
|
|
2941
|
+
{
|
|
2942
|
+
name: "Get Project",
|
|
2943
|
+
params,
|
|
2944
|
+
properties: [{ label: "Project ID", text: params.id }]
|
|
2945
|
+
}
|
|
2946
|
+
);
|
|
3351
2947
|
}
|
|
3352
2948
|
projects(key, params = {}) {
|
|
3353
|
-
return this.runTask(
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
2949
|
+
return this.runTask(
|
|
2950
|
+
key,
|
|
2951
|
+
async (client) => {
|
|
2952
|
+
const edges = await client.projects(params);
|
|
2953
|
+
return serializeLinearOutput(edges);
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
name: "Get Projects",
|
|
2957
|
+
params,
|
|
2958
|
+
properties: queryProperties(params)
|
|
2959
|
+
}
|
|
2960
|
+
);
|
|
3361
2961
|
}
|
|
3362
2962
|
archiveProject(key, params) {
|
|
3363
|
-
return this.runTask(
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
});
|
|
2963
|
+
return this.runTask(
|
|
2964
|
+
key,
|
|
2965
|
+
async (client) => {
|
|
2966
|
+
const payload = await client.archiveProject(params.id, params.variables);
|
|
2967
|
+
return serializeLinearOutput({
|
|
2968
|
+
...payload,
|
|
2969
|
+
entity: await payload.entity
|
|
2970
|
+
});
|
|
2971
|
+
},
|
|
2972
|
+
{
|
|
2973
|
+
name: "Archive Project",
|
|
2974
|
+
params,
|
|
2975
|
+
properties: [{ label: "Project ID", text: params.id }]
|
|
2976
|
+
}
|
|
2977
|
+
);
|
|
3379
2978
|
}
|
|
3380
2979
|
createProject(key, params) {
|
|
3381
|
-
return this.runTask(
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
]
|
|
3397
|
-
});
|
|
2980
|
+
return this.runTask(
|
|
2981
|
+
key,
|
|
2982
|
+
async (client) => {
|
|
2983
|
+
const payload = await client.createProject(params);
|
|
2984
|
+
return serializeLinearOutput(await payload.project);
|
|
2985
|
+
},
|
|
2986
|
+
{
|
|
2987
|
+
name: "Create Project",
|
|
2988
|
+
params,
|
|
2989
|
+
properties: [
|
|
2990
|
+
{ label: "Team IDs", text: params.teamIds.join(", ") },
|
|
2991
|
+
{ label: "Project name", text: params.name }
|
|
2992
|
+
]
|
|
2993
|
+
}
|
|
2994
|
+
);
|
|
3398
2995
|
}
|
|
3399
2996
|
deleteProject(key, params) {
|
|
3400
|
-
return this.runTask(
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
});
|
|
2997
|
+
return this.runTask(
|
|
2998
|
+
key,
|
|
2999
|
+
async (client) => {
|
|
3000
|
+
const payload = await client.deleteProject(params.id);
|
|
3001
|
+
return serializeLinearOutput(await payload.entity);
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
name: "Delete Project",
|
|
3005
|
+
params,
|
|
3006
|
+
properties: [{ label: "Project ID", text: params.id }]
|
|
3007
|
+
}
|
|
3008
|
+
);
|
|
3413
3009
|
}
|
|
3414
3010
|
searchProjects(key, params) {
|
|
3415
|
-
return this.runTask(
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
});
|
|
3011
|
+
return this.runTask(
|
|
3012
|
+
key,
|
|
3013
|
+
async (client) => {
|
|
3014
|
+
const payload = await client.searchProjects(params.term, params.variables);
|
|
3015
|
+
return serializeLinearOutput(payload);
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
name: "Search Projects",
|
|
3019
|
+
params,
|
|
3020
|
+
properties: [{ label: "Search Term", text: params.term }]
|
|
3021
|
+
}
|
|
3022
|
+
);
|
|
3428
3023
|
}
|
|
3429
3024
|
updateProject(key, params) {
|
|
3430
|
-
return this.runTask(
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
});
|
|
3025
|
+
return this.runTask(
|
|
3026
|
+
key,
|
|
3027
|
+
async (client) => {
|
|
3028
|
+
const payload = await client.updateProject(params.id, params.input);
|
|
3029
|
+
return serializeLinearOutput(await payload.project);
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
name: "Update Project",
|
|
3033
|
+
params,
|
|
3034
|
+
properties: [{ label: "Project ID", text: params.id }]
|
|
3035
|
+
}
|
|
3036
|
+
);
|
|
3443
3037
|
}
|
|
3444
3038
|
projectLink(key, params) {
|
|
3445
|
-
return this.runTask(
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
});
|
|
3039
|
+
return this.runTask(
|
|
3040
|
+
key,
|
|
3041
|
+
async (client) => {
|
|
3042
|
+
const entity = await client.projectLink(params.id);
|
|
3043
|
+
return serializeLinearOutput(entity);
|
|
3044
|
+
},
|
|
3045
|
+
{
|
|
3046
|
+
name: "Get ProjectLink",
|
|
3047
|
+
params,
|
|
3048
|
+
properties: [{ label: "ProjectLink ID", text: params.id }]
|
|
3049
|
+
}
|
|
3050
|
+
);
|
|
3458
3051
|
}
|
|
3459
3052
|
projectLinks(key, params = {}) {
|
|
3460
|
-
return this.runTask(
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3053
|
+
return this.runTask(
|
|
3054
|
+
key,
|
|
3055
|
+
async (client) => {
|
|
3056
|
+
const edges = await client.projectLinks(params);
|
|
3057
|
+
return serializeLinearOutput(edges);
|
|
3058
|
+
},
|
|
3059
|
+
{
|
|
3060
|
+
name: "Get ProjectLinks",
|
|
3061
|
+
params,
|
|
3062
|
+
properties: queryProperties(params)
|
|
3063
|
+
}
|
|
3064
|
+
);
|
|
3468
3065
|
}
|
|
3469
3066
|
createProjectLink(key, params) {
|
|
3470
|
-
return this.runTask(
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
label: "Link
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
label: "Link URL",
|
|
3487
|
-
text: params.url
|
|
3488
|
-
}
|
|
3489
|
-
]
|
|
3490
|
-
});
|
|
3067
|
+
return this.runTask(
|
|
3068
|
+
key,
|
|
3069
|
+
async (client) => {
|
|
3070
|
+
const payload = await client.createProjectLink(params);
|
|
3071
|
+
return serializeLinearOutput(await payload.projectLink);
|
|
3072
|
+
},
|
|
3073
|
+
{
|
|
3074
|
+
name: "Create ProjectLink",
|
|
3075
|
+
params,
|
|
3076
|
+
properties: [
|
|
3077
|
+
{ label: "Project ID", text: params.projectId },
|
|
3078
|
+
{ label: "Link Label", text: params.label },
|
|
3079
|
+
{ label: "Link URL", text: params.url }
|
|
3080
|
+
]
|
|
3081
|
+
}
|
|
3082
|
+
);
|
|
3491
3083
|
}
|
|
3492
3084
|
createProjectMilestone(key, params) {
|
|
3493
|
-
return this.runTask(
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
]
|
|
3509
|
-
});
|
|
3085
|
+
return this.runTask(
|
|
3086
|
+
key,
|
|
3087
|
+
async (client) => {
|
|
3088
|
+
const payload = await client.createProjectMilestone(params);
|
|
3089
|
+
return serializeLinearOutput(await payload.projectMilestone);
|
|
3090
|
+
},
|
|
3091
|
+
{
|
|
3092
|
+
name: "Create ProjectMilestone",
|
|
3093
|
+
params,
|
|
3094
|
+
properties: [
|
|
3095
|
+
{ label: "Project ID", text: params.projectId },
|
|
3096
|
+
{ label: "Milestone Name", text: params.name }
|
|
3097
|
+
]
|
|
3098
|
+
}
|
|
3099
|
+
);
|
|
3510
3100
|
}
|
|
3511
3101
|
projectUpdate(key, params) {
|
|
3512
|
-
return this.runTask(
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
});
|
|
3102
|
+
return this.runTask(
|
|
3103
|
+
key,
|
|
3104
|
+
async (client) => {
|
|
3105
|
+
const entity = await client.projectUpdate(params.id);
|
|
3106
|
+
return serializeLinearOutput(entity);
|
|
3107
|
+
},
|
|
3108
|
+
{
|
|
3109
|
+
name: "Get ProjectUpdate",
|
|
3110
|
+
params,
|
|
3111
|
+
properties: [{ label: "ProjectUpdate ID", text: params.id }]
|
|
3112
|
+
}
|
|
3113
|
+
);
|
|
3525
3114
|
}
|
|
3526
3115
|
projectUpdates(key, params = {}) {
|
|
3527
|
-
return this.runTask(
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3116
|
+
return this.runTask(
|
|
3117
|
+
key,
|
|
3118
|
+
async (client) => {
|
|
3119
|
+
const edges = await client.projectUpdates(params);
|
|
3120
|
+
return serializeLinearOutput(edges);
|
|
3121
|
+
},
|
|
3122
|
+
{
|
|
3123
|
+
name: "Get ProjectUpdates",
|
|
3124
|
+
params,
|
|
3125
|
+
properties: queryProperties(params)
|
|
3126
|
+
}
|
|
3127
|
+
);
|
|
3535
3128
|
}
|
|
3536
3129
|
createProjectUpdate(key, params) {
|
|
3537
|
-
return this.runTask(
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
});
|
|
3130
|
+
return this.runTask(
|
|
3131
|
+
key,
|
|
3132
|
+
async (client) => {
|
|
3133
|
+
const payload = await client.createProjectUpdate(params);
|
|
3134
|
+
return serializeLinearOutput(await payload.projectUpdate);
|
|
3135
|
+
},
|
|
3136
|
+
{
|
|
3137
|
+
name: "Create ProjectUpdate",
|
|
3138
|
+
params,
|
|
3139
|
+
properties: [{ label: "Project ID", text: params.projectId }]
|
|
3140
|
+
}
|
|
3141
|
+
);
|
|
3550
3142
|
}
|
|
3551
3143
|
deleteProjectUpdate(key, params) {
|
|
3552
3144
|
return this.runTask(key, (client) => client.deleteProjectUpdate(params.id), {
|
|
3553
3145
|
name: "Delete ProjectUpdate",
|
|
3554
3146
|
params,
|
|
3555
|
-
properties: [
|
|
3556
|
-
{
|
|
3557
|
-
label: "ProjectUpdate ID",
|
|
3558
|
-
text: params.id
|
|
3559
|
-
}
|
|
3560
|
-
]
|
|
3147
|
+
properties: [{ label: "ProjectUpdate ID", text: params.id }]
|
|
3561
3148
|
});
|
|
3562
3149
|
}
|
|
3563
3150
|
updateProjectUpdate(key, params) {
|
|
3564
|
-
return this.runTask(
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
});
|
|
3151
|
+
return this.runTask(
|
|
3152
|
+
key,
|
|
3153
|
+
async (client) => {
|
|
3154
|
+
const payload = await client.updateProjectUpdate(params.id, params.input);
|
|
3155
|
+
return serializeLinearOutput(await payload.projectUpdate);
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
name: "Update ProjectUpdate",
|
|
3159
|
+
params,
|
|
3160
|
+
properties: [{ label: "ProjectUpdate ID", text: params.id }]
|
|
3161
|
+
}
|
|
3162
|
+
);
|
|
3577
3163
|
}
|
|
3578
3164
|
createReaction(key, params) {
|
|
3579
|
-
return this.runTask(
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
}
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
}
|
|
3597
|
-
] : [],
|
|
3598
|
-
...params.projectUpdateId ? [
|
|
3599
|
-
{
|
|
3600
|
-
label: "ProjectUpdate ID",
|
|
3601
|
-
text: params.projectUpdateId
|
|
3602
|
-
}
|
|
3603
|
-
] : [],
|
|
3604
|
-
{
|
|
3605
|
-
label: "Emoji",
|
|
3606
|
-
text: params.emoji
|
|
3607
|
-
}
|
|
3608
|
-
]
|
|
3609
|
-
});
|
|
3165
|
+
return this.runTask(
|
|
3166
|
+
key,
|
|
3167
|
+
async (client) => {
|
|
3168
|
+
const payload = await client.createReaction(params);
|
|
3169
|
+
return serializeLinearOutput(await payload.reaction);
|
|
3170
|
+
},
|
|
3171
|
+
{
|
|
3172
|
+
name: "Create Reaction",
|
|
3173
|
+
params,
|
|
3174
|
+
properties: [
|
|
3175
|
+
...params.commentId ? [{ label: "Comment ID", text: params.commentId }] : [],
|
|
3176
|
+
...params.issueId ? [{ label: "Issue ID", text: params.issueId }] : [],
|
|
3177
|
+
...params.projectUpdateId ? [{ label: "ProjectUpdate ID", text: params.projectUpdateId }] : [],
|
|
3178
|
+
{ label: "Emoji", text: params.emoji }
|
|
3179
|
+
]
|
|
3180
|
+
}
|
|
3181
|
+
);
|
|
3610
3182
|
}
|
|
3611
3183
|
deleteReaction(key, params) {
|
|
3612
3184
|
return this.runTask(key, (client) => client.deleteReaction(params.id), {
|
|
3613
3185
|
name: "Delete Reaction",
|
|
3614
3186
|
params,
|
|
3615
|
-
properties: [
|
|
3616
|
-
{
|
|
3617
|
-
label: "Reaction ID",
|
|
3618
|
-
text: params.id
|
|
3619
|
-
}
|
|
3620
|
-
]
|
|
3187
|
+
properties: [{ label: "Reaction ID", text: params.id }]
|
|
3621
3188
|
});
|
|
3622
3189
|
}
|
|
3623
3190
|
archiveRoadmap(key, params) {
|
|
3624
|
-
return this.runTask(
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
});
|
|
3191
|
+
return this.runTask(
|
|
3192
|
+
key,
|
|
3193
|
+
async (client) => {
|
|
3194
|
+
const payload = await client.archiveRoadmap(params.id);
|
|
3195
|
+
return serializeLinearOutput({
|
|
3196
|
+
...payload,
|
|
3197
|
+
entity: await payload.entity
|
|
3198
|
+
});
|
|
3199
|
+
},
|
|
3200
|
+
{
|
|
3201
|
+
name: "Archive Roadmap",
|
|
3202
|
+
params,
|
|
3203
|
+
properties: [{ label: "Roadmap ID", text: params.id }]
|
|
3204
|
+
}
|
|
3205
|
+
);
|
|
3640
3206
|
}
|
|
3641
3207
|
createRoadmap(key, params) {
|
|
3642
|
-
return this.runTask(
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
});
|
|
3208
|
+
return this.runTask(
|
|
3209
|
+
key,
|
|
3210
|
+
async (client) => {
|
|
3211
|
+
const payload = await client.createRoadmap(params);
|
|
3212
|
+
return serializeLinearOutput(await payload.roadmap);
|
|
3213
|
+
},
|
|
3214
|
+
{
|
|
3215
|
+
name: "Create Roadmap",
|
|
3216
|
+
params,
|
|
3217
|
+
properties: [{ label: "Roadmap Name", text: params.name }]
|
|
3218
|
+
}
|
|
3219
|
+
);
|
|
3655
3220
|
}
|
|
3656
3221
|
team(key, params) {
|
|
3657
|
-
return this.runTask(
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
});
|
|
3222
|
+
return this.runTask(
|
|
3223
|
+
key,
|
|
3224
|
+
async (client) => {
|
|
3225
|
+
const entity = await client.team(params.id);
|
|
3226
|
+
return serializeLinearOutput(entity);
|
|
3227
|
+
},
|
|
3228
|
+
{
|
|
3229
|
+
name: "Get Team",
|
|
3230
|
+
params,
|
|
3231
|
+
properties: [{ label: "Team ID", text: params.id }]
|
|
3232
|
+
}
|
|
3233
|
+
);
|
|
3670
3234
|
}
|
|
3671
3235
|
teams(key, params = {}) {
|
|
3672
|
-
return this.runTask(
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3236
|
+
return this.runTask(
|
|
3237
|
+
key,
|
|
3238
|
+
async (client) => {
|
|
3239
|
+
const edges = await client.teams(params);
|
|
3240
|
+
return serializeLinearOutput(edges);
|
|
3241
|
+
},
|
|
3242
|
+
{
|
|
3243
|
+
name: "Get Teams",
|
|
3244
|
+
params,
|
|
3245
|
+
properties: queryProperties(params)
|
|
3246
|
+
}
|
|
3247
|
+
);
|
|
3680
3248
|
}
|
|
3681
3249
|
createTeam(key, params) {
|
|
3682
|
-
return this.runTask(
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
});
|
|
3250
|
+
return this.runTask(
|
|
3251
|
+
key,
|
|
3252
|
+
async (client) => {
|
|
3253
|
+
const payload = await client.createTeam(params);
|
|
3254
|
+
return serializeLinearOutput(await payload.team);
|
|
3255
|
+
},
|
|
3256
|
+
{
|
|
3257
|
+
name: "Create Team",
|
|
3258
|
+
params,
|
|
3259
|
+
properties: [{ label: "Team Name", text: params.name }]
|
|
3260
|
+
}
|
|
3261
|
+
);
|
|
3695
3262
|
}
|
|
3696
3263
|
teamMembership(key, params) {
|
|
3697
|
-
return this.runTask(
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
});
|
|
3264
|
+
return this.runTask(
|
|
3265
|
+
key,
|
|
3266
|
+
async (client) => {
|
|
3267
|
+
const entity = await client.teamMembership(params.id);
|
|
3268
|
+
return serializeLinearOutput(entity);
|
|
3269
|
+
},
|
|
3270
|
+
{
|
|
3271
|
+
name: "Get TeamMembership",
|
|
3272
|
+
params,
|
|
3273
|
+
properties: [{ label: "TeamMembership ID", text: params.id }]
|
|
3274
|
+
}
|
|
3275
|
+
);
|
|
3710
3276
|
}
|
|
3711
3277
|
teamMemberships(key, params = {}) {
|
|
3712
|
-
return this.runTask(
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3278
|
+
return this.runTask(
|
|
3279
|
+
key,
|
|
3280
|
+
async (client) => {
|
|
3281
|
+
const edges = await client.teamMemberships(params);
|
|
3282
|
+
return serializeLinearOutput(edges);
|
|
3283
|
+
},
|
|
3284
|
+
{
|
|
3285
|
+
name: "Get TeamMemberships",
|
|
3286
|
+
params,
|
|
3287
|
+
properties: queryProperties(params)
|
|
3288
|
+
}
|
|
3289
|
+
);
|
|
3720
3290
|
}
|
|
3721
3291
|
createTeamMembership(key, params) {
|
|
3722
|
-
return this.runTask(
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
]
|
|
3738
|
-
});
|
|
3292
|
+
return this.runTask(
|
|
3293
|
+
key,
|
|
3294
|
+
async (client) => {
|
|
3295
|
+
const payload = await client.createTeamMembership(params);
|
|
3296
|
+
return serializeLinearOutput(await payload.teamMembership);
|
|
3297
|
+
},
|
|
3298
|
+
{
|
|
3299
|
+
name: "Create TeamMembership",
|
|
3300
|
+
params,
|
|
3301
|
+
properties: [
|
|
3302
|
+
{ label: "Team ID", text: params.teamId },
|
|
3303
|
+
{ label: "User ID", text: params.userId }
|
|
3304
|
+
]
|
|
3305
|
+
}
|
|
3306
|
+
);
|
|
3739
3307
|
}
|
|
3740
3308
|
template(key, params) {
|
|
3741
|
-
return this.runTask(
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
});
|
|
3309
|
+
return this.runTask(
|
|
3310
|
+
key,
|
|
3311
|
+
async (client) => {
|
|
3312
|
+
const entity = await client.template(params.id);
|
|
3313
|
+
return serializeLinearOutput(entity);
|
|
3314
|
+
},
|
|
3315
|
+
{
|
|
3316
|
+
name: "Get Template",
|
|
3317
|
+
properties: [{ label: "Template ID", text: params.id }]
|
|
3318
|
+
}
|
|
3319
|
+
);
|
|
3753
3320
|
}
|
|
3754
3321
|
templates(key) {
|
|
3755
|
-
return this.runTask(
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3322
|
+
return this.runTask(
|
|
3323
|
+
key,
|
|
3324
|
+
async (client) => {
|
|
3325
|
+
const entity = await client.templates;
|
|
3326
|
+
return serializeLinearOutput(entity);
|
|
3327
|
+
},
|
|
3328
|
+
{
|
|
3329
|
+
name: "Get Templates"
|
|
3330
|
+
}
|
|
3331
|
+
);
|
|
3761
3332
|
}
|
|
3762
3333
|
user(key, params) {
|
|
3763
|
-
return this.runTask(
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
});
|
|
3334
|
+
return this.runTask(
|
|
3335
|
+
key,
|
|
3336
|
+
async (client) => {
|
|
3337
|
+
const entity = await client.user(params.id);
|
|
3338
|
+
return serializeLinearOutput(entity);
|
|
3339
|
+
},
|
|
3340
|
+
{
|
|
3341
|
+
name: "Get User",
|
|
3342
|
+
params,
|
|
3343
|
+
properties: [{ label: "User ID", text: params.id }]
|
|
3344
|
+
}
|
|
3345
|
+
);
|
|
3776
3346
|
}
|
|
3777
3347
|
users(key, params = {}) {
|
|
3778
|
-
return this.runTask(
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3348
|
+
return this.runTask(
|
|
3349
|
+
key,
|
|
3350
|
+
async (client) => {
|
|
3351
|
+
const edges = await client.users(params);
|
|
3352
|
+
return serializeLinearOutput(edges);
|
|
3353
|
+
},
|
|
3354
|
+
{
|
|
3355
|
+
name: "Get Users",
|
|
3356
|
+
params,
|
|
3357
|
+
properties: queryProperties(params)
|
|
3358
|
+
}
|
|
3359
|
+
);
|
|
3786
3360
|
}
|
|
3787
3361
|
updateUser(key, params) {
|
|
3788
|
-
return this.runTask(
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
});
|
|
3362
|
+
return this.runTask(
|
|
3363
|
+
key,
|
|
3364
|
+
async (client) => {
|
|
3365
|
+
const payload = await client.updateUser(params.id, params.input);
|
|
3366
|
+
return serializeLinearOutput(await payload.user);
|
|
3367
|
+
},
|
|
3368
|
+
{
|
|
3369
|
+
name: "Update User",
|
|
3370
|
+
params,
|
|
3371
|
+
properties: [{ label: "User ID", text: params.id }]
|
|
3372
|
+
}
|
|
3373
|
+
);
|
|
3801
3374
|
}
|
|
3802
3375
|
viewer(key) {
|
|
3803
|
-
return this.runTask(
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3376
|
+
return this.runTask(
|
|
3377
|
+
key,
|
|
3378
|
+
async (client) => {
|
|
3379
|
+
const entity = await client.viewer;
|
|
3380
|
+
return serializeLinearOutput(entity);
|
|
3381
|
+
},
|
|
3382
|
+
{
|
|
3383
|
+
name: "Get Viewer"
|
|
3384
|
+
}
|
|
3385
|
+
);
|
|
3809
3386
|
}
|
|
3810
3387
|
workflowState(key, params) {
|
|
3811
|
-
return this.runTask(
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
});
|
|
3388
|
+
return this.runTask(
|
|
3389
|
+
key,
|
|
3390
|
+
async (client) => {
|
|
3391
|
+
const entity = await client.workflowState(params.id);
|
|
3392
|
+
return serializeLinearOutput(entity);
|
|
3393
|
+
},
|
|
3394
|
+
{
|
|
3395
|
+
name: "Get WorkflowState",
|
|
3396
|
+
params,
|
|
3397
|
+
properties: [{ label: "WorkflowState ID", text: params.id }]
|
|
3398
|
+
}
|
|
3399
|
+
);
|
|
3824
3400
|
}
|
|
3825
3401
|
workflowStates(key, params = {}) {
|
|
3826
|
-
return this.runTask(
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3402
|
+
return this.runTask(
|
|
3403
|
+
key,
|
|
3404
|
+
async (client) => {
|
|
3405
|
+
const edges = await client.workflowStates(params);
|
|
3406
|
+
return serializeLinearOutput(edges);
|
|
3407
|
+
},
|
|
3408
|
+
{
|
|
3409
|
+
name: "Get WorkflowStates",
|
|
3410
|
+
params,
|
|
3411
|
+
properties: queryProperties(params)
|
|
3412
|
+
}
|
|
3413
|
+
);
|
|
3834
3414
|
}
|
|
3835
3415
|
archiveWorkflowState(key, params) {
|
|
3836
|
-
return this.runTask(
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
});
|
|
3416
|
+
return this.runTask(
|
|
3417
|
+
key,
|
|
3418
|
+
async (client) => {
|
|
3419
|
+
const payload = await client.archiveWorkflowState(params.id);
|
|
3420
|
+
return serializeLinearOutput({
|
|
3421
|
+
...payload,
|
|
3422
|
+
entity: await payload.entity
|
|
3423
|
+
});
|
|
3424
|
+
},
|
|
3425
|
+
{
|
|
3426
|
+
name: "Archive WorkflowState",
|
|
3427
|
+
params,
|
|
3428
|
+
properties: [{ label: "WorkflowState ID", text: params.id }]
|
|
3429
|
+
}
|
|
3430
|
+
);
|
|
3852
3431
|
}
|
|
3853
3432
|
createWorkflowState(key, params) {
|
|
3854
|
-
return this.runTask(
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
label: "
|
|
3867
|
-
text: params.
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
text: params.name
|
|
3872
|
-
},
|
|
3873
|
-
{
|
|
3874
|
-
label: "State Color",
|
|
3875
|
-
text: params.color
|
|
3876
|
-
}
|
|
3877
|
-
]
|
|
3878
|
-
});
|
|
3433
|
+
return this.runTask(
|
|
3434
|
+
key,
|
|
3435
|
+
async (client) => {
|
|
3436
|
+
const payload = await client.createWorkflowState(params);
|
|
3437
|
+
return serializeLinearOutput(await payload.workflowState);
|
|
3438
|
+
},
|
|
3439
|
+
{
|
|
3440
|
+
name: "Create WorkflowState",
|
|
3441
|
+
params,
|
|
3442
|
+
properties: [
|
|
3443
|
+
{ label: "Team ID", text: params.teamId },
|
|
3444
|
+
{ label: "Workflow Type", text: params.type },
|
|
3445
|
+
{ label: "State Name", text: params.name },
|
|
3446
|
+
{ label: "State Color", text: params.color }
|
|
3447
|
+
]
|
|
3448
|
+
}
|
|
3449
|
+
);
|
|
3879
3450
|
}
|
|
3880
3451
|
// updateReaction() does not exist
|
|
3881
3452
|
/** **WARNING:** Still in alpha - use with caution! */
|
|
@@ -3993,11 +3564,10 @@ var _Linear = class _Linear {
|
|
|
3993
3564
|
}
|
|
3994
3565
|
};
|
|
3995
3566
|
_webhooks = new WeakSet();
|
|
3996
|
-
webhooks_get =
|
|
3567
|
+
webhooks_get = function() {
|
|
3997
3568
|
return new Webhooks(this.runTask.bind(this));
|
|
3998
|
-
}
|
|
3999
|
-
|
|
4000
|
-
var Linear = _Linear;
|
|
3569
|
+
};
|
|
3570
|
+
var Linear2 = _Linear;
|
|
4001
3571
|
function onError(error) {
|
|
4002
3572
|
if (error instanceof sdk.LinearError) {
|
|
4003
3573
|
if (error.errors?.some((e) => e.userError)) {
|
|
@@ -4029,18 +3599,17 @@ function onError(error) {
|
|
|
4029
3599
|
};
|
|
4030
3600
|
}
|
|
4031
3601
|
}
|
|
4032
|
-
|
|
4033
|
-
var serializeLinearOutput = /* @__PURE__ */ __name((obj) => {
|
|
3602
|
+
var serializeLinearOutput = (obj) => {
|
|
4034
3603
|
return JSON.parse(JSON.stringify(obj), (key, value) => {
|
|
4035
3604
|
if (typeof value === "function" || key.startsWith("_")) {
|
|
4036
3605
|
return void 0;
|
|
4037
3606
|
}
|
|
4038
3607
|
return value;
|
|
4039
3608
|
});
|
|
4040
|
-
}
|
|
3609
|
+
};
|
|
4041
3610
|
var PaginationOrderBy = sdk.LinearDocument.PaginationOrderBy;
|
|
4042
3611
|
|
|
4043
|
-
exports.Linear =
|
|
3612
|
+
exports.Linear = Linear2;
|
|
4044
3613
|
exports.PaginationOrderBy = PaginationOrderBy;
|
|
4045
3614
|
exports.events = events_exports;
|
|
4046
3615
|
exports.onError = onError;
|