@credal/actions 0.1.52 → 0.1.53
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 +6 -0
- package/dist/actions/autogen/templates.d.ts +1 -0
- package/dist/actions/autogen/templates.js +77 -1
- package/dist/actions/autogen/types.d.ts +82 -0
- package/dist/actions/autogen/types.js +22 -1
- package/dist/actions/providers/github/listPullRequests.d.ts +3 -0
- package/dist/actions/providers/github/listPullRequests.js +56 -0
- package/dist/actions/providers/workday/requestTimeOff.d.ts +23 -0
- package/dist/actions/providers/workday/requestTimeOff.js +88 -0
- package/package.json +1 -1
@@ -74,6 +74,7 @@ const createDocument_1 = __importDefault(require("./providers/microsoft/createDo
|
|
74
74
|
const getDocument_1 = __importDefault(require("./providers/microsoft/getDocument"));
|
75
75
|
const fetchSalesforceSchema_1 = __importDefault(require("./providers/salesforce/fetchSalesforceSchema"));
|
76
76
|
const deepResearch_1 = __importDefault(require("./providers/firecrawl/deepResearch"));
|
77
|
+
const listPullRequests_1 = __importDefault(require("./providers/github/listPullRequests"));
|
77
78
|
const getJiraIssuesByQuery_1 = __importDefault(require("./providers/jira/getJiraIssuesByQuery"));
|
78
79
|
exports.ActionMapper = {
|
79
80
|
generic: {
|
@@ -473,5 +474,10 @@ exports.ActionMapper = {
|
|
473
474
|
paramsSchema: types_1.githubCreatePullRequestParamsSchema,
|
474
475
|
outputSchema: types_1.githubCreatePullRequestOutputSchema,
|
475
476
|
},
|
477
|
+
listPullRequests: {
|
478
|
+
fn: listPullRequests_1.default,
|
479
|
+
paramsSchema: types_1.githubListPullRequestsParamsSchema,
|
480
|
+
outputSchema: types_1.githubListPullRequestsOutputSchema,
|
481
|
+
},
|
476
482
|
},
|
477
483
|
};
|
@@ -69,3 +69,4 @@ export declare const microsoftGetDocumentDefinition: ActionTemplate;
|
|
69
69
|
export declare const githubCreateOrUpdateFileDefinition: ActionTemplate;
|
70
70
|
export declare const githubCreateBranchDefinition: ActionTemplate;
|
71
71
|
export declare const githubCreatePullRequestDefinition: ActionTemplate;
|
72
|
+
export declare const githubListPullRequestsDefinition: ActionTemplate;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.ashbyAddCandidateToProjectDefinition = exports.ashbyGetCandidateInfoDefinition = exports.ashbyCreateNoteDefinition = exports.lookerEnableUserByEmailDefinition = exports.finnhubGetBasicFinancialsDefinition = exports.finnhubSymbolLookupDefinition = 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.zendeskCreateZendeskTicketDefinition = exports.credalCallCopilotDefinition = 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.slackListConversationsDefinition = exports.slackSendMessageDefinition = exports.asanaUpdateTaskDefinition = exports.asanaCreateTaskDefinition = exports.asanaCommentTaskDefinition = exports.genericFillTemplateDefinition = void 0;
|
4
|
-
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.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = exports.ashbyListCandidateNotesDefinition = exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = 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.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = exports.ashbyListCandidateNotesDefinition = exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = void 0;
|
5
5
|
exports.genericFillTemplateDefinition = {
|
6
6
|
description: "Simple utility that takes a template and returns it filled in",
|
7
7
|
scopes: [],
|
@@ -5976,3 +5976,79 @@ exports.githubCreatePullRequestDefinition = {
|
|
5976
5976
|
name: "createPullRequest",
|
5977
5977
|
provider: "github",
|
5978
5978
|
};
|
5979
|
+
exports.githubListPullRequestsDefinition = {
|
5980
|
+
description: "List pull requests in a GitHub repository",
|
5981
|
+
scopes: [],
|
5982
|
+
parameters: {
|
5983
|
+
type: "object",
|
5984
|
+
required: ["repositoryOwner", "repositoryName"],
|
5985
|
+
properties: {
|
5986
|
+
repositoryOwner: {
|
5987
|
+
type: "string",
|
5988
|
+
description: "The owner of the repository",
|
5989
|
+
},
|
5990
|
+
repositoryName: {
|
5991
|
+
type: "string",
|
5992
|
+
description: "The name of the repository",
|
5993
|
+
},
|
5994
|
+
state: {
|
5995
|
+
type: "string",
|
5996
|
+
description: "The state of the pull requests to list (e.g., open, closed)",
|
5997
|
+
},
|
5998
|
+
},
|
5999
|
+
},
|
6000
|
+
output: {
|
6001
|
+
type: "object",
|
6002
|
+
required: ["pullRequests"],
|
6003
|
+
properties: {
|
6004
|
+
pullRequests: {
|
6005
|
+
type: "array",
|
6006
|
+
description: "A list of pull requests in the repository",
|
6007
|
+
items: {
|
6008
|
+
type: "object",
|
6009
|
+
properties: {
|
6010
|
+
number: {
|
6011
|
+
type: "number",
|
6012
|
+
description: "The number of the pull request",
|
6013
|
+
},
|
6014
|
+
title: {
|
6015
|
+
type: "string",
|
6016
|
+
description: "The title of the pull request",
|
6017
|
+
},
|
6018
|
+
state: {
|
6019
|
+
type: "string",
|
6020
|
+
description: "The state of the pull request (e.g., open, closed)",
|
6021
|
+
},
|
6022
|
+
url: {
|
6023
|
+
type: "string",
|
6024
|
+
description: "The URL of the pull request",
|
6025
|
+
},
|
6026
|
+
createdAt: {
|
6027
|
+
type: "string",
|
6028
|
+
description: "The date and time when the pull request was created",
|
6029
|
+
},
|
6030
|
+
updatedAt: {
|
6031
|
+
type: "string",
|
6032
|
+
description: "The date and time when the pull request was last updated",
|
6033
|
+
},
|
6034
|
+
user: {
|
6035
|
+
type: "object",
|
6036
|
+
properties: {
|
6037
|
+
login: {
|
6038
|
+
type: "string",
|
6039
|
+
description: "The username of the user who created the pull request",
|
6040
|
+
},
|
6041
|
+
},
|
6042
|
+
},
|
6043
|
+
description: {
|
6044
|
+
type: "string",
|
6045
|
+
description: "The description of the pull request",
|
6046
|
+
},
|
6047
|
+
},
|
6048
|
+
},
|
6049
|
+
},
|
6050
|
+
},
|
6051
|
+
},
|
6052
|
+
name: "listPullRequests",
|
6053
|
+
provider: "github",
|
6054
|
+
};
|
@@ -2813,3 +2813,85 @@ export declare const githubCreatePullRequestOutputSchema: z.ZodObject<{
|
|
2813
2813
|
}>;
|
2814
2814
|
export type githubCreatePullRequestOutputType = z.infer<typeof githubCreatePullRequestOutputSchema>;
|
2815
2815
|
export type githubCreatePullRequestFunction = ActionFunction<githubCreatePullRequestParamsType, AuthParamsType, githubCreatePullRequestOutputType>;
|
2816
|
+
export declare const githubListPullRequestsParamsSchema: z.ZodObject<{
|
2817
|
+
repositoryOwner: z.ZodString;
|
2818
|
+
repositoryName: z.ZodString;
|
2819
|
+
state: z.ZodOptional<z.ZodString>;
|
2820
|
+
}, "strip", z.ZodTypeAny, {
|
2821
|
+
repositoryOwner: string;
|
2822
|
+
repositoryName: string;
|
2823
|
+
state?: string | undefined;
|
2824
|
+
}, {
|
2825
|
+
repositoryOwner: string;
|
2826
|
+
repositoryName: string;
|
2827
|
+
state?: string | undefined;
|
2828
|
+
}>;
|
2829
|
+
export type githubListPullRequestsParamsType = z.infer<typeof githubListPullRequestsParamsSchema>;
|
2830
|
+
export declare const githubListPullRequestsOutputSchema: z.ZodObject<{
|
2831
|
+
pullRequests: z.ZodArray<z.ZodObject<{
|
2832
|
+
number: z.ZodOptional<z.ZodNumber>;
|
2833
|
+
title: z.ZodOptional<z.ZodString>;
|
2834
|
+
state: z.ZodOptional<z.ZodString>;
|
2835
|
+
url: z.ZodOptional<z.ZodString>;
|
2836
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
2837
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
2838
|
+
user: z.ZodOptional<z.ZodObject<{
|
2839
|
+
login: z.ZodOptional<z.ZodString>;
|
2840
|
+
}, "strip", z.ZodTypeAny, {
|
2841
|
+
login?: string | undefined;
|
2842
|
+
}, {
|
2843
|
+
login?: string | undefined;
|
2844
|
+
}>>;
|
2845
|
+
description: z.ZodOptional<z.ZodString>;
|
2846
|
+
}, "strip", z.ZodTypeAny, {
|
2847
|
+
number?: number | undefined;
|
2848
|
+
description?: string | undefined;
|
2849
|
+
user?: {
|
2850
|
+
login?: string | undefined;
|
2851
|
+
} | undefined;
|
2852
|
+
title?: string | undefined;
|
2853
|
+
url?: string | undefined;
|
2854
|
+
createdAt?: string | undefined;
|
2855
|
+
state?: string | undefined;
|
2856
|
+
updatedAt?: string | undefined;
|
2857
|
+
}, {
|
2858
|
+
number?: number | undefined;
|
2859
|
+
description?: string | undefined;
|
2860
|
+
user?: {
|
2861
|
+
login?: string | undefined;
|
2862
|
+
} | undefined;
|
2863
|
+
title?: string | undefined;
|
2864
|
+
url?: string | undefined;
|
2865
|
+
createdAt?: string | undefined;
|
2866
|
+
state?: string | undefined;
|
2867
|
+
updatedAt?: string | undefined;
|
2868
|
+
}>, "many">;
|
2869
|
+
}, "strip", z.ZodTypeAny, {
|
2870
|
+
pullRequests: {
|
2871
|
+
number?: number | undefined;
|
2872
|
+
description?: string | undefined;
|
2873
|
+
user?: {
|
2874
|
+
login?: string | undefined;
|
2875
|
+
} | undefined;
|
2876
|
+
title?: string | undefined;
|
2877
|
+
url?: string | undefined;
|
2878
|
+
createdAt?: string | undefined;
|
2879
|
+
state?: string | undefined;
|
2880
|
+
updatedAt?: string | undefined;
|
2881
|
+
}[];
|
2882
|
+
}, {
|
2883
|
+
pullRequests: {
|
2884
|
+
number?: number | undefined;
|
2885
|
+
description?: string | undefined;
|
2886
|
+
user?: {
|
2887
|
+
login?: string | undefined;
|
2888
|
+
} | undefined;
|
2889
|
+
title?: string | undefined;
|
2890
|
+
url?: string | undefined;
|
2891
|
+
createdAt?: string | undefined;
|
2892
|
+
state?: string | undefined;
|
2893
|
+
updatedAt?: string | undefined;
|
2894
|
+
}[];
|
2895
|
+
}>;
|
2896
|
+
export type githubListPullRequestsOutputType = z.infer<typeof githubListPullRequestsOutputSchema>;
|
2897
|
+
export type githubListPullRequestsFunction = ActionFunction<githubListPullRequestsParamsType, AuthParamsType, githubListPullRequestsOutputType>;
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.zendeskAddCommentToTicketParamsSchema = exports.zendeskUpdateTicketStatusOutputSchema = exports.zendeskUpdateTicketStatusParamsSchema = exports.zendeskGetTicketDetailsOutputSchema = exports.zendeskGetTicketDetailsParamsSchema = exports.zendeskCreateZendeskTicketOutputSchema = exports.zendeskCreateZendeskTicketParamsSchema = exports.credalCallCopilotOutputSchema = exports.credalCallCopilotParamsSchema = 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.slackListConversationsOutputSchema = exports.slackListConversationsParamsSchema = 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
4
|
exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = exports.ashbyCreateNoteParamsSchema = exports.lookerEnableUserByEmailOutputSchema = exports.lookerEnableUserByEmailParamsSchema = exports.finnhubGetBasicFinancialsOutputSchema = exports.finnhubGetBasicFinancialsParamsSchema = exports.finnhubSymbolLookupOutputSchema = exports.finnhubSymbolLookupParamsSchema = 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 = void 0;
|
5
|
-
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.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 = 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.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 = void 0;
|
6
6
|
const zod_1 = require("zod");
|
7
7
|
exports.AuthParamsSchema = zod_1.z.object({
|
8
8
|
authToken: zod_1.z.string().optional(),
|
@@ -2283,3 +2283,24 @@ exports.githubCreatePullRequestOutputSchema = zod_1.z.object({
|
|
2283
2283
|
pullRequestUrl: zod_1.z.string().describe("The URL of the created pull request").optional(),
|
2284
2284
|
pullRequestNumber: zod_1.z.number().describe("The number of the created pull request").optional(),
|
2285
2285
|
});
|
2286
|
+
exports.githubListPullRequestsParamsSchema = zod_1.z.object({
|
2287
|
+
repositoryOwner: zod_1.z.string().describe("The owner of the repository"),
|
2288
|
+
repositoryName: zod_1.z.string().describe("The name of the repository"),
|
2289
|
+
state: zod_1.z.string().describe("The state of the pull requests to list (e.g., open, closed)").optional(),
|
2290
|
+
});
|
2291
|
+
exports.githubListPullRequestsOutputSchema = zod_1.z.object({
|
2292
|
+
pullRequests: zod_1.z
|
2293
|
+
.array(zod_1.z.object({
|
2294
|
+
number: zod_1.z.number().describe("The number of the pull request").optional(),
|
2295
|
+
title: zod_1.z.string().describe("The title of the pull request").optional(),
|
2296
|
+
state: zod_1.z.string().describe("The state of the pull request (e.g., open, closed)").optional(),
|
2297
|
+
url: zod_1.z.string().describe("The URL of the pull request").optional(),
|
2298
|
+
createdAt: zod_1.z.string().describe("The date and time when the pull request was created").optional(),
|
2299
|
+
updatedAt: zod_1.z.string().describe("The date and time when the pull request was last updated").optional(),
|
2300
|
+
user: zod_1.z
|
2301
|
+
.object({ login: zod_1.z.string().describe("The username of the user who created the pull request").optional() })
|
2302
|
+
.optional(),
|
2303
|
+
description: zod_1.z.string().describe("The description of the pull request").optional(),
|
2304
|
+
}))
|
2305
|
+
.describe("A list of pull requests in the repository"),
|
2306
|
+
});
|
@@ -0,0 +1,56 @@
|
|
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
|
+
const types_1 = require("../../autogen/types");
|
17
|
+
const listPullRequests = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
18
|
+
const { authToken } = authParams;
|
19
|
+
const { repositoryName, repositoryOwner } = params;
|
20
|
+
const url = `https://api.github.com/repos/${repositoryOwner}/${repositoryName}/pulls`;
|
21
|
+
const oneYearAgo = new Date();
|
22
|
+
oneYearAgo.setFullYear(oneYearAgo.getFullYear() - 1);
|
23
|
+
const allPulls = [];
|
24
|
+
let page = 1;
|
25
|
+
const perPage = 100;
|
26
|
+
while (true) {
|
27
|
+
const response = yield axios_1.default.get(url, {
|
28
|
+
headers: {
|
29
|
+
Authorization: `Bearer ${authToken}`,
|
30
|
+
Accept: "application/vnd.github+json",
|
31
|
+
"X-GitHub-Api-Version": "2022-11-28",
|
32
|
+
},
|
33
|
+
params: {
|
34
|
+
state: "all",
|
35
|
+
sort: "created",
|
36
|
+
direction: "desc",
|
37
|
+
per_page: perPage,
|
38
|
+
page,
|
39
|
+
},
|
40
|
+
});
|
41
|
+
const pulls = response.data;
|
42
|
+
if (pulls.length === 0)
|
43
|
+
break;
|
44
|
+
// Filter by date
|
45
|
+
const recentPulls = pulls.filter(pr => pr.createdAt && new Date(pr.createdAt) >= oneYearAgo);
|
46
|
+
allPulls.push(...recentPulls);
|
47
|
+
// Stop if the rest are older than one year
|
48
|
+
if (recentPulls.length < pulls.length)
|
49
|
+
break;
|
50
|
+
page++;
|
51
|
+
}
|
52
|
+
return types_1.githubListPullRequestsOutputSchema.parse({
|
53
|
+
pullRequests: allPulls,
|
54
|
+
});
|
55
|
+
});
|
56
|
+
exports.default = listPullRequests;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
declare const axios: any;
|
2
|
+
declare const WORKDAY_BASE_URL = "https://your-workday-url/ccx/service/YOUR_TENANT/Absence_Management/v43.2";
|
3
|
+
declare const TOKEN_URL = "https://your-workday-url/oauth2/YOUR_TENANT/token";
|
4
|
+
declare const CLIENT_ID = "your-client-id";
|
5
|
+
declare const CLIENT_SECRET = "your-client-secret";
|
6
|
+
/**
|
7
|
+
* Fetches an OAuth 2.0 access token from Workday.
|
8
|
+
*/
|
9
|
+
declare function getAccessToken(): Promise<any>;
|
10
|
+
/**
|
11
|
+
* Submits a time-off request to Workday.
|
12
|
+
* @param {Object} params - Time-off details.
|
13
|
+
* @param {string} params.workerId - Worker's ID in Workday.
|
14
|
+
* @param {string} params.startDate - Start date (YYYY-MM-DD).
|
15
|
+
* @param {string} params.endDate - End date (YYYY-MM-DD).
|
16
|
+
* @param {string} params.timeOffType - Time-off type (e.g., "SICK_LEAVE").
|
17
|
+
*/
|
18
|
+
declare function submitTimeOff({ workerId, startDate, endDate, timeOffType }: {
|
19
|
+
workerId: any;
|
20
|
+
startDate: any;
|
21
|
+
endDate: any;
|
22
|
+
timeOffType: any;
|
23
|
+
}): Promise<any>;
|
@@ -0,0 +1,88 @@
|
|
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
|
+
const axios = require("axios");
|
12
|
+
const WORKDAY_BASE_URL = "https://your-workday-url/ccx/service/YOUR_TENANT/Absence_Management/v43.2";
|
13
|
+
const TOKEN_URL = "https://your-workday-url/oauth2/YOUR_TENANT/token"; // OAuth token endpoint
|
14
|
+
const CLIENT_ID = "your-client-id";
|
15
|
+
const CLIENT_SECRET = "your-client-secret";
|
16
|
+
/**
|
17
|
+
* Fetches an OAuth 2.0 access token from Workday.
|
18
|
+
*/
|
19
|
+
function getAccessToken() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
var _a;
|
22
|
+
try {
|
23
|
+
const response = yield axios.post(TOKEN_URL, new URLSearchParams({ grant_type: "client_credentials" }), {
|
24
|
+
auth: {
|
25
|
+
username: CLIENT_ID,
|
26
|
+
password: CLIENT_SECRET
|
27
|
+
},
|
28
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
29
|
+
});
|
30
|
+
return response.data.access_token;
|
31
|
+
}
|
32
|
+
catch (error) {
|
33
|
+
console.error("Error fetching access token:", ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) || error.message);
|
34
|
+
throw error;
|
35
|
+
}
|
36
|
+
});
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* Submits a time-off request to Workday.
|
40
|
+
* @param {Object} params - Time-off details.
|
41
|
+
* @param {string} params.workerId - Worker's ID in Workday.
|
42
|
+
* @param {string} params.startDate - Start date (YYYY-MM-DD).
|
43
|
+
* @param {string} params.endDate - End date (YYYY-MM-DD).
|
44
|
+
* @param {string} params.timeOffType - Time-off type (e.g., "SICK_LEAVE").
|
45
|
+
*/
|
46
|
+
function submitTimeOff(_a) {
|
47
|
+
return __awaiter(this, arguments, void 0, function* ({ workerId, startDate, endDate, timeOffType }) {
|
48
|
+
var _b;
|
49
|
+
try {
|
50
|
+
const token = yield getAccessToken(); // Get OAuth token
|
51
|
+
const requestBody = {
|
52
|
+
"wd:Enter_Time_Off_Request": {
|
53
|
+
"wd:Worker_Reference": {
|
54
|
+
"wd:ID": [{ "_": workerId, "$": { "wd:type": "WID" } }]
|
55
|
+
},
|
56
|
+
"wd:Time_Off_Entries": [
|
57
|
+
{
|
58
|
+
"wd:Start_Date": startDate,
|
59
|
+
"wd:End_Date": endDate,
|
60
|
+
"wd:Time_Off_Type_Reference": {
|
61
|
+
"wd:ID": [{ "_": timeOffType, "$": { "wd:type": "Time_Off_Type_ID" } }]
|
62
|
+
}
|
63
|
+
}
|
64
|
+
]
|
65
|
+
}
|
66
|
+
};
|
67
|
+
const response = yield axios.post(`${WORKDAY_BASE_URL}/Enter_Time_Off`, requestBody, {
|
68
|
+
headers: {
|
69
|
+
"Authorization": `Bearer ${token}`,
|
70
|
+
"Content-Type": "application/json"
|
71
|
+
}
|
72
|
+
});
|
73
|
+
console.log("Time-off request submitted successfully:", response.data);
|
74
|
+
return response.data;
|
75
|
+
}
|
76
|
+
catch (error) {
|
77
|
+
console.error("Error submitting time-off request:", ((_b = error.response) === null || _b === void 0 ? void 0 : _b.data) || error.message);
|
78
|
+
throw error;
|
79
|
+
}
|
80
|
+
});
|
81
|
+
}
|
82
|
+
// Example Usage:
|
83
|
+
submitTimeOff({
|
84
|
+
workerId: "12345",
|
85
|
+
startDate: "2025-03-10",
|
86
|
+
endDate: "2025-03-12",
|
87
|
+
timeOffType: "SICK_LEAVE"
|
88
|
+
}).then(console.log).catch(console.error);
|