@credal/actions 0.2.154 → 0.2.156
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/actions/actionMapper.js +43 -1
- package/dist/actions/autogen/templates.js +24 -15
- package/dist/actions/autogen/types.d.ts +22 -13
- package/dist/actions/autogen/types.js +24 -3
- package/dist/actions/groups.js +1 -11
- package/dist/actions/providers/github/fetchFile.d.ts +3 -0
- package/dist/actions/providers/github/fetchFile.js +131 -0
- package/dist/actions/providers/github/getContents.d.ts +3 -0
- package/dist/actions/providers/github/getContents.js +41 -0
- package/dist/actions/providers/jira/getJiraIssuesByQuery.js +42 -27
- package/dist/actions/providers/slack/getChannelMessages.js +98 -2
- package/dist/actions/providers/slack/messageTransformers.d.ts +53 -0
- package/dist/actions/providers/slack/messageTransformers.js +267 -0
- package/dist/actions/providers/slackUser/searchSlack.d.ts +0 -26
- package/dist/actions/providers/slackUser/searchSlack.js +5 -171
- package/package.json +2 -2
- package/dist/actions/providers/confluence/updatePage.d.ts +0 -3
- package/dist/actions/providers/confluence/updatePage.js +0 -46
- package/dist/actions/providers/credal/callCopilot.d.ts +0 -3
- package/dist/actions/providers/credal/callCopilot.js +0 -36
- package/dist/actions/providers/generic/fillTemplateAction.d.ts +0 -7
- package/dist/actions/providers/generic/fillTemplateAction.js +0 -18
- package/dist/actions/providers/generic/genericApiCall.d.ts +0 -3
- package/dist/actions/providers/generic/genericApiCall.js +0 -38
- package/dist/actions/providers/google-oauth/getDriveContentById.d.ts +0 -3
- package/dist/actions/providers/google-oauth/getDriveContentById.js +0 -161
- package/dist/actions/providers/google-oauth/searchAndGetDriveContentByKeywords.d.ts +0 -3
- package/dist/actions/providers/google-oauth/searchAndGetDriveContentByKeywords.js +0 -47
- package/dist/actions/providers/google-oauth/searchDriveAndGetContentByKeywords.d.ts +0 -3
- package/dist/actions/providers/google-oauth/searchDriveAndGetContentByKeywords.js +0 -110
- package/dist/actions/providers/google-oauth/searchDriveAndGetContentByQuery.d.ts +0 -3
- package/dist/actions/providers/google-oauth/searchDriveAndGetContentByQuery.js +0 -78
- package/dist/actions/providers/google-oauth/utils/extractContentFromDriveFileId.d.ts +0 -15
- package/dist/actions/providers/google-oauth/utils/extractContentFromDriveFileId.js +0 -129
- package/dist/actions/providers/googlemaps/nearbysearch.d.ts +0 -3
- package/dist/actions/providers/googlemaps/nearbysearch.js +0 -96
- package/dist/actions/providers/math/index.d.ts +0 -1
- package/dist/actions/providers/math/index.js +0 -37
- package/dist/actions/providers/slack/index.d.ts +0 -1
- package/dist/actions/providers/slack/index.js +0 -37
- package/dist/actions/providers/slack/listConversations.d.ts +0 -3
- package/dist/actions/providers/slack/listConversations.js +0 -41
- package/dist/actions/providers/slackUser/getSlackMessagesInTimeRange.d.ts +0 -3
- package/dist/actions/providers/slackUser/getSlackMessagesInTimeRange.js +0 -81
- package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.d.ts +0 -3
- package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.js +0 -154
- package/dist/actions/providers/x/scrapeTweetDataWithNitter.d.ts +0 -3
- package/dist/actions/providers/x/scrapeTweetDataWithNitter.js +0 -45
|
@@ -412,7 +412,49 @@ export const ActionMapper = {
|
|
|
412
412
|
},
|
|
413
413
|
jira: jiraActions,
|
|
414
414
|
jiraOrg: jiraActions,
|
|
415
|
-
jiraDataCenter:
|
|
415
|
+
jiraDataCenter: {
|
|
416
|
+
// Exclude Service Desk: getServiceDesks, createServiceDeskRequest, publicCommentOnServiceDeskRequest
|
|
417
|
+
getJiraIssuesByQuery: {
|
|
418
|
+
fn: getJiraIssuesByQuery,
|
|
419
|
+
paramsSchema: jiraGetJiraIssuesByQueryParamsSchema,
|
|
420
|
+
outputSchema: jiraGetJiraIssuesByQueryOutputSchema,
|
|
421
|
+
},
|
|
422
|
+
assignJiraTicket: {
|
|
423
|
+
fn: assignJiraTicket,
|
|
424
|
+
paramsSchema: jiraAssignJiraTicketParamsSchema,
|
|
425
|
+
outputSchema: jiraAssignJiraTicketOutputSchema,
|
|
426
|
+
},
|
|
427
|
+
commentJiraTicket: {
|
|
428
|
+
fn: commentJiraTicket,
|
|
429
|
+
paramsSchema: jiraCommentJiraTicketParamsSchema,
|
|
430
|
+
outputSchema: jiraCommentJiraTicketOutputSchema,
|
|
431
|
+
},
|
|
432
|
+
createJiraTicket: {
|
|
433
|
+
fn: createJiraTicket,
|
|
434
|
+
paramsSchema: jiraCreateJiraTicketParamsSchema,
|
|
435
|
+
outputSchema: jiraCreateJiraTicketOutputSchema,
|
|
436
|
+
},
|
|
437
|
+
getJiraTicketDetails: {
|
|
438
|
+
fn: getJiraTicketDetails,
|
|
439
|
+
paramsSchema: jiraGetJiraTicketDetailsParamsSchema,
|
|
440
|
+
outputSchema: jiraGetJiraTicketDetailsOutputSchema,
|
|
441
|
+
},
|
|
442
|
+
getJiraTicketHistory: {
|
|
443
|
+
fn: getJiraTicketHistory,
|
|
444
|
+
paramsSchema: jiraGetJiraTicketHistoryParamsSchema,
|
|
445
|
+
outputSchema: jiraGetJiraTicketHistoryOutputSchema,
|
|
446
|
+
},
|
|
447
|
+
updateJiraTicketDetails: {
|
|
448
|
+
fn: updateJiraTicketDetails,
|
|
449
|
+
paramsSchema: jiraUpdateJiraTicketDetailsParamsSchema,
|
|
450
|
+
outputSchema: jiraUpdateJiraTicketDetailsOutputSchema,
|
|
451
|
+
},
|
|
452
|
+
updateJiraTicketStatus: {
|
|
453
|
+
fn: updateJiraTicketStatus,
|
|
454
|
+
paramsSchema: jiraUpdateJiraTicketStatusParamsSchema,
|
|
455
|
+
outputSchema: jiraUpdateJiraTicketStatusOutputSchema,
|
|
456
|
+
},
|
|
457
|
+
},
|
|
416
458
|
openstreetmap: {
|
|
417
459
|
getLatitudeLongitudeFromLocation: {
|
|
418
460
|
fn: getLatitudeLongitudeFromLocation,
|
|
@@ -686,6 +686,22 @@ export const slackGetChannelMessagesDefinition = {
|
|
|
686
686
|
type: "string",
|
|
687
687
|
description: "Only messages after this Unix timestamp will be included in results",
|
|
688
688
|
},
|
|
689
|
+
latest: {
|
|
690
|
+
type: "string",
|
|
691
|
+
description: "Only messages before this Unix timestamp will be included. Default is the current time. Use with oldest to create a time range.",
|
|
692
|
+
},
|
|
693
|
+
limit: {
|
|
694
|
+
type: "number",
|
|
695
|
+
description: "Maximum number of messages to return (1-999). Default is 100. Slack recommends no more than 200 results at a time for performance.",
|
|
696
|
+
},
|
|
697
|
+
cursor: {
|
|
698
|
+
type: "string",
|
|
699
|
+
description: "Pagination cursor from a previous response's next_cursor value. Use to navigate through large result sets.",
|
|
700
|
+
},
|
|
701
|
+
includeThreadReplies: {
|
|
702
|
+
type: "boolean",
|
|
703
|
+
description: "If true, includes all replies for messages that are part of a thread. Default is false.",
|
|
704
|
+
},
|
|
689
705
|
},
|
|
690
706
|
},
|
|
691
707
|
output: {
|
|
@@ -715,6 +731,14 @@ export const slackGetChannelMessagesDefinition = {
|
|
|
715
731
|
},
|
|
716
732
|
},
|
|
717
733
|
},
|
|
734
|
+
hasMore: {
|
|
735
|
+
type: "boolean",
|
|
736
|
+
description: "Indicates if there are more messages available beyond the current result set",
|
|
737
|
+
},
|
|
738
|
+
nextCursor: {
|
|
739
|
+
type: "string",
|
|
740
|
+
description: "Cursor to use for fetching the next page of results. Only present when hasMore is true.",
|
|
741
|
+
},
|
|
718
742
|
},
|
|
719
743
|
},
|
|
720
744
|
name: "getChannelMessages",
|
|
@@ -1566,12 +1590,7 @@ export const jiraGetJiraIssuesByQueryDefinition = {
|
|
|
1566
1590
|
},
|
|
1567
1591
|
output: {
|
|
1568
1592
|
type: "object",
|
|
1569
|
-
required: ["success"],
|
|
1570
1593
|
properties: {
|
|
1571
|
-
success: {
|
|
1572
|
-
type: "boolean",
|
|
1573
|
-
description: "Whether the records were successfully retrieved",
|
|
1574
|
-
},
|
|
1575
1594
|
results: {
|
|
1576
1595
|
type: "array",
|
|
1577
1596
|
description: "The results of the Jira issues",
|
|
@@ -2258,12 +2277,7 @@ export const jiraOrgGetJiraIssuesByQueryDefinition = {
|
|
|
2258
2277
|
},
|
|
2259
2278
|
output: {
|
|
2260
2279
|
type: "object",
|
|
2261
|
-
required: ["success"],
|
|
2262
2280
|
properties: {
|
|
2263
|
-
success: {
|
|
2264
|
-
type: "boolean",
|
|
2265
|
-
description: "Whether the records were successfully retrieved",
|
|
2266
|
-
},
|
|
2267
2281
|
results: {
|
|
2268
2282
|
type: "array",
|
|
2269
2283
|
description: "The results of the Jira issues",
|
|
@@ -2950,12 +2964,7 @@ export const jiraDataCenterGetJiraIssuesByQueryDefinition = {
|
|
|
2950
2964
|
},
|
|
2951
2965
|
output: {
|
|
2952
2966
|
type: "object",
|
|
2953
|
-
required: ["success"],
|
|
2954
2967
|
properties: {
|
|
2955
|
-
success: {
|
|
2956
|
-
type: "boolean",
|
|
2957
|
-
description: "Whether the records were successfully retrieved",
|
|
2958
|
-
},
|
|
2959
2968
|
results: {
|
|
2960
2969
|
type: "array",
|
|
2961
2970
|
description: "The results of the Jira issues",
|
|
@@ -825,14 +825,26 @@ export declare const slackGetChannelMessagesParamsSchema: z.ZodObject<{
|
|
|
825
825
|
channelId: z.ZodOptional<z.ZodString>;
|
|
826
826
|
channelName: z.ZodOptional<z.ZodString>;
|
|
827
827
|
oldest: z.ZodString;
|
|
828
|
+
latest: z.ZodOptional<z.ZodString>;
|
|
829
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
830
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
831
|
+
includeThreadReplies: z.ZodOptional<z.ZodBoolean>;
|
|
828
832
|
}, "strip", z.ZodTypeAny, {
|
|
829
833
|
oldest: string;
|
|
830
834
|
channelName?: string | undefined;
|
|
831
835
|
channelId?: string | undefined;
|
|
836
|
+
latest?: string | undefined;
|
|
837
|
+
limit?: number | undefined;
|
|
838
|
+
cursor?: string | undefined;
|
|
839
|
+
includeThreadReplies?: boolean | undefined;
|
|
832
840
|
}, {
|
|
833
841
|
oldest: string;
|
|
834
842
|
channelName?: string | undefined;
|
|
835
843
|
channelId?: string | undefined;
|
|
844
|
+
latest?: string | undefined;
|
|
845
|
+
limit?: number | undefined;
|
|
846
|
+
cursor?: string | undefined;
|
|
847
|
+
includeThreadReplies?: boolean | undefined;
|
|
836
848
|
}>;
|
|
837
849
|
export type slackGetChannelMessagesParamsType = z.infer<typeof slackGetChannelMessagesParamsSchema>;
|
|
838
850
|
export declare const slackGetChannelMessagesOutputSchema: z.ZodObject<{
|
|
@@ -849,18 +861,24 @@ export declare const slackGetChannelMessagesOutputSchema: z.ZodObject<{
|
|
|
849
861
|
user: string;
|
|
850
862
|
ts: string;
|
|
851
863
|
}>, "many">;
|
|
864
|
+
hasMore: z.ZodOptional<z.ZodBoolean>;
|
|
865
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
852
866
|
}, "strip", z.ZodTypeAny, {
|
|
853
867
|
messages: {
|
|
854
868
|
text: string;
|
|
855
869
|
user: string;
|
|
856
870
|
ts: string;
|
|
857
871
|
}[];
|
|
872
|
+
hasMore?: boolean | undefined;
|
|
873
|
+
nextCursor?: string | undefined;
|
|
858
874
|
}, {
|
|
859
875
|
messages: {
|
|
860
876
|
text: string;
|
|
861
877
|
user: string;
|
|
862
878
|
ts: string;
|
|
863
879
|
}[];
|
|
880
|
+
hasMore?: boolean | undefined;
|
|
881
|
+
nextCursor?: string | undefined;
|
|
864
882
|
}>;
|
|
865
883
|
export type slackGetChannelMessagesOutputType = z.infer<typeof slackGetChannelMessagesOutputSchema>;
|
|
866
884
|
export type slackGetChannelMessagesFunction = ActionFunction<slackGetChannelMessagesParamsType, AuthParamsType, slackGetChannelMessagesOutputType>;
|
|
@@ -872,18 +890,18 @@ export declare const slackUserSearchSlackParamsSchema: z.ZodObject<{
|
|
|
872
890
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
873
891
|
fetchAdjacentMessages: z.ZodDefault<z.ZodBoolean>;
|
|
874
892
|
}, "strip", z.ZodTypeAny, {
|
|
875
|
-
timeRange: "latest" | "today" | "yesterday" | "last_7d" | "last_30d" | "all";
|
|
876
893
|
limit: number;
|
|
894
|
+
timeRange: "latest" | "today" | "yesterday" | "last_7d" | "last_30d" | "all";
|
|
877
895
|
fetchAdjacentMessages: boolean;
|
|
878
896
|
emails?: string[] | undefined;
|
|
879
897
|
channel?: string | undefined;
|
|
880
898
|
topic?: string | undefined;
|
|
881
899
|
}, {
|
|
900
|
+
limit?: number | undefined;
|
|
882
901
|
emails?: string[] | undefined;
|
|
883
902
|
channel?: string | undefined;
|
|
884
903
|
topic?: string | undefined;
|
|
885
904
|
timeRange?: "latest" | "today" | "yesterday" | "last_7d" | "last_30d" | "all" | undefined;
|
|
886
|
-
limit?: number | undefined;
|
|
887
905
|
fetchAdjacentMessages?: boolean | undefined;
|
|
888
906
|
}>;
|
|
889
907
|
export type slackUserSearchSlackParamsType = z.infer<typeof slackUserSearchSlackParamsSchema>;
|
|
@@ -1616,7 +1634,6 @@ export declare const jiraGetJiraIssuesByQueryParamsSchema: z.ZodObject<{
|
|
|
1616
1634
|
}>;
|
|
1617
1635
|
export type jiraGetJiraIssuesByQueryParamsType = z.infer<typeof jiraGetJiraIssuesByQueryParamsSchema>;
|
|
1618
1636
|
export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
1619
|
-
success: z.ZodBoolean;
|
|
1620
1637
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1621
1638
|
name: z.ZodString;
|
|
1622
1639
|
url: z.ZodString;
|
|
@@ -1789,7 +1806,6 @@ export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
1789
1806
|
}>, "many">>;
|
|
1790
1807
|
error: z.ZodOptional<z.ZodString>;
|
|
1791
1808
|
}, "strip", z.ZodTypeAny, {
|
|
1792
|
-
success: boolean;
|
|
1793
1809
|
error?: string | undefined;
|
|
1794
1810
|
results?: {
|
|
1795
1811
|
name: string;
|
|
@@ -1824,7 +1840,6 @@ export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
1824
1840
|
};
|
|
1825
1841
|
}[] | undefined;
|
|
1826
1842
|
}, {
|
|
1827
|
-
success: boolean;
|
|
1828
1843
|
error?: string | undefined;
|
|
1829
1844
|
results?: {
|
|
1830
1845
|
name: string;
|
|
@@ -2302,7 +2317,6 @@ export declare const jiraOrgGetJiraIssuesByQueryParamsSchema: z.ZodObject<{
|
|
|
2302
2317
|
}>;
|
|
2303
2318
|
export type jiraOrgGetJiraIssuesByQueryParamsType = z.infer<typeof jiraOrgGetJiraIssuesByQueryParamsSchema>;
|
|
2304
2319
|
export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
2305
|
-
success: z.ZodBoolean;
|
|
2306
2320
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2307
2321
|
name: z.ZodString;
|
|
2308
2322
|
url: z.ZodString;
|
|
@@ -2475,7 +2489,6 @@ export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
2475
2489
|
}>, "many">>;
|
|
2476
2490
|
error: z.ZodOptional<z.ZodString>;
|
|
2477
2491
|
}, "strip", z.ZodTypeAny, {
|
|
2478
|
-
success: boolean;
|
|
2479
2492
|
error?: string | undefined;
|
|
2480
2493
|
results?: {
|
|
2481
2494
|
name: string;
|
|
@@ -2510,7 +2523,6 @@ export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
2510
2523
|
};
|
|
2511
2524
|
}[] | undefined;
|
|
2512
2525
|
}, {
|
|
2513
|
-
success: boolean;
|
|
2514
2526
|
error?: string | undefined;
|
|
2515
2527
|
results?: {
|
|
2516
2528
|
name: string;
|
|
@@ -2988,7 +3000,6 @@ export declare const jiraDataCenterGetJiraIssuesByQueryParamsSchema: z.ZodObject
|
|
|
2988
3000
|
}>;
|
|
2989
3001
|
export type jiraDataCenterGetJiraIssuesByQueryParamsType = z.infer<typeof jiraDataCenterGetJiraIssuesByQueryParamsSchema>;
|
|
2990
3002
|
export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
2991
|
-
success: z.ZodBoolean;
|
|
2992
3003
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2993
3004
|
name: z.ZodString;
|
|
2994
3005
|
url: z.ZodString;
|
|
@@ -3161,7 +3172,6 @@ export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject
|
|
|
3161
3172
|
}>, "many">>;
|
|
3162
3173
|
error: z.ZodOptional<z.ZodString>;
|
|
3163
3174
|
}, "strip", z.ZodTypeAny, {
|
|
3164
|
-
success: boolean;
|
|
3165
3175
|
error?: string | undefined;
|
|
3166
3176
|
results?: {
|
|
3167
3177
|
name: string;
|
|
@@ -3196,7 +3206,6 @@ export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject
|
|
|
3196
3206
|
};
|
|
3197
3207
|
}[] | undefined;
|
|
3198
3208
|
}, {
|
|
3199
|
-
success: boolean;
|
|
3200
3209
|
error?: string | undefined;
|
|
3201
3210
|
results?: {
|
|
3202
3211
|
name: string;
|
|
@@ -10348,6 +10357,7 @@ export declare const githubListCommitsOutputSchema: z.ZodObject<{
|
|
|
10348
10357
|
}, "strip", z.ZodTypeAny, {
|
|
10349
10358
|
success: boolean;
|
|
10350
10359
|
error?: string | undefined;
|
|
10360
|
+
hasMore?: boolean | undefined;
|
|
10351
10361
|
commits?: {
|
|
10352
10362
|
url: string;
|
|
10353
10363
|
sha: string;
|
|
@@ -10380,10 +10390,10 @@ export declare const githubListCommitsOutputSchema: z.ZodObject<{
|
|
|
10380
10390
|
}[] | undefined;
|
|
10381
10391
|
}[] | undefined;
|
|
10382
10392
|
totalCount?: number | undefined;
|
|
10383
|
-
hasMore?: boolean | undefined;
|
|
10384
10393
|
}, {
|
|
10385
10394
|
success: boolean;
|
|
10386
10395
|
error?: string | undefined;
|
|
10396
|
+
hasMore?: boolean | undefined;
|
|
10387
10397
|
commits?: {
|
|
10388
10398
|
url: string;
|
|
10389
10399
|
sha: string;
|
|
@@ -10416,7 +10426,6 @@ export declare const githubListCommitsOutputSchema: z.ZodObject<{
|
|
|
10416
10426
|
}[] | undefined;
|
|
10417
10427
|
}[] | undefined;
|
|
10418
10428
|
totalCount?: number | undefined;
|
|
10419
|
-
hasMore?: boolean | undefined;
|
|
10420
10429
|
}>;
|
|
10421
10430
|
export type githubListCommitsOutputType = z.infer<typeof githubListCommitsOutputSchema>;
|
|
10422
10431
|
export type githubListCommitsFunction = ActionFunction<githubListCommitsParamsType, AuthParamsType, githubListCommitsOutputType>;
|
|
@@ -266,6 +266,22 @@ export const slackGetChannelMessagesParamsSchema = z.object({
|
|
|
266
266
|
.describe("Name of the channel to summarize. Either the channelId or channelName must be provided.")
|
|
267
267
|
.optional(),
|
|
268
268
|
oldest: z.string().describe("Only messages after this Unix timestamp will be included in results"),
|
|
269
|
+
latest: z
|
|
270
|
+
.string()
|
|
271
|
+
.describe("Only messages before this Unix timestamp will be included. Default is the current time. Use with oldest to create a time range.")
|
|
272
|
+
.optional(),
|
|
273
|
+
limit: z
|
|
274
|
+
.number()
|
|
275
|
+
.describe("Maximum number of messages to return (1-999). Default is 100. Slack recommends no more than 200 results at a time for performance.")
|
|
276
|
+
.optional(),
|
|
277
|
+
cursor: z
|
|
278
|
+
.string()
|
|
279
|
+
.describe("Pagination cursor from a previous response's next_cursor value. Use to navigate through large result sets.")
|
|
280
|
+
.optional(),
|
|
281
|
+
includeThreadReplies: z
|
|
282
|
+
.boolean()
|
|
283
|
+
.describe("If true, includes all replies for messages that are part of a thread. Default is false.")
|
|
284
|
+
.optional(),
|
|
269
285
|
});
|
|
270
286
|
export const slackGetChannelMessagesOutputSchema = z.object({
|
|
271
287
|
messages: z
|
|
@@ -277,6 +293,14 @@ export const slackGetChannelMessagesOutputSchema = z.object({
|
|
|
277
293
|
})
|
|
278
294
|
.describe("A message in the channel"))
|
|
279
295
|
.describe("The messages in the channel"),
|
|
296
|
+
hasMore: z
|
|
297
|
+
.boolean()
|
|
298
|
+
.describe("Indicates if there are more messages available beyond the current result set")
|
|
299
|
+
.optional(),
|
|
300
|
+
nextCursor: z
|
|
301
|
+
.string()
|
|
302
|
+
.describe("Cursor to use for fetching the next page of results. Only present when hasMore is true.")
|
|
303
|
+
.optional(),
|
|
280
304
|
});
|
|
281
305
|
export const slackUserSearchSlackParamsSchema = z.object({
|
|
282
306
|
emails: z
|
|
@@ -532,7 +556,6 @@ export const jiraGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
532
556
|
limit: z.number().describe("The maximum number of records to retrieve").optional(),
|
|
533
557
|
});
|
|
534
558
|
export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
535
|
-
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
536
559
|
results: z
|
|
537
560
|
.array(z.object({
|
|
538
561
|
name: z.string().describe("The name of the result"),
|
|
@@ -725,7 +748,6 @@ export const jiraOrgGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
725
748
|
limit: z.number().describe("The maximum number of records to retrieve").optional(),
|
|
726
749
|
});
|
|
727
750
|
export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
728
|
-
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
729
751
|
results: z
|
|
730
752
|
.array(z.object({
|
|
731
753
|
name: z.string().describe("The name of the result"),
|
|
@@ -918,7 +940,6 @@ export const jiraDataCenterGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
918
940
|
limit: z.number().describe("The maximum number of records to retrieve").optional(),
|
|
919
941
|
});
|
|
920
942
|
export const jiraDataCenterGetJiraIssuesByQueryOutputSchema = z.object({
|
|
921
|
-
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
922
943
|
results: z
|
|
923
944
|
.array(z.object({
|
|
924
945
|
name: z.string().describe("The name of the result"),
|
package/dist/actions/groups.js
CHANGED
|
@@ -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, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, 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,
|
|
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, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, 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, googleOauthGetDriveFileContentByIdDefinition, googleOauthSearchDriveByQueryDefinition, googleOauthSearchDriveByQueryAndGetFileContentDefinition, githubGetFileContentDefinition, githubListDirectoryDefinition, } from "./autogen/templates.js";
|
|
2
2
|
export const ACTION_GROUPS = {
|
|
3
3
|
GENERIC: {
|
|
4
4
|
description: "Generic utility actions",
|
|
@@ -248,14 +248,4 @@ export const ACTION_GROUPS = {
|
|
|
248
248
|
oktaTriggerOktaWorkflowDefinition,
|
|
249
249
|
],
|
|
250
250
|
},
|
|
251
|
-
LINEAR: {
|
|
252
|
-
description: "Actions for interacting with Linear",
|
|
253
|
-
actions: [
|
|
254
|
-
linearGetIssueDetailsDefinition,
|
|
255
|
-
linearGetProjectsDefinition,
|
|
256
|
-
linearGetProjectDetailsDefinition,
|
|
257
|
-
linearGetTeamDetailsDefinition,
|
|
258
|
-
linearGetTeamsDefinition,
|
|
259
|
-
],
|
|
260
|
-
},
|
|
261
251
|
};
|
|
@@ -0,0 +1,131 @@
|
|
|
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 { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
|
11
|
+
// Limits on the number of results to return
|
|
12
|
+
const MAX_CODE_RESULTS = 15;
|
|
13
|
+
const MAX_COMMITS = 10;
|
|
14
|
+
const MAX_FILES_PER_COMMIT = 5;
|
|
15
|
+
const MAX_ISSUES_OR_PRS = 10;
|
|
16
|
+
const MAX_FILES_PER_PR = 5;
|
|
17
|
+
const MAX_PATCH_LINES = 20;
|
|
18
|
+
const MAX_FRAGMENT_LINES = 20;
|
|
19
|
+
const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
20
|
+
const { Octokit } = yield import("octokit");
|
|
21
|
+
if (!authParams.authToken) {
|
|
22
|
+
throw new Error(MISSING_AUTH_TOKEN);
|
|
23
|
+
}
|
|
24
|
+
const octokit = new Octokit({ auth: authParams.authToken });
|
|
25
|
+
const { organization, repository, query } = params;
|
|
26
|
+
// Search CODE with text match metadata
|
|
27
|
+
const codeResultsResponse = yield octokit.rest.search.code({
|
|
28
|
+
q: `${query} in:file,path repo:${organization}/${repository}`,
|
|
29
|
+
text_match: true,
|
|
30
|
+
headers: {
|
|
31
|
+
accept: "application/vnd.github.v3.text-match+json",
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
const codeResults = codeResultsResponse.data.items.slice(0, MAX_CODE_RESULTS).map(item => ({
|
|
35
|
+
name: item.name,
|
|
36
|
+
path: item.path,
|
|
37
|
+
sha: item.sha,
|
|
38
|
+
url: item.url,
|
|
39
|
+
repository: {
|
|
40
|
+
full_name: item.repository.full_name,
|
|
41
|
+
html_url: item.repository.html_url,
|
|
42
|
+
},
|
|
43
|
+
score: item.score,
|
|
44
|
+
textMatches: item.text_matches
|
|
45
|
+
? item.text_matches.map(match => {
|
|
46
|
+
var _a, _b, _c, _d;
|
|
47
|
+
return ({
|
|
48
|
+
object_url: (_a = match.object_url) !== null && _a !== void 0 ? _a : undefined,
|
|
49
|
+
object_type: (_b = match.object_type) !== null && _b !== void 0 ? _b : undefined,
|
|
50
|
+
fragment: (_c = match.fragment) === null || _c === void 0 ? void 0 : _c.split("\n").slice(0, MAX_FRAGMENT_LINES).join("\n"),
|
|
51
|
+
matches: (_d = match.matches) !== null && _d !== void 0 ? _d : [],
|
|
52
|
+
});
|
|
53
|
+
})
|
|
54
|
+
: [],
|
|
55
|
+
}));
|
|
56
|
+
// Search COMMITS
|
|
57
|
+
const commitResults = yield octokit.rest.search.commits({
|
|
58
|
+
q: `${query} repo:${organization}/${repository}`,
|
|
59
|
+
headers: {
|
|
60
|
+
accept: "application/vnd.github.cloak-preview+json",
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
const commitSHAs = commitResults.data.items.slice(0, MAX_COMMITS).map(item => item.sha);
|
|
64
|
+
const commitDetails = yield Promise.all(commitSHAs.map(sha => octokit.rest.repos.getCommit({ owner: organization, repo: repository, ref: sha })));
|
|
65
|
+
const enrichedCommits = commitResults.data.items.slice(0, MAX_COMMITS).map(item => {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
const full = commitDetails.find(c => c.data.sha === item.sha);
|
|
68
|
+
return {
|
|
69
|
+
sha: item.sha,
|
|
70
|
+
url: item.url,
|
|
71
|
+
commit: {
|
|
72
|
+
message: item.commit.message,
|
|
73
|
+
author: item.commit.author,
|
|
74
|
+
},
|
|
75
|
+
score: item.score,
|
|
76
|
+
author: (_a = item.author) !== null && _a !== void 0 ? _a : undefined,
|
|
77
|
+
files: ((_b = full === null || full === void 0 ? void 0 : full.data.files) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_FILES_PER_COMMIT).map(f => {
|
|
78
|
+
var _a;
|
|
79
|
+
return ({
|
|
80
|
+
filename: f.filename,
|
|
81
|
+
status: f.status,
|
|
82
|
+
patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
|
|
83
|
+
});
|
|
84
|
+
})) || [],
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
// Search ISSUES & PRs
|
|
88
|
+
const issueResults = yield octokit.rest.search.issuesAndPullRequests({
|
|
89
|
+
q: `${query} repo:${organization}/${repository}`,
|
|
90
|
+
});
|
|
91
|
+
const prItems = issueResults.data.items.filter(item => item.pull_request).slice(0, MAX_ISSUES_OR_PRS);
|
|
92
|
+
const prNumbers = prItems.map(item => item.number);
|
|
93
|
+
const prFiles = yield Promise.all(prNumbers.map(number => octokit.rest.pulls.listFiles({ owner: organization, repo: repository, pull_number: number })));
|
|
94
|
+
const issuesAndPRs = issueResults.data.items
|
|
95
|
+
.slice(0, MAX_ISSUES_OR_PRS)
|
|
96
|
+
.map(item => {
|
|
97
|
+
var _a, _b, _c, _d;
|
|
98
|
+
const isPR = !!item.pull_request;
|
|
99
|
+
const prIndex = prNumbers.indexOf(item.number);
|
|
100
|
+
const files = isPR && prIndex !== -1
|
|
101
|
+
? prFiles[prIndex].data.slice(0, MAX_FILES_PER_PR).map(f => {
|
|
102
|
+
var _a;
|
|
103
|
+
return ({
|
|
104
|
+
filename: f.filename,
|
|
105
|
+
status: f.status,
|
|
106
|
+
patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
|
|
107
|
+
});
|
|
108
|
+
})
|
|
109
|
+
: undefined;
|
|
110
|
+
return {
|
|
111
|
+
number: item.number,
|
|
112
|
+
title: item.title,
|
|
113
|
+
html_url: item.html_url,
|
|
114
|
+
state: item.state,
|
|
115
|
+
isPullRequest: isPR,
|
|
116
|
+
body: item.body,
|
|
117
|
+
user: {
|
|
118
|
+
email: (_b = (_a = item.user) === null || _a === void 0 ? void 0 : _a.email) !== null && _b !== void 0 ? _b : undefined,
|
|
119
|
+
name: (_d = (_c = item.user) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : undefined,
|
|
120
|
+
},
|
|
121
|
+
score: item.score,
|
|
122
|
+
files,
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
return {
|
|
126
|
+
code: codeResults,
|
|
127
|
+
commits: enrichedCommits,
|
|
128
|
+
issuesAndPullRequests: issuesAndPRs,
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
export default searchRepository;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
|
11
|
+
// Limits on the number of results to return
|
|
12
|
+
const MAX_CODE_RESULTS = 15;
|
|
13
|
+
const MAX_COMMITS = 10;
|
|
14
|
+
const MAX_FILES_PER_COMMIT = 5;
|
|
15
|
+
const MAX_ISSUES_OR_PRS = 10;
|
|
16
|
+
const MAX_FILES_PER_PR = 5;
|
|
17
|
+
const MAX_PATCH_LINES = 20;
|
|
18
|
+
const MAX_FRAGMENT_LINES = 20;
|
|
19
|
+
const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
20
|
+
const { Octokit } = yield import("octokit");
|
|
21
|
+
if (!authParams.authToken) {
|
|
22
|
+
throw new Error(MISSING_AUTH_TOKEN);
|
|
23
|
+
}
|
|
24
|
+
const octokit = new Octokit({ auth: authParams.authToken });
|
|
25
|
+
const { organization, repository, query } = params;
|
|
26
|
+
// Search CODE with text match metadata
|
|
27
|
+
const codeResultsResponse = yield octokit.rest.search.code({
|
|
28
|
+
q: `${query} in:file,path repo:${organization}/${repository}`,
|
|
29
|
+
text_match: true,
|
|
30
|
+
headers: {
|
|
31
|
+
accept: "application/vnd.github.v3.text-match+json",
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
const commitResults = yield octokit.rest.repos.getCommit({ owner: organization, repo: repository, ref: sha });
|
|
35
|
+
return {
|
|
36
|
+
code: codeResults,
|
|
37
|
+
commits: enrichedCommits,
|
|
38
|
+
issuesAndPullRequests: issuesAndPRs,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
export default searchRepository;
|