@credal/actions 0.1.50 → 0.1.51
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 +47 -2
- package/dist/actions/autogen/types.d.ts +28 -2
- package/dist/actions/autogen/types.js +12 -3
- package/dist/actions/groups.js +1 -0
- package/dist/actions/providers/jira/getJiraIssuesByQuery.d.ts +3 -0
- package/dist/actions/providers/jira/getJiraIssuesByQuery.js +45 -0
- package/package.json +1 -1
- package/dist/actions/providers/workday/requestTimeOff.d.ts +0 -23
- package/dist/actions/providers/workday/requestTimeOff.js +0 -88
@@ -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 getJiraIssuesByQuery_1 = __importDefault(require("./providers/jira/getJiraIssuesByQuery"));
|
77
78
|
exports.ActionMapper = {
|
78
79
|
generic: {
|
79
80
|
fillTemplate: {
|
@@ -208,6 +209,11 @@ exports.ActionMapper = {
|
|
208
209
|
},
|
209
210
|
},
|
210
211
|
jira: {
|
212
|
+
getJiraIssuesByQuery: {
|
213
|
+
fn: getJiraIssuesByQuery_1.default,
|
214
|
+
paramsSchema: types_1.jiraGetJiraIssuesByQueryParamsSchema,
|
215
|
+
outputSchema: types_1.jiraGetJiraIssuesByQueryOutputSchema,
|
216
|
+
},
|
211
217
|
assignJiraTicket: {
|
212
218
|
fn: assignJiraTicket_1.default,
|
213
219
|
paramsSchema: types_1.jiraAssignJiraTicketParamsSchema,
|
@@ -16,6 +16,7 @@ export declare const jiraGetJiraTicketDetailsDefinition: ActionTemplate;
|
|
16
16
|
export declare const jiraGetJiraTicketHistoryDefinition: ActionTemplate;
|
17
17
|
export declare const jiraUpdateJiraTicketDetailsDefinition: ActionTemplate;
|
18
18
|
export declare const jiraUpdateJiraTicketStatusDefinition: ActionTemplate;
|
19
|
+
export declare const jiraGetJiraIssuesByQueryDefinition: ActionTemplate;
|
19
20
|
export declare const googlemapsValidateAddressDefinition: ActionTemplate;
|
20
21
|
export declare const googlemapsNearbysearchRestaurantsDefinition: ActionTemplate;
|
21
22
|
export declare const credalCallCopilotDefinition: ActionTemplate;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
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 = void 0;
|
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;
|
5
5
|
exports.genericFillTemplateDefinition = {
|
6
6
|
description: "Simple utility that takes a template and returns it filled in",
|
7
7
|
scopes: [],
|
@@ -692,6 +692,51 @@ exports.jiraUpdateJiraTicketStatusDefinition = {
|
|
692
692
|
name: "updateJiraTicketStatus",
|
693
693
|
provider: "jira",
|
694
694
|
};
|
695
|
+
exports.jiraGetJiraIssuesByQueryDefinition = {
|
696
|
+
description: "Retrieve Jira Issues by JQL query",
|
697
|
+
scopes: [],
|
698
|
+
parameters: {
|
699
|
+
type: "object",
|
700
|
+
required: ["query"],
|
701
|
+
properties: {
|
702
|
+
query: {
|
703
|
+
type: "string",
|
704
|
+
description: "The JQL query to execute",
|
705
|
+
},
|
706
|
+
limit: {
|
707
|
+
type: "number",
|
708
|
+
description: "The maximum number of records to retrieve",
|
709
|
+
},
|
710
|
+
},
|
711
|
+
},
|
712
|
+
output: {
|
713
|
+
type: "object",
|
714
|
+
required: ["success"],
|
715
|
+
properties: {
|
716
|
+
success: {
|
717
|
+
type: "boolean",
|
718
|
+
description: "Whether the records were successfully retrieved",
|
719
|
+
},
|
720
|
+
records: {
|
721
|
+
type: "array",
|
722
|
+
description: "The retrieved records",
|
723
|
+
items: {
|
724
|
+
type: "object",
|
725
|
+
description: "An issue from Jira",
|
726
|
+
additionalProperties: {
|
727
|
+
type: "string",
|
728
|
+
},
|
729
|
+
},
|
730
|
+
},
|
731
|
+
error: {
|
732
|
+
type: "string",
|
733
|
+
description: "The error that occurred if the records were not successfully retrieved",
|
734
|
+
},
|
735
|
+
},
|
736
|
+
},
|
737
|
+
name: "getJiraIssuesByQuery",
|
738
|
+
provider: "jira",
|
739
|
+
};
|
695
740
|
exports.googlemapsValidateAddressDefinition = {
|
696
741
|
description: "Validate a Google Maps address",
|
697
742
|
scopes: [],
|
@@ -552,6 +552,32 @@ export declare const jiraUpdateJiraTicketStatusOutputSchema: z.ZodObject<{
|
|
552
552
|
}>;
|
553
553
|
export type jiraUpdateJiraTicketStatusOutputType = z.infer<typeof jiraUpdateJiraTicketStatusOutputSchema>;
|
554
554
|
export type jiraUpdateJiraTicketStatusFunction = ActionFunction<jiraUpdateJiraTicketStatusParamsType, AuthParamsType, jiraUpdateJiraTicketStatusOutputType>;
|
555
|
+
export declare const jiraGetJiraIssuesByQueryParamsSchema: z.ZodObject<{
|
556
|
+
query: z.ZodString;
|
557
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
558
|
+
}, "strip", z.ZodTypeAny, {
|
559
|
+
query: string;
|
560
|
+
limit?: number | undefined;
|
561
|
+
}, {
|
562
|
+
query: string;
|
563
|
+
limit?: number | undefined;
|
564
|
+
}>;
|
565
|
+
export type jiraGetJiraIssuesByQueryParamsType = z.infer<typeof jiraGetJiraIssuesByQueryParamsSchema>;
|
566
|
+
export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
567
|
+
success: z.ZodBoolean;
|
568
|
+
records: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>, "many">>;
|
569
|
+
error: z.ZodOptional<z.ZodString>;
|
570
|
+
}, "strip", z.ZodTypeAny, {
|
571
|
+
success: boolean;
|
572
|
+
error?: string | undefined;
|
573
|
+
records?: Record<string, string>[] | undefined;
|
574
|
+
}, {
|
575
|
+
success: boolean;
|
576
|
+
error?: string | undefined;
|
577
|
+
records?: Record<string, string>[] | undefined;
|
578
|
+
}>;
|
579
|
+
export type jiraGetJiraIssuesByQueryOutputType = z.infer<typeof jiraGetJiraIssuesByQueryOutputSchema>;
|
580
|
+
export type jiraGetJiraIssuesByQueryFunction = ActionFunction<jiraGetJiraIssuesByQueryParamsType, AuthParamsType, jiraGetJiraIssuesByQueryOutputType>;
|
555
581
|
export declare const googlemapsValidateAddressParamsSchema: z.ZodObject<{
|
556
582
|
regionCode: z.ZodString;
|
557
583
|
locality: z.ZodString;
|
@@ -844,12 +870,12 @@ export declare const credalCallCopilotParamsSchema: z.ZodObject<{
|
|
844
870
|
query: z.ZodString;
|
845
871
|
userEmail: z.ZodString;
|
846
872
|
}, "strip", z.ZodTypeAny, {
|
847
|
-
agentId: string;
|
848
873
|
query: string;
|
874
|
+
agentId: string;
|
849
875
|
userEmail: string;
|
850
876
|
}, {
|
851
|
-
agentId: string;
|
852
877
|
query: string;
|
878
|
+
agentId: string;
|
853
879
|
userEmail: string;
|
854
880
|
}>;
|
855
881
|
export type credalCallCopilotParamsType = z.infer<typeof credalCallCopilotParamsSchema>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
exports.
|
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 = void 0;
|
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
|
+
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;
|
6
6
|
const zod_1 = require("zod");
|
7
7
|
exports.AuthParamsSchema = zod_1.z.object({
|
8
8
|
authToken: zod_1.z.string().optional(),
|
@@ -208,6 +208,15 @@ exports.jiraUpdateJiraTicketStatusOutputSchema = zod_1.z.object({
|
|
208
208
|
error: zod_1.z.string().describe("The error that occurred if the status was not updated successfully").optional(),
|
209
209
|
ticketUrl: zod_1.z.string().describe("The url to the Jira ticket").optional(),
|
210
210
|
});
|
211
|
+
exports.jiraGetJiraIssuesByQueryParamsSchema = zod_1.z.object({
|
212
|
+
query: zod_1.z.string().describe("The JQL query to execute"),
|
213
|
+
limit: zod_1.z.number().describe("The maximum number of records to retrieve").optional(),
|
214
|
+
});
|
215
|
+
exports.jiraGetJiraIssuesByQueryOutputSchema = zod_1.z.object({
|
216
|
+
success: zod_1.z.boolean().describe("Whether the records were successfully retrieved"),
|
217
|
+
records: zod_1.z.array(zod_1.z.record(zod_1.z.string()).describe("An issue from Jira")).describe("The retrieved records").optional(),
|
218
|
+
error: zod_1.z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
219
|
+
});
|
211
220
|
exports.googlemapsValidateAddressParamsSchema = zod_1.z.object({
|
212
221
|
regionCode: zod_1.z.string().describe("The country of the address being verified."),
|
213
222
|
locality: zod_1.z.string().describe("The locality of the address being verified. This is likely a city."),
|
package/dist/actions/groups.js
CHANGED
@@ -72,6 +72,7 @@ exports.ACTION_GROUPS = {
|
|
72
72
|
templates_1.jiraGetJiraTicketHistoryDefinition,
|
73
73
|
templates_1.jiraUpdateJiraTicketDetailsDefinition,
|
74
74
|
templates_1.jiraUpdateJiraTicketStatusDefinition,
|
75
|
+
templates_1.jiraGetJiraIssuesByQueryDefinition,
|
75
76
|
],
|
76
77
|
},
|
77
78
|
OPENSTREETMAP_GET_LATITUDE_LONGITUDE_FROM_LOCATION: {
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const axiosClient_1 = require("../../util/axiosClient");
|
13
|
+
const DEFAULT_LIMIT = 1000;
|
14
|
+
const getJiraIssuesByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
15
|
+
const { authToken, cloudId } = authParams;
|
16
|
+
const { query, limit } = params;
|
17
|
+
const queryParams = new URLSearchParams();
|
18
|
+
queryParams.set("jql", query);
|
19
|
+
queryParams.set("maxResults", String(limit != undefined && limit <= DEFAULT_LIMIT ? limit : DEFAULT_LIMIT));
|
20
|
+
const apiUrl = `https://api.atlassian.com/ex/jira/${cloudId}/rest/api/3/search/jql?${queryParams.toString()}`;
|
21
|
+
try {
|
22
|
+
const response = yield axiosClient_1.axiosClient.get(apiUrl, {
|
23
|
+
headers: {
|
24
|
+
Authorization: `Bearer ${authToken}`,
|
25
|
+
Accept: "application/json",
|
26
|
+
},
|
27
|
+
});
|
28
|
+
return {
|
29
|
+
success: true,
|
30
|
+
records: response.data,
|
31
|
+
};
|
32
|
+
}
|
33
|
+
catch (error) {
|
34
|
+
console.error("Error retrieving Jira issues:", error);
|
35
|
+
return {
|
36
|
+
success: false,
|
37
|
+
error: error instanceof axiosClient_1.ApiError
|
38
|
+
? error.data.length > 0
|
39
|
+
? error.data[0].message
|
40
|
+
: error.message
|
41
|
+
: "An unknown error occurred",
|
42
|
+
};
|
43
|
+
}
|
44
|
+
});
|
45
|
+
exports.default = getJiraIssuesByQuery;
|
package/package.json
CHANGED
@@ -1,23 +0,0 @@
|
|
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>;
|
@@ -1,88 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
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);
|