@credal/actions 0.2.155 → 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 +0 -15
- package/dist/actions/autogen/types.d.ts +0 -9
- package/dist/actions/autogen/types.js +0 -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/package.json +1 -1
- 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,
|
|
@@ -1590,12 +1590,7 @@ export const jiraGetJiraIssuesByQueryDefinition = {
|
|
|
1590
1590
|
},
|
|
1591
1591
|
output: {
|
|
1592
1592
|
type: "object",
|
|
1593
|
-
required: ["success"],
|
|
1594
1593
|
properties: {
|
|
1595
|
-
success: {
|
|
1596
|
-
type: "boolean",
|
|
1597
|
-
description: "Whether the records were successfully retrieved",
|
|
1598
|
-
},
|
|
1599
1594
|
results: {
|
|
1600
1595
|
type: "array",
|
|
1601
1596
|
description: "The results of the Jira issues",
|
|
@@ -2282,12 +2277,7 @@ export const jiraOrgGetJiraIssuesByQueryDefinition = {
|
|
|
2282
2277
|
},
|
|
2283
2278
|
output: {
|
|
2284
2279
|
type: "object",
|
|
2285
|
-
required: ["success"],
|
|
2286
2280
|
properties: {
|
|
2287
|
-
success: {
|
|
2288
|
-
type: "boolean",
|
|
2289
|
-
description: "Whether the records were successfully retrieved",
|
|
2290
|
-
},
|
|
2291
2281
|
results: {
|
|
2292
2282
|
type: "array",
|
|
2293
2283
|
description: "The results of the Jira issues",
|
|
@@ -2974,12 +2964,7 @@ export const jiraDataCenterGetJiraIssuesByQueryDefinition = {
|
|
|
2974
2964
|
},
|
|
2975
2965
|
output: {
|
|
2976
2966
|
type: "object",
|
|
2977
|
-
required: ["success"],
|
|
2978
2967
|
properties: {
|
|
2979
|
-
success: {
|
|
2980
|
-
type: "boolean",
|
|
2981
|
-
description: "Whether the records were successfully retrieved",
|
|
2982
|
-
},
|
|
2983
2968
|
results: {
|
|
2984
2969
|
type: "array",
|
|
2985
2970
|
description: "The results of the Jira issues",
|
|
@@ -1634,7 +1634,6 @@ export declare const jiraGetJiraIssuesByQueryParamsSchema: z.ZodObject<{
|
|
|
1634
1634
|
}>;
|
|
1635
1635
|
export type jiraGetJiraIssuesByQueryParamsType = z.infer<typeof jiraGetJiraIssuesByQueryParamsSchema>;
|
|
1636
1636
|
export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
1637
|
-
success: z.ZodBoolean;
|
|
1638
1637
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1639
1638
|
name: z.ZodString;
|
|
1640
1639
|
url: z.ZodString;
|
|
@@ -1807,7 +1806,6 @@ export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
1807
1806
|
}>, "many">>;
|
|
1808
1807
|
error: z.ZodOptional<z.ZodString>;
|
|
1809
1808
|
}, "strip", z.ZodTypeAny, {
|
|
1810
|
-
success: boolean;
|
|
1811
1809
|
error?: string | undefined;
|
|
1812
1810
|
results?: {
|
|
1813
1811
|
name: string;
|
|
@@ -1842,7 +1840,6 @@ export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
1842
1840
|
};
|
|
1843
1841
|
}[] | undefined;
|
|
1844
1842
|
}, {
|
|
1845
|
-
success: boolean;
|
|
1846
1843
|
error?: string | undefined;
|
|
1847
1844
|
results?: {
|
|
1848
1845
|
name: string;
|
|
@@ -2320,7 +2317,6 @@ export declare const jiraOrgGetJiraIssuesByQueryParamsSchema: z.ZodObject<{
|
|
|
2320
2317
|
}>;
|
|
2321
2318
|
export type jiraOrgGetJiraIssuesByQueryParamsType = z.infer<typeof jiraOrgGetJiraIssuesByQueryParamsSchema>;
|
|
2322
2319
|
export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
2323
|
-
success: z.ZodBoolean;
|
|
2324
2320
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2325
2321
|
name: z.ZodString;
|
|
2326
2322
|
url: z.ZodString;
|
|
@@ -2493,7 +2489,6 @@ export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
2493
2489
|
}>, "many">>;
|
|
2494
2490
|
error: z.ZodOptional<z.ZodString>;
|
|
2495
2491
|
}, "strip", z.ZodTypeAny, {
|
|
2496
|
-
success: boolean;
|
|
2497
2492
|
error?: string | undefined;
|
|
2498
2493
|
results?: {
|
|
2499
2494
|
name: string;
|
|
@@ -2528,7 +2523,6 @@ export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
2528
2523
|
};
|
|
2529
2524
|
}[] | undefined;
|
|
2530
2525
|
}, {
|
|
2531
|
-
success: boolean;
|
|
2532
2526
|
error?: string | undefined;
|
|
2533
2527
|
results?: {
|
|
2534
2528
|
name: string;
|
|
@@ -3006,7 +3000,6 @@ export declare const jiraDataCenterGetJiraIssuesByQueryParamsSchema: z.ZodObject
|
|
|
3006
3000
|
}>;
|
|
3007
3001
|
export type jiraDataCenterGetJiraIssuesByQueryParamsType = z.infer<typeof jiraDataCenterGetJiraIssuesByQueryParamsSchema>;
|
|
3008
3002
|
export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
3009
|
-
success: z.ZodBoolean;
|
|
3010
3003
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3011
3004
|
name: z.ZodString;
|
|
3012
3005
|
url: z.ZodString;
|
|
@@ -3179,7 +3172,6 @@ export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject
|
|
|
3179
3172
|
}>, "many">>;
|
|
3180
3173
|
error: z.ZodOptional<z.ZodString>;
|
|
3181
3174
|
}, "strip", z.ZodTypeAny, {
|
|
3182
|
-
success: boolean;
|
|
3183
3175
|
error?: string | undefined;
|
|
3184
3176
|
results?: {
|
|
3185
3177
|
name: string;
|
|
@@ -3214,7 +3206,6 @@ export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject
|
|
|
3214
3206
|
};
|
|
3215
3207
|
}[] | undefined;
|
|
3216
3208
|
}, {
|
|
3217
|
-
success: boolean;
|
|
3218
3209
|
error?: string | undefined;
|
|
3219
3210
|
results?: {
|
|
3220
3211
|
name: string;
|
|
@@ -556,7 +556,6 @@ export const jiraGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
556
556
|
limit: z.number().describe("The maximum number of records to retrieve").optional(),
|
|
557
557
|
});
|
|
558
558
|
export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
559
|
-
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
560
559
|
results: z
|
|
561
560
|
.array(z.object({
|
|
562
561
|
name: z.string().describe("The name of the result"),
|
|
@@ -749,7 +748,6 @@ export const jiraOrgGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
749
748
|
limit: z.number().describe("The maximum number of records to retrieve").optional(),
|
|
750
749
|
});
|
|
751
750
|
export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
752
|
-
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
753
751
|
results: z
|
|
754
752
|
.array(z.object({
|
|
755
753
|
name: z.string().describe("The name of the result"),
|
|
@@ -942,7 +940,6 @@ export const jiraDataCenterGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
942
940
|
limit: z.number().describe("The maximum number of records to retrieve").optional(),
|
|
943
941
|
});
|
|
944
942
|
export const jiraDataCenterGetJiraIssuesByQueryOutputSchema = z.object({
|
|
945
|
-
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
946
943
|
results: z
|
|
947
944
|
.array(z.object({
|
|
948
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;
|
|
@@ -10,6 +10,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { axiosClient } from "../../util/axiosClient.js";
|
|
11
11
|
import { getJiraApiConfig, getErrorMessage } from "./utils.js";
|
|
12
12
|
const DEFAULT_LIMIT = 100;
|
|
13
|
+
function extractPlainText(adf) {
|
|
14
|
+
if (!adf || adf.type !== "doc" || !Array.isArray(adf.content))
|
|
15
|
+
return "";
|
|
16
|
+
return adf.content
|
|
17
|
+
.map(block => {
|
|
18
|
+
if (block.type === "paragraph" && Array.isArray(block.content)) {
|
|
19
|
+
return block.content.map(inline => { var _a; return (_a = inline.text) !== null && _a !== void 0 ? _a : ""; }).join("");
|
|
20
|
+
}
|
|
21
|
+
return "";
|
|
22
|
+
})
|
|
23
|
+
.join("\n")
|
|
24
|
+
.trim();
|
|
25
|
+
}
|
|
13
26
|
const getJiraIssuesByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
14
27
|
const { authToken } = authParams;
|
|
15
28
|
const { query, limit } = params;
|
|
@@ -17,9 +30,6 @@ const getJiraIssuesByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* (
|
|
|
17
30
|
if (!authToken) {
|
|
18
31
|
throw new Error("Auth token is required");
|
|
19
32
|
}
|
|
20
|
-
const queryParams = new URLSearchParams();
|
|
21
|
-
queryParams.set("jql", query);
|
|
22
|
-
queryParams.set("maxResults", String(limit != undefined && limit <= DEFAULT_LIMIT ? limit : DEFAULT_LIMIT));
|
|
23
33
|
const fields = [
|
|
24
34
|
"key",
|
|
25
35
|
"id",
|
|
@@ -39,19 +49,37 @@ const getJiraIssuesByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* (
|
|
|
39
49
|
"timespent",
|
|
40
50
|
"aggregatetimeoriginalestimate",
|
|
41
51
|
];
|
|
42
|
-
queryParams.set("fields", fields.join(","));
|
|
43
52
|
const searchEndpoint = strategy.getSearchEndpoint();
|
|
44
|
-
const
|
|
53
|
+
const requestedLimit = limit !== null && limit !== void 0 ? limit : DEFAULT_LIMIT;
|
|
54
|
+
const allIssues = [];
|
|
55
|
+
let startAt = 0;
|
|
45
56
|
try {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
// Keep fetching pages until we have all requested issues
|
|
58
|
+
while (allIssues.length < requestedLimit) {
|
|
59
|
+
// Calculate how many results to fetch in this request
|
|
60
|
+
const remainingIssues = requestedLimit - allIssues.length;
|
|
61
|
+
const maxResults = Math.min(remainingIssues, DEFAULT_LIMIT);
|
|
62
|
+
const queryParams = new URLSearchParams();
|
|
63
|
+
queryParams.set("jql", query);
|
|
64
|
+
queryParams.set("maxResults", String(maxResults));
|
|
65
|
+
queryParams.set("startAt", String(startAt));
|
|
66
|
+
queryParams.set("fields", fields.join(","));
|
|
67
|
+
const fullApiUrl = `${apiUrl}${searchEndpoint}?${queryParams.toString()}`;
|
|
68
|
+
const response = yield axiosClient.get(fullApiUrl, {
|
|
69
|
+
headers: {
|
|
70
|
+
Authorization: `Bearer ${authToken}`,
|
|
71
|
+
Accept: "application/json",
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
const { issues, total } = response.data;
|
|
75
|
+
allIssues.push(...issues);
|
|
76
|
+
if (allIssues.length >= total || issues.length === 0) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
startAt += issues.length;
|
|
80
|
+
}
|
|
52
81
|
return {
|
|
53
|
-
|
|
54
|
-
results: response.data.issues.map(issue => {
|
|
82
|
+
results: allIssues.map(issue => {
|
|
55
83
|
const { id, key, fields } = issue;
|
|
56
84
|
const { summary, description, project, issuetype, status, assignee, reporter, creator, created, updated, resolution, duedate, } = fields;
|
|
57
85
|
const ticketUrl = `${browseUrl}/browse/${key}`;
|
|
@@ -93,22 +121,9 @@ const getJiraIssuesByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* (
|
|
|
93
121
|
catch (error) {
|
|
94
122
|
console.error("Error retrieving Jira issues:", error);
|
|
95
123
|
return {
|
|
96
|
-
|
|
124
|
+
results: [],
|
|
97
125
|
error: getErrorMessage(error),
|
|
98
126
|
};
|
|
99
127
|
}
|
|
100
128
|
});
|
|
101
|
-
function extractPlainText(adf) {
|
|
102
|
-
if (!adf || adf.type !== "doc" || !Array.isArray(adf.content))
|
|
103
|
-
return "";
|
|
104
|
-
return adf.content
|
|
105
|
-
.map(block => {
|
|
106
|
-
if (block.type === "paragraph" && Array.isArray(block.content)) {
|
|
107
|
-
return block.content.map(inline => { var _a; return (_a = inline.text) !== null && _a !== void 0 ? _a : ""; }).join("");
|
|
108
|
-
}
|
|
109
|
-
return "";
|
|
110
|
-
})
|
|
111
|
-
.join("\n")
|
|
112
|
-
.trim();
|
|
113
|
-
}
|
|
114
129
|
export default getJiraIssuesByQuery;
|
package/package.json
CHANGED
|
@@ -1,46 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const axiosClient_1 = require("../../util/axiosClient");
|
|
13
|
-
function getConfluenceRequestConfig(baseUrl, username, apiToken) {
|
|
14
|
-
return {
|
|
15
|
-
baseURL: baseUrl,
|
|
16
|
-
headers: {
|
|
17
|
-
Accept: "application/json",
|
|
18
|
-
Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
23
|
-
const { pageId, content, title } = params;
|
|
24
|
-
const { baseUrl, authToken, username } = authParams;
|
|
25
|
-
if (!baseUrl || !authToken || !username) {
|
|
26
|
-
throw new Error("Missing required authentication information");
|
|
27
|
-
}
|
|
28
|
-
const config = getConfluenceRequestConfig(baseUrl, username, authToken);
|
|
29
|
-
// Get current version number
|
|
30
|
-
const response = yield axiosClient_1.axiosClient.get(`/api/v2/pages/${pageId}`, config);
|
|
31
|
-
const currVersion = response.data.version.number;
|
|
32
|
-
const payload = {
|
|
33
|
-
id: pageId,
|
|
34
|
-
status: "current",
|
|
35
|
-
title,
|
|
36
|
-
body: {
|
|
37
|
-
representation: "storage",
|
|
38
|
-
value: content,
|
|
39
|
-
},
|
|
40
|
-
version: {
|
|
41
|
-
number: currVersion + 1,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
|
|
45
|
-
});
|
|
46
|
-
exports.default = confluenceUpdatePage;
|
|
@@ -1,36 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const sdk_1 = require("@credal/sdk");
|
|
13
|
-
const callCopilot = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
14
|
-
var _b;
|
|
15
|
-
const requestBody = {
|
|
16
|
-
agentId: params.agentId,
|
|
17
|
-
query: params.query,
|
|
18
|
-
userEmail: params.userEmail,
|
|
19
|
-
};
|
|
20
|
-
const baseUrl = (_b = authParams.baseUrl) !== null && _b !== void 0 ? _b : "https://app.credal.ai/api";
|
|
21
|
-
const client = new sdk_1.CredalClient({ environment: baseUrl, apiKey: authParams.apiKey });
|
|
22
|
-
const response = yield client.copilots.sendMessage({
|
|
23
|
-
agentId: requestBody.agentId,
|
|
24
|
-
message: requestBody.query,
|
|
25
|
-
userEmail: requestBody.userEmail,
|
|
26
|
-
});
|
|
27
|
-
return {
|
|
28
|
-
response: response.sendChatResult.type === "ai_response_result"
|
|
29
|
-
? response.sendChatResult.response.message
|
|
30
|
-
: "Error getting response",
|
|
31
|
-
referencedSources: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.referencedSources : [],
|
|
32
|
-
sourcesInDataContext: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.sourcesInDataContext : [],
|
|
33
|
-
webSearchResults: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.webSearchResults : [],
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
exports.default = callCopilot;
|
|
@@ -1,18 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const fillTemplateAction = (_a) => __awaiter(void 0, [_a], void 0, function* ({ template }) {
|
|
13
|
-
// Simply return the template without any modification
|
|
14
|
-
return {
|
|
15
|
-
result: template,
|
|
16
|
-
};
|
|
17
|
-
});
|
|
18
|
-
exports.default = fillTemplateAction;
|