@credal/actions 0.2.159 → 0.2.161

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.
@@ -3565,6 +3565,10 @@ export const zendeskCreateZendeskTicketDefinition = {
3565
3565
  type: "string",
3566
3566
  description: "The subdomain of the Zendesk account",
3567
3567
  },
3568
+ groupId: {
3569
+ type: "number",
3570
+ description: "The ID of the group to assign the ticket to",
3571
+ },
3568
3572
  },
3569
3573
  },
3570
3574
  output: {
@@ -8823,72 +8827,94 @@ export const googlemailSearchGmailMessagesDefinition = {
8823
8827
  },
8824
8828
  output: {
8825
8829
  type: "object",
8826
- required: ["success", "messages"],
8830
+ required: ["success", "results"],
8827
8831
  properties: {
8828
8832
  success: {
8829
8833
  type: "boolean",
8830
8834
  },
8831
- messages: {
8835
+ error: {
8836
+ type: "string",
8837
+ description: "Error message if search failed",
8838
+ },
8839
+ pageToken: {
8840
+ type: "string",
8841
+ description: "The token to use to get the next page of results",
8842
+ },
8843
+ results: {
8832
8844
  type: "array",
8833
8845
  description: "List of matching Gmail messages",
8834
8846
  items: {
8835
8847
  type: "object",
8836
- required: ["id", "threadId"],
8848
+ required: ["name", "url", "contents"],
8837
8849
  properties: {
8838
- id: {
8839
- type: "string",
8840
- description: "The message ID",
8841
- },
8842
- threadId: {
8850
+ name: {
8843
8851
  type: "string",
8844
- description: "The thread ID",
8852
+ description: "The name of the message",
8845
8853
  },
8846
- snippet: {
8854
+ url: {
8847
8855
  type: "string",
8848
- description: "A short part of the message text",
8856
+ description: "The URL of the message",
8849
8857
  },
8850
- labelIds: {
8851
- type: "array",
8852
- items: {
8853
- type: "string",
8858
+ contents: {
8859
+ type: "object",
8860
+ required: ["id", "threadId"],
8861
+ properties: {
8862
+ id: {
8863
+ type: "string",
8864
+ description: "The message ID",
8865
+ },
8866
+ threadId: {
8867
+ type: "string",
8868
+ description: "The thread ID",
8869
+ },
8870
+ snippet: {
8871
+ type: "string",
8872
+ description: "A short part of the message text",
8873
+ },
8874
+ labels: {
8875
+ type: "array",
8876
+ items: {
8877
+ type: "string",
8878
+ },
8879
+ description: "Labels on the message",
8880
+ },
8881
+ internalDate: {
8882
+ type: "string",
8883
+ description: "Internal timestamp of the message",
8884
+ },
8885
+ body: {
8886
+ type: "string",
8887
+ description: "The body of the message",
8888
+ },
8889
+ from: {
8890
+ type: "string",
8891
+ description: "The from header of the message",
8892
+ },
8893
+ to: {
8894
+ type: "string",
8895
+ description: "The to header of the message",
8896
+ },
8897
+ subject: {
8898
+ type: "string",
8899
+ description: "The subject header of the message",
8900
+ },
8901
+ cc: {
8902
+ type: "string",
8903
+ description: "The cc header of the message",
8904
+ },
8905
+ bcc: {
8906
+ type: "string",
8907
+ description: "The bcc header of the message",
8908
+ },
8909
+ error: {
8910
+ type: "string",
8911
+ description: "Error message if search failed",
8912
+ },
8854
8913
  },
8855
- description: "Labels on the message",
8856
- },
8857
- internalDate: {
8858
- type: "string",
8859
- description: "Internal timestamp of the message",
8860
- },
8861
- emailBody: {
8862
- type: "string",
8863
- description: "The body of the message",
8864
- },
8865
- from: {
8866
- type: "string",
8867
- description: "The from header of the message",
8868
- },
8869
- to: {
8870
- type: "string",
8871
- description: "The to header of the message",
8872
- },
8873
- subject: {
8874
- type: "string",
8875
- description: "The subject header of the message",
8876
- },
8877
- cc: {
8878
- type: "string",
8879
- description: "The cc header of the message",
8880
- },
8881
- bcc: {
8882
- type: "string",
8883
- description: "The bcc header of the message",
8884
8914
  },
8885
8915
  },
8886
8916
  },
8887
8917
  },
8888
- error: {
8889
- type: "string",
8890
- description: "Error message if search failed",
8891
- },
8892
8918
  },
8893
8919
  },
8894
8920
  name: "searchGmailMessages",
@@ -3921,14 +3921,17 @@ export declare const zendeskCreateZendeskTicketParamsSchema: z.ZodObject<{
3921
3921
  subject: z.ZodString;
3922
3922
  body: z.ZodOptional<z.ZodString>;
3923
3923
  subdomain: z.ZodString;
3924
+ groupId: z.ZodOptional<z.ZodNumber>;
3924
3925
  }, "strip", z.ZodTypeAny, {
3925
3926
  subdomain: string;
3926
3927
  subject: string;
3927
3928
  body?: string | undefined;
3929
+ groupId?: number | undefined;
3928
3930
  }, {
3929
3931
  subdomain: string;
3930
3932
  subject: string;
3931
3933
  body?: string | undefined;
3934
+ groupId?: number | undefined;
3932
3935
  }>;
3933
3936
  export type zendeskCreateZendeskTicketParamsType = z.infer<typeof zendeskCreateZendeskTicketParamsSchema>;
3934
3937
  export declare const zendeskCreateZendeskTicketOutputSchema: z.ZodObject<{
@@ -6151,76 +6154,130 @@ export declare const googlemailSearchGmailMessagesParamsSchema: z.ZodObject<{
6151
6154
  export type googlemailSearchGmailMessagesParamsType = z.infer<typeof googlemailSearchGmailMessagesParamsSchema>;
6152
6155
  export declare const googlemailSearchGmailMessagesOutputSchema: z.ZodObject<{
6153
6156
  success: z.ZodBoolean;
6154
- messages: z.ZodArray<z.ZodObject<{
6155
- id: z.ZodString;
6156
- threadId: z.ZodString;
6157
- snippet: z.ZodOptional<z.ZodString>;
6158
- labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6159
- internalDate: z.ZodOptional<z.ZodString>;
6160
- emailBody: z.ZodOptional<z.ZodString>;
6161
- from: z.ZodOptional<z.ZodString>;
6162
- to: z.ZodOptional<z.ZodString>;
6163
- subject: z.ZodOptional<z.ZodString>;
6164
- cc: z.ZodOptional<z.ZodString>;
6165
- bcc: z.ZodOptional<z.ZodString>;
6157
+ error: z.ZodOptional<z.ZodString>;
6158
+ pageToken: z.ZodOptional<z.ZodString>;
6159
+ results: z.ZodArray<z.ZodObject<{
6160
+ name: z.ZodString;
6161
+ url: z.ZodString;
6162
+ contents: z.ZodObject<{
6163
+ id: z.ZodString;
6164
+ threadId: z.ZodString;
6165
+ snippet: z.ZodOptional<z.ZodString>;
6166
+ labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6167
+ internalDate: z.ZodOptional<z.ZodString>;
6168
+ body: z.ZodOptional<z.ZodString>;
6169
+ from: z.ZodOptional<z.ZodString>;
6170
+ to: z.ZodOptional<z.ZodString>;
6171
+ subject: z.ZodOptional<z.ZodString>;
6172
+ cc: z.ZodOptional<z.ZodString>;
6173
+ bcc: z.ZodOptional<z.ZodString>;
6174
+ error: z.ZodOptional<z.ZodString>;
6175
+ }, "strip", z.ZodTypeAny, {
6176
+ id: string;
6177
+ threadId: string;
6178
+ error?: string | undefined;
6179
+ subject?: string | undefined;
6180
+ body?: string | undefined;
6181
+ to?: string | undefined;
6182
+ snippet?: string | undefined;
6183
+ internalDate?: string | undefined;
6184
+ cc?: string | undefined;
6185
+ bcc?: string | undefined;
6186
+ labels?: string[] | undefined;
6187
+ from?: string | undefined;
6188
+ }, {
6189
+ id: string;
6190
+ threadId: string;
6191
+ error?: string | undefined;
6192
+ subject?: string | undefined;
6193
+ body?: string | undefined;
6194
+ to?: string | undefined;
6195
+ snippet?: string | undefined;
6196
+ internalDate?: string | undefined;
6197
+ cc?: string | undefined;
6198
+ bcc?: string | undefined;
6199
+ labels?: string[] | undefined;
6200
+ from?: string | undefined;
6201
+ }>;
6166
6202
  }, "strip", z.ZodTypeAny, {
6167
- id: string;
6168
- threadId: string;
6169
- subject?: string | undefined;
6170
- to?: string | undefined;
6171
- snippet?: string | undefined;
6172
- labelIds?: string[] | undefined;
6173
- internalDate?: string | undefined;
6174
- emailBody?: string | undefined;
6175
- cc?: string | undefined;
6176
- bcc?: string | undefined;
6177
- from?: string | undefined;
6203
+ name: string;
6204
+ url: string;
6205
+ contents: {
6206
+ id: string;
6207
+ threadId: string;
6208
+ error?: string | undefined;
6209
+ subject?: string | undefined;
6210
+ body?: string | undefined;
6211
+ to?: string | undefined;
6212
+ snippet?: string | undefined;
6213
+ internalDate?: string | undefined;
6214
+ cc?: string | undefined;
6215
+ bcc?: string | undefined;
6216
+ labels?: string[] | undefined;
6217
+ from?: string | undefined;
6218
+ };
6178
6219
  }, {
6179
- id: string;
6180
- threadId: string;
6181
- subject?: string | undefined;
6182
- to?: string | undefined;
6183
- snippet?: string | undefined;
6184
- labelIds?: string[] | undefined;
6185
- internalDate?: string | undefined;
6186
- emailBody?: string | undefined;
6187
- cc?: string | undefined;
6188
- bcc?: string | undefined;
6189
- from?: string | undefined;
6220
+ name: string;
6221
+ url: string;
6222
+ contents: {
6223
+ id: string;
6224
+ threadId: string;
6225
+ error?: string | undefined;
6226
+ subject?: string | undefined;
6227
+ body?: string | undefined;
6228
+ to?: string | undefined;
6229
+ snippet?: string | undefined;
6230
+ internalDate?: string | undefined;
6231
+ cc?: string | undefined;
6232
+ bcc?: string | undefined;
6233
+ labels?: string[] | undefined;
6234
+ from?: string | undefined;
6235
+ };
6190
6236
  }>, "many">;
6191
- error: z.ZodOptional<z.ZodString>;
6192
6237
  }, "strip", z.ZodTypeAny, {
6193
6238
  success: boolean;
6194
- messages: {
6195
- id: string;
6196
- threadId: string;
6197
- subject?: string | undefined;
6198
- to?: string | undefined;
6199
- snippet?: string | undefined;
6200
- labelIds?: string[] | undefined;
6201
- internalDate?: string | undefined;
6202
- emailBody?: string | undefined;
6203
- cc?: string | undefined;
6204
- bcc?: string | undefined;
6205
- from?: string | undefined;
6239
+ results: {
6240
+ name: string;
6241
+ url: string;
6242
+ contents: {
6243
+ id: string;
6244
+ threadId: string;
6245
+ error?: string | undefined;
6246
+ subject?: string | undefined;
6247
+ body?: string | undefined;
6248
+ to?: string | undefined;
6249
+ snippet?: string | undefined;
6250
+ internalDate?: string | undefined;
6251
+ cc?: string | undefined;
6252
+ bcc?: string | undefined;
6253
+ labels?: string[] | undefined;
6254
+ from?: string | undefined;
6255
+ };
6206
6256
  }[];
6207
6257
  error?: string | undefined;
6258
+ pageToken?: string | undefined;
6208
6259
  }, {
6209
6260
  success: boolean;
6210
- messages: {
6211
- id: string;
6212
- threadId: string;
6213
- subject?: string | undefined;
6214
- to?: string | undefined;
6215
- snippet?: string | undefined;
6216
- labelIds?: string[] | undefined;
6217
- internalDate?: string | undefined;
6218
- emailBody?: string | undefined;
6219
- cc?: string | undefined;
6220
- bcc?: string | undefined;
6221
- from?: string | undefined;
6261
+ results: {
6262
+ name: string;
6263
+ url: string;
6264
+ contents: {
6265
+ id: string;
6266
+ threadId: string;
6267
+ error?: string | undefined;
6268
+ subject?: string | undefined;
6269
+ body?: string | undefined;
6270
+ to?: string | undefined;
6271
+ snippet?: string | undefined;
6272
+ internalDate?: string | undefined;
6273
+ cc?: string | undefined;
6274
+ bcc?: string | undefined;
6275
+ labels?: string[] | undefined;
6276
+ from?: string | undefined;
6277
+ };
6222
6278
  }[];
6223
6279
  error?: string | undefined;
6280
+ pageToken?: string | undefined;
6224
6281
  }>;
6225
6282
  export type googlemailSearchGmailMessagesOutputType = z.infer<typeof googlemailSearchGmailMessagesOutputSchema>;
6226
6283
  export type googlemailSearchGmailMessagesFunction = ActionFunction<googlemailSearchGmailMessagesParamsType, AuthParamsType, googlemailSearchGmailMessagesOutputType>;
@@ -9216,6 +9273,11 @@ export declare const githubGetPullRequestDetailsOutputSchema: z.ZodObject<{
9216
9273
  } | undefined;
9217
9274
  updatedAt?: string | undefined;
9218
9275
  htmlUrl?: string | undefined;
9276
+ labels?: {
9277
+ description?: string | null | undefined;
9278
+ name?: string | undefined;
9279
+ color?: string | undefined;
9280
+ }[] | undefined;
9219
9281
  draft?: boolean | undefined;
9220
9282
  closedAt?: string | null | undefined;
9221
9283
  mergedAt?: string | null | undefined;
@@ -9225,11 +9287,6 @@ export declare const githubGetPullRequestDetailsOutputSchema: z.ZodObject<{
9225
9287
  reviewers?: {
9226
9288
  login?: string | undefined;
9227
9289
  }[] | undefined;
9228
- labels?: {
9229
- description?: string | null | undefined;
9230
- name?: string | undefined;
9231
- color?: string | undefined;
9232
- }[] | undefined;
9233
9290
  mergeable?: boolean | null | undefined;
9234
9291
  mergeableState?: string | null | undefined;
9235
9292
  additions?: number | undefined;
@@ -9277,6 +9334,11 @@ export declare const githubGetPullRequestDetailsOutputSchema: z.ZodObject<{
9277
9334
  } | undefined;
9278
9335
  updatedAt?: string | undefined;
9279
9336
  htmlUrl?: string | undefined;
9337
+ labels?: {
9338
+ description?: string | null | undefined;
9339
+ name?: string | undefined;
9340
+ color?: string | undefined;
9341
+ }[] | undefined;
9280
9342
  draft?: boolean | undefined;
9281
9343
  closedAt?: string | null | undefined;
9282
9344
  mergedAt?: string | null | undefined;
@@ -9286,11 +9348,6 @@ export declare const githubGetPullRequestDetailsOutputSchema: z.ZodObject<{
9286
9348
  reviewers?: {
9287
9349
  login?: string | undefined;
9288
9350
  }[] | undefined;
9289
- labels?: {
9290
- description?: string | null | undefined;
9291
- name?: string | undefined;
9292
- color?: string | undefined;
9293
- }[] | undefined;
9294
9351
  mergeable?: boolean | null | undefined;
9295
9352
  mergeableState?: string | null | undefined;
9296
9353
  additions?: number | undefined;
@@ -9342,6 +9399,11 @@ export declare const githubGetPullRequestDetailsOutputSchema: z.ZodObject<{
9342
9399
  } | undefined;
9343
9400
  updatedAt?: string | undefined;
9344
9401
  htmlUrl?: string | undefined;
9402
+ labels?: {
9403
+ description?: string | null | undefined;
9404
+ name?: string | undefined;
9405
+ color?: string | undefined;
9406
+ }[] | undefined;
9345
9407
  draft?: boolean | undefined;
9346
9408
  closedAt?: string | null | undefined;
9347
9409
  mergedAt?: string | null | undefined;
@@ -9351,11 +9413,6 @@ export declare const githubGetPullRequestDetailsOutputSchema: z.ZodObject<{
9351
9413
  reviewers?: {
9352
9414
  login?: string | undefined;
9353
9415
  }[] | undefined;
9354
- labels?: {
9355
- description?: string | null | undefined;
9356
- name?: string | undefined;
9357
- color?: string | undefined;
9358
- }[] | undefined;
9359
9416
  mergeable?: boolean | null | undefined;
9360
9417
  mergeableState?: string | null | undefined;
9361
9418
  additions?: number | undefined;
@@ -9407,6 +9464,11 @@ export declare const githubGetPullRequestDetailsOutputSchema: z.ZodObject<{
9407
9464
  } | undefined;
9408
9465
  updatedAt?: string | undefined;
9409
9466
  htmlUrl?: string | undefined;
9467
+ labels?: {
9468
+ description?: string | null | undefined;
9469
+ name?: string | undefined;
9470
+ color?: string | undefined;
9471
+ }[] | undefined;
9410
9472
  draft?: boolean | undefined;
9411
9473
  closedAt?: string | null | undefined;
9412
9474
  mergedAt?: string | null | undefined;
@@ -9416,11 +9478,6 @@ export declare const githubGetPullRequestDetailsOutputSchema: z.ZodObject<{
9416
9478
  reviewers?: {
9417
9479
  login?: string | undefined;
9418
9480
  }[] | undefined;
9419
- labels?: {
9420
- description?: string | null | undefined;
9421
- name?: string | undefined;
9422
- color?: string | undefined;
9423
- }[] | undefined;
9424
9481
  mergeable?: boolean | null | undefined;
9425
9482
  mergeableState?: string | null | undefined;
9426
9483
  additions?: number | undefined;
@@ -1153,6 +1153,7 @@ export const zendeskCreateZendeskTicketParamsSchema = z.object({
1153
1153
  subject: z.string().describe("The subject of the ticket"),
1154
1154
  body: z.string().describe("The body of the ticket").optional(),
1155
1155
  subdomain: z.string().describe("The subdomain of the Zendesk account"),
1156
+ groupId: z.number().describe("The ID of the group to assign the ticket to").optional(),
1156
1157
  });
1157
1158
  export const zendeskCreateZendeskTicketOutputSchema = z.object({
1158
1159
  ticketId: z.string().describe("The ID of the ticket created"),
@@ -3252,22 +3253,28 @@ export const googlemailSearchGmailMessagesParamsSchema = z.object({
3252
3253
  });
3253
3254
  export const googlemailSearchGmailMessagesOutputSchema = z.object({
3254
3255
  success: z.boolean(),
3255
- messages: z
3256
+ error: z.string().describe("Error message if search failed").optional(),
3257
+ pageToken: z.string().describe("The token to use to get the next page of results").optional(),
3258
+ results: z
3256
3259
  .array(z.object({
3257
- id: z.string().describe("The message ID"),
3258
- threadId: z.string().describe("The thread ID"),
3259
- snippet: z.string().describe("A short part of the message text").optional(),
3260
- labelIds: z.array(z.string()).describe("Labels on the message").optional(),
3261
- internalDate: z.string().describe("Internal timestamp of the message").optional(),
3262
- emailBody: z.string().describe("The body of the message").optional(),
3263
- from: z.string().describe("The from header of the message").optional(),
3264
- to: z.string().describe("The to header of the message").optional(),
3265
- subject: z.string().describe("The subject header of the message").optional(),
3266
- cc: z.string().describe("The cc header of the message").optional(),
3267
- bcc: z.string().describe("The bcc header of the message").optional(),
3260
+ name: z.string().describe("The name of the message"),
3261
+ url: z.string().describe("The URL of the message"),
3262
+ contents: z.object({
3263
+ id: z.string().describe("The message ID"),
3264
+ threadId: z.string().describe("The thread ID"),
3265
+ snippet: z.string().describe("A short part of the message text").optional(),
3266
+ labels: z.array(z.string()).describe("Labels on the message").optional(),
3267
+ internalDate: z.string().describe("Internal timestamp of the message").optional(),
3268
+ body: z.string().describe("The body of the message").optional(),
3269
+ from: z.string().describe("The from header of the message").optional(),
3270
+ to: z.string().describe("The to header of the message").optional(),
3271
+ subject: z.string().describe("The subject header of the message").optional(),
3272
+ cc: z.string().describe("The cc header of the message").optional(),
3273
+ bcc: z.string().describe("The bcc header of the message").optional(),
3274
+ error: z.string().describe("Error message if search failed").optional(),
3275
+ }),
3268
3276
  }))
3269
3277
  .describe("List of matching Gmail messages"),
3270
- error: z.string().describe("Error message if search failed").optional(),
3271
3278
  });
3272
3279
  export const googlemailListGmailThreadsParamsSchema = z.object({
3273
3280
  query: z.string().describe('Gmail search query (e.g. "from:alice subject:project")'),
@@ -1,4 +1,4 @@
1
- import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, } 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, 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";
2
2
  export const ACTION_GROUPS = {
3
3
  GENERIC: {
4
4
  description: "Generic utility actions",
@@ -17,7 +17,12 @@ export const ACTION_GROUPS = {
17
17
  },
18
18
  SLACK_LIST_CONVERSATIONS: {
19
19
  description: "Actions for interacting with Slack",
20
- actions: [slackSendMessageDefinition, slackGetChannelMessagesDefinition],
20
+ actions: [
21
+ slackSendMessageDefinition,
22
+ slackGetChannelMessagesDefinition,
23
+ slackCreateChannelDefinition,
24
+ slackArchiveChannelDefinition,
25
+ ],
21
26
  },
22
27
  CONFLUENCE: {
23
28
  description: "Action for interacting with Confluence",
@@ -41,6 +46,9 @@ export const ACTION_GROUPS = {
41
46
  googleOauthCreatePresentationDefinition,
42
47
  googleOauthUpdatePresentationDefinition,
43
48
  googleOauthSearchDriveByKeywordsDefinition,
49
+ googleOauthSearchDriveByQueryDefinition,
50
+ googleOauthSearchDriveByQueryAndGetFileContentDefinition,
51
+ googleOauthGetDriveFileContentByIdDefinition,
44
52
  ],
45
53
  },
46
54
  GOOGLE_CALENDAR: {
@@ -95,6 +103,21 @@ export const ACTION_GROUPS = {
95
103
  jiraUpdateJiraTicketDetailsDefinition,
96
104
  jiraUpdateJiraTicketStatusDefinition,
97
105
  jiraGetJiraIssuesByQueryDefinition,
106
+ jiraGetServiceDesksDefinition,
107
+ jiraCreateServiceDeskRequestDefinition,
108
+ ],
109
+ },
110
+ JIRA_ORG_ACTIONS: {
111
+ description: "Action for interacting with Jira tickets",
112
+ actions: [
113
+ jiraOrgAssignJiraTicketDefinition,
114
+ jiraOrgCreateJiraTicketDefinition,
115
+ jiraOrgCommentJiraTicketDefinition,
116
+ jiraOrgGetJiraTicketDetailsDefinition,
117
+ jiraOrgGetJiraTicketHistoryDefinition,
118
+ jiraOrgUpdateJiraTicketDetailsDefinition,
119
+ jiraOrgUpdateJiraTicketStatusDefinition,
120
+ jiraOrgGetJiraIssuesByQueryDefinition,
98
121
  ],
99
122
  },
100
123
  OPENSTREETMAP_GET_LATITUDE_LONGITUDE_FROM_LOCATION: {
@@ -131,7 +154,12 @@ export const ACTION_GROUPS = {
131
154
  },
132
155
  JAMF: {
133
156
  description: "Actions for interacting with Jamf",
134
- actions: [jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition],
157
+ actions: [
158
+ jamfGetJamfComputerInventoryDefinition,
159
+ jamfGetJamfFileVaultRecoveryKeyDefinition,
160
+ jamfGetJamfUserComputerIdDefinition,
161
+ jamfLockJamfComputerByIdDefinition,
162
+ ],
135
163
  },
136
164
  LOOKER: {
137
165
  description: "Actions for interacting with Looker",
@@ -171,6 +199,8 @@ export const ACTION_GROUPS = {
171
199
  githubCreateBranchDefinition,
172
200
  githubCreatePullRequestDefinition,
173
201
  githubListPullRequestsDefinition,
202
+ githubGetFileContentDefinition,
203
+ githubListDirectoryDefinition,
174
204
  ],
175
205
  },
176
206
  ASHBY: {
@@ -215,6 +245,17 @@ export const ACTION_GROUPS = {
215
245
  oktaResetPasswordDefinition,
216
246
  oktaResetMFADefinition,
217
247
  oktaListMFADefinition,
248
+ oktaTriggerOktaWorkflowDefinition,
249
+ ],
250
+ },
251
+ LINEAR: {
252
+ description: "Actions for interacting with Linear",
253
+ actions: [
254
+ linearGetIssueDetailsDefinition,
255
+ linearGetProjectsDefinition,
256
+ linearGetProjectDetailsDefinition,
257
+ linearGetTeamDetailsDefinition,
258
+ linearGetTeamsDefinition,
218
259
  ],
219
260
  },
220
261
  };
@@ -0,0 +1,3 @@
1
+ import { confluenceUpdatePageFunction } from "../../../actions/autogen/types";
2
+ declare const confluenceUpdatePage: confluenceUpdatePageFunction;
3
+ export default confluenceUpdatePage;
@@ -0,0 +1,47 @@
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;
@@ -0,0 +1,3 @@
1
+ import type { credalCallCopilotFunction } from "../../autogen/types";
2
+ declare const callCopilot: credalCallCopilotFunction;
3
+ export default callCopilot;
@@ -0,0 +1,36 @@
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,17 +1,3 @@
1
- export interface GmailMessageResult {
2
- id: string;
3
- threadId: string;
4
- snippet: string;
5
- labelIds?: string[];
6
- internalDate: string;
7
- emailBody: string;
8
- from?: string;
9
- to?: string;
10
- subject?: string;
11
- cc?: string;
12
- bcc?: string;
13
- error?: string;
14
- }
15
1
  import type { googlemailSearchGmailMessagesFunction } from "../../autogen/types.js";
16
2
  declare const searchGmailMessages: googlemailSearchGmailMessagesFunction;
17
3
  export default searchGmailMessages;
@@ -40,7 +40,7 @@ function cleanAndTruncateEmail(text, maxLength = 2000) {
40
40
  }
41
41
  const searchGmailMessages = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
42
42
  if (!authParams.authToken) {
43
- return { success: false, error: MISSING_AUTH_TOKEN, messages: [] };
43
+ return { success: false, error: MISSING_AUTH_TOKEN, results: [] };
44
44
  }
45
45
  const { query, maxResults, timeout } = params;
46
46
  const max = Math.min(maxResults !== null && maxResults !== void 0 ? maxResults : DEFAULT_EMAIL_CONTENTS_FETCHED, MAX_EMAIL_CONTENTS_FETCHED);
@@ -63,6 +63,7 @@ const searchGmailMessages = (_a) => __awaiter(void 0, [_a], void 0, function* ({
63
63
  break;
64
64
  const batch = messageList.slice(0, max - allMessages.length);
65
65
  const results = yield Promise.allSettled(batch.map((msg) => __awaiter(void 0, void 0, void 0, function* () {
66
+ var _a, _b, _c;
66
67
  try {
67
68
  yield limiter.removeTokens(1);
68
69
  const msgRes = yield axiosClient.get(`https://gmail.googleapis.com/gmail/v1/users/me/messages/${msg.id}?format=full`, {
@@ -73,54 +74,53 @@ const searchGmailMessages = (_a) => __awaiter(void 0, [_a], void 0, function* ({
73
74
  const { id, threadId, snippet, labelIds, internalDate, payload } = msgRes.data;
74
75
  const headers = {};
75
76
  for (const header of payload.headers) {
76
- const lowerName = header.name.toLowerCase();
77
- if (lowerName === "from" ||
78
- lowerName === "to" ||
79
- lowerName === "subject" ||
80
- lowerName === "cc" ||
81
- lowerName === "bcc") {
82
- headers[lowerName] = header.value;
83
- }
77
+ headers[header.name.toLowerCase()] = header.value;
84
78
  }
85
- const rawBody = getEmailContent(msgRes.data) || "";
86
- const emailBody = cleanAndTruncateEmail(rawBody);
87
- const message = {
88
- id,
89
- threadId,
90
- snippet,
91
- labelIds,
92
- internalDate,
93
- emailBody,
94
- from: headers.from,
95
- to: headers.to,
96
- subject: headers.subject,
97
- cc: headers.cc,
98
- bcc: headers.bcc,
79
+ // Extract and clean the full text
80
+ const emailBody = cleanAndTruncateEmail(getEmailContent(msgRes.data) || "");
81
+ const subject = ((_a = headers.subject) === null || _a === void 0 ? void 0 : _a.trim()) || "(No subject)";
82
+ const from = ((_c = (_b = headers.from) === null || _b === void 0 ? void 0 : _b.split("<")[0]) === null || _c === void 0 ? void 0 : _c.trim()) || "Unknown sender";
83
+ const date = new Date(Number(internalDate)).toLocaleDateString("en-US");
84
+ const name = `${subject} — ${from} (${date})`;
85
+ return {
86
+ name,
87
+ url: `https://mail.google.com/mail/u/0/#inbox/${id}`,
88
+ contents: {
89
+ id,
90
+ from: headers.from,
91
+ to: headers.to,
92
+ cc: headers.cc,
93
+ bcc: headers.bcc,
94
+ snippet,
95
+ body: emailBody, // 👈 your old emailBody now lives here
96
+ labels: labelIds,
97
+ threadId,
98
+ internalDate,
99
+ },
99
100
  };
100
- return message;
101
101
  }
102
102
  catch (err) {
103
- const errorMessage = err instanceof Error ? err.message : "Failed to fetch message details";
104
- errorMessages.push(errorMessage);
103
+ const errorMsg = err instanceof Error ? err.message : "Failed to fetch message details";
105
104
  return {
106
- id: msg.id,
107
- threadId: "",
108
- snippet: "",
109
- labelIds: [],
110
- internalDate: "",
111
- emailBody: "",
112
- error: errorMessage,
113
- from: "",
114
- to: "",
115
- subject: "",
116
- cc: "",
117
- bcc: "",
105
+ name: "Error fetching message",
106
+ url: "",
107
+ contents: {
108
+ error: errorMsg,
109
+ id: msg.id,
110
+ threadId: "",
111
+ snippet: "",
112
+ internalDate: "",
113
+ body: "",
114
+ from: "",
115
+ to: "",
116
+ cc: "",
117
+ bcc: "",
118
+ labels: [],
119
+ },
118
120
  };
119
121
  }
120
122
  })));
121
- const successfulResults = results
122
- .filter((r) => r.status === "fulfilled")
123
- .map(r => r.value);
123
+ const successfulResults = results.filter(r => r.status === "fulfilled").map(r => r.value);
124
124
  const failedResults = results.filter((r) => r.status === "rejected");
125
125
  failedResults.forEach(r => {
126
126
  const errorMessage = r.reason instanceof Error ? r.reason.message : "Failed to fetch message details";
@@ -134,15 +134,16 @@ const searchGmailMessages = (_a) => __awaiter(void 0, [_a], void 0, function* ({
134
134
  }
135
135
  return {
136
136
  success: errorMessages.length === 0,
137
- messages: allMessages,
138
137
  error: errorMessages.join("; "),
138
+ results: allMessages,
139
+ pageToken,
139
140
  };
140
141
  }
141
142
  catch (err) {
142
143
  return {
143
144
  success: false,
144
145
  error: err instanceof Error ? err.message : "Unknown error searching Gmail",
145
- messages: [],
146
+ results: [],
146
147
  };
147
148
  }
148
149
  });
@@ -0,0 +1,8 @@
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
+ }>;
@@ -0,0 +1,7 @@
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
+ });
@@ -0,0 +1 @@
1
+ export * as add from "./add";
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.add = void 0;
37
+ exports.add = __importStar(require("./add"));
@@ -9,14 +9,21 @@ 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";
12
13
  const archiveChannel = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
13
14
  if (!authParams.authToken) {
14
15
  throw new Error(MISSING_AUTH_TOKEN);
15
16
  }
16
17
  try {
17
18
  const client = new WebClient(authParams.authToken);
18
- const { channelId } = params;
19
- const result = yield client.conversations.archive({ channel: channelId });
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 });
20
27
  if (!result.ok) {
21
28
  return {
22
29
  success: false,
@@ -0,0 +1 @@
1
+ export * as listConversations from "./listConversations";
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.listConversations = void 0;
37
+ exports.listConversations = __importStar(require("./listConversations"));
@@ -0,0 +1,3 @@
1
+ import type { slackListConversationsFunction } from "../../autogen/types";
2
+ declare const slackListConversations: slackListConversationsFunction;
3
+ export default slackListConversations;
@@ -0,0 +1,41 @@
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 web_api_1 = require("@slack/web-api");
13
+ const helpers_1 = require("./helpers");
14
+ const slackListConversations = (_a) => __awaiter(void 0, [_a], void 0, function* ({ authParams, }) {
15
+ const client = new web_api_1.WebClient(authParams.authToken);
16
+ try {
17
+ const allChannels = yield (0, helpers_1.getSlackChannels)(client);
18
+ const filteredChannels = [];
19
+ for (const channel of allChannels) {
20
+ if (channel.name && channel.topic && channel.topic.value && channel.purpose && channel.purpose.value) {
21
+ const purpose = channel.purpose.value;
22
+ const topic = channel.topic.value;
23
+ const name = channel.name;
24
+ filteredChannels.push(Object.assign(Object.assign({}, channel), { purpose, topic, name }));
25
+ }
26
+ }
27
+ return {
28
+ channels: filteredChannels,
29
+ };
30
+ }
31
+ catch (error) {
32
+ if (error instanceof Error) {
33
+ // Enhance error with more context
34
+ throw new Error(`Failed to list Slack conversations: ${error.message}`);
35
+ }
36
+ else {
37
+ throw error;
38
+ }
39
+ }
40
+ });
41
+ exports.default = slackListConversations;
@@ -11,7 +11,7 @@ import { createAxiosClientWithRetries } from "../../util/axiosClient.js";
11
11
  import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
12
12
  const createZendeskTicket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
13
13
  const { authToken } = authParams;
14
- const { subdomain, subject, body } = params;
14
+ const { subdomain, subject, body, groupId } = params;
15
15
  const url = `https://${subdomain}.zendesk.com/api/v2/tickets.json`;
16
16
  const payload = {
17
17
  ticket: {
@@ -19,6 +19,7 @@ const createZendeskTicket = (_a) => __awaiter(void 0, [_a], void 0, function* ({
19
19
  comment: {
20
20
  body,
21
21
  },
22
+ group_id: groupId,
22
23
  },
23
24
  };
24
25
  if (!authToken) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.159",
3
+ "version": "0.2.161",
4
4
  "type": "module",
5
5
  "description": "AI Actions by Credal AI",
6
6
  "sideEffects": false,