@credal/actions 0.1.89 → 0.1.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/actionMapper.js +8 -0
- package/dist/actions/autogen/templates.d.ts +2 -1
- package/dist/actions/autogen/templates.js +80 -27
- package/dist/actions/autogen/types.d.ts +74 -31
- package/dist/actions/autogen/types.js +27 -12
- package/dist/actions/groups.js +4 -0
- package/dist/actions/providers/notion/searchByTitle.d.ts +3 -0
- package/dist/actions/providers/notion/searchByTitle.js +71 -0
- package/package.json +1 -1
@@ -85,6 +85,7 @@ const types_2 = require("./autogen/types");
|
|
85
85
|
const getFVRecoveryKeyForDevice_1 = __importDefault(require("./providers/kandji/getFVRecoveryKeyForDevice"));
|
86
86
|
const listAsanaTasksByProject_1 = __importDefault(require("./providers/asana/listAsanaTasksByProject"));
|
87
87
|
const getTasksDetails_1 = __importDefault(require("./providers/asana/getTasksDetails"));
|
88
|
+
const searchByTitle_1 = __importDefault(require("./providers/notion/searchByTitle"));
|
88
89
|
exports.ActionMapper = {
|
89
90
|
generic: {
|
90
91
|
fillTemplate: {
|
@@ -535,4 +536,11 @@ exports.ActionMapper = {
|
|
535
536
|
outputSchema: types_1.githubListPullRequestsOutputSchema,
|
536
537
|
},
|
537
538
|
},
|
539
|
+
notion: {
|
540
|
+
searchByTitle: {
|
541
|
+
fn: searchByTitle_1.default,
|
542
|
+
paramsSchema: types_1.notionSearchByTitleParamsSchema,
|
543
|
+
outputSchema: types_1.notionSearchByTitleOutputSchema,
|
544
|
+
},
|
545
|
+
},
|
538
546
|
};
|
@@ -41,6 +41,7 @@ export declare const firecrawlDeepResearchDefinition: ActionTemplate;
|
|
41
41
|
export declare const firecrawlScrapeUrlDefinition: ActionTemplate;
|
42
42
|
export declare const firecrawlScrapeTweetDataWithNitterDefinition: ActionTemplate;
|
43
43
|
export declare const resendSendEmailDefinition: ActionTemplate;
|
44
|
+
export declare const googleOauthSearchFilesByKeywordsDefinition: ActionTemplate;
|
44
45
|
export declare const googleOauthCreateNewGoogleDocDefinition: ActionTemplate;
|
45
46
|
export declare const googleOauthUpdateDocDefinition: ActionTemplate;
|
46
47
|
export declare const googleOauthScheduleCalendarMeetingDefinition: ActionTemplate;
|
@@ -78,4 +79,4 @@ export declare const githubCreateOrUpdateFileDefinition: ActionTemplate;
|
|
78
79
|
export declare const githubCreateBranchDefinition: ActionTemplate;
|
79
80
|
export declare const githubCreatePullRequestDefinition: ActionTemplate;
|
80
81
|
export declare const githubListPullRequestsDefinition: ActionTemplate;
|
81
|
-
export declare const
|
82
|
+
export declare const notionSearchByTitleDefinition: ActionTemplate;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
exports.
|
3
|
+
exports.googleOauthUpdatePresentationDefinition = exports.googleOauthCreatePresentationDefinition = exports.googleOauthUpdateSpreadsheetDefinition = exports.googleOauthCreateSpreadsheetDefinition = exports.googleOauthScheduleCalendarMeetingDefinition = exports.googleOauthUpdateDocDefinition = exports.googleOauthCreateNewGoogleDocDefinition = exports.googleOauthSearchFilesByKeywordsDefinition = 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.asanaGetTasksDetailsDefinition = exports.asanaSearchTasksDefinition = exports.asanaUpdateTaskDefinition = exports.asanaCreateTaskDefinition = exports.asanaListAsanaTasksByProjectDefinition = exports.asanaCommentTaskDefinition = exports.genericFillTemplateDefinition = void 0;
|
4
|
+
exports.notionSearchByTitleDefinition = 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 = exports.lookerEnableUserByEmailDefinition = exports.finnhubGetBasicFinancialsDefinition = exports.finnhubSymbolLookupDefinition = exports.gongGetGongTranscriptsDefinition = exports.googleOauthSearchDriveByKeywordsDefinition = void 0;
|
5
5
|
exports.genericFillTemplateDefinition = {
|
6
6
|
description: "Simple utility that takes a template and returns it filled in",
|
7
7
|
scopes: [],
|
@@ -2136,6 +2136,65 @@ exports.resendSendEmailDefinition = {
|
|
2136
2136
|
name: "sendEmail",
|
2137
2137
|
provider: "resend",
|
2138
2138
|
};
|
2139
|
+
exports.googleOauthSearchFilesByKeywordsDefinition = {
|
2140
|
+
description: "Search Google Drive files that contain one or more keywords in their full text.",
|
2141
|
+
scopes: ["https://www.googleapis.com/auth/drive.readonly"],
|
2142
|
+
parameters: {
|
2143
|
+
type: "object",
|
2144
|
+
required: ["keywords"],
|
2145
|
+
properties: {
|
2146
|
+
keywords: {
|
2147
|
+
type: "array",
|
2148
|
+
description: "List of keywords to search for in file contents.",
|
2149
|
+
items: {
|
2150
|
+
type: "string",
|
2151
|
+
},
|
2152
|
+
},
|
2153
|
+
},
|
2154
|
+
},
|
2155
|
+
output: {
|
2156
|
+
type: "object",
|
2157
|
+
required: ["success", "files"],
|
2158
|
+
properties: {
|
2159
|
+
success: {
|
2160
|
+
type: "boolean",
|
2161
|
+
description: "Whether the search was successful",
|
2162
|
+
},
|
2163
|
+
files: {
|
2164
|
+
type: "array",
|
2165
|
+
description: "List of files matching the search",
|
2166
|
+
items: {
|
2167
|
+
type: "object",
|
2168
|
+
required: ["id", "name", "mimeType", "webViewLink"],
|
2169
|
+
properties: {
|
2170
|
+
id: {
|
2171
|
+
type: "string",
|
2172
|
+
description: "The file ID",
|
2173
|
+
},
|
2174
|
+
name: {
|
2175
|
+
type: "string",
|
2176
|
+
description: "The file name",
|
2177
|
+
},
|
2178
|
+
mimeType: {
|
2179
|
+
type: "string",
|
2180
|
+
description: "The MIME type of the file",
|
2181
|
+
},
|
2182
|
+
webViewLink: {
|
2183
|
+
type: "string",
|
2184
|
+
description: "The web link to view the file",
|
2185
|
+
},
|
2186
|
+
},
|
2187
|
+
},
|
2188
|
+
},
|
2189
|
+
error: {
|
2190
|
+
type: "string",
|
2191
|
+
description: "Error message if search failed",
|
2192
|
+
},
|
2193
|
+
},
|
2194
|
+
},
|
2195
|
+
name: "searchFilesByKeywords",
|
2196
|
+
provider: "googleOauth",
|
2197
|
+
};
|
2139
2198
|
exports.googleOauthCreateNewGoogleDocDefinition = {
|
2140
2199
|
description: "Create a new Google Docs document using OAuth authentication",
|
2141
2200
|
scopes: [],
|
@@ -6683,52 +6742,46 @@ exports.githubListPullRequestsDefinition = {
|
|
6683
6742
|
name: "listPullRequests",
|
6684
6743
|
provider: "github",
|
6685
6744
|
};
|
6686
|
-
exports.
|
6687
|
-
description: "Search
|
6688
|
-
scopes: [
|
6745
|
+
exports.notionSearchByTitleDefinition = {
|
6746
|
+
description: "Search Notion pages and databases by title",
|
6747
|
+
scopes: [],
|
6689
6748
|
parameters: {
|
6690
6749
|
type: "object",
|
6691
|
-
required: ["
|
6750
|
+
required: ["query"],
|
6692
6751
|
properties: {
|
6693
|
-
|
6694
|
-
type: "
|
6695
|
-
description: "
|
6696
|
-
items: {
|
6697
|
-
type: "string",
|
6698
|
-
},
|
6752
|
+
query: {
|
6753
|
+
type: "string",
|
6754
|
+
description: "The query to search for in Notion titles",
|
6699
6755
|
},
|
6700
6756
|
},
|
6701
6757
|
},
|
6702
6758
|
output: {
|
6703
6759
|
type: "object",
|
6704
|
-
required: ["success"
|
6760
|
+
required: ["success"],
|
6705
6761
|
properties: {
|
6706
6762
|
success: {
|
6707
6763
|
type: "boolean",
|
6708
6764
|
description: "Whether the search was successful",
|
6709
6765
|
},
|
6710
|
-
|
6766
|
+
results: {
|
6711
6767
|
type: "array",
|
6712
|
-
description: "List of
|
6768
|
+
description: "List of matching Notion pages",
|
6713
6769
|
items: {
|
6714
6770
|
type: "object",
|
6715
|
-
required: ["id", "
|
6771
|
+
required: ["id", "url"],
|
6716
6772
|
properties: {
|
6717
6773
|
id: {
|
6718
6774
|
type: "string",
|
6719
|
-
description: "The
|
6720
|
-
},
|
6721
|
-
name: {
|
6722
|
-
type: "string",
|
6723
|
-
description: "The file name",
|
6775
|
+
description: "The Notion page ID",
|
6724
6776
|
},
|
6725
|
-
|
6777
|
+
title: {
|
6726
6778
|
type: "string",
|
6727
|
-
description: "The
|
6779
|
+
description: "The page title",
|
6780
|
+
nullable: true,
|
6728
6781
|
},
|
6729
|
-
|
6782
|
+
url: {
|
6730
6783
|
type: "string",
|
6731
|
-
description: "The
|
6784
|
+
description: "The URL to the Notion page",
|
6732
6785
|
},
|
6733
6786
|
},
|
6734
6787
|
},
|
@@ -6739,6 +6792,6 @@ exports.googleDriveSearchFilesByKeywordsDefinition = {
|
|
6739
6792
|
},
|
6740
6793
|
},
|
6741
6794
|
},
|
6742
|
-
name: "
|
6743
|
-
provider: "
|
6795
|
+
name: "searchByTitle",
|
6796
|
+
provider: "notion",
|
6744
6797
|
};
|
@@ -2005,6 +2005,54 @@ export declare const resendSendEmailOutputSchema: z.ZodObject<{
|
|
2005
2005
|
}>;
|
2006
2006
|
export type resendSendEmailOutputType = z.infer<typeof resendSendEmailOutputSchema>;
|
2007
2007
|
export type resendSendEmailFunction = ActionFunction<resendSendEmailParamsType, AuthParamsType, resendSendEmailOutputType>;
|
2008
|
+
export declare const googleOauthSearchFilesByKeywordsParamsSchema: z.ZodObject<{
|
2009
|
+
keywords: z.ZodArray<z.ZodString, "many">;
|
2010
|
+
}, "strip", z.ZodTypeAny, {
|
2011
|
+
keywords: string[];
|
2012
|
+
}, {
|
2013
|
+
keywords: string[];
|
2014
|
+
}>;
|
2015
|
+
export type googleOauthSearchFilesByKeywordsParamsType = z.infer<typeof googleOauthSearchFilesByKeywordsParamsSchema>;
|
2016
|
+
export declare const googleOauthSearchFilesByKeywordsOutputSchema: z.ZodObject<{
|
2017
|
+
success: z.ZodBoolean;
|
2018
|
+
files: z.ZodArray<z.ZodObject<{
|
2019
|
+
id: z.ZodString;
|
2020
|
+
name: z.ZodString;
|
2021
|
+
mimeType: z.ZodString;
|
2022
|
+
webViewLink: z.ZodString;
|
2023
|
+
}, "strip", z.ZodTypeAny, {
|
2024
|
+
name: string;
|
2025
|
+
id: string;
|
2026
|
+
mimeType: string;
|
2027
|
+
webViewLink: string;
|
2028
|
+
}, {
|
2029
|
+
name: string;
|
2030
|
+
id: string;
|
2031
|
+
mimeType: string;
|
2032
|
+
webViewLink: string;
|
2033
|
+
}>, "many">;
|
2034
|
+
error: z.ZodOptional<z.ZodString>;
|
2035
|
+
}, "strip", z.ZodTypeAny, {
|
2036
|
+
success: boolean;
|
2037
|
+
files: {
|
2038
|
+
name: string;
|
2039
|
+
id: string;
|
2040
|
+
mimeType: string;
|
2041
|
+
webViewLink: string;
|
2042
|
+
}[];
|
2043
|
+
error?: string | undefined;
|
2044
|
+
}, {
|
2045
|
+
success: boolean;
|
2046
|
+
files: {
|
2047
|
+
name: string;
|
2048
|
+
id: string;
|
2049
|
+
mimeType: string;
|
2050
|
+
webViewLink: string;
|
2051
|
+
}[];
|
2052
|
+
error?: string | undefined;
|
2053
|
+
}>;
|
2054
|
+
export type googleOauthSearchFilesByKeywordsOutputType = z.infer<typeof googleOauthSearchFilesByKeywordsOutputSchema>;
|
2055
|
+
export type googleOauthSearchFilesByKeywordsFunction = ActionFunction<googleOauthSearchFilesByKeywordsParamsType, AuthParamsType, googleOauthSearchFilesByKeywordsOutputType>;
|
2008
2056
|
export declare const googleOauthCreateNewGoogleDocParamsSchema: z.ZodObject<{
|
2009
2057
|
title: z.ZodString;
|
2010
2058
|
content: z.ZodOptional<z.ZodString>;
|
@@ -3623,51 +3671,46 @@ export declare const githubListPullRequestsOutputSchema: z.ZodObject<{
|
|
3623
3671
|
}>;
|
3624
3672
|
export type githubListPullRequestsOutputType = z.infer<typeof githubListPullRequestsOutputSchema>;
|
3625
3673
|
export type githubListPullRequestsFunction = ActionFunction<githubListPullRequestsParamsType, AuthParamsType, githubListPullRequestsOutputType>;
|
3626
|
-
export declare const
|
3627
|
-
|
3674
|
+
export declare const notionSearchByTitleParamsSchema: z.ZodObject<{
|
3675
|
+
query: z.ZodString;
|
3628
3676
|
}, "strip", z.ZodTypeAny, {
|
3629
|
-
|
3677
|
+
query: string;
|
3630
3678
|
}, {
|
3631
|
-
|
3679
|
+
query: string;
|
3632
3680
|
}>;
|
3633
|
-
export type
|
3634
|
-
export declare const
|
3681
|
+
export type notionSearchByTitleParamsType = z.infer<typeof notionSearchByTitleParamsSchema>;
|
3682
|
+
export declare const notionSearchByTitleOutputSchema: z.ZodObject<{
|
3635
3683
|
success: z.ZodBoolean;
|
3636
|
-
|
3684
|
+
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
3637
3685
|
id: z.ZodString;
|
3638
|
-
|
3639
|
-
|
3640
|
-
webViewLink: z.ZodString;
|
3686
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
3687
|
+
url: z.ZodString;
|
3641
3688
|
}, "strip", z.ZodTypeAny, {
|
3642
|
-
name: string;
|
3643
3689
|
id: string;
|
3644
|
-
|
3645
|
-
|
3690
|
+
url: string;
|
3691
|
+
title?: string | null | undefined;
|
3646
3692
|
}, {
|
3647
|
-
name: string;
|
3648
3693
|
id: string;
|
3649
|
-
|
3650
|
-
|
3651
|
-
}>, "many"
|
3694
|
+
url: string;
|
3695
|
+
title?: string | null | undefined;
|
3696
|
+
}>, "many">>;
|
3652
3697
|
error: z.ZodOptional<z.ZodString>;
|
3653
3698
|
}, "strip", z.ZodTypeAny, {
|
3654
3699
|
success: boolean;
|
3655
|
-
files: {
|
3656
|
-
name: string;
|
3657
|
-
id: string;
|
3658
|
-
mimeType: string;
|
3659
|
-
webViewLink: string;
|
3660
|
-
}[];
|
3661
3700
|
error?: string | undefined;
|
3701
|
+
results?: {
|
3702
|
+
id: string;
|
3703
|
+
url: string;
|
3704
|
+
title?: string | null | undefined;
|
3705
|
+
}[] | undefined;
|
3662
3706
|
}, {
|
3663
3707
|
success: boolean;
|
3664
|
-
files: {
|
3665
|
-
name: string;
|
3666
|
-
id: string;
|
3667
|
-
mimeType: string;
|
3668
|
-
webViewLink: string;
|
3669
|
-
}[];
|
3670
3708
|
error?: string | undefined;
|
3709
|
+
results?: {
|
3710
|
+
id: string;
|
3711
|
+
url: string;
|
3712
|
+
title?: string | null | undefined;
|
3713
|
+
}[] | undefined;
|
3671
3714
|
}>;
|
3672
|
-
export type
|
3673
|
-
export type
|
3715
|
+
export type notionSearchByTitleOutputType = z.infer<typeof notionSearchByTitleOutputSchema>;
|
3716
|
+
export type notionSearchByTitleFunction = ActionFunction<notionSearchByTitleParamsType, AuthParamsType, notionSearchByTitleOutputType>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
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.asanaGetTasksDetailsOutputSchema = exports.asanaGetTasksDetailsParamsSchema = exports.asanaSearchTasksOutputSchema = exports.asanaSearchTasksParamsSchema = exports.asanaUpdateTaskOutputSchema = exports.asanaUpdateTaskParamsSchema = exports.asanaCreateTaskOutputSchema = exports.asanaCreateTaskParamsSchema = exports.asanaListAsanaTasksByProjectOutputSchema = exports.asanaListAsanaTasksByProjectParamsSchema = exports.asanaCommentTaskOutputSchema = exports.asanaCommentTaskParamsSchema = exports.genericFillTemplateOutputSchema = exports.genericFillTemplateParamsSchema = exports.AuthParamsSchema = void 0;
|
4
|
-
exports.
|
5
|
-
exports.
|
6
|
-
exports.
|
4
|
+
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.googleOauthSearchFilesByKeywordsOutputSchema = exports.googleOauthSearchFilesByKeywordsParamsSchema = 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 = exports.zendeskGetTicketDetailsParamsSchema = exports.zendeskListZendeskTicketsOutputSchema = exports.zendeskListZendeskTicketsParamsSchema = exports.zendeskCreateZendeskTicketOutputSchema = exports.zendeskCreateZendeskTicketParamsSchema = exports.credalCallCopilotOutputSchema = void 0;
|
5
|
+
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 = exports.lookerEnableUserByEmailParamsSchema = exports.finnhubGetBasicFinancialsOutputSchema = exports.finnhubGetBasicFinancialsParamsSchema = exports.finnhubSymbolLookupOutputSchema = exports.finnhubSymbolLookupParamsSchema = exports.gongGetGongTranscriptsOutputSchema = exports.gongGetGongTranscriptsParamsSchema = exports.googleOauthSearchDriveByKeywordsOutputSchema = exports.googleOauthSearchDriveByKeywordsParamsSchema = exports.googleOauthUpdatePresentationOutputSchema = void 0;
|
6
|
+
exports.notionSearchByTitleOutputSchema = exports.notionSearchByTitleParamsSchema = exports.githubListPullRequestsOutputSchema = exports.githubListPullRequestsParamsSchema = exports.githubCreatePullRequestOutputSchema = exports.githubCreatePullRequestParamsSchema = exports.githubCreateBranchOutputSchema = exports.githubCreateBranchParamsSchema = exports.githubCreateOrUpdateFileOutputSchema = exports.githubCreateOrUpdateFileParamsSchema = exports.microsoftGetDocumentOutputSchema = exports.microsoftGetDocumentParamsSchema = exports.microsoftMessageTeamsChannelOutputSchema = void 0;
|
7
7
|
const zod_1 = require("zod");
|
8
8
|
exports.AuthParamsSchema = zod_1.z.object({
|
9
9
|
authToken: zod_1.z.string().optional(),
|
@@ -635,6 +635,21 @@ exports.resendSendEmailOutputSchema = zod_1.z.object({
|
|
635
635
|
success: zod_1.z.boolean().describe("Whether the email was sent successfully"),
|
636
636
|
error: zod_1.z.string().describe("The error that occurred if the email was not sent successfully").optional(),
|
637
637
|
});
|
638
|
+
exports.googleOauthSearchFilesByKeywordsParamsSchema = zod_1.z.object({
|
639
|
+
keywords: zod_1.z.array(zod_1.z.string()).describe("List of keywords to search for in file contents."),
|
640
|
+
});
|
641
|
+
exports.googleOauthSearchFilesByKeywordsOutputSchema = zod_1.z.object({
|
642
|
+
success: zod_1.z.boolean().describe("Whether the search was successful"),
|
643
|
+
files: zod_1.z
|
644
|
+
.array(zod_1.z.object({
|
645
|
+
id: zod_1.z.string().describe("The file ID"),
|
646
|
+
name: zod_1.z.string().describe("The file name"),
|
647
|
+
mimeType: zod_1.z.string().describe("The MIME type of the file"),
|
648
|
+
webViewLink: zod_1.z.string().describe("The web link to view the file"),
|
649
|
+
}))
|
650
|
+
.describe("List of files matching the search"),
|
651
|
+
error: zod_1.z.string().describe("Error message if search failed").optional(),
|
652
|
+
});
|
638
653
|
exports.googleOauthCreateNewGoogleDocParamsSchema = zod_1.z.object({
|
639
654
|
title: zod_1.z.string().describe("The title of the new Google Doc"),
|
640
655
|
content: zod_1.z.string().describe("The content to add to the new Google Doc").optional(),
|
@@ -2507,18 +2522,18 @@ exports.githubListPullRequestsOutputSchema = zod_1.z.object({
|
|
2507
2522
|
}))
|
2508
2523
|
.describe("A list of pull requests in the repository"),
|
2509
2524
|
});
|
2510
|
-
exports.
|
2511
|
-
|
2525
|
+
exports.notionSearchByTitleParamsSchema = zod_1.z.object({
|
2526
|
+
query: zod_1.z.string().describe("The query to search for in Notion titles"),
|
2512
2527
|
});
|
2513
|
-
exports.
|
2528
|
+
exports.notionSearchByTitleOutputSchema = zod_1.z.object({
|
2514
2529
|
success: zod_1.z.boolean().describe("Whether the search was successful"),
|
2515
|
-
|
2530
|
+
results: zod_1.z
|
2516
2531
|
.array(zod_1.z.object({
|
2517
|
-
id: zod_1.z.string().describe("The
|
2518
|
-
|
2519
|
-
|
2520
|
-
webViewLink: zod_1.z.string().describe("The web link to view the file"),
|
2532
|
+
id: zod_1.z.string().describe("The Notion page ID"),
|
2533
|
+
title: zod_1.z.string().nullable().describe("The page title").optional(),
|
2534
|
+
url: zod_1.z.string().describe("The URL to the Notion page"),
|
2521
2535
|
}))
|
2522
|
-
.describe("List of
|
2536
|
+
.describe("List of matching Notion pages")
|
2537
|
+
.optional(),
|
2523
2538
|
error: zod_1.z.string().describe("Error message if search failed").optional(),
|
2524
2539
|
});
|
package/dist/actions/groups.js
CHANGED
@@ -0,0 +1,71 @@
|
|
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 missingAuthConstants_1 = require("../../util/missingAuthConstants");
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
17
|
+
// Notion response is not standard for title, title can be in different places
|
18
|
+
// This function checks if the title is in the properties object
|
19
|
+
function isTitleProperty(prop) {
|
20
|
+
return (typeof prop === "object" &&
|
21
|
+
prop !== null &&
|
22
|
+
"type" in prop &&
|
23
|
+
prop.type === "title" &&
|
24
|
+
"title" in prop &&
|
25
|
+
Array.isArray(prop.title));
|
26
|
+
}
|
27
|
+
const searchByTitle = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
28
|
+
const { authToken } = authParams;
|
29
|
+
const { query } = params;
|
30
|
+
if (!authToken) {
|
31
|
+
return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN, results: [] };
|
32
|
+
}
|
33
|
+
try {
|
34
|
+
const response = yield axios_1.default.post("https://api.notion.com/v1/search", { query }, {
|
35
|
+
headers: {
|
36
|
+
Authorization: `Bearer ${authToken}`,
|
37
|
+
"Notion-Version": "2022-06-28",
|
38
|
+
"Content-Type": "application/json",
|
39
|
+
},
|
40
|
+
});
|
41
|
+
const { results: notionResults = [] } = response.data;
|
42
|
+
const results = notionResults.map((item) => {
|
43
|
+
let title = "";
|
44
|
+
// Try to find a title property in properties (for pages)
|
45
|
+
if (item.properties) {
|
46
|
+
const titleProp = Object.values(item.properties).find(isTitleProperty);
|
47
|
+
if (titleProp && Array.isArray(titleProp.title)) {
|
48
|
+
title = titleProp.title.map(t => t.plain_text).join("") || "";
|
49
|
+
}
|
50
|
+
}
|
51
|
+
// If still no title, try item.title (for databases)
|
52
|
+
if (!title && Array.isArray(item.title)) {
|
53
|
+
title = item.title.map(t => t.plain_text).join("") || "";
|
54
|
+
}
|
55
|
+
return {
|
56
|
+
id: item.id,
|
57
|
+
title,
|
58
|
+
url: item.url,
|
59
|
+
};
|
60
|
+
}) || [];
|
61
|
+
return { success: true, results };
|
62
|
+
}
|
63
|
+
catch (error) {
|
64
|
+
return {
|
65
|
+
success: false,
|
66
|
+
error: error instanceof Error ? error.message : "Unknown error",
|
67
|
+
results: [],
|
68
|
+
};
|
69
|
+
}
|
70
|
+
});
|
71
|
+
exports.default = searchByTitle;
|