@trigger.dev/linear 3.0.0-beta.6 → 3.0.0

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