@credal/actions 0.2.31 → 0.2.32

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.
@@ -110,6 +110,48 @@ import lockJamfComputerById from "./providers/jamf/lockJamfComputerById.js";
110
110
  import triggerOktaWorkflow from "./providers/okta/triggerOktaWorkflow.js";
111
111
  import searchGroup from "./providers/gitlab/searchGroup.js";
112
112
  import searchRepository from "./providers/github/searchRepository.js";
113
+ const jiraActions = {
114
+ getJiraIssuesByQuery: {
115
+ fn: getJiraIssuesByQuery,
116
+ paramsSchema: jiraGetJiraIssuesByQueryParamsSchema,
117
+ outputSchema: jiraGetJiraIssuesByQueryOutputSchema,
118
+ },
119
+ assignJiraTicket: {
120
+ fn: assignJiraTicket,
121
+ paramsSchema: jiraAssignJiraTicketParamsSchema,
122
+ outputSchema: jiraAssignJiraTicketOutputSchema,
123
+ },
124
+ commentJiraTicket: {
125
+ fn: commentJiraTicket,
126
+ paramsSchema: jiraCommentJiraTicketParamsSchema,
127
+ outputSchema: jiraCommentJiraTicketOutputSchema,
128
+ },
129
+ createJiraTicket: {
130
+ fn: createJiraTicket,
131
+ paramsSchema: jiraCreateJiraTicketParamsSchema,
132
+ outputSchema: jiraCreateJiraTicketOutputSchema,
133
+ },
134
+ getJiraTicketDetails: {
135
+ fn: getJiraTicketDetails,
136
+ paramsSchema: jiraGetJiraTicketDetailsParamsSchema,
137
+ outputSchema: jiraGetJiraTicketDetailsOutputSchema,
138
+ },
139
+ getJiraTicketHistory: {
140
+ fn: getJiraTicketHistory,
141
+ paramsSchema: jiraGetJiraTicketHistoryParamsSchema,
142
+ outputSchema: jiraGetJiraTicketHistoryOutputSchema,
143
+ },
144
+ updateJiraTicketDetails: {
145
+ fn: updateJiraTicketDetails,
146
+ paramsSchema: jiraUpdateJiraTicketDetailsParamsSchema,
147
+ outputSchema: jiraUpdateJiraTicketDetailsOutputSchema,
148
+ },
149
+ updateJiraTicketStatus: {
150
+ fn: updateJiraTicketStatus,
151
+ paramsSchema: jiraUpdateJiraTicketStatusParamsSchema,
152
+ outputSchema: jiraUpdateJiraTicketStatusOutputSchema,
153
+ },
154
+ };
113
155
  export const ActionMapper = {
114
156
  generic: {
115
157
  fillTemplate: {
@@ -297,48 +339,8 @@ export const ActionMapper = {
297
339
  outputSchema: linkedinCreateShareLinkedinPostUrlOutputSchema,
298
340
  },
299
341
  },
300
- jira: {
301
- getJiraIssuesByQuery: {
302
- fn: getJiraIssuesByQuery,
303
- paramsSchema: jiraGetJiraIssuesByQueryParamsSchema,
304
- outputSchema: jiraGetJiraIssuesByQueryOutputSchema,
305
- },
306
- assignJiraTicket: {
307
- fn: assignJiraTicket,
308
- paramsSchema: jiraAssignJiraTicketParamsSchema,
309
- outputSchema: jiraAssignJiraTicketOutputSchema,
310
- },
311
- commentJiraTicket: {
312
- fn: commentJiraTicket,
313
- paramsSchema: jiraCommentJiraTicketParamsSchema,
314
- outputSchema: jiraCommentJiraTicketOutputSchema,
315
- },
316
- createJiraTicket: {
317
- fn: createJiraTicket,
318
- paramsSchema: jiraCreateJiraTicketParamsSchema,
319
- outputSchema: jiraCreateJiraTicketOutputSchema,
320
- },
321
- getJiraTicketDetails: {
322
- fn: getJiraTicketDetails,
323
- paramsSchema: jiraGetJiraTicketDetailsParamsSchema,
324
- outputSchema: jiraGetJiraTicketDetailsOutputSchema,
325
- },
326
- getJiraTicketHistory: {
327
- fn: getJiraTicketHistory,
328
- paramsSchema: jiraGetJiraTicketHistoryParamsSchema,
329
- outputSchema: jiraGetJiraTicketHistoryOutputSchema,
330
- },
331
- updateJiraTicketDetails: {
332
- fn: updateJiraTicketDetails,
333
- paramsSchema: jiraUpdateJiraTicketDetailsParamsSchema,
334
- outputSchema: jiraUpdateJiraTicketDetailsOutputSchema,
335
- },
336
- updateJiraTicketStatus: {
337
- fn: updateJiraTicketStatus,
338
- paramsSchema: jiraUpdateJiraTicketStatusParamsSchema,
339
- outputSchema: jiraUpdateJiraTicketStatusOutputSchema,
340
- },
341
- },
342
+ jira: jiraActions,
343
+ jiraOrg: jiraActions,
342
344
  openstreetmap: {
343
345
  getLatitudeLongitudeFromLocation: {
344
346
  fn: getLatitudeLongitudeFromLocation,
@@ -21,6 +21,14 @@ export declare const jiraGetJiraTicketHistoryDefinition: ActionTemplate;
21
21
  export declare const jiraUpdateJiraTicketDetailsDefinition: ActionTemplate;
22
22
  export declare const jiraUpdateJiraTicketStatusDefinition: ActionTemplate;
23
23
  export declare const jiraGetJiraIssuesByQueryDefinition: ActionTemplate;
24
+ export declare const jiraOrgAssignJiraTicketDefinition: ActionTemplate;
25
+ export declare const jiraOrgCommentJiraTicketDefinition: ActionTemplate;
26
+ export declare const jiraOrgCreateJiraTicketDefinition: ActionTemplate;
27
+ export declare const jiraOrgGetJiraTicketDetailsDefinition: ActionTemplate;
28
+ export declare const jiraOrgGetJiraTicketHistoryDefinition: ActionTemplate;
29
+ export declare const jiraOrgUpdateJiraTicketDetailsDefinition: ActionTemplate;
30
+ export declare const jiraOrgUpdateJiraTicketStatusDefinition: ActionTemplate;
31
+ export declare const jiraOrgGetJiraIssuesByQueryDefinition: ActionTemplate;
24
32
  export declare const kandjiGetFVRecoveryKeyForDeviceDefinition: ActionTemplate;
25
33
  export declare const googlemapsValidateAddressDefinition: ActionTemplate;
26
34
  export declare const googlemapsNearbysearchRestaurantsDefinition: ActionTemplate;
@@ -1090,6 +1090,351 @@ export const jiraGetJiraIssuesByQueryDefinition = {
1090
1090
  name: "getJiraIssuesByQuery",
1091
1091
  provider: "jira",
1092
1092
  };
1093
+ export const jiraOrgAssignJiraTicketDefinition = {
1094
+ description: "Assigns/Re-assignes a Jira ticket to a specified user",
1095
+ scopes: ["write:jira-work", "read:jira-user"],
1096
+ parameters: {
1097
+ type: "object",
1098
+ required: ["projectKey", "issueId", "assignee"],
1099
+ properties: {
1100
+ projectKey: {
1101
+ type: "string",
1102
+ description: "The key for the project you want to add it to",
1103
+ },
1104
+ assignee: {
1105
+ type: "string",
1106
+ description: "The assignee for the ticket, userID or email",
1107
+ },
1108
+ issueId: {
1109
+ type: "string",
1110
+ description: "The issue ID associated with the ticket to be assigned/re-assigned",
1111
+ },
1112
+ },
1113
+ },
1114
+ output: {
1115
+ type: "object",
1116
+ required: ["success"],
1117
+ properties: {
1118
+ success: {
1119
+ type: "boolean",
1120
+ description: "Whether the ticket was successfully assigned/reassigned",
1121
+ },
1122
+ error: {
1123
+ type: "string",
1124
+ description: "The error that occurred if the ticket was not successfully assigned/reassigned",
1125
+ },
1126
+ ticketUrl: {
1127
+ type: "string",
1128
+ description: "The url to the newly assigned/reassigned Jira ticket",
1129
+ },
1130
+ },
1131
+ },
1132
+ name: "assignJiraTicket",
1133
+ provider: "jiraOrg",
1134
+ };
1135
+ export const jiraOrgCommentJiraTicketDefinition = {
1136
+ description: "Comments on a Jira ticket with specified content",
1137
+ scopes: ["write:comment:jira"],
1138
+ parameters: {
1139
+ type: "object",
1140
+ required: ["projectKey", "issueId", "comment"],
1141
+ properties: {
1142
+ projectKey: {
1143
+ type: "string",
1144
+ description: "The key for the project",
1145
+ },
1146
+ issueId: {
1147
+ type: "string",
1148
+ description: "The issue ID associated with the ticket to be commented on",
1149
+ },
1150
+ comment: {
1151
+ type: "string",
1152
+ description: "The text to be commented on the ticket",
1153
+ },
1154
+ },
1155
+ },
1156
+ output: {
1157
+ type: "object",
1158
+ required: ["success"],
1159
+ properties: {
1160
+ success: {
1161
+ type: "boolean",
1162
+ description: "Whether the comment was sent successfully",
1163
+ },
1164
+ error: {
1165
+ type: "string",
1166
+ description: "The error that occurred if the comment was not sent successfully",
1167
+ },
1168
+ commentUrl: {
1169
+ type: "string",
1170
+ description: "The url to the created Jira comment",
1171
+ },
1172
+ },
1173
+ },
1174
+ name: "commentJiraTicket",
1175
+ provider: "jiraOrg",
1176
+ };
1177
+ export const jiraOrgCreateJiraTicketDefinition = {
1178
+ description: "Create a jira ticket with new content specified",
1179
+ scopes: [],
1180
+ parameters: {
1181
+ type: "object",
1182
+ required: ["projectKey", "summary", "description", "issueType"],
1183
+ properties: {
1184
+ projectKey: {
1185
+ type: "string",
1186
+ description: "The key for the project you want to add it to",
1187
+ },
1188
+ summary: {
1189
+ type: "string",
1190
+ description: "The summary of the new ticket",
1191
+ },
1192
+ description: {
1193
+ type: "string",
1194
+ description: "The description for the new ticket",
1195
+ },
1196
+ issueType: {
1197
+ type: "string",
1198
+ description: "The issue type of the new ticket. Should be Epic, Story, Task, Bug, Sub-task, etc.",
1199
+ },
1200
+ reporter: {
1201
+ type: "string",
1202
+ description: "The reporter for the new ticket creation",
1203
+ },
1204
+ assignee: {
1205
+ type: "string",
1206
+ description: "The assignee for the new ticket creation",
1207
+ },
1208
+ customFields: {
1209
+ type: "object",
1210
+ description: "Custom fields to be set on the create ticket request",
1211
+ additionalProperties: true,
1212
+ },
1213
+ },
1214
+ },
1215
+ output: {
1216
+ type: "object",
1217
+ required: ["ticketUrl"],
1218
+ properties: {
1219
+ ticketUrl: {
1220
+ type: "string",
1221
+ description: "The url to the created Jira Ticket",
1222
+ },
1223
+ },
1224
+ },
1225
+ name: "createJiraTicket",
1226
+ provider: "jiraOrg",
1227
+ };
1228
+ export const jiraOrgGetJiraTicketDetailsDefinition = {
1229
+ description: "Get details of a ticket in Jira",
1230
+ scopes: ["read:jira-work"],
1231
+ parameters: {
1232
+ type: "object",
1233
+ required: ["projectKey", "issueId"],
1234
+ properties: {
1235
+ projectKey: {
1236
+ type: "string",
1237
+ description: "The key for the project",
1238
+ },
1239
+ issueId: {
1240
+ type: "string",
1241
+ description: "The ID of the ticket",
1242
+ },
1243
+ },
1244
+ },
1245
+ output: {
1246
+ type: "object",
1247
+ required: ["success"],
1248
+ properties: {
1249
+ success: {
1250
+ type: "boolean",
1251
+ description: "Whether the status was updated successfully",
1252
+ },
1253
+ error: {
1254
+ type: "string",
1255
+ description: "The error that occurred if the retrieval was unsuccessful",
1256
+ },
1257
+ data: {
1258
+ type: "object",
1259
+ description: "The data of the Jira ticket",
1260
+ },
1261
+ },
1262
+ },
1263
+ name: "getJiraTicketDetails",
1264
+ provider: "jiraOrg",
1265
+ };
1266
+ export const jiraOrgGetJiraTicketHistoryDefinition = {
1267
+ description: "Get ticket history of a ticket in Jira",
1268
+ scopes: ["read:jira-work"],
1269
+ parameters: {
1270
+ type: "object",
1271
+ required: ["projectKey", "issueId"],
1272
+ properties: {
1273
+ projectKey: {
1274
+ type: "string",
1275
+ description: "The key for the project",
1276
+ },
1277
+ issueId: {
1278
+ type: "string",
1279
+ description: "The ID of the ticket",
1280
+ },
1281
+ },
1282
+ },
1283
+ output: {
1284
+ type: "object",
1285
+ required: ["success"],
1286
+ properties: {
1287
+ success: {
1288
+ type: "boolean",
1289
+ description: "Whether the status was updated successfully",
1290
+ },
1291
+ error: {
1292
+ type: "string",
1293
+ description: "The error that occurred if the retrieval was unsuccessful",
1294
+ },
1295
+ history: {
1296
+ type: "array",
1297
+ description: "The history data of the Jira ticket",
1298
+ },
1299
+ },
1300
+ },
1301
+ name: "getJiraTicketHistory",
1302
+ provider: "jiraOrg",
1303
+ };
1304
+ export const jiraOrgUpdateJiraTicketDetailsDefinition = {
1305
+ description: "Update a Jira ticket with new content specified",
1306
+ scopes: ["write:jira-work"],
1307
+ parameters: {
1308
+ type: "object",
1309
+ required: ["projectKey", "issueId"],
1310
+ properties: {
1311
+ projectKey: {
1312
+ type: "string",
1313
+ description: "The key for the project you want to add it to",
1314
+ },
1315
+ issueId: {
1316
+ type: "string",
1317
+ description: "The issue ID associated with the ticket to be updated",
1318
+ },
1319
+ summary: {
1320
+ type: "string",
1321
+ description: "The updated summary",
1322
+ },
1323
+ description: {
1324
+ type: "string",
1325
+ description: "The updated description",
1326
+ },
1327
+ issueType: {
1328
+ type: "string",
1329
+ description: "The updated issue type",
1330
+ },
1331
+ customFields: {
1332
+ type: "object",
1333
+ description: "Custom fields to be set on the update ticket request",
1334
+ additionalProperties: true,
1335
+ },
1336
+ },
1337
+ },
1338
+ output: {
1339
+ type: "object",
1340
+ required: ["ticketUrl"],
1341
+ properties: {
1342
+ ticketUrl: {
1343
+ type: "string",
1344
+ description: "The url to the Jira ticket",
1345
+ },
1346
+ },
1347
+ },
1348
+ name: "updateJiraTicketDetails",
1349
+ provider: "jiraOrg",
1350
+ };
1351
+ export const jiraOrgUpdateJiraTicketStatusDefinition = {
1352
+ description: "Updates the status of Jira ticket with specified status",
1353
+ scopes: ["read:jira-work", "write:jira-work"],
1354
+ parameters: {
1355
+ type: "object",
1356
+ required: ["projectKey", "issueId", "status"],
1357
+ properties: {
1358
+ projectKey: {
1359
+ type: "string",
1360
+ description: "The key for the project you want to add it to",
1361
+ },
1362
+ issueId: {
1363
+ type: "string",
1364
+ description: "The issue ID associated with the ticket",
1365
+ },
1366
+ status: {
1367
+ type: "string",
1368
+ description: 'The status the ticket should be changed to (eg "In Progress", "Closed")',
1369
+ },
1370
+ },
1371
+ },
1372
+ output: {
1373
+ type: "object",
1374
+ required: ["success"],
1375
+ properties: {
1376
+ success: {
1377
+ type: "boolean",
1378
+ description: "Whether the status was updated successfully",
1379
+ },
1380
+ error: {
1381
+ type: "string",
1382
+ description: "The error that occurred if the status was not updated successfully",
1383
+ },
1384
+ ticketUrl: {
1385
+ type: "string",
1386
+ description: "The url to the Jira ticket",
1387
+ },
1388
+ },
1389
+ },
1390
+ name: "updateJiraTicketStatus",
1391
+ provider: "jiraOrg",
1392
+ };
1393
+ export const jiraOrgGetJiraIssuesByQueryDefinition = {
1394
+ description: "Retrieve Jira Issues by JQL query",
1395
+ scopes: [],
1396
+ parameters: {
1397
+ type: "object",
1398
+ required: ["query"],
1399
+ properties: {
1400
+ query: {
1401
+ type: "string",
1402
+ description: "The JQL query to execute",
1403
+ },
1404
+ limit: {
1405
+ type: "number",
1406
+ description: "The maximum number of records to retrieve",
1407
+ },
1408
+ },
1409
+ },
1410
+ output: {
1411
+ type: "object",
1412
+ required: ["success"],
1413
+ properties: {
1414
+ success: {
1415
+ type: "boolean",
1416
+ description: "Whether the records were successfully retrieved",
1417
+ },
1418
+ records: {
1419
+ type: "array",
1420
+ description: "The retrieved records",
1421
+ items: {
1422
+ type: "object",
1423
+ description: "An issue from Jira",
1424
+ additionalProperties: {
1425
+ type: "string",
1426
+ },
1427
+ },
1428
+ },
1429
+ error: {
1430
+ type: "string",
1431
+ description: "The error that occurred if the records were not successfully retrieved",
1432
+ },
1433
+ },
1434
+ },
1435
+ name: "getJiraIssuesByQuery",
1436
+ provider: "jiraOrg",
1437
+ };
1093
1438
  export const kandjiGetFVRecoveryKeyForDeviceDefinition = {
1094
1439
  description: "Get the FileVault recovery key for a device",
1095
1440
  scopes: [],
@@ -6,6 +6,7 @@ export declare enum ProviderName {
6
6
  MATH = "math",
7
7
  CONFLUENCE = "confluence",
8
8
  JIRA = "jira",
9
+ JIRAORG = "jiraOrg",
9
10
  KANDJI = "kandji",
10
11
  GOOGLEMAPS = "googlemaps",
11
12
  BING = "bing",
@@ -1094,6 +1095,238 @@ export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
1094
1095
  }>;
1095
1096
  export type jiraGetJiraIssuesByQueryOutputType = z.infer<typeof jiraGetJiraIssuesByQueryOutputSchema>;
1096
1097
  export type jiraGetJiraIssuesByQueryFunction = ActionFunction<jiraGetJiraIssuesByQueryParamsType, AuthParamsType, jiraGetJiraIssuesByQueryOutputType>;
1098
+ export declare const jiraOrgAssignJiraTicketParamsSchema: z.ZodObject<{
1099
+ projectKey: z.ZodString;
1100
+ assignee: z.ZodString;
1101
+ issueId: z.ZodString;
1102
+ }, "strip", z.ZodTypeAny, {
1103
+ assignee: string;
1104
+ projectKey: string;
1105
+ issueId: string;
1106
+ }, {
1107
+ assignee: string;
1108
+ projectKey: string;
1109
+ issueId: string;
1110
+ }>;
1111
+ export type jiraOrgAssignJiraTicketParamsType = z.infer<typeof jiraOrgAssignJiraTicketParamsSchema>;
1112
+ export declare const jiraOrgAssignJiraTicketOutputSchema: z.ZodObject<{
1113
+ success: z.ZodBoolean;
1114
+ error: z.ZodOptional<z.ZodString>;
1115
+ ticketUrl: z.ZodOptional<z.ZodString>;
1116
+ }, "strip", z.ZodTypeAny, {
1117
+ success: boolean;
1118
+ error?: string | undefined;
1119
+ ticketUrl?: string | undefined;
1120
+ }, {
1121
+ success: boolean;
1122
+ error?: string | undefined;
1123
+ ticketUrl?: string | undefined;
1124
+ }>;
1125
+ export type jiraOrgAssignJiraTicketOutputType = z.infer<typeof jiraOrgAssignJiraTicketOutputSchema>;
1126
+ export type jiraOrgAssignJiraTicketFunction = ActionFunction<jiraOrgAssignJiraTicketParamsType, AuthParamsType, jiraOrgAssignJiraTicketOutputType>;
1127
+ export declare const jiraOrgCommentJiraTicketParamsSchema: z.ZodObject<{
1128
+ projectKey: z.ZodString;
1129
+ issueId: z.ZodString;
1130
+ comment: z.ZodString;
1131
+ }, "strip", z.ZodTypeAny, {
1132
+ projectKey: string;
1133
+ issueId: string;
1134
+ comment: string;
1135
+ }, {
1136
+ projectKey: string;
1137
+ issueId: string;
1138
+ comment: string;
1139
+ }>;
1140
+ export type jiraOrgCommentJiraTicketParamsType = z.infer<typeof jiraOrgCommentJiraTicketParamsSchema>;
1141
+ export declare const jiraOrgCommentJiraTicketOutputSchema: z.ZodObject<{
1142
+ success: z.ZodBoolean;
1143
+ error: z.ZodOptional<z.ZodString>;
1144
+ commentUrl: z.ZodOptional<z.ZodString>;
1145
+ }, "strip", z.ZodTypeAny, {
1146
+ success: boolean;
1147
+ error?: string | undefined;
1148
+ commentUrl?: string | undefined;
1149
+ }, {
1150
+ success: boolean;
1151
+ error?: string | undefined;
1152
+ commentUrl?: string | undefined;
1153
+ }>;
1154
+ export type jiraOrgCommentJiraTicketOutputType = z.infer<typeof jiraOrgCommentJiraTicketOutputSchema>;
1155
+ export type jiraOrgCommentJiraTicketFunction = ActionFunction<jiraOrgCommentJiraTicketParamsType, AuthParamsType, jiraOrgCommentJiraTicketOutputType>;
1156
+ export declare const jiraOrgCreateJiraTicketParamsSchema: z.ZodObject<{
1157
+ projectKey: z.ZodString;
1158
+ summary: z.ZodString;
1159
+ description: z.ZodString;
1160
+ issueType: z.ZodString;
1161
+ reporter: z.ZodOptional<z.ZodString>;
1162
+ assignee: z.ZodOptional<z.ZodString>;
1163
+ customFields: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodAny, z.objectOutputType<{}, z.ZodAny, "strip">, z.objectInputType<{}, z.ZodAny, "strip">>>;
1164
+ }, "strip", z.ZodTypeAny, {
1165
+ description: string;
1166
+ projectKey: string;
1167
+ summary: string;
1168
+ issueType: string;
1169
+ assignee?: string | undefined;
1170
+ customFields?: z.objectOutputType<{}, z.ZodAny, "strip"> | undefined;
1171
+ reporter?: string | undefined;
1172
+ }, {
1173
+ description: string;
1174
+ projectKey: string;
1175
+ summary: string;
1176
+ issueType: string;
1177
+ assignee?: string | undefined;
1178
+ customFields?: z.objectInputType<{}, z.ZodAny, "strip"> | undefined;
1179
+ reporter?: string | undefined;
1180
+ }>;
1181
+ export type jiraOrgCreateJiraTicketParamsType = z.infer<typeof jiraOrgCreateJiraTicketParamsSchema>;
1182
+ export declare const jiraOrgCreateJiraTicketOutputSchema: z.ZodObject<{
1183
+ ticketUrl: z.ZodString;
1184
+ }, "strip", z.ZodTypeAny, {
1185
+ ticketUrl: string;
1186
+ }, {
1187
+ ticketUrl: string;
1188
+ }>;
1189
+ export type jiraOrgCreateJiraTicketOutputType = z.infer<typeof jiraOrgCreateJiraTicketOutputSchema>;
1190
+ export type jiraOrgCreateJiraTicketFunction = ActionFunction<jiraOrgCreateJiraTicketParamsType, AuthParamsType, jiraOrgCreateJiraTicketOutputType>;
1191
+ export declare const jiraOrgGetJiraTicketDetailsParamsSchema: z.ZodObject<{
1192
+ projectKey: z.ZodString;
1193
+ issueId: z.ZodString;
1194
+ }, "strip", z.ZodTypeAny, {
1195
+ projectKey: string;
1196
+ issueId: string;
1197
+ }, {
1198
+ projectKey: string;
1199
+ issueId: string;
1200
+ }>;
1201
+ export type jiraOrgGetJiraTicketDetailsParamsType = z.infer<typeof jiraOrgGetJiraTicketDetailsParamsSchema>;
1202
+ export declare const jiraOrgGetJiraTicketDetailsOutputSchema: z.ZodObject<{
1203
+ success: z.ZodBoolean;
1204
+ error: z.ZodOptional<z.ZodString>;
1205
+ data: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodAny, z.objectOutputType<{}, z.ZodAny, "strip">, z.objectInputType<{}, z.ZodAny, "strip">>>;
1206
+ }, "strip", z.ZodTypeAny, {
1207
+ success: boolean;
1208
+ error?: string | undefined;
1209
+ data?: z.objectOutputType<{}, z.ZodAny, "strip"> | undefined;
1210
+ }, {
1211
+ success: boolean;
1212
+ error?: string | undefined;
1213
+ data?: z.objectInputType<{}, z.ZodAny, "strip"> | undefined;
1214
+ }>;
1215
+ export type jiraOrgGetJiraTicketDetailsOutputType = z.infer<typeof jiraOrgGetJiraTicketDetailsOutputSchema>;
1216
+ export type jiraOrgGetJiraTicketDetailsFunction = ActionFunction<jiraOrgGetJiraTicketDetailsParamsType, AuthParamsType, jiraOrgGetJiraTicketDetailsOutputType>;
1217
+ export declare const jiraOrgGetJiraTicketHistoryParamsSchema: z.ZodObject<{
1218
+ projectKey: z.ZodString;
1219
+ issueId: z.ZodString;
1220
+ }, "strip", z.ZodTypeAny, {
1221
+ projectKey: string;
1222
+ issueId: string;
1223
+ }, {
1224
+ projectKey: string;
1225
+ issueId: string;
1226
+ }>;
1227
+ export type jiraOrgGetJiraTicketHistoryParamsType = z.infer<typeof jiraOrgGetJiraTicketHistoryParamsSchema>;
1228
+ export declare const jiraOrgGetJiraTicketHistoryOutputSchema: z.ZodObject<{
1229
+ success: z.ZodBoolean;
1230
+ error: z.ZodOptional<z.ZodString>;
1231
+ history: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1232
+ }, "strip", z.ZodTypeAny, {
1233
+ success: boolean;
1234
+ error?: string | undefined;
1235
+ history?: any[] | undefined;
1236
+ }, {
1237
+ success: boolean;
1238
+ error?: string | undefined;
1239
+ history?: any[] | undefined;
1240
+ }>;
1241
+ export type jiraOrgGetJiraTicketHistoryOutputType = z.infer<typeof jiraOrgGetJiraTicketHistoryOutputSchema>;
1242
+ export type jiraOrgGetJiraTicketHistoryFunction = ActionFunction<jiraOrgGetJiraTicketHistoryParamsType, AuthParamsType, jiraOrgGetJiraTicketHistoryOutputType>;
1243
+ export declare const jiraOrgUpdateJiraTicketDetailsParamsSchema: z.ZodObject<{
1244
+ projectKey: z.ZodString;
1245
+ issueId: z.ZodString;
1246
+ summary: z.ZodOptional<z.ZodString>;
1247
+ description: z.ZodOptional<z.ZodString>;
1248
+ issueType: z.ZodOptional<z.ZodString>;
1249
+ customFields: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodAny, z.objectOutputType<{}, z.ZodAny, "strip">, z.objectInputType<{}, z.ZodAny, "strip">>>;
1250
+ }, "strip", z.ZodTypeAny, {
1251
+ projectKey: string;
1252
+ issueId: string;
1253
+ description?: string | undefined;
1254
+ customFields?: z.objectOutputType<{}, z.ZodAny, "strip"> | undefined;
1255
+ summary?: string | undefined;
1256
+ issueType?: string | undefined;
1257
+ }, {
1258
+ projectKey: string;
1259
+ issueId: string;
1260
+ description?: string | undefined;
1261
+ customFields?: z.objectInputType<{}, z.ZodAny, "strip"> | undefined;
1262
+ summary?: string | undefined;
1263
+ issueType?: string | undefined;
1264
+ }>;
1265
+ export type jiraOrgUpdateJiraTicketDetailsParamsType = z.infer<typeof jiraOrgUpdateJiraTicketDetailsParamsSchema>;
1266
+ export declare const jiraOrgUpdateJiraTicketDetailsOutputSchema: z.ZodObject<{
1267
+ ticketUrl: z.ZodString;
1268
+ }, "strip", z.ZodTypeAny, {
1269
+ ticketUrl: string;
1270
+ }, {
1271
+ ticketUrl: string;
1272
+ }>;
1273
+ export type jiraOrgUpdateJiraTicketDetailsOutputType = z.infer<typeof jiraOrgUpdateJiraTicketDetailsOutputSchema>;
1274
+ export type jiraOrgUpdateJiraTicketDetailsFunction = ActionFunction<jiraOrgUpdateJiraTicketDetailsParamsType, AuthParamsType, jiraOrgUpdateJiraTicketDetailsOutputType>;
1275
+ export declare const jiraOrgUpdateJiraTicketStatusParamsSchema: z.ZodObject<{
1276
+ projectKey: z.ZodString;
1277
+ issueId: z.ZodString;
1278
+ status: z.ZodString;
1279
+ }, "strip", z.ZodTypeAny, {
1280
+ status: string;
1281
+ projectKey: string;
1282
+ issueId: string;
1283
+ }, {
1284
+ status: string;
1285
+ projectKey: string;
1286
+ issueId: string;
1287
+ }>;
1288
+ export type jiraOrgUpdateJiraTicketStatusParamsType = z.infer<typeof jiraOrgUpdateJiraTicketStatusParamsSchema>;
1289
+ export declare const jiraOrgUpdateJiraTicketStatusOutputSchema: z.ZodObject<{
1290
+ success: z.ZodBoolean;
1291
+ error: z.ZodOptional<z.ZodString>;
1292
+ ticketUrl: z.ZodOptional<z.ZodString>;
1293
+ }, "strip", z.ZodTypeAny, {
1294
+ success: boolean;
1295
+ error?: string | undefined;
1296
+ ticketUrl?: string | undefined;
1297
+ }, {
1298
+ success: boolean;
1299
+ error?: string | undefined;
1300
+ ticketUrl?: string | undefined;
1301
+ }>;
1302
+ export type jiraOrgUpdateJiraTicketStatusOutputType = z.infer<typeof jiraOrgUpdateJiraTicketStatusOutputSchema>;
1303
+ export type jiraOrgUpdateJiraTicketStatusFunction = ActionFunction<jiraOrgUpdateJiraTicketStatusParamsType, AuthParamsType, jiraOrgUpdateJiraTicketStatusOutputType>;
1304
+ export declare const jiraOrgGetJiraIssuesByQueryParamsSchema: z.ZodObject<{
1305
+ query: z.ZodString;
1306
+ limit: z.ZodOptional<z.ZodNumber>;
1307
+ }, "strip", z.ZodTypeAny, {
1308
+ query: string;
1309
+ limit?: number | undefined;
1310
+ }, {
1311
+ query: string;
1312
+ limit?: number | undefined;
1313
+ }>;
1314
+ export type jiraOrgGetJiraIssuesByQueryParamsType = z.infer<typeof jiraOrgGetJiraIssuesByQueryParamsSchema>;
1315
+ export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
1316
+ success: z.ZodBoolean;
1317
+ records: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>, "many">>;
1318
+ error: z.ZodOptional<z.ZodString>;
1319
+ }, "strip", z.ZodTypeAny, {
1320
+ success: boolean;
1321
+ error?: string | undefined;
1322
+ records?: Record<string, string>[] | undefined;
1323
+ }, {
1324
+ success: boolean;
1325
+ error?: string | undefined;
1326
+ records?: Record<string, string>[] | undefined;
1327
+ }>;
1328
+ export type jiraOrgGetJiraIssuesByQueryOutputType = z.infer<typeof jiraOrgGetJiraIssuesByQueryOutputSchema>;
1329
+ export type jiraOrgGetJiraIssuesByQueryFunction = ActionFunction<jiraOrgGetJiraIssuesByQueryParamsType, AuthParamsType, jiraOrgGetJiraIssuesByQueryOutputType>;
1097
1330
  export declare const kandjiGetFVRecoveryKeyForDeviceParamsSchema: z.ZodObject<{
1098
1331
  userEmail: z.ZodString;
1099
1332
  subdomain: z.ZodString;
@@ -7,6 +7,7 @@ export var ProviderName;
7
7
  ProviderName["MATH"] = "math";
8
8
  ProviderName["CONFLUENCE"] = "confluence";
9
9
  ProviderName["JIRA"] = "jira";
10
+ ProviderName["JIRAORG"] = "jiraOrg";
10
11
  ProviderName["KANDJI"] = "kandji";
11
12
  ProviderName["GOOGLEMAPS"] = "googlemaps";
12
13
  ProviderName["BING"] = "bing";
@@ -353,6 +354,97 @@ export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
353
354
  records: z.array(z.record(z.string()).describe("An issue from Jira")).describe("The retrieved records").optional(),
354
355
  error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
355
356
  });
357
+ export const jiraOrgAssignJiraTicketParamsSchema = z.object({
358
+ projectKey: z.string().describe("The key for the project you want to add it to"),
359
+ assignee: z.string().describe("The assignee for the ticket, userID or email"),
360
+ issueId: z.string().describe("The issue ID associated with the ticket to be assigned/re-assigned"),
361
+ });
362
+ export const jiraOrgAssignJiraTicketOutputSchema = z.object({
363
+ success: z.boolean().describe("Whether the ticket was successfully assigned/reassigned"),
364
+ error: z
365
+ .string()
366
+ .describe("The error that occurred if the ticket was not successfully assigned/reassigned")
367
+ .optional(),
368
+ ticketUrl: z.string().describe("The url to the newly assigned/reassigned Jira ticket").optional(),
369
+ });
370
+ export const jiraOrgCommentJiraTicketParamsSchema = z.object({
371
+ projectKey: z.string().describe("The key for the project"),
372
+ issueId: z.string().describe("The issue ID associated with the ticket to be commented on"),
373
+ comment: z.string().describe("The text to be commented on the ticket"),
374
+ });
375
+ export const jiraOrgCommentJiraTicketOutputSchema = z.object({
376
+ success: z.boolean().describe("Whether the comment was sent successfully"),
377
+ error: z.string().describe("The error that occurred if the comment was not sent successfully").optional(),
378
+ commentUrl: z.string().describe("The url to the created Jira comment").optional(),
379
+ });
380
+ export const jiraOrgCreateJiraTicketParamsSchema = z.object({
381
+ projectKey: z.string().describe("The key for the project you want to add it to"),
382
+ summary: z.string().describe("The summary of the new ticket"),
383
+ description: z.string().describe("The description for the new ticket"),
384
+ issueType: z.string().describe("The issue type of the new ticket. Should be Epic, Story, Task, Bug, Sub-task, etc."),
385
+ reporter: z.string().describe("The reporter for the new ticket creation").optional(),
386
+ assignee: z.string().describe("The assignee for the new ticket creation").optional(),
387
+ customFields: z
388
+ .object({})
389
+ .catchall(z.any())
390
+ .describe("Custom fields to be set on the create ticket request")
391
+ .optional(),
392
+ });
393
+ export const jiraOrgCreateJiraTicketOutputSchema = z.object({
394
+ ticketUrl: z.string().describe("The url to the created Jira Ticket"),
395
+ });
396
+ export const jiraOrgGetJiraTicketDetailsParamsSchema = z.object({
397
+ projectKey: z.string().describe("The key for the project"),
398
+ issueId: z.string().describe("The ID of the ticket"),
399
+ });
400
+ export const jiraOrgGetJiraTicketDetailsOutputSchema = z.object({
401
+ success: z.boolean().describe("Whether the status was updated successfully"),
402
+ error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
403
+ data: z.object({}).catchall(z.any()).describe("The data of the Jira ticket").optional(),
404
+ });
405
+ export const jiraOrgGetJiraTicketHistoryParamsSchema = z.object({
406
+ projectKey: z.string().describe("The key for the project"),
407
+ issueId: z.string().describe("The ID of the ticket"),
408
+ });
409
+ export const jiraOrgGetJiraTicketHistoryOutputSchema = z.object({
410
+ success: z.boolean().describe("Whether the status was updated successfully"),
411
+ error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
412
+ history: z.array(z.any()).describe("The history data of the Jira ticket").optional(),
413
+ });
414
+ export const jiraOrgUpdateJiraTicketDetailsParamsSchema = z.object({
415
+ projectKey: z.string().describe("The key for the project you want to add it to"),
416
+ issueId: z.string().describe("The issue ID associated with the ticket to be updated"),
417
+ summary: z.string().describe("The updated summary").optional(),
418
+ description: z.string().describe("The updated description").optional(),
419
+ issueType: z.string().describe("The updated issue type").optional(),
420
+ customFields: z
421
+ .object({})
422
+ .catchall(z.any())
423
+ .describe("Custom fields to be set on the update ticket request")
424
+ .optional(),
425
+ });
426
+ export const jiraOrgUpdateJiraTicketDetailsOutputSchema = z.object({
427
+ ticketUrl: z.string().describe("The url to the Jira ticket"),
428
+ });
429
+ export const jiraOrgUpdateJiraTicketStatusParamsSchema = z.object({
430
+ projectKey: z.string().describe("The key for the project you want to add it to"),
431
+ issueId: z.string().describe("The issue ID associated with the ticket"),
432
+ status: z.string().describe('The status the ticket should be changed to (eg "In Progress", "Closed")'),
433
+ });
434
+ export const jiraOrgUpdateJiraTicketStatusOutputSchema = z.object({
435
+ success: z.boolean().describe("Whether the status was updated successfully"),
436
+ error: z.string().describe("The error that occurred if the status was not updated successfully").optional(),
437
+ ticketUrl: z.string().describe("The url to the Jira ticket").optional(),
438
+ });
439
+ export const jiraOrgGetJiraIssuesByQueryParamsSchema = z.object({
440
+ query: z.string().describe("The JQL query to execute"),
441
+ limit: z.number().describe("The maximum number of records to retrieve").optional(),
442
+ });
443
+ export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
444
+ success: z.boolean().describe("Whether the records were successfully retrieved"),
445
+ records: z.array(z.record(z.string()).describe("An issue from Jira")).describe("The retrieved records").optional(),
446
+ error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
447
+ });
356
448
  export const kandjiGetFVRecoveryKeyForDeviceParamsSchema = z.object({
357
449
  userEmail: z.string().describe("The email of the user requesting the recovery key"),
358
450
  subdomain: z.string().describe("The subdomain of the Kandji account"),
@@ -1,4 +1,4 @@
1
- import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, } from "./autogen/templates.js";
1
+ import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, } from "./autogen/templates.js";
2
2
  export const ACTION_GROUPS = {
3
3
  GENERIC: {
4
4
  description: "Generic utility actions",
@@ -102,6 +102,19 @@ export const ACTION_GROUPS = {
102
102
  jiraGetJiraIssuesByQueryDefinition,
103
103
  ],
104
104
  },
105
+ JIRA_ORG_ACTIONS: {
106
+ description: "Action for interacting with Jira tickets",
107
+ actions: [
108
+ jiraOrgAssignJiraTicketDefinition,
109
+ jiraOrgCreateJiraTicketDefinition,
110
+ jiraOrgCommentJiraTicketDefinition,
111
+ jiraOrgGetJiraTicketDetailsDefinition,
112
+ jiraOrgGetJiraTicketHistoryDefinition,
113
+ jiraOrgUpdateJiraTicketDetailsDefinition,
114
+ jiraOrgUpdateJiraTicketStatusDefinition,
115
+ jiraOrgGetJiraIssuesByQueryDefinition,
116
+ ],
117
+ },
105
118
  OPENSTREETMAP_GET_LATITUDE_LONGITUDE_FROM_LOCATION: {
106
119
  description: "Action for getting the latitude and longitude of a location",
107
120
  actions: [openstreetmapGetLatitudeLongitudeFromLocationDefinition],
@@ -0,0 +1,3 @@
1
+ import type { googleOauthListGmailThreadsFunction } from "../../autogen/types";
2
+ declare const listGmailThreads: googleOauthListGmailThreadsFunction;
3
+ export default listGmailThreads;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
14
+ const decodeMessage_1 = require("./utils/decodeMessage");
15
+ const listGmailThreads = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
16
+ if (!authParams.authToken) {
17
+ return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN, threads: [] };
18
+ }
19
+ const { query, maxResults } = params;
20
+ const allThreads = [];
21
+ const errorMessages = [];
22
+ const max = maxResults !== null && maxResults !== void 0 ? maxResults : 100;
23
+ let fetched = 0;
24
+ let pageToken = undefined;
25
+ try {
26
+ while (fetched < max) {
27
+ const url = `https://gmail.googleapis.com/gmail/v1/users/me/threads?q=${encodeURIComponent(query)}` +
28
+ (pageToken ? `&pageToken=${encodeURIComponent(pageToken)}` : "") +
29
+ `&maxResults=${Math.min(100, max - fetched)}`;
30
+ const listRes = yield axiosClient_1.axiosClient.get(url, {
31
+ headers: {
32
+ Authorization: `Bearer ${authParams.authToken}`,
33
+ },
34
+ });
35
+ const { threads: threadList = [], nextPageToken } = listRes.data;
36
+ if (!Array.isArray(threadList) || threadList.length === 0)
37
+ break;
38
+ const remaining = max - allThreads.length;
39
+ const batch = threadList.slice(0, remaining);
40
+ const results = yield Promise.all(batch.map((thread) => __awaiter(void 0, void 0, void 0, function* () {
41
+ try {
42
+ const threadRes = yield axiosClient_1.axiosClient.get(`https://gmail.googleapis.com/gmail/v1/users/me/threads/${thread.id}?format=full`, {
43
+ headers: {
44
+ Authorization: `Bearer ${authParams.authToken}`,
45
+ },
46
+ });
47
+ const { id, historyId, messages } = threadRes.data;
48
+ return {
49
+ id,
50
+ historyId,
51
+ messages: Array.isArray(messages)
52
+ ? messages.map(msg => {
53
+ const { id, threadId, snippet, labelIds, internalDate } = msg;
54
+ const emailBody = (0, decodeMessage_1.getEmailContent)(msg) || "";
55
+ return {
56
+ id,
57
+ threadId,
58
+ snippet,
59
+ labelIds,
60
+ internalDate,
61
+ emailBody,
62
+ };
63
+ })
64
+ : [],
65
+ };
66
+ }
67
+ catch (err) {
68
+ errorMessages.push(err instanceof Error ? err.message : "Failed to fetch thread details");
69
+ return {
70
+ id: thread.id,
71
+ snippet: "",
72
+ historyId: "",
73
+ messages: [],
74
+ error: err instanceof Error ? err.message : "Failed to fetch thread details",
75
+ };
76
+ }
77
+ })));
78
+ allThreads.push(...results);
79
+ fetched = allThreads.length;
80
+ if (!nextPageToken || allThreads.length >= max)
81
+ break;
82
+ pageToken = nextPageToken;
83
+ }
84
+ return {
85
+ success: errorMessages.length === 0,
86
+ threads: allThreads,
87
+ error: errorMessages.join("; "),
88
+ };
89
+ }
90
+ catch (error) {
91
+ return {
92
+ success: false,
93
+ error: error instanceof Error ? error.message : "Unknown error listing Gmail threads",
94
+ threads: [],
95
+ };
96
+ }
97
+ });
98
+ exports.default = listGmailThreads;
@@ -0,0 +1,3 @@
1
+ import type { googleOauthSearchGmailMessagesFunction } from "../../autogen/types";
2
+ declare const searchGmailMessages: googleOauthSearchGmailMessagesFunction;
3
+ export default searchGmailMessages;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
14
+ const decodeMessage_1 = require("./utils/decodeMessage");
15
+ const searchGmailMessages = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
16
+ if (!authParams.authToken) {
17
+ return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN, messages: [] };
18
+ }
19
+ const { query, maxResults } = params;
20
+ const allMessages = [];
21
+ const max = maxResults !== null && maxResults !== void 0 ? maxResults : 100;
22
+ const errorMessages = [];
23
+ let pageToken = undefined;
24
+ let fetched = 0;
25
+ try {
26
+ while (fetched < max) {
27
+ const url = `https://gmail.googleapis.com/gmail/v1/users/me/messages?q=${encodeURIComponent(query)}` +
28
+ (pageToken ? `&pageToken=${encodeURIComponent(pageToken)}` : "") +
29
+ `&maxResults=${Math.min(100, max - fetched)}`;
30
+ const listRes = yield axiosClient_1.axiosClient.get(url, {
31
+ headers: {
32
+ Authorization: `Bearer ${authParams.authToken}`,
33
+ },
34
+ });
35
+ const { messages: messageList = [], nextPageToken } = listRes.data;
36
+ if (!Array.isArray(messageList) || messageList.length === 0)
37
+ break;
38
+ const remaining = max - allMessages.length;
39
+ const batch = messageList.slice(0, remaining);
40
+ const results = yield Promise.all(batch.map((msg) => __awaiter(void 0, void 0, void 0, function* () {
41
+ try {
42
+ const msgRes = yield axiosClient_1.axiosClient.get(`https://gmail.googleapis.com/gmail/v1/users/me/messages/${msg.id}?format=full`, {
43
+ headers: {
44
+ Authorization: `Bearer ${authParams.authToken}`,
45
+ },
46
+ });
47
+ const { id, threadId, snippet, labelIds, internalDate } = msgRes.data;
48
+ const emailBody = (0, decodeMessage_1.getEmailContent)(msgRes.data) || "";
49
+ return {
50
+ id,
51
+ threadId,
52
+ snippet,
53
+ labelIds,
54
+ internalDate,
55
+ emailBody,
56
+ };
57
+ }
58
+ catch (err) {
59
+ errorMessages.push(err instanceof Error ? err.message : "Failed to fetch message details");
60
+ return {
61
+ id: msg.id,
62
+ threadId: "",
63
+ snippet: "",
64
+ labelIds: [],
65
+ internalDate: "",
66
+ payload: {},
67
+ error: err instanceof Error ? err.message : "Failed to fetch message details",
68
+ };
69
+ }
70
+ })));
71
+ allMessages.push(...results);
72
+ fetched = allMessages.length;
73
+ if (!nextPageToken || allMessages.length >= max)
74
+ break;
75
+ pageToken = nextPageToken;
76
+ }
77
+ return {
78
+ success: errorMessages.length === 0,
79
+ messages: allMessages,
80
+ error: errorMessages.join("; "),
81
+ };
82
+ }
83
+ catch (error) {
84
+ return {
85
+ success: false,
86
+ error: error instanceof Error ? error.message : "Unknown error searching Gmail",
87
+ messages: [],
88
+ };
89
+ }
90
+ });
91
+ exports.default = searchGmailMessages;
@@ -0,0 +1,3 @@
1
+ import type { jamfGetComputerInventoryFunction } from "../../autogen/types";
2
+ declare const getComputerInventory: jamfGetComputerInventoryFunction;
3
+ export default getComputerInventory;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const axiosClient_1 = require("../../util/axiosClient");
13
+ const getComputerInventory = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
+ const { authToken, baseUrl } = authParams;
15
+ const { section } = params;
16
+ if (!baseUrl) {
17
+ throw new Error("Base URL is required to fetch computer inventory");
18
+ }
19
+ const apiUrl = `${baseUrl}/v1/computer-inventory`;
20
+ const queryParams = {};
21
+ if (section) {
22
+ queryParams.section = section;
23
+ }
24
+ try {
25
+ const response = yield axiosClient_1.axiosClient.get(apiUrl, {
26
+ headers: {
27
+ Authorization: `Bearer ${authToken}`,
28
+ Accept: "application/json",
29
+ },
30
+ params: queryParams,
31
+ });
32
+ return {
33
+ success: true,
34
+ data: response.data,
35
+ };
36
+ }
37
+ catch (error) {
38
+ console.error("Error retrieving computer inventory: ", error);
39
+ return {
40
+ success: false,
41
+ error: error instanceof Error ? error.message : "Unknown error",
42
+ };
43
+ }
44
+ });
45
+ exports.default = getComputerInventory;
@@ -0,0 +1,3 @@
1
+ import type { jamfGetFileVaultRecoveryKeyFunction } from "../../autogen/types";
2
+ declare const getFileVaultRecoveryKey: jamfGetFileVaultRecoveryKeyFunction;
3
+ export default getFileVaultRecoveryKey;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const axiosClient_1 = require("../../util/axiosClient");
13
+ const getFileVaultRecoveryKey = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
+ const { authToken, baseUrl } = authParams;
15
+ const { computerId } = params;
16
+ if (!baseUrl || !computerId) {
17
+ throw new Error("Base URL and Computer ID are required to fetch FileVault2 recovery key");
18
+ }
19
+ const apiUrl = `${baseUrl}/JSSResource/computers/${computerId}/FileVault2RecoveryKey`;
20
+ try {
21
+ const response = yield axiosClient_1.axiosClient.get(apiUrl, {
22
+ headers: {
23
+ Authorization: `Bearer ${authToken}`,
24
+ Accept: "application/json",
25
+ },
26
+ });
27
+ return {
28
+ success: true,
29
+ data: response.data,
30
+ };
31
+ }
32
+ catch (error) {
33
+ console.error("Error retrieving FileVault2 recovery key: ", error);
34
+ return {
35
+ success: false,
36
+ error: error instanceof Error ? error.message : "Unknown error",
37
+ };
38
+ }
39
+ });
40
+ exports.default = getFileVaultRecoveryKey;
@@ -0,0 +1,3 @@
1
+ import type { jamfRestartJamfComputerByIdFunction } from "../../autogen/types.js";
2
+ declare const restartJamfComputerById: jamfRestartJamfComputerByIdFunction;
3
+ export default restartJamfComputerById;
@@ -0,0 +1,37 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { axiosClient } from "../../util/axiosClient.js";
11
+ const restartJamfComputerById = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
12
+ const { authToken, subdomain } = authParams;
13
+ const { computerId } = params;
14
+ if (!subdomain || !authToken) {
15
+ throw new Error("Instance and authToken are required to fetch Jamf user computer ID");
16
+ }
17
+ const url = `https://${subdomain}.jamfcloud.com`;
18
+ try {
19
+ yield axiosClient.post(`${url}/api/command/v1/computers/${computerId}/restart`, {
20
+ headers: {
21
+ Authorization: `Bearer ${authToken}`,
22
+ Accept: "application/json",
23
+ },
24
+ });
25
+ return {
26
+ success: true,
27
+ };
28
+ }
29
+ catch (error) {
30
+ console.error("Error restarting Jamf computer: ", error);
31
+ return {
32
+ success: false,
33
+ error: error instanceof Error ? error.message : "Unknown error",
34
+ };
35
+ }
36
+ });
37
+ export default restartJamfComputerById;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "type": "module",
5
5
  "description": "AI Actions by Credal AI",
