@credal/actions 0.1.72 → 0.1.75

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.
Files changed (63) hide show
  1. package/dist/actions/actionMapper.js +12 -4
  2. package/dist/actions/autogen/templates.d.ts +1 -0
  3. package/dist/actions/autogen/templates.js +37 -2
  4. package/dist/actions/autogen/types.d.ts +30 -7
  5. package/dist/actions/autogen/types.js +13 -4
  6. package/dist/actions/groups.js +4 -0
  7. package/dist/actions/invoke.js +4 -0
  8. package/dist/actions/providers/asana/commentAsanaTask.js +3 -2
  9. package/dist/actions/providers/asana/createAsanaTask.js +3 -2
  10. package/dist/actions/providers/asana/updateAsanaTask.js +3 -2
  11. package/dist/actions/providers/ashby/addCandidateToProject.js +2 -1
  12. package/dist/actions/providers/ashby/createCandidate.js +2 -4
  13. package/dist/actions/providers/ashby/createNote.js +2 -1
  14. package/dist/actions/providers/ashby/getCandidateInfo.js +2 -1
  15. package/dist/actions/providers/ashby/listCandidateNotes.js +2 -1
  16. package/dist/actions/providers/ashby/listCandidates.js +2 -1
  17. package/dist/actions/providers/ashby/searchCandidates.js +2 -1
  18. package/dist/actions/providers/ashby/updateCandidate.js +2 -4
  19. package/dist/actions/providers/confluence/fetchPageContent.js +2 -1
  20. package/dist/actions/providers/confluence/overwritePage.js +2 -1
  21. package/dist/actions/providers/firecrawl/scrapeTweetDataWithNitter.js +2 -1
  22. package/dist/actions/providers/github/createBranch.js +2 -1
  23. package/dist/actions/providers/github/createOrUpdateFile.js +2 -1
  24. package/dist/actions/providers/github/createPullRequest.js +2 -1
  25. package/dist/actions/providers/github/listPullRequests.js +4 -0
  26. package/dist/actions/providers/gong/getGongTranscripts.js +42 -10
  27. package/dist/actions/providers/google-oauth/createNewGoogleDoc.js +2 -1
  28. package/dist/actions/providers/google-oauth/createPresentation.js +2 -1
  29. package/dist/actions/providers/google-oauth/createSpreadsheet.js +2 -1
  30. package/dist/actions/providers/google-oauth/scheduleCalendarMeeting.js +2 -1
  31. package/dist/actions/providers/google-oauth/updateDoc.js +2 -1
  32. package/dist/actions/providers/google-oauth/updatePresentation.js +2 -1
  33. package/dist/actions/providers/google-oauth/updateSpreadsheet.js +2 -1
  34. package/dist/actions/providers/jamf/getComputerInventory.d.ts +3 -0
  35. package/dist/actions/providers/{salesforce/getSalesforceRecordByQuery.js → jamf/getComputerInventory.js} +16 -14
  36. package/dist/actions/providers/jamf/getFileVaultRecoveryKey.d.ts +3 -0
  37. package/dist/actions/providers/jamf/getFileVaultRecoveryKey.js +40 -0
  38. package/dist/actions/providers/jira/commentJiraTicket.js +2 -2
  39. package/dist/actions/providers/jira/createJiraTicket.js +2 -2
  40. package/dist/actions/providers/jira/getJiraIssuesByQuery.js +3 -0
  41. package/dist/actions/providers/jira/getJiraTicketDetails.js +2 -2
  42. package/dist/actions/providers/jira/getJiraTicketHistory.js +2 -2
  43. package/dist/actions/providers/jira/updateJiraTicketDetails.js +2 -2
  44. package/dist/actions/providers/jira/updateJiraTicketStatus.js +2 -2
  45. package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.d.ts +3 -0
  46. package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.js +88 -0
  47. package/dist/actions/providers/microsoft/messageTeamsChannel.js +0 -15
  48. package/dist/actions/providers/microsoft/messageTeamsChat.js +0 -12
  49. package/dist/actions/providers/salesforce/createRecord.js +0 -6
  50. package/dist/actions/providers/slack/getChannelMessages.js +4 -0
  51. package/dist/actions/providers/slack/sendMessage.js +4 -0
  52. package/dist/actions/providers/snowflake/getRowByFieldValue.js +2 -1
  53. package/dist/actions/providers/snowflake/runSnowflakeQuery.js +0 -3
  54. package/dist/actions/providers/zendesk/addCommentToTicket.js +2 -1
  55. package/dist/actions/providers/zendesk/assignTicket.js +2 -1
  56. package/dist/actions/providers/zendesk/createZendeskTicket.js +2 -1
  57. package/dist/actions/providers/zendesk/getTicketDetails.js +2 -1
  58. package/dist/actions/providers/zendesk/listTickets.js +2 -1
  59. package/dist/actions/providers/zendesk/updateTicketStatus.js +2 -1
  60. package/dist/actions/util/missingAuthConstants.d.ts +2 -0
  61. package/dist/actions/util/missingAuthConstants.js +5 -0
  62. package/package.json +1 -1
  63. package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +0 -3
