@credal/actions 0.2.151 → 0.2.153

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.
@@ -10823,32 +10823,47 @@ export const salesforceSearchAllSalesforceRecordsDefinition = {
10823
10823
  type: "boolean",
10824
10824
  description: "Whether the records were successfully retrieved",
10825
10825
  },
10826
- searchRecords: {
10826
+ results: {
10827
10827
  type: "array",
10828
10828
  description: "The records that match the search",
10829
10829
  items: {
10830
10830
  type: "object",
10831
10831
  description: "A record from Salesforce",
10832
10832
  properties: {
10833
- id: {
10833
+ name: {
10834
10834
  type: "string",
10835
- description: "The Salesforce record ID",
10835
+ description: "The name of the record",
10836
10836
  },
10837
- attributes: {
10837
+ url: {
10838
+ type: "string",
10839
+ description: "The URL of the record",
10840
+ },
10841
+ contents: {
10838
10842
  type: "object",
10839
- description: "Metadata about the Salesforce record",
10843
+ description: "The contents of the record",
10844
+ additionalProperties: true,
10840
10845
  properties: {
10841
- type: {
10846
+ id: {
10842
10847
  type: "string",
10843
- description: "The Salesforce object type",
10848
+ description: "The Salesforce record ID",
10844
10849
  },
10845
- url: {
10846
- type: "string",
10847
- description: "The Salesforce record URL",
10850
+ attributes: {
10851
+ type: "object",
10852
+ description: "Metadata about the Salesforce record",
10853
+ properties: {
10854
+ type: {
10855
+ type: "string",
10856
+ description: "The Salesforce object type",
10857
+ },
10858
+ url: {
10859
+ type: "string",
10860
+ description: "The Salesforce record URL",
10861
+ },
10862
+ },
10863
+ required: ["type", "url"],
10864
+ additionalProperties: true,
10848
10865
  },
10849
10866
  },
10850
- required: ["type", "url"],
10851
- additionalProperties: true,
10852
10867
  },
10853
10868
  },
10854
10869
  },
@@ -10920,6 +10935,7 @@ export const salesforceSearchSalesforceRecordsDefinition = {
10920
10935
  contents: {
10921
10936
  type: "object",
10922
10937
  description: "The contents of the record",
10938
+ additionalProperties: true,
10923
10939
  properties: {
10924
10940
  id: {
10925
10941
  type: "string",
@@ -7909,51 +7909,119 @@ export declare const salesforceSearchAllSalesforceRecordsParamsSchema: z.ZodObje
7909
7909
  export type salesforceSearchAllSalesforceRecordsParamsType = z.infer<typeof salesforceSearchAllSalesforceRecordsParamsSchema>;
7910
7910
  export declare const salesforceSearchAllSalesforceRecordsOutputSchema: z.ZodObject<{
7911
7911
  success: z.ZodBoolean;
7912
- searchRecords: z.ZodOptional<z.ZodArray<z.ZodObject<{
7913
- id: z.ZodOptional<z.ZodString>;
7914
- attributes: z.ZodOptional<z.ZodObject<{
7915
- type: z.ZodString;
7916
- url: z.ZodString;
7912
+ results: z.ZodOptional<z.ZodArray<z.ZodObject<{
7913
+ name: z.ZodOptional<z.ZodString>;
7914
+ url: z.ZodOptional<z.ZodString>;
7915
+ contents: z.ZodOptional<z.ZodObject<{
7916
+ id: z.ZodOptional<z.ZodString>;
7917
+ attributes: z.ZodOptional<z.ZodObject<{
7918
+ type: z.ZodString;
7919
+ url: z.ZodString;
7920
+ }, "strip", z.ZodAny, z.objectOutputType<{
7921
+ type: z.ZodString;
7922
+ url: z.ZodString;
7923
+ }, z.ZodAny, "strip">, z.objectInputType<{
7924
+ type: z.ZodString;
7925
+ url: z.ZodString;
7926
+ }, z.ZodAny, "strip">>>;
7917
7927
  }, "strip", z.ZodAny, z.objectOutputType<{
7918
- type: z.ZodString;
7919
- url: z.ZodString;
7928
+ id: z.ZodOptional<z.ZodString>;
7929
+ attributes: z.ZodOptional<z.ZodObject<{
7930
+ type: z.ZodString;
7931
+ url: z.ZodString;
7932
+ }, "strip", z.ZodAny, z.objectOutputType<{
7933
+ type: z.ZodString;
7934
+ url: z.ZodString;
7935
+ }, z.ZodAny, "strip">, z.objectInputType<{
7936
+ type: z.ZodString;
7937
+ url: z.ZodString;
7938
+ }, z.ZodAny, "strip">>>;
7920
7939
  }, z.ZodAny, "strip">, z.objectInputType<{
7921
- type: z.ZodString;
7922
- url: z.ZodString;
7940
+ id: z.ZodOptional<z.ZodString>;
7941
+ attributes: z.ZodOptional<z.ZodObject<{
7942
+ type: z.ZodString;
7943
+ url: z.ZodString;
7944
+ }, "strip", z.ZodAny, z.objectOutputType<{
7945
+ type: z.ZodString;
7946
+ url: z.ZodString;
7947
+ }, z.ZodAny, "strip">, z.objectInputType<{
7948
+ type: z.ZodString;
7949
+ url: z.ZodString;
7950
+ }, z.ZodAny, "strip">>>;
7923
7951
  }, z.ZodAny, "strip">>>;
7924
7952
  }, "strip", z.ZodTypeAny, {
7925
- attributes?: z.objectOutputType<{
7926
- type: z.ZodString;
7927
- url: z.ZodString;
7953
+ name?: string | undefined;
7954
+ url?: string | undefined;
7955
+ contents?: z.objectOutputType<{
7956
+ id: z.ZodOptional<z.ZodString>;
7957
+ attributes: z.ZodOptional<z.ZodObject<{
7958
+ type: z.ZodString;
7959
+ url: z.ZodString;
7960
+ }, "strip", z.ZodAny, z.objectOutputType<{
7961
+ type: z.ZodString;
7962
+ url: z.ZodString;
7963
+ }, z.ZodAny, "strip">, z.objectInputType<{
7964
+ type: z.ZodString;
7965
+ url: z.ZodString;
7966
+ }, z.ZodAny, "strip">>>;
7928
7967
  }, z.ZodAny, "strip"> | undefined;
7929
- id?: string | undefined;
7930
7968
  }, {
7931
- attributes?: z.objectInputType<{
7932
- type: z.ZodString;
7933
- url: z.ZodString;
7969
+ name?: string | undefined;
7970
+ url?: string | undefined;
7971
+ contents?: z.objectInputType<{
7972
+ id: z.ZodOptional<z.ZodString>;
7973
+ attributes: z.ZodOptional<z.ZodObject<{
7974
+ type: z.ZodString;
7975
+ url: z.ZodString;
7976
+ }, "strip", z.ZodAny, z.objectOutputType<{
7977
+ type: z.ZodString;
7978
+ url: z.ZodString;
7979
+ }, z.ZodAny, "strip">, z.objectInputType<{
7980
+ type: z.ZodString;
7981
+ url: z.ZodString;
7982
+ }, z.ZodAny, "strip">>>;
7934
7983
  }, z.ZodAny, "strip"> | undefined;
7935
- id?: string | undefined;
7936
7984
  }>, "many">>;
7937
7985
  error: z.ZodOptional<z.ZodString>;
7938
7986
  }, "strip", z.ZodTypeAny, {
7939
7987
  success: boolean;
7940
7988
  error?: string | undefined;
7941
- searchRecords?: {
7942
- attributes?: z.objectOutputType<{
7943
- type: z.ZodString;
7944
- url: z.ZodString;
7989
+ results?: {
7990
+ name?: string | undefined;
7991
+ url?: string | undefined;
7992
+ contents?: z.objectOutputType<{
7993
+ id: z.ZodOptional<z.ZodString>;
7994
+ attributes: z.ZodOptional<z.ZodObject<{
7995
+ type: z.ZodString;
7996
+ url: z.ZodString;
7997
+ }, "strip", z.ZodAny, z.objectOutputType<{
7998
+ type: z.ZodString;
7999
+ url: z.ZodString;
8000
+ }, z.ZodAny, "strip">, z.objectInputType<{
8001
+ type: z.ZodString;
8002
+ url: z.ZodString;
8003
+ }, z.ZodAny, "strip">>>;
7945
8004
  }, z.ZodAny, "strip"> | undefined;
7946
- id?: string | undefined;
7947
8005
  }[] | undefined;
7948
8006
  }, {
7949
8007
  success: boolean;
7950
8008
  error?: string | undefined;
7951
- searchRecords?: {
7952
- attributes?: z.objectInputType<{
7953
- type: z.ZodString;
7954
- url: z.ZodString;
8009
+ results?: {
8010
+ name?: string | undefined;
8011
+ url?: string | undefined;
8012
+ contents?: z.objectInputType<{
8013
+ id: z.ZodOptional<z.ZodString>;
8014
+ attributes: z.ZodOptional<z.ZodObject<{
8015
+ type: z.ZodString;
8016
+ url: z.ZodString;
8017
+ }, "strip", z.ZodAny, z.objectOutputType<{
8018
+ type: z.ZodString;
8019
+ url: z.ZodString;
8020
+ }, z.ZodAny, "strip">, z.objectInputType<{
8021
+ type: z.ZodString;
8022
+ url: z.ZodString;
8023
+ }, z.ZodAny, "strip">>>;
7955
8024
  }, z.ZodAny, "strip"> | undefined;
7956
- id?: string | undefined;
7957
8025
  }[] | undefined;
7958
8026
  }>;
7959
8027
  export type salesforceSearchAllSalesforceRecordsOutputType = z.infer<typeof salesforceSearchAllSalesforceRecordsOutputSchema>;
@@ -7995,39 +8063,63 @@ export declare const salesforceSearchSalesforceRecordsOutputSchema: z.ZodObject<
7995
8063
  type: z.ZodString;
7996
8064
  url: z.ZodString;
7997
8065
  }, z.ZodAny, "strip">>>;
7998
- }, "strip", z.ZodTypeAny, {
7999
- attributes?: z.objectOutputType<{
8066
+ }, "strip", z.ZodAny, z.objectOutputType<{
8067
+ id: z.ZodOptional<z.ZodString>;
8068
+ attributes: z.ZodOptional<z.ZodObject<{
8000
8069
  type: z.ZodString;
8001
8070
  url: z.ZodString;
8002
- }, z.ZodAny, "strip"> | undefined;
8003
- id?: string | undefined;
8004
- }, {
8005
- attributes?: z.objectInputType<{
8071
+ }, "strip", z.ZodAny, z.objectOutputType<{
8006
8072
  type: z.ZodString;
8007
8073
  url: z.ZodString;
8008
- }, z.ZodAny, "strip"> | undefined;
8009
- id?: string | undefined;
8010
- }>>;
8074
+ }, z.ZodAny, "strip">, z.objectInputType<{
8075
+ type: z.ZodString;
8076
+ url: z.ZodString;
8077
+ }, z.ZodAny, "strip">>>;
8078
+ }, z.ZodAny, "strip">, z.objectInputType<{
8079
+ id: z.ZodOptional<z.ZodString>;
8080
+ attributes: z.ZodOptional<z.ZodObject<{
8081
+ type: z.ZodString;
8082
+ url: z.ZodString;
8083
+ }, "strip", z.ZodAny, z.objectOutputType<{
8084
+ type: z.ZodString;
8085
+ url: z.ZodString;
8086
+ }, z.ZodAny, "strip">, z.objectInputType<{
8087
+ type: z.ZodString;
8088
+ url: z.ZodString;
8089
+ }, z.ZodAny, "strip">>>;
8090
+ }, z.ZodAny, "strip">>>;
8011
8091
  }, "strip", z.ZodTypeAny, {
8012
8092
  name?: string | undefined;
8013
8093
  url?: string | undefined;
8014
- contents?: {
8015
- attributes?: z.objectOutputType<{
8094
+ contents?: z.objectOutputType<{
8095
+ id: z.ZodOptional<z.ZodString>;
8096
+ attributes: z.ZodOptional<z.ZodObject<{
8016
8097
  type: z.ZodString;
8017
8098
  url: z.ZodString;
8018
- }, z.ZodAny, "strip"> | undefined;
8019
- id?: string | undefined;
8020
- } | undefined;
8099
+ }, "strip", z.ZodAny, z.objectOutputType<{
8100
+ type: z.ZodString;
8101
+ url: z.ZodString;
8102
+ }, z.ZodAny, "strip">, z.objectInputType<{
8103
+ type: z.ZodString;
8104
+ url: z.ZodString;
8105
+ }, z.ZodAny, "strip">>>;
8106
+ }, z.ZodAny, "strip"> | undefined;
8021
8107
  }, {
8022
8108
  name?: string | undefined;
8023
8109
  url?: string | undefined;
8024
- contents?: {
8025
- attributes?: z.objectInputType<{
8110
+ contents?: z.objectInputType<{
8111
+ id: z.ZodOptional<z.ZodString>;
8112
+ attributes: z.ZodOptional<z.ZodObject<{
8026
8113
  type: z.ZodString;
8027
8114
  url: z.ZodString;
8028
- }, z.ZodAny, "strip"> | undefined;
8029
- id?: string | undefined;
8030
- } | undefined;
8115
+ }, "strip", z.ZodAny, z.objectOutputType<{
8116
+ type: z.ZodString;
8117
+ url: z.ZodString;
8118
+ }, z.ZodAny, "strip">, z.objectInputType<{
8119
+ type: z.ZodString;
8120
+ url: z.ZodString;
8121
+ }, z.ZodAny, "strip">>>;
8122
+ }, z.ZodAny, "strip"> | undefined;
8031
8123
  }>, "many">>;
8032
8124
  error: z.ZodOptional<z.ZodString>;
8033
8125
  }, "strip", z.ZodTypeAny, {
@@ -8036,13 +8128,19 @@ export declare const salesforceSearchSalesforceRecordsOutputSchema: z.ZodObject<
8036
8128
  results?: {
8037
8129
  name?: string | undefined;
8038
8130
  url?: string | undefined;
8039
- contents?: {
8040
- attributes?: z.objectOutputType<{
8131
+ contents?: z.objectOutputType<{
8132
+ id: z.ZodOptional<z.ZodString>;
8133
+ attributes: z.ZodOptional<z.ZodObject<{
8041
8134
  type: z.ZodString;
8042
8135
  url: z.ZodString;
8043
- }, z.ZodAny, "strip"> | undefined;
8044
- id?: string | undefined;
8045
- } | undefined;
8136
+ }, "strip", z.ZodAny, z.objectOutputType<{
8137
+ type: z.ZodString;
8138
+ url: z.ZodString;
8139
+ }, z.ZodAny, "strip">, z.objectInputType<{
8140
+ type: z.ZodString;
8141
+ url: z.ZodString;
8142
+ }, z.ZodAny, "strip">>>;
8143
+ }, z.ZodAny, "strip"> | undefined;
8046
8144
  }[] | undefined;
8047
8145
  }, {
8048
8146
  success: boolean;
@@ -8050,13 +8148,19 @@ export declare const salesforceSearchSalesforceRecordsOutputSchema: z.ZodObject<
8050
8148
  results?: {
8051
8149
  name?: string | undefined;
8052
8150
  url?: string | undefined;
8053
- contents?: {
8054
- attributes?: z.objectInputType<{
8151
+ contents?: z.objectInputType<{
8152
+ id: z.ZodOptional<z.ZodString>;
8153
+ attributes: z.ZodOptional<z.ZodObject<{
8055
8154
  type: z.ZodString;
8056
8155
  url: z.ZodString;
8057
- }, z.ZodAny, "strip"> | undefined;
8058
- id?: string | undefined;
8059
- } | undefined;
8156
+ }, "strip", z.ZodAny, z.objectOutputType<{
8157
+ type: z.ZodString;
8158
+ url: z.ZodString;
8159
+ }, z.ZodAny, "strip">, z.objectInputType<{
8160
+ type: z.ZodString;
8161
+ url: z.ZodString;
8162
+ }, z.ZodAny, "strip">>>;
8163
+ }, z.ZodAny, "strip"> | undefined;
8060
8164
  }[] | undefined;
8061
8165
  }>;
8062
8166
  export type salesforceSearchSalesforceRecordsOutputType = z.infer<typeof salesforceSearchSalesforceRecordsOutputSchema>;
@@ -3837,17 +3837,25 @@ export const salesforceSearchAllSalesforceRecordsParamsSchema = z.object({
3837
3837
  });
3838
3838
  export const salesforceSearchAllSalesforceRecordsOutputSchema = z.object({
3839
3839
  success: z.boolean().describe("Whether the records were successfully retrieved"),
3840
- searchRecords: z
3840
+ results: z
3841
3841
  .array(z
3842
3842
  .object({
3843
- id: z.string().describe("The Salesforce record ID").optional(),
3844
- attributes: z
3843
+ name: z.string().describe("The name of the record").optional(),
3844
+ url: z.string().describe("The URL of the record").optional(),
3845
+ contents: z
3845
3846
  .object({
3846
- type: z.string().describe("The Salesforce object type"),
3847
- url: z.string().describe("The Salesforce record URL"),
3847
+ id: z.string().describe("The Salesforce record ID").optional(),
3848
+ attributes: z
3849
+ .object({
3850
+ type: z.string().describe("The Salesforce object type"),
3851
+ url: z.string().describe("The Salesforce record URL"),
3852
+ })
3853
+ .catchall(z.any())
3854
+ .describe("Metadata about the Salesforce record")
3855
+ .optional(),
3848
3856
  })
3849
3857
  .catchall(z.any())
3850
- .describe("Metadata about the Salesforce record")
3858
+ .describe("The contents of the record")
3851
3859
  .optional(),
3852
3860
  })
3853
3861
  .describe("A record from Salesforce"))
@@ -3881,6 +3889,7 @@ export const salesforceSearchSalesforceRecordsOutputSchema = z.object({
3881
3889
  .describe("Metadata about the Salesforce record")
3882
3890
  .optional(),
3883
3891
  })
3892
+ .catchall(z.any())
3884
3893
  .describe("The contents of the record")
3885
3894
  .optional(),
3886
3895
  })
@@ -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, linearGetIssueDetailsDefinition, linearGetProjectsDefinition, linearGetProjectDetailsDefinition, linearGetTeamDetailsDefinition, linearGetTeamsDefinition, 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";
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, } from "./autogen/templates.js";
2
2
  export const ACTION_GROUPS = {
3
3
  GENERIC: {
4
4
  description: "Generic utility actions",
@@ -47,7 +47,6 @@ export const ACTION_GROUPS = {
47
47
  googleOauthUpdatePresentationDefinition,
48
48
  googleOauthSearchDriveByKeywordsDefinition,
49
49
  googleOauthSearchDriveByQueryDefinition,
50
- googleOauthSearchDriveByQueryAndGetFileContentDefinition,
51
50
  googleOauthGetDriveFileContentByIdDefinition,
52
51
  ],
53
52
  },
@@ -199,8 +198,6 @@ export const ACTION_GROUPS = {
199
198
  githubCreateBranchDefinition,
200
199
  githubCreatePullRequestDefinition,
201
200
  githubListPullRequestsDefinition,
202
- githubGetFileContentDefinition,
203
- githubListDirectoryDefinition,
204
201
  ],
205
202
  },
206
203
  ASHBY: {
@@ -248,14 +245,4 @@ export const ACTION_GROUPS = {
248
245
  oktaTriggerOktaWorkflowDefinition,
249
246
  ],
250
247
  },
251
- LINEAR: {
252
- description: "Actions for interacting with Linear",
253
- actions: [
254
- linearGetIssueDetailsDefinition,
255
- linearGetProjectsDefinition,
256
- linearGetProjectDetailsDefinition,
257
- linearGetTeamDetailsDefinition,
258
- linearGetTeamsDefinition,
259
- ],
260
- },
261
248
  };
@@ -0,0 +1,3 @@
1
+ import { salesforceGetSalesforceRecordsByQueryFunction } from "../../autogen/types";
2
+ declare const getSalesforceRecordByQuery: salesforceGetSalesforceRecordsByQueryFunction;
3
+ export default getSalesforceRecordByQuery;
@@ -0,0 +1,43 @@
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 getSalesforceRecordByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
+ const { authToken, baseUrl } = authParams;
15
+ const { query, limit } = params;
16
+ if (!authToken || !baseUrl) {
17
+ return {
18
+ success: false,
19
+ error: "authToken and baseUrl are required for Salesforce API",
20
+ };
21
+ }
22
+ // The API limits the maximum number of records returned to 2000, the limit lets the user set a smaller custom limit
23
+ const url = `${baseUrl}/services/data/v56.0/query/?q=${encodeURIComponent(query + " LIMIT " + (limit != undefined && limit <= 2000 ? limit : 2000))}`;
24
+ try {
25
+ const response = yield axiosClient_1.axiosClient.get(url, {
26
+ headers: {
27
+ Authorization: `Bearer ${authToken}`,
28
+ },
29
+ });
30
+ return {
31
+ success: true,
32
+ records: response.data,
33
+ };
34
+ }
35
+ catch (error) {
36
+ console.error("Error retrieving Salesforce record:", error);
37
+ return {
38
+ success: false,
39
+ error: error instanceof Error ? error.message : "An unknown error occurred",
40
+ };
41
+ }
42
+ });
43
+ exports.default = getSalesforceRecordByQuery;
@@ -21,7 +21,7 @@ const searchAllSalesforceRecords = (_a) => __awaiter(void 0, [_a], void 0, funct
21
21
  .replace(/-/g, "\\-"); // Escape dashes
22
22
  let customObject = "";
23
23
  if (params.usesLightningKnowledge) {
24
- customObject = `Knowledge__kav(Article_Body__c, Title),
24
+ customObject = `Knowledge__kav(Article_Body__c, Title, Link_to_Community_Article__c),
25
25
  FeedItem(Id, Body, Title, ParentId, Parent.Name, CreatedBy.Name, CreatedDate, CommentCount),
26
26
  FeedComment(Id, CommentBody, FeedItemId, ParentId, CreatedBy.Name, CreatedDate),
27
27
  EmailMessage(Id, Subject, TextBody, FromAddress, ToAddress, ParentId, CreatedDate, Incoming)`;
@@ -50,13 +50,24 @@ const searchAllSalesforceRecords = (_a) => __awaiter(void 0, [_a], void 0, funct
50
50
  }
51
51
  }
52
52
  // Salesforce record types are confusing and non standard
53
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
- const recordsWithUrl = response.data.searchRecords.map((record) => {
55
- const recordId = record.Id;
56
- const webUrl = recordId ? `${baseUrl}/lightning/r/${recordId}/view` : undefined;
57
- return Object.assign(Object.assign({}, record), { webUrl });
58
- });
59
- return { success: true, searchRecords: recordsWithUrl };
53
+ return {
54
+ success: true,
55
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
56
+ results: response.data.searchRecords.map((record) => {
57
+ const recordId = record.Id;
58
+ const webUrl = recordId ? `${baseUrl}/lightning/r/${recordId}/view` : undefined;
59
+ // Try common name fields in order of preference, using only what's available
60
+ const displayName = record.Name ||
61
+ record.Title ||
62
+ record.Subject ||
63
+ record.CaseNumber ||
64
+ record.AccountName ||
65
+ record.ContactName ||
66
+ record.Id ||
67
+ webUrl;
68
+ return { name: displayName, url: webUrl, contents: record };
69
+ }),
70
+ };
60
71
  }
61
72
  catch (error) {
62
73
  console.error("Error retrieving Salesforce record:", error);
@@ -9,21 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { WebClient } from "@slack/web-api";
11
11
  import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
12
- import { getSlackChannels } from "./helpers.js";
13
12
  const archiveChannel = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
13
  if (!authParams.authToken) {
15
14
  throw new Error(MISSING_AUTH_TOKEN);
16
15
  }
17
16
  try {
18
17
  const client = new WebClient(authParams.authToken);
19
- const { channelName } = params;
20
- const allChannels = yield getSlackChannels(client);
21
- const channel = allChannels.find(channel => channel.name == channelName);
22
- if (!channel || !channel.id) {
23
- throw Error(`Channel with name ${channelName} not found`);
24
- }
25
- yield client.conversations.join({ channel: channel.id });
26
- const result = yield client.conversations.archive({ channel: channel.id });
18
+ const { channelId } = params;
19
+ const result = yield client.conversations.archive({ channel: channelId });
27
20
  if (!result.ok) {
28
21
  return {
29
22
  success: false,
@@ -432,16 +432,35 @@ const searchSlack = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params,
432
432
  else if (filteredTargetIds.length >= 2) {
433
433
  const searchMPIM = () => __awaiter(void 0, void 0, void 0, function* () {
434
434
  const mpimName = yield tryGetMPIMName(client, filteredTargetIds);
435
- return mpimName ? searchScoped({ client, scope: mpimName, topic, timeRange, limit }) : [];
435
+ return mpimName
436
+ ? searchScoped({ client, scope: mpimName, topic, timeRange, limit: Math.max(Math.floor(limit / 2), 1) })
437
+ : [];
436
438
  });
437
439
  searchPromises.push(searchMPIM());
438
- searchPromises.push(...filteredTargetIds.map(id => searchScoped({ client, scope: `<@${id}>`, topic, timeRange, limit })));
440
+ searchPromises.push(...filteredTargetIds.map(id => searchScoped({
441
+ client,
442
+ scope: `<@${id}>`,
443
+ topic,
444
+ timeRange,
445
+ limit: Math.max(Math.floor(limit / filteredTargetIds.length), 1),
446
+ })));
439
447
  }
440
448
  else if (channel) {
441
- searchPromises.push(searchScoped({ client, scope: normalizeChannelOperand(channel), topic, timeRange, limit }));
449
+ searchPromises.push(searchScoped({
450
+ client,
451
+ scope: normalizeChannelOperand(channel),
452
+ topic,
453
+ timeRange,
454
+ limit: Math.max(Math.floor(limit / 2), 1),
455
+ }));
442
456
  }
443
457
  if (topic) {
444
- searchPromises.push(searchByTopic({ client, topic, timeRange, limit }));
458
+ searchPromises.push(searchByTopic({
459
+ client,
460
+ topic,
461
+ timeRange,
462
+ limit: Math.max(Math.floor(limit / Math.max(searchPromises.length, 1)), 1),
463
+ }));
445
464
  }
446
465
  const searchResults = yield Promise.all(searchPromises);
447
466
  searchResults.forEach(matches => allMatches.push(...matches));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.151",
3
+ "version": "0.2.153",
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;
@@ -1,8 +0,0 @@
1
- import { z } from "zod";
2
- export declare const TokenResponseSchema: z.ZodObject<{
3
- token: z.ZodString;
4
- }, "strip", z.ZodTypeAny, {
5
- token: string;
6
- }, {
7
- token: string;
8
- }>;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TokenResponseSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.TokenResponseSchema = zod_1.z.object({
6
- token: zod_1.z.string(),
7
- });