6
6
  "sideEffects": false,
@@ -1,3 +0,0 @@
1
- import { confluenceUpdatePageFunction } from "../../../actions/autogen/types";
2
- declare const confluenceUpdatePage: confluenceUpdatePageFunction;
3
- export default confluenceUpdatePage;
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const axios_1 = __importDefault(require("axios"));
16
- function getConfluenceApi(baseUrl, username, apiToken) {
17
- const api = axios_1.default.create({
18
- baseURL: baseUrl,
19
- headers: {
20
- Accept: "application/json",
21
- // Tokens are associated with a specific user.
22
- Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
23
- },
24
- });
25
- return api;
26
- }
27
- const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
28
- const { pageId, username, content, title } = params;
29
- const { baseUrl, authToken } = authParams;
30
- const api = getConfluenceApi(baseUrl, username, authToken);
31
- // Get current version number
32
- const response = yield api.get(`/api/v2/pages/${pageId}`);
33
- const currVersion = response.data.version.number;
34
- yield api.put(`/api/v2/pages/${pageId}`, {
35
- id: pageId,
36
- status: "current",
37
- title,
38
- body: {
39
- representation: "storage",
40
- value: content,
41
- },
42
- version: {
43
- number: currVersion + 1,
44
- },
45
- });
46
- });
47
- exports.default = confluenceUpdatePage;