@@ -80,6 +80,7 @@ const createRecord_1 = __importDefault(require("./providers/salesforce/createRec
80
80
  const getTopNSearchResultUrls_1 = __importDefault(require("./providers/bing/getTopNSearchResultUrls"));
81
81
  const getGongTranscripts_1 = __importDefault(require("./providers/gong/getGongTranscripts"));
82
82
  const types_2 = require("./autogen/types");
83
+ const getFVRecoveryKeyForDevice_1 = __importDefault(require("./providers/kandji/getFVRecoveryKeyForDevice"));
83
84
  exports.ActionMapper = {
84
85
  generic: {
85
86
  fillTemplate: {
@@ -155,6 +156,13 @@ exports.ActionMapper = {
155
156
  outputSchema: types_1.credalCallCopilotOutputSchema,
156
157
  },
157
158
  },
159
+ kandji: {
160
+ getFVRecoveryKeyForDevice: {
161
+ fn: getFVRecoveryKeyForDevice_1.default,
162
+ paramsSchema: types_1.kandjiGetFVRecoveryKeyForDeviceParamsSchema,
163
+ outputSchema: types_1.kandjiGetFVRecoveryKeyForDeviceOutputSchema,
164
+ },
165
+ },
158
166
  bing: {
159
167
  getTopNSearchResultUrls: {
160
168
  fn: getTopNSearchResultUrls_1.default,
@@ -408,8 +416,8 @@ exports.ActionMapper = {
408
416
  },
409
417
  addCandidateToProject: {
410
418
  fn: addCandidateToProject_1.default,
411
- paramsSchema: types_1.ashbyUpdateCandidateParamsSchema,
412
- outputSchema: types_1.ashbyUpdateCandidateOutputSchema,
419
+ paramsSchema: types_1.ashbyAddCandidateToProjectParamsSchema,
420
+ outputSchema: types_1.ashbyAddCandidateToProjectOutputSchema,
413
421
  },
414
422
  },
415
423
  salesforce: {
@@ -472,8 +480,8 @@ exports.ActionMapper = {
472
480
  },
473
481
  createDocument: {
474
482
  fn: createDocument_1.default,
475
- paramsSchema: types_1.microsoftUpdateDocumentParamsSchema,
476
- outputSchema: types_1.microsoftUpdateDocumentOutputSchema,
483
+ paramsSchema: types_1.microsoftCreateDocumentParamsSchema,
484
+ outputSchema: types_1.microsoftCreateDocumentOutputSchema,
477
485
  },
478
486
  getDocument: {
479
487
  fn: getDocument_1.default,
@@ -16,6 +16,7 @@ export declare const jiraGetJiraTicketHistoryDefinition: ActionTemplate;
16
16
  export declare const jiraUpdateJiraTicketDetailsDefinition: ActionTemplate;
17
17
  export declare const jiraUpdateJiraTicketStatusDefinition: ActionTemplate;
18
18
  export declare const jiraGetJiraIssuesByQueryDefinition: ActionTemplate;
19
+ export declare const kandjiGetFVRecoveryKeyForDeviceDefinition: ActionTemplate;
19
20
  export declare const googlemapsValidateAddressDefinition: ActionTemplate;
20
21
  export declare const googlemapsNearbysearchRestaurantsDefinition: ActionTemplate;
21
22
  export declare const bingGetTopNSearchResultUrlsDefinition: ActionTemplate;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ashbyCreateNoteDefinition = exports.lookerEnableUserByEmailDefinition = exports.finnhubGetBasicFinancialsDefinition = exports.finnhubSymbolLookupDefinition = exports.gongGetGongTranscriptsDefinition = exports.googleOauthUpdatePresentationDefinition = exports.googleOauthCreatePresentationDefinition = exports.googleOauthUpdateSpreadsheetDefinition = exports.googleOauthCreateSpreadsheetDefinition = exports.googleOauthScheduleCalendarMeetingDefinition = exports.googleOauthUpdateDocDefinition = exports.googleOauthCreateNewGoogleDocDefinition = exports.resendSendEmailDefinition = exports.firecrawlScrapeTweetDataWithNitterDefinition = exports.firecrawlScrapeUrlDefinition = exports.firecrawlDeepResearchDefinition = exports.nwsGetForecastForLocationDefinition = exports.openstreetmapGetLatitudeLongitudeFromLocationDefinition = exports.snowflakeRunSnowflakeQueryDefinition = exports.snowflakeGetRowByFieldValueDefinition = exports.mongoInsertMongoDocDefinition = exports.xCreateShareXPostUrlDefinition = exports.linkedinCreateShareLinkedinPostUrlDefinition = exports.zendeskAssignTicketDefinition = exports.zendeskAddCommentToTicketDefinition = exports.zendeskUpdateTicketStatusDefinition = exports.zendeskGetTicketDetailsDefinition = exports.zendeskListZendeskTicketsDefinition = exports.zendeskCreateZendeskTicketDefinition = exports.credalCallCopilotDefinition = exports.bingGetTopNSearchResultUrlsDefinition = exports.googlemapsNearbysearchRestaurantsDefinition = exports.googlemapsValidateAddressDefinition = exports.jiraGetJiraIssuesByQueryDefinition = exports.jiraUpdateJiraTicketStatusDefinition = exports.jiraUpdateJiraTicketDetailsDefinition = exports.jiraGetJiraTicketHistoryDefinition = exports.jiraGetJiraTicketDetailsDefinition = exports.jiraCreateJiraTicketDefinition = exports.jiraCommentJiraTicketDefinition = exports.jiraAssignJiraTicketDefinition = exports.confluenceFetchPageContentDefinition = exports.confluenceOverwritePageDefinition = exports.mathAddDefinition = exports.slackGetChannelMessagesDefinition = exports.slackSendMessageDefinition = exports.asanaUpdateTaskDefinition = exports.asanaCreateTaskDefinition = exports.asanaCommentTaskDefinition = exports.genericFillTemplateDefinition = void 0;
4
- exports.githubListPullRequestsDefinition = exports.githubCreatePullRequestDefinition = exports.githubCreateBranchDefinition = exports.githubCreateOrUpdateFileDefinition = exports.microsoftGetDocumentDefinition = exports.microsoftMessageTeamsChannelDefinition = exports.microsoftMessageTeamsChatDefinition = exports.microsoftUpdateSpreadsheetDefinition = exports.microsoftUpdateDocumentDefinition = exports.microsoftCreateDocumentDefinition = exports.salesforceFetchSalesforceSchemaByObjectDefinition = exports.salesforceGetRecordDefinition = exports.salesforceGetSalesforceRecordsByQueryDefinition = exports.salesforceGenerateSalesReportDefinition = exports.salesforceCreateCaseDefinition = exports.salesforceCreateRecordDefinition = exports.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = exports.ashbyListCandidateNotesDefinition = exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = exports.ashbyAddCandidateToProjectDefinition = exports.ashbyGetCandidateInfoDefinition = void 0;
3
+ exports.lookerEnableUserByEmailDefinition = exports.finnhubGetBasicFinancialsDefinition = exports.finnhubSymbolLookupDefinition = exports.gongGetGongTranscriptsDefinition = exports.googleOauthUpdatePresentationDefinition = exports.googleOauthCreatePresentationDefinition = exports.googleOauthUpdateSpreadsheetDefinition = exports.googleOauthCreateSpreadsheetDefinition = exports.googleOauthScheduleCalendarMeetingDefinition = exports.googleOauthUpdateDocDefinition = exports.googleOauthCreateNewGoogleDocDefinition = exports.resendSendEmailDefinition = exports.firecrawlScrapeTweetDataWithNitterDefinition = exports.firecrawlScrapeUrlDefinition = exports.firecrawlDeepResearchDefinition = exports.nwsGetForecastForLocationDefinition = exports.openstreetmapGetLatitudeLongitudeFromLocationDefinition = exports.snowflakeRunSnowflakeQueryDefinition = exports.snowflakeGetRowByFieldValueDefinition = exports.mongoInsertMongoDocDefinition = exports.xCreateShareXPostUrlDefinition = exports.linkedinCreateShareLinkedinPostUrlDefinition = exports.zendeskAssignTicketDefinition = exports.zendeskAddCommentToTicketDefinition = exports.zendeskUpdateTicketStatusDefinition = exports.zendeskGetTicketDetailsDefinition = exports.zendeskListZendeskTicketsDefinition = exports.zendeskCreateZendeskTicketDefinition = exports.credalCallCopilotDefinition = exports.bingGetTopNSearchResultUrlsDefinition = exports.googlemapsNearbysearchRestaurantsDefinition = exports.googlemapsValidateAddressDefinition = exports.kandjiGetFVRecoveryKeyForDeviceDefinition = exports.jiraGetJiraIssuesByQueryDefinition = exports.jiraUpdateJiraTicketStatusDefinition = exports.jiraUpdateJiraTicketDetailsDefinition = exports.jiraGetJiraTicketHistoryDefinition = exports.jiraGetJiraTicketDetailsDefinition = exports.jiraCreateJiraTicketDefinition = exports.jiraCommentJiraTicketDefinition = exports.jiraAssignJiraTicketDefinition = exports.confluenceFetchPageContentDefinition = exports.confluenceOverwritePageDefinition = exports.mathAddDefinition = exports.slackGetChannelMessagesDefinition = exports.slackSendMessageDefinition = exports.asanaUpdateTaskDefinition = exports.asanaCreateTaskDefinition = exports.asanaCommentTaskDefinition = exports.genericFillTemplateDefinition = void 0;
4
+ exports.githubListPullRequestsDefinition = exports.githubCreatePullRequestDefinition = exports.githubCreateBranchDefinition = exports.githubCreateOrUpdateFileDefinition = exports.microsoftGetDocumentDefinition = exports.microsoftMessageTeamsChannelDefinition = exports.microsoftMessageTeamsChatDefinition = exports.microsoftUpdateSpreadsheetDefinition = exports.microsoftUpdateDocumentDefinition = exports.microsoftCreateDocumentDefinition = exports.salesforceFetchSalesforceSchemaByObjectDefinition = exports.salesforceGetRecordDefinition = exports.salesforceGetSalesforceRecordsByQueryDefinition = exports.salesforceGenerateSalesReportDefinition = exports.salesforceCreateCaseDefinition = exports.salesforceCreateRecordDefinition = exports.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = exports.ashbyListCandidateNotesDefinition = exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = exports.ashbyAddCandidateToProjectDefinition = exports.ashbyGetCandidateInfoDefinition = exports.ashbyCreateNoteDefinition = void 0;
5
5
  exports.genericFillTemplateDefinition = {
6
6
  description: "Simple utility that takes a template and returns it filled in",
7
7
  scopes: [],
@@ -712,6 +712,40 @@ exports.jiraGetJiraIssuesByQueryDefinition = {
712
712
  name: "getJiraIssuesByQuery",
713
713
  provider: "jira",
714
714
  };
715
+ exports.kandjiGetFVRecoveryKeyForDeviceDefinition = {
716
+ description: "Get the FileVault recovery key for a device",
717
+ scopes: [],
718
+ parameters: {
719
+ type: "object",
720
+ required: ["serialNumber"],
721
+ properties: {
722
+ serialNumber: {
723
+ type: "string",
724
+ description: "The serial number of the device",
725
+ },
726
+ },
727
+ },
728
+ output: {
729
+ type: "object",
730
+ required: ["success"],
731
+ properties: {
732
+ success: {
733
+ type: "boolean",
734
+ description: "Whether the recovery key was retrieved successfully",
735
+ },
736
+ recoveryKey: {
737
+ type: "string",
738
+ description: "The FileVault recovery key for the device",
739
+ },
740
+ error: {
741
+ type: "string",
742
+ description: "The error that occurred if the recovery key was not retrieved successfully",
743
+ },
744
+ },
745
+ },
746
+ name: "getFVRecoveryKeyForDevice",
747
+ provider: "kandji",
748
+ };
715
749
  exports.googlemapsValidateAddressDefinition = {
716
750
  description: "Validate a Google Maps address",
717
751
  scopes: [],
@@ -4906,6 +4940,7 @@ exports.gongGetGongTranscriptsDefinition = {
4906
4940
  },
4907
4941
  topic: {
4908
4942
  type: "string",
4943
+ nullable: true,
4909
4944
  description: "The topic of the transcript",
4910
4945
  },
4911
4946
  sentences: {
@@ -551,6 +551,29 @@ export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
551
551
  }>;
552
552
  export type jiraGetJiraIssuesByQueryOutputType = z.infer<typeof jiraGetJiraIssuesByQueryOutputSchema>;
553
553
  export type jiraGetJiraIssuesByQueryFunction = ActionFunction<jiraGetJiraIssuesByQueryParamsType, AuthParamsType, jiraGetJiraIssuesByQueryOutputType>;
554
+ export declare const kandjiGetFVRecoveryKeyForDeviceParamsSchema: z.ZodObject<{
555
+ serialNumber: z.ZodString;
556
+ }, "strip", z.ZodTypeAny, {
557
+ serialNumber: string;
558
+ }, {
559
+ serialNumber: string;
560
+ }>;
561
+ export type kandjiGetFVRecoveryKeyForDeviceParamsType = z.infer<typeof kandjiGetFVRecoveryKeyForDeviceParamsSchema>;
562
+ export declare const kandjiGetFVRecoveryKeyForDeviceOutputSchema: z.ZodObject<{
563
+ success: z.ZodBoolean;
564
+ recoveryKey: z.ZodOptional<z.ZodString>;
565
+ error: z.ZodOptional<z.ZodString>;
566
+ }, "strip", z.ZodTypeAny, {
567
+ success: boolean;
568
+ error?: string | undefined;
569
+ recoveryKey?: string | undefined;
570
+ }, {
571
+ success: boolean;
572
+ error?: string | undefined;
573
+ recoveryKey?: string | undefined;
574
+ }>;
575
+ export type kandjiGetFVRecoveryKeyForDeviceOutputType = z.infer<typeof kandjiGetFVRecoveryKeyForDeviceOutputSchema>;
576
+ export type kandjiGetFVRecoveryKeyForDeviceFunction = ActionFunction<kandjiGetFVRecoveryKeyForDeviceParamsType, AuthParamsType, kandjiGetFVRecoveryKeyForDeviceOutputType>;
554
577
  export declare const googlemapsValidateAddressParamsSchema: z.ZodObject<{
555
578
  regionCode: z.ZodString;
556
579
  locality: z.ZodString;
@@ -1958,7 +1981,7 @@ export declare const gongGetGongTranscriptsOutputSchema: z.ZodObject<{
1958
1981
  callId: z.ZodOptional<z.ZodString>;
1959
1982
  transcript: z.ZodOptional<z.ZodArray<z.ZodObject<{
1960
1983
  speakerName: z.ZodOptional<z.ZodString>;
1961
- topic: z.ZodOptional<z.ZodString>;
1984
+ topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1962
1985
  sentences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1963
1986
  start: z.ZodOptional<z.ZodNumber>;
1964
1987
  end: z.ZodOptional<z.ZodNumber>;
@@ -1974,7 +1997,7 @@ export declare const gongGetGongTranscriptsOutputSchema: z.ZodObject<{
1974
1997
  }>, "many">>;
1975
1998
  }, "strip", z.ZodTypeAny, {
1976
1999
  speakerName?: string | undefined;
1977
- topic?: string | undefined;
2000
+ topic?: string | null | undefined;
1978
2001
  sentences?: {
1979
2002
  text?: string | undefined;
1980
2003
  start?: number | undefined;
@@ -1982,7 +2005,7 @@ export declare const gongGetGongTranscriptsOutputSchema: z.ZodObject<{
1982
2005
  }[] | undefined;
1983
2006
  }, {
1984
2007
  speakerName?: string | undefined;
1985
- topic?: string | undefined;
2008
+ topic?: string | null | undefined;
1986
2009
  sentences?: {
1987
2010
  text?: string | undefined;
1988
2011
  start?: number | undefined;
@@ -1993,7 +2016,7 @@ export declare const gongGetGongTranscriptsOutputSchema: z.ZodObject<{
1993
2016
  callId?: string | undefined;
1994
2017
  transcript?: {
1995
2018
  speakerName?: string | undefined;
1996
- topic?: string | undefined;
2019
+ topic?: string | null | undefined;
1997
2020
  sentences?: {
1998
2021
  text?: string | undefined;
1999
2022
  start?: number | undefined;
@@ -2004,7 +2027,7 @@ export declare const gongGetGongTranscriptsOutputSchema: z.ZodObject<{
2004
2027
  callId?: string | undefined;
2005
2028
  transcript?: {
2006
2029
  speakerName?: string | undefined;
2007
- topic?: string | undefined;
2030
+ topic?: string | null | undefined;
2008
2031
  sentences?: {
2009
2032
  text?: string | undefined;
2010
2033
  start?: number | undefined;
@@ -2020,7 +2043,7 @@ export declare const gongGetGongTranscriptsOutputSchema: z.ZodObject<{
2020
2043
  callId?: string | undefined;
2021
2044
  transcript?: {
2022
2045
  speakerName?: string | undefined;
2023
- topic?: string | undefined;
2046
+ topic?: string | null | undefined;
2024
2047
  sentences?: {
2025
2048
  text?: string | undefined;
2026
2049
  start?: number | undefined;
@@ -2035,7 +2058,7 @@ export declare const gongGetGongTranscriptsOutputSchema: z.ZodObject<{
2035
2058
  callId?: string | undefined;
2036
2059
  transcript?: {
2037
2060
  speakerName?: string | undefined;
2038
- topic?: string | undefined;
2061
+ topic?: string | null | undefined;
2039
2062
  sentences?: {
2040
2063
  text?: string | undefined;
2041
2064
  start?: number | undefined;
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zendeskUpdateTicketStatusParamsSchema = exports.zendeskGetTicketDetailsOutputSchema = exports.zendeskGetTicketDetailsParamsSchema = exports.zendeskListZendeskTicketsOutputSchema = exports.zendeskListZendeskTicketsParamsSchema = exports.zendeskCreateZendeskTicketOutputSchema = exports.zendeskCreateZendeskTicketParamsSchema = exports.credalCallCopilotOutputSchema = exports.credalCallCopilotParamsSchema = exports.bingGetTopNSearchResultUrlsOutputSchema = exports.bingGetTopNSearchResultUrlsParamsSchema = exports.googlemapsNearbysearchRestaurantsOutputSchema = exports.googlemapsNearbysearchRestaurantsParamsSchema = exports.googlemapsValidateAddressOutputSchema = exports.googlemapsValidateAddressParamsSchema = exports.jiraGetJiraIssuesByQueryOutputSchema = exports.jiraGetJiraIssuesByQueryParamsSchema = exports.jiraUpdateJiraTicketStatusOutputSchema = exports.jiraUpdateJiraTicketStatusParamsSchema = exports.jiraUpdateJiraTicketDetailsOutputSchema = exports.jiraUpdateJiraTicketDetailsParamsSchema = exports.jiraGetJiraTicketHistoryOutputSchema = exports.jiraGetJiraTicketHistoryParamsSchema = exports.jiraGetJiraTicketDetailsOutputSchema = exports.jiraGetJiraTicketDetailsParamsSchema = exports.jiraCreateJiraTicketOutputSchema = exports.jiraCreateJiraTicketParamsSchema = exports.jiraCommentJiraTicketOutputSchema = exports.jiraCommentJiraTicketParamsSchema = exports.jiraAssignJiraTicketOutputSchema = exports.jiraAssignJiraTicketParamsSchema = exports.confluenceFetchPageContentOutputSchema = exports.confluenceFetchPageContentParamsSchema = exports.confluenceOverwritePageOutputSchema = exports.confluenceOverwritePageParamsSchema = exports.mathAddOutputSchema = exports.mathAddParamsSchema = exports.slackGetChannelMessagesOutputSchema = exports.slackGetChannelMessagesParamsSchema = exports.slackSendMessageOutputSchema = exports.slackSendMessageParamsSchema = exports.asanaUpdateTaskOutputSchema = exports.asanaUpdateTaskParamsSchema = exports.asanaCreateTaskOutputSchema = exports.asanaCreateTaskParamsSchema = exports.asanaCommentTaskOutputSchema = exports.asanaCommentTaskParamsSchema = exports.genericFillTemplateOutputSchema = exports.genericFillTemplateParamsSchema = exports.AuthParamsSchema = void 0;
4
- exports.ashbyCreateNoteParamsSchema = exports.lookerEnableUserByEmailOutputSchema = exports.lookerEnableUserByEmailParamsSchema = exports.finnhubGetBasicFinancialsOutputSchema = exports.finnhubGetBasicFinancialsParamsSchema = exports.finnhubSymbolLookupOutputSchema = exports.finnhubSymbolLookupParamsSchema = exports.gongGetGongTranscriptsOutputSchema = exports.gongGetGongTranscriptsParamsSchema = exports.googleOauthUpdatePresentationOutputSchema = exports.googleOauthUpdatePresentationParamsSchema = exports.googleOauthCreatePresentationOutputSchema = exports.googleOauthCreatePresentationParamsSchema = exports.googleOauthUpdateSpreadsheetOutputSchema = exports.googleOauthUpdateSpreadsheetParamsSchema = exports.googleOauthCreateSpreadsheetOutputSchema = exports.googleOauthCreateSpreadsheetParamsSchema = exports.googleOauthScheduleCalendarMeetingOutputSchema = exports.googleOauthScheduleCalendarMeetingParamsSchema = exports.googleOauthUpdateDocOutputSchema = exports.googleOauthUpdateDocParamsSchema = exports.googleOauthCreateNewGoogleDocOutputSchema = exports.googleOauthCreateNewGoogleDocParamsSchema = exports.resendSendEmailOutputSchema = exports.resendSendEmailParamsSchema = exports.firecrawlScrapeTweetDataWithNitterOutputSchema = exports.firecrawlScrapeTweetDataWithNitterParamsSchema = exports.firecrawlScrapeUrlOutputSchema = exports.firecrawlScrapeUrlParamsSchema = exports.firecrawlDeepResearchOutputSchema = exports.firecrawlDeepResearchParamsSchema = exports.nwsGetForecastForLocationOutputSchema = exports.nwsGetForecastForLocationParamsSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationOutputSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationParamsSchema = exports.snowflakeRunSnowflakeQueryOutputSchema = exports.snowflakeRunSnowflakeQueryParamsSchema = exports.snowflakeGetRowByFieldValueOutputSchema = exports.snowflakeGetRowByFieldValueParamsSchema = exports.mongoInsertMongoDocOutputSchema = exports.mongoInsertMongoDocParamsSchema = exports.xCreateShareXPostUrlOutputSchema = exports.xCreateShareXPostUrlParamsSchema = exports.linkedinCreateShareLinkedinPostUrlOutputSchema = exports.linkedinCreateShareLinkedinPostUrlParamsSchema = exports.zendeskAssignTicketOutputSchema = exports.zendeskAssignTicketParamsSchema = exports.zendeskAddCommentToTicketOutputSchema = exports.zendeskAddCommentToTicketParamsSchema = exports.zendeskUpdateTicketStatusOutputSchema = void 0;
5
- exports.githubListPullRequestsOutputSchema = exports.githubListPullRequestsParamsSchema = exports.githubCreatePullRequestOutputSchema = exports.githubCreatePullRequestParamsSchema = exports.githubCreateBranchOutputSchema = exports.githubCreateBranchParamsSchema = exports.githubCreateOrUpdateFileOutputSchema = exports.githubCreateOrUpdateFileParamsSchema = exports.microsoftGetDocumentOutputSchema = exports.microsoftGetDocumentParamsSchema = exports.microsoftMessageTeamsChannelOutputSchema = exports.microsoftMessageTeamsChannelParamsSchema = exports.microsoftMessageTeamsChatOutputSchema = exports.microsoftMessageTeamsChatParamsSchema = exports.microsoftUpdateSpreadsheetOutputSchema = exports.microsoftUpdateSpreadsheetParamsSchema = exports.microsoftUpdateDocumentOutputSchema = exports.microsoftUpdateDocumentParamsSchema = exports.microsoftCreateDocumentOutputSchema = exports.microsoftCreateDocumentParamsSchema = exports.salesforceFetchSalesforceSchemaByObjectOutputSchema = exports.salesforceFetchSalesforceSchemaByObjectParamsSchema = exports.salesforceGetRecordOutputSchema = exports.salesforceGetRecordParamsSchema = exports.salesforceGetSalesforceRecordsByQueryOutputSchema = exports.salesforceGetSalesforceRecordsByQueryParamsSchema = exports.salesforceGenerateSalesReportOutputSchema = exports.salesforceGenerateSalesReportParamsSchema = exports.salesforceCreateCaseOutputSchema = exports.salesforceCreateCaseParamsSchema = exports.salesforceCreateRecordOutputSchema = exports.salesforceCreateRecordParamsSchema = exports.salesforceUpdateRecordOutputSchema = exports.salesforceUpdateRecordParamsSchema = exports.ashbyUpdateCandidateOutputSchema = exports.ashbyUpdateCandidateParamsSchema = exports.ashbyCreateCandidateOutputSchema = exports.ashbyCreateCandidateParamsSchema = exports.ashbyListCandidateNotesOutputSchema = exports.ashbyListCandidateNotesParamsSchema = exports.ashbySearchCandidatesOutputSchema = exports.ashbySearchCandidatesParamsSchema = exports.ashbyListCandidatesOutputSchema = exports.ashbyListCandidatesParamsSchema = exports.ashbyAddCandidateToProjectOutputSchema = exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = void 0;
3
+ exports.zendeskGetTicketDetailsParamsSchema = exports.zendeskListZendeskTicketsOutputSchema = exports.zendeskListZendeskTicketsParamsSchema = exports.zendeskCreateZendeskTicketOutputSchema = exports.zendeskCreateZendeskTicketParamsSchema = exports.credalCallCopilotOutputSchema = exports.credalCallCopilotParamsSchema = exports.bingGetTopNSearchResultUrlsOutputSchema = exports.bingGetTopNSearchResultUrlsParamsSchema = exports.googlemapsNearbysearchRestaurantsOutputSchema = exports.googlemapsNearbysearchRestaurantsParamsSchema = exports.googlemapsValidateAddressOutputSchema = exports.googlemapsValidateAddressParamsSchema = exports.kandjiGetFVRecoveryKeyForDeviceOutputSchema = exports.kandjiGetFVRecoveryKeyForDeviceParamsSchema = exports.jiraGetJiraIssuesByQueryOutputSchema = exports.jiraGetJiraIssuesByQueryParamsSchema = exports.jiraUpdateJiraTicketStatusOutputSchema = exports.jiraUpdateJiraTicketStatusParamsSchema = exports.jiraUpdateJiraTicketDetailsOutputSchema = exports.jiraUpdateJiraTicketDetailsParamsSchema = exports.jiraGetJiraTicketHistoryOutputSchema = exports.jiraGetJiraTicketHistoryParamsSchema = exports.jiraGetJiraTicketDetailsOutputSchema = exports.jiraGetJiraTicketDetailsParamsSchema = exports.jiraCreateJiraTicketOutputSchema = exports.jiraCreateJiraTicketParamsSchema = exports.jiraCommentJiraTicketOutputSchema = exports.jiraCommentJiraTicketParamsSchema = exports.jiraAssignJiraTicketOutputSchema = exports.jiraAssignJiraTicketParamsSchema = exports.confluenceFetchPageContentOutputSchema = exports.confluenceFetchPageContentParamsSchema = exports.confluenceOverwritePageOutputSchema = exports.confluenceOverwritePageParamsSchema = exports.mathAddOutputSchema = exports.mathAddParamsSchema = exports.slackGetChannelMessagesOutputSchema = exports.slackGetChannelMessagesParamsSchema = exports.slackSendMessageOutputSchema = exports.slackSendMessageParamsSchema = exports.asanaUpdateTaskOutputSchema = exports.asanaUpdateTaskParamsSchema = exports.asanaCreateTaskOutputSchema = exports.asanaCreateTaskParamsSchema = exports.asanaCommentTaskOutputSchema = exports.asanaCommentTaskParamsSchema = exports.genericFillTemplateOutputSchema = exports.genericFillTemplateParamsSchema = exports.AuthParamsSchema = void 0;
4
+ exports.lookerEnableUserByEmailParamsSchema = exports.finnhubGetBasicFinancialsOutputSchema = exports.finnhubGetBasicFinancialsParamsSchema = exports.finnhubSymbolLookupOutputSchema = exports.finnhubSymbolLookupParamsSchema = exports.gongGetGongTranscriptsOutputSchema = exports.gongGetGongTranscriptsParamsSchema = exports.googleOauthUpdatePresentationOutputSchema = exports.googleOauthUpdatePresentationParamsSchema = exports.googleOauthCreatePresentationOutputSchema = exports.googleOauthCreatePresentationParamsSchema = exports.googleOauthUpdateSpreadsheetOutputSchema = exports.googleOauthUpdateSpreadsheetParamsSchema = exports.googleOauthCreateSpreadsheetOutputSchema = exports.googleOauthCreateSpreadsheetParamsSchema = exports.googleOauthScheduleCalendarMeetingOutputSchema = exports.googleOauthScheduleCalendarMeetingParamsSchema = exports.googleOauthUpdateDocOutputSchema = exports.googleOauthUpdateDocParamsSchema = exports.googleOauthCreateNewGoogleDocOutputSchema = exports.googleOauthCreateNewGoogleDocParamsSchema = exports.resendSendEmailOutputSchema = exports.resendSendEmailParamsSchema = exports.firecrawlScrapeTweetDataWithNitterOutputSchema = exports.firecrawlScrapeTweetDataWithNitterParamsSchema = exports.firecrawlScrapeUrlOutputSchema = exports.firecrawlScrapeUrlParamsSchema = exports.firecrawlDeepResearchOutputSchema = exports.firecrawlDeepResearchParamsSchema = exports.nwsGetForecastForLocationOutputSchema = exports.nwsGetForecastForLocationParamsSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationOutputSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationParamsSchema = exports.snowflakeRunSnowflakeQueryOutputSchema = exports.snowflakeRunSnowflakeQueryParamsSchema = exports.snowflakeGetRowByFieldValueOutputSchema = exports.snowflakeGetRowByFieldValueParamsSchema = exports.mongoInsertMongoDocOutputSchema = exports.mongoInsertMongoDocParamsSchema = exports.xCreateShareXPostUrlOutputSchema = exports.xCreateShareXPostUrlParamsSchema = exports.linkedinCreateShareLinkedinPostUrlOutputSchema = exports.linkedinCreateShareLinkedinPostUrlParamsSchema = exports.zendeskAssignTicketOutputSchema = exports.zendeskAssignTicketParamsSchema = exports.zendeskAddCommentToTicketOutputSchema = exports.zendeskAddCommentToTicketParamsSchema = exports.zendeskUpdateTicketStatusOutputSchema = exports.zendeskUpdateTicketStatusParamsSchema = exports.zendeskGetTicketDetailsOutputSchema = void 0;
5
+ exports.githubListPullRequestsParamsSchema = exports.githubCreatePullRequestOutputSchema = exports.githubCreatePullRequestParamsSchema = exports.githubCreateBranchOutputSchema = exports.githubCreateBranchParamsSchema = exports.githubCreateOrUpdateFileOutputSchema = exports.githubCreateOrUpdateFileParamsSchema = exports.microsoftGetDocumentOutputSchema = exports.microsoftGetDocumentParamsSchema = exports.microsoftMessageTeamsChannelOutputSchema = exports.microsoftMessageTeamsChannelParamsSchema = exports.microsoftMessageTeamsChatOutputSchema = exports.microsoftMessageTeamsChatParamsSchema = exports.microsoftUpdateSpreadsheetOutputSchema = exports.microsoftUpdateSpreadsheetParamsSchema = exports.microsoftUpdateDocumentOutputSchema = exports.microsoftUpdateDocumentParamsSchema = exports.microsoftCreateDocumentOutputSchema = exports.microsoftCreateDocumentParamsSchema = exports.salesforceFetchSalesforceSchemaByObjectOutputSchema = exports.salesforceFetchSalesforceSchemaByObjectParamsSchema = exports.salesforceGetRecordOutputSchema = exports.salesforceGetRecordParamsSchema = exports.salesforceGetSalesforceRecordsByQueryOutputSchema = exports.salesforceGetSalesforceRecordsByQueryParamsSchema = exports.salesforceGenerateSalesReportOutputSchema = exports.salesforceGenerateSalesReportParamsSchema = exports.salesforceCreateCaseOutputSchema = exports.salesforceCreateCaseParamsSchema = exports.salesforceCreateRecordOutputSchema = exports.salesforceCreateRecordParamsSchema = exports.salesforceUpdateRecordOutputSchema = exports.salesforceUpdateRecordParamsSchema = exports.ashbyUpdateCandidateOutputSchema = exports.ashbyUpdateCandidateParamsSchema = exports.ashbyCreateCandidateOutputSchema = exports.ashbyCreateCandidateParamsSchema = exports.ashbyListCandidateNotesOutputSchema = exports.ashbyListCandidateNotesParamsSchema = exports.ashbySearchCandidatesOutputSchema = exports.ashbySearchCandidatesParamsSchema = exports.ashbyListCandidatesOutputSchema = exports.ashbyListCandidatesParamsSchema = exports.ashbyAddCandidateToProjectOutputSchema = exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = exports.ashbyCreateNoteParamsSchema = exports.lookerEnableUserByEmailOutputSchema = void 0;
6
+ exports.githubListPullRequestsOutputSchema = void 0;
6
7
  const zod_1 = require("zod");
7
8
  exports.AuthParamsSchema = zod_1.z.object({
8
9
  authToken: zod_1.z.string().optional(),
@@ -207,6 +208,14 @@ exports.jiraGetJiraIssuesByQueryOutputSchema = zod_1.z.object({
207
208
  records: zod_1.z.array(zod_1.z.record(zod_1.z.string()).describe("An issue from Jira")).describe("The retrieved records").optional(),
208
209
  error: zod_1.z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
209
210
  });
211
+ exports.kandjiGetFVRecoveryKeyForDeviceParamsSchema = zod_1.z.object({
212
+ serialNumber: zod_1.z.string().describe("The serial number of the device"),
213
+ });
214
+ exports.kandjiGetFVRecoveryKeyForDeviceOutputSchema = zod_1.z.object({
215
+ success: zod_1.z.boolean().describe("Whether the recovery key was retrieved successfully"),
216
+ recoveryKey: zod_1.z.string().describe("The FileVault recovery key for the device").optional(),
217
+ error: zod_1.z.string().describe("The error that occurred if the recovery key was not retrieved successfully").optional(),
218
+ });
210
219
  exports.googlemapsValidateAddressParamsSchema = zod_1.z.object({
211
220
  regionCode: zod_1.z.string().describe("The country of the address being verified."),
212
221
  locality: zod_1.z.string().describe("The locality of the address being verified. This is likely a city."),
@@ -1987,7 +1996,7 @@ exports.gongGetGongTranscriptsOutputSchema = zod_1.z.object({
1987
1996
  .array(zod_1.z
1988
1997
  .object({
1989
1998
  speakerName: zod_1.z.string().describe("The name of the speaker").optional(),
1990
- topic: zod_1.z.string().describe("The topic of the transcript").optional(),
1999
+ topic: zod_1.z.string().nullable().describe("The topic of the transcript").optional(),
1991
2000
  sentences: zod_1.z
1992
2001
  .array(zod_1.z
1993
2002
  .object({
@@ -145,6 +145,10 @@ exports.ACTION_GROUPS = {
145
145
  templates_1.microsoftGetDocumentDefinition,
146
146
  ],
147
147
  },
148
+ KANDJI: {
149
+ description: "Actions for interacting with Kandji",
150
+ actions: [templates_1.kandjiGetFVRecoveryKeyForDeviceDefinition],
151
+ },
148
152
  GITHUB: {
149
153
  description: "Actions for interacting with GitHub",
150
154
  actions: [
@@ -18,6 +18,10 @@ function invokeAction(input) {
18
18
  throw new Error(`Provider '${provider}' not found`);
19
19
  }
20
20
  const providerFunction = actionMapper_1.ActionMapper[provider][name].fn;
21
+ const safeParseParams = actionMapper_1.ActionMapper[provider][name].paramsSchema.safeParse(parameters);
22
+ if (!safeParseParams.success) {
23
+ throw new Error(`Invalid parameters for action '${name}': ${safeParseParams.error}`);
24
+ }
21
25
  return providerFunction({ params: parameters, authParams });
22
26
  });
23
27
  }
@@ -10,12 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const commentAsanaTask = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
15
  var _b, _c;
15
16
  const { authToken } = authParams;
16
17
  const { commentText, isPinned, taskId } = params;
17
- if (!commentText || !authToken) {
18
- return { success: false, error: "Comment text and valid authToken are required" };
18
+ if (!authToken) {
19
+ return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN };
19
20
  }
20
21
  try {
21
22
  const response = yield axiosClient_1.axiosClient.post(`https://app.asana.com/api/1.0/tasks/${taskId}/stories`, {
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const utils_1 = require("./utils");
14
15
  const getTaskTemplates = (authToken, projectId) => __awaiter(void 0, void 0, void 0, function* () {
15
16
  const url = `https://app.asana.com/api/1.0/task_templates/?project=${projectId}`;
@@ -28,8 +29,8 @@ const createAsanaTask = (_a) => __awaiter(void 0, [_a], void 0, function* ({ par
28
29
  var _b, _c;
29
30
  const { authToken } = authParams;
30
31
  const { name, projectId, description, customFields, taskTemplate, assignee, approvalStatus, dueAt } = params;
31
- if (!name || !authToken || !projectId) {
32
- return { success: false, error: "Task name, valid authToken, and projectId are required" };
32
+ if (!authToken) {
33
+ return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN };
33
34
  }
34
35
  const workspaceId = yield (0, utils_1.getWorkspaceIdFromProject)(projectId, authToken);
35
36
  if (!workspaceId) {
@@ -10,12 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const utils_1 = require("./utils");
14
15
  const updateAsanaTask = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
15
16
  const { authToken } = authParams;
16
17
  const { name, taskId, description, customFields, completed, assignee, approvalStatus, dueAt } = params;
17
- if (!authToken || !taskId) {
18
- return { success: false, error: "Valid authToken, and taskId are required" };
18
+ if (!authToken) {
19
+ return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN };
19
20
  }
20
21
  const { workspaceId, permalinkUrl } = yield (0, utils_1.getWorkspaceIdAndPermalinkFromTask)(taskId, authToken);
21
22
  if (!workspaceId || !permalinkUrl) {
@@ -10,11 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const addCandidateToProject = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
15
  const { candidateId, projectId } = params;
15
16
  const { authToken } = authParams;
16
17
  if (!authToken) {
17
- throw new Error("Auth token is required");
18
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
18
19
  }
19
20
  const response = yield axiosClient_1.axiosClient.post(`https://api.ashbyhq.com/candidate.addProject`, {
20
21
  candidateId,
@@ -10,13 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const createCandidate = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
15
  const { authToken } = authParams;
15
16
  if (!authToken) {
16
- throw new Error("Auth token is required");
17
- }
18
- if (!params.name) {
19
- throw new Error("Name is required");
17
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
20
18
  }
21
19
  const response = yield axiosClient_1.axiosClient.post(`https://api.ashbyhq.com/candidate.create`, {
22
20
  name: params.name,
@@ -10,11 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const createNote = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
15
  const { candidateId, note } = params;
15
16
  const { authToken } = authParams;
16
17
  if (!authToken) {
17
- throw new Error("Auth token is required");
18
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
18
19
  }
19
20
  const response = yield axiosClient_1.axiosClient.post(`https://api.ashbyhq.com/candidate.createNote`, {
20
21
  candidateId,
@@ -10,11 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const getCandidateInfo = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
15
  const { candidateId } = params;
15
16
  const { authToken } = authParams;
16
17
  if (!authToken) {
17
- throw new Error("Auth token is required");
18
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
18
19
  }
19
20
  const response = yield axiosClient_1.axiosClient.post(`https://api.ashbyhq.com/candidate.info`, {
20
21
  id: candidateId,
@@ -10,11 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const listCandidateNotes = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
15
  const { candidateId } = params;
15
16
  const { authToken } = authParams;
16
17
  if (!authToken) {
17
- throw new Error("Auth token is required");
18
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
18
19
  }
19
20
  const response = yield axiosClient_1.axiosClient.post(`https://api.ashbyhq.com/candidate.listNotes`, {
20
21
  candidateId,
@@ -10,10 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const listCandidates = (_a) => __awaiter(void 0, [_a], void 0, function* ({ authParams, }) {
14
15
  const { authToken } = authParams;
15
16
  if (!authToken) {
16
- throw new Error("Auth token is required");
17
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
17
18
  }
18
19
  const response = yield axiosClient_1.axiosClient.post(`https://api.ashbyhq.com/candidate.list`, null, {
19
20
  auth: {
@@ -10,11 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const searchCandidates = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
15
  const { email, name } = params;
15
16
  const { authToken } = authParams;
16
17
  if (!authToken) {
17
- throw new Error("Auth token is required");
18
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
18
19
  }
19
20
  const response = yield axiosClient_1.axiosClient.post(`https://api.ashbyhq.com/candidate.search`, {
20
21
  email,
@@ -10,13 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const updateCandidate = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
15
  const { authToken } = authParams;
15
16
  if (!authToken) {
16
- throw new Error("Auth token is required");
17
- }
18
- if (!params.candidateId) {
19
- throw new Error("Candidate ID is required");
17
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
20
18
  }
21
19
  const body = {
22
20
  candidateId: params.candidateId,
@@ -11,12 +11,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const helpers_1 = require("./helpers");
13
13
  const axiosClient_1 = require("../../util/axiosClient");
14
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
14
15
  const confluenceFetchPageContent = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
15
16
  var _b, _c;
16
17
  const { pageId } = params;
17
18
  const { authToken } = authParams;
18
19
  if (!authToken) {
19
- throw new Error("Missing required authentication parameters");
20
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
20
21
  }
21
22
  const cloudDetails = yield axiosClient_1.axiosClient.get("https://api.atlassian.com/oauth/token/accessible-resources", {
22
23
  headers: {
@@ -10,12 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
13
14
  const helpers_1 = require("./helpers");
14
15
  const confluenceOverwritePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
15
16
  const { pageId, content, title } = params;
16
17
  const { authToken } = authParams;
17
18
  if (!authToken) {
18
- throw new Error("Missing required authentication parameters");
19
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
19
20
  }
20
21
  const cloudDetails = yield axiosClient_1.axiosClient.get("https://api.atlassian.com/oauth/token/accessible-resources", {
21
22
  headers: {
@@ -13,6 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const firecrawl_js_1 = __importDefault(require("@mendable/firecrawl-js"));
16
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
16
17
  const scrapeTweetDataWithNitter = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
17
18
  const tweetUrlRegex = /^(?:https?:\/\/)?(?:www\.)?(?:twitter\.com|x\.com)\/([a-zA-Z0-9_]+)\/status\/(\d+)(?:\?.*)?$/;
18
19
  if (!tweetUrlRegex.test(params.tweetUrl)) {
@@ -21,7 +22,7 @@ const scrapeTweetDataWithNitter = (_a) => __awaiter(void 0, [_a], void 0, functi
21
22
  const nitterUrl = params.tweetUrl.replace(/^(?:https?:\/\/)?(?:www\.)?(?:twitter\.com|x\.com)/i, "https://nitter.net");
22
23
  // Initialize Firecrawl
23
24
  if (!authParams.apiKey) {
24
- throw new Error("API key is required for X+Nitter+Firecrawl");
25
+ throw new Error(missingAuthConstants_1.MISSING_API_KEY);
25
26
  }
26
27
  const firecrawl = new firecrawl_js_1.default({
27
28
  apiKey: authParams.apiKey,
@@ -42,12 +42,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
42
42
  });
43
43
  };
44
44
  Object.defineProperty(exports, "__esModule", { value: true });
45
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
45
46
  /**
46
47
  * Creates a new branch in a GitHub repository
47
48
  */
48
49
  const createBranch = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
49
50
  if (!authParams.authToken) {
50
- return { success: false, error: "authToken is required for GitHub API" };
51
+ return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN };
51
52
  }
52
53
  const { Octokit, RequestError } = yield Promise.resolve().then(() => __importStar(require("octokit")));
53
54
  const { repositoryOwner, repositoryName, branchName, baseRefOrHash } = params;
@@ -43,12 +43,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43
43
  };
44
44
  Object.defineProperty(exports, "__esModule", { value: true });
45
45
  const zod_1 = require("zod");
46
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
46
47
  /**
47
48
  * Creates or updates a file in a GitHub repository
48
49
  */
49
50
  const createOrUpdateFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
50
51
  if (!authParams.authToken) {
51
- return { success: false, error: "authToken is required for GitHub API" };
52
+ return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN };
52
53
  }
53
54
  const { Octokit, RequestError } = yield Promise.resolve().then(() => __importStar(require("octokit")));
54
55
  const { repositoryOwner, repositoryName, filePath, branch, fileContent, commitMessage } = params;
@@ -42,12 +42,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
42
42
  });
43
43
  };
44
44
  Object.defineProperty(exports, "__esModule", { value: true });
45
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
45
46
  /**
46
47
  * Creates a pull request in a GitHub repository
47
48
  */
48
49
  const createPullRequest = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
49
50
  if (!authParams.authToken) {
50
- return { success: false, error: "authToken is required for GitHub API" };
51
+ return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN };
51
52
  }
52
53
  const { Octokit, RequestError } = yield Promise.resolve().then(() => __importStar(require("octokit")));
53
54
  const { repositoryOwner, repositoryName, head, base, title, description } = params;
@@ -14,8 +14,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const axios_1 = __importDefault(require("axios"));
16
16
  const types_1 = require("../../autogen/types");
17
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
17
18
  const listPullRequests = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
18
19
  const { authToken } = authParams;
20
+ if (!authToken) {
21
+ throw new Error(missingAuthConstants_1.MISSING_AUTH_TOKEN);
22
+ }
19
23
  const { repositoryName, repositoryOwner, state } = params;
20
24
  const url = `https://api.github.com/repos/${repositoryOwner}/${repositoryName}/pulls`;
21
25
  const allPulls = [];