@credal/actions 0.1.101 → 0.2.0
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 +0 -8
- package/dist/actions/autogen/templates.d.ts +0 -1
- package/dist/actions/autogen/templates.js +2 -135
- package/dist/actions/autogen/types.d.ts +33 -146
- package/dist/actions/autogen/types.js +36 -54
- package/dist/actions/groups.js +0 -4
- package/dist/actions/parse.js +10 -0
- package/dist/actions/providers/confluence/updatePage.d.ts +3 -0
- package/dist/actions/providers/confluence/updatePage.js +47 -0
- package/dist/app.d.ts +4 -1
- package/dist/app.js +1 -21
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2 -4
- package/package.json +1 -1
- package/dist/actions/providers/google-oauth/listGmailThreads.d.ts +0 -3
- package/dist/actions/providers/google-oauth/listGmailThreads.js +0 -98
- package/dist/actions/providers/google-oauth/searchGmailMessages.d.ts +0 -3
- package/dist/actions/providers/google-oauth/searchGmailMessages.js +0 -91
- package/dist/actions/providers/jamf/getComputerInventory.d.ts +0 -3
- package/dist/actions/providers/jamf/getComputerInventory.js +0 -45
- package/dist/actions/providers/jamf/getFileVaultRecoveryKey.d.ts +0 -3
- package/dist/actions/providers/jamf/getFileVaultRecoveryKey.js +0 -40
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.ActionMapper = void 0;
|
7
7
|
const types_1 = require("./autogen/types");
|
8
|
-
const callCopilot_1 = __importDefault(require("./providers/credal/callCopilot"));
|
9
8
|
const validateAddress_1 = __importDefault(require("./providers/googlemaps/validateAddress"));
|
10
9
|
const add_1 = __importDefault(require("./providers/math/add"));
|
11
10
|
const fillTemplate_1 = __importDefault(require("./providers/generic/fillTemplate"));
|
@@ -197,13 +196,6 @@ exports.ActionMapper = {
|
|
197
196
|
outputSchema: types_1.googlemapsNearbysearchRestaurantsOutputSchema,
|
198
197
|
},
|
199
198
|
},
|
200
|
-
credal: {
|
201
|
-
callCopilot: {
|
202
|
-
fn: callCopilot_1.default,
|
203
|
-
paramsSchema: types_1.credalCallCopilotParamsSchema,
|
204
|
-
outputSchema: types_1.credalCallCopilotOutputSchema,
|
205
|
-
},
|
206
|
-
},
|
207
199
|
kandji: {
|
208
200
|
getFVRecoveryKeyForDevice: {
|
209
201
|
fn: getFVRecoveryKeyForDevice_1.default,
|
@@ -23,7 +23,6 @@ export declare const kandjiGetFVRecoveryKeyForDeviceDefinition: ActionTemplate;
|
|
23
23
|
export declare const googlemapsValidateAddressDefinition: ActionTemplate;
|
24
24
|
export declare const googlemapsNearbysearchRestaurantsDefinition: ActionTemplate;
|
25
25
|
export declare const bingGetTopNSearchResultUrlsDefinition: ActionTemplate;
|
26
|
-
export declare const credalCallCopilotDefinition: ActionTemplate;
|
27
26
|
export declare const zendeskCreateZendeskTicketDefinition: ActionTemplate;
|
28
27
|
export declare const zendeskListZendeskTicketsDefinition: ActionTemplate;
|
29
28
|
export declare const zendeskGetTicketDetailsDefinition: ActionTemplate;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.googleOauthDeleteCalendarEventDefinition = exports.googleOauthUpdateCalendarEventDefinition = exports.googleOauthListCalendarEventsDefinition = exports.googleOauthListCalendarsDefinition = 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.
|
4
|
-
exports.jamfGetJamfComputerInventoryDefinition = exports.jamfGetJamfFileVaultRecoveryKeyDefinition = 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.googlemailListGmailThreadsDefinition = exports.googlemailSearchGmailMessagesDefinition = exports.googleOauthDeleteGroupMemberDefinition = exports.googleOauthAddGroupMemberDefinition = exports.googleOauthHasGroupMemberDefinition = exports.googleOauthListGroupMembersDefinition = exports.googleOauthGetGroupDefinition = exports.googleOauthListGroupsDefinition = exports.googleOauthSearchDriveByKeywordsDefinition = exports.googleOauthUpdatePresentationDefinition = exports.googleOauthCreatePresentationDefinition = exports.googleOauthUpdateSpreadsheetDefinition =
|
3
|
+
exports.googleOauthCreateSpreadsheetDefinition = exports.googleOauthDeleteCalendarEventDefinition = exports.googleOauthUpdateCalendarEventDefinition = exports.googleOauthListCalendarEventsDefinition = exports.googleOauthListCalendarsDefinition = 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.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.jamfGetJamfComputerInventoryDefinition = exports.jamfGetJamfFileVaultRecoveryKeyDefinition = 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.googlemailListGmailThreadsDefinition = exports.googlemailSearchGmailMessagesDefinition = exports.googleOauthDeleteGroupMemberDefinition = exports.googleOauthAddGroupMemberDefinition = exports.googleOauthHasGroupMemberDefinition = exports.googleOauthListGroupMembersDefinition = exports.googleOauthGetGroupDefinition = exports.googleOauthListGroupsDefinition = exports.googleOauthSearchDriveByKeywordsDefinition = exports.googleOauthUpdatePresentationDefinition = exports.googleOauthCreatePresentationDefinition = exports.googleOauthUpdateSpreadsheetDefinition = void 0;
|
5
5
|
exports.genericFillTemplateDefinition = {
|
6
6
|
description: "Simple utility that takes a template and returns it filled in",
|
7
7
|
scopes: [],
|
@@ -1341,139 +1341,6 @@ exports.bingGetTopNSearchResultUrlsDefinition = {
|
|
1341
1341
|
name: "getTopNSearchResultUrls",
|
1342
1342
|
provider: "bing",
|
1343
1343
|
};
|
1344
|
-
exports.credalCallCopilotDefinition = {
|
1345
|
-
description: "Call Credal Copilot for response on a given query",
|
1346
|
-
scopes: [],
|
1347
|
-
parameters: {
|
1348
|
-
type: "object",
|
1349
|
-
required: ["agentId", "query", "userEmail"],
|
1350
|
-
properties: {
|
1351
|
-
agentId: {
|
1352
|
-
type: "string",
|
1353
|
-
description: "The ID of the copilot to call",
|
1354
|
-
},
|
1355
|
-
query: {
|
1356
|
-
type: "string",
|
1357
|
-
description: "The query to ask Credal Copilot",
|
1358
|
-
},
|
1359
|
-
userEmail: {
|
1360
|
-
type: "string",
|
1361
|
-
description: "The email of the user sending or authorizing the query",
|
1362
|
-
},
|
1363
|
-
},
|
1364
|
-
},
|
1365
|
-
output: {
|
1366
|
-
type: "object",
|
1367
|
-
required: ["response"],
|
1368
|
-
properties: {
|
1369
|
-
response: {
|
1370
|
-
type: "string",
|
1371
|
-
description: "The response from the Credal Copilot",
|
1372
|
-
},
|
1373
|
-
referencedSources: {
|
1374
|
-
type: "array",
|
1375
|
-
description: "The sources referenced in the response",
|
1376
|
-
items: {
|
1377
|
-
type: "object",
|
1378
|
-
description: "The source referenced in the response",
|
1379
|
-
required: ["id", "externalResourceId", "name"],
|
1380
|
-
properties: {
|
1381
|
-
id: {
|
1382
|
-
type: "string",
|
1383
|
-
description: "The id of the source",
|
1384
|
-
},
|
1385
|
-
externalResourceId: {
|
1386
|
-
type: "object",
|
1387
|
-
required: ["externalResourceId", "resourceType"],
|
1388
|
-
description: "The external resource id of the source",
|
1389
|
-
properties: {
|
1390
|
-
externalResourceId: {
|
1391
|
-
type: "string",
|
1392
|
-
description: "The external resource id of the source",
|
1393
|
-
},
|
1394
|
-
resourceType: {
|
1395
|
-
type: "string",
|
1396
|
-
description: "The type of the resource",
|
1397
|
-
},
|
1398
|
-
},
|
1399
|
-
},
|
1400
|
-
name: {
|
1401
|
-
type: "string",
|
1402
|
-
description: "The name of the source",
|
1403
|
-
},
|
1404
|
-
url: {
|
1405
|
-
type: "string",
|
1406
|
-
description: "The url of the source",
|
1407
|
-
},
|
1408
|
-
},
|
1409
|
-
},
|
1410
|
-
},
|
1411
|
-
sourcesInDataContext: {
|
1412
|
-
type: "array",
|
1413
|
-
description: "The sources in the data context of the response",
|
1414
|
-
items: {
|
1415
|
-
type: "object",
|
1416
|
-
description: "The source in the data context of the response",
|
1417
|
-
required: ["id", "externalResourceId", "name"],
|
1418
|
-
properties: {
|
1419
|
-
id: {
|
1420
|
-
type: "string",
|
1421
|
-
description: "The id of the source",
|
1422
|
-
},
|
1423
|
-
externalResourceId: {
|
1424
|
-
type: "object",
|
1425
|
-
description: "The external resource id of the source",
|
1426
|
-
required: ["externalResourceId", "resourceType"],
|
1427
|
-
properties: {
|
1428
|
-
externalResourceId: {
|
1429
|
-
type: "string",
|
1430
|
-
description: "The external resource id of the source",
|
1431
|
-
},
|
1432
|
-
resourceType: {
|
1433
|
-
type: "string",
|
1434
|
-
description: "The type of the resource",
|
1435
|
-
},
|
1436
|
-
},
|
1437
|
-
},
|
1438
|
-
name: {
|
1439
|
-
type: "string",
|
1440
|
-
description: "The name of the source",
|
1441
|
-
},
|
1442
|
-
url: {
|
1443
|
-
type: "string",
|
1444
|
-
description: "The url of the source",
|
1445
|
-
},
|
1446
|
-
},
|
1447
|
-
},
|
1448
|
-
},
|
1449
|
-
webSearchResults: {
|
1450
|
-
type: "array",
|
1451
|
-
description: "The web search results in the response",
|
1452
|
-
items: {
|
1453
|
-
type: "object",
|
1454
|
-
description: "The web search result in the response",
|
1455
|
-
required: ["title", "url"],
|
1456
|
-
properties: {
|
1457
|
-
title: {
|
1458
|
-
type: "string",
|
1459
|
-
description: "The title of the web search result",
|
1460
|
-
},
|
1461
|
-
url: {
|
1462
|
-
type: "string",
|
1463
|
-
description: "The url of the web search result",
|
1464
|
-
},
|
1465
|
-
contents: {
|
1466
|
-
type: "string",
|
1467
|
-
description: "The contents of the web search result",
|
1468
|
-
},
|
1469
|
-
},
|
1470
|
-
},
|
1471
|
-
},
|
1472
|
-
},
|
1473
|
-
},
|
1474
|
-
name: "callCopilot",
|
1475
|
-
provider: "credal",
|
1476
|
-
};
|
1477
1344
|
exports.zendeskCreateZendeskTicketDefinition = {
|
1478
1345
|
description: "Create a ticket in Zendesk",
|
1479
1346
|
scopes: [],
|
@@ -1,4 +1,35 @@
|
|
1
1
|
import { z } from "zod";
|
2
|
+
export declare enum ProviderName {
|
3
|
+
GENERIC = "generic",
|
4
|
+
ASANA = "asana",
|
5
|
+
SLACK = "slack",
|
6
|
+
MATH = "math",
|
7
|
+
CONFLUENCE = "confluence",
|
8
|
+
JIRA = "jira",
|
9
|
+
KANDJI = "kandji",
|
10
|
+
GOOGLEMAPS = "googlemaps",
|
11
|
+
BING = "bing",
|
12
|
+
ZENDESK = "zendesk",
|
13
|
+
LINKEDIN = "linkedin",
|
14
|
+
X = "x",
|
15
|
+
MONGO = "mongo",
|
16
|
+
SNOWFLAKE = "snowflake",
|
17
|
+
OPENSTREETMAP = "openstreetmap",
|
18
|
+
NWS = "nws",
|
19
|
+
FIRECRAWL = "firecrawl",
|
20
|
+
RESEND = "resend",
|
21
|
+
GOOGLEOAUTH = "googleOauth",
|
22
|
+
GOOGLEMAIL = "googlemail",
|
23
|
+
GONG = "gong",
|
24
|
+
FINNHUB = "finnhub",
|
25
|
+
LOOKER = "looker",
|
26
|
+
ASHBY = "ashby",
|
27
|
+
SALESFORCE = "salesforce",
|
28
|
+
MICROSOFT = "microsoft",
|
29
|
+
GITHUB = "github",
|
30
|
+
NOTION = "notion",
|
31
|
+
JAMF = "jamf"
|
32
|
+
}
|
2
33
|
export type ActionFunction<P, A, O> = (input: {
|
3
34
|
params: P;
|
4
35
|
authParams: A;
|
@@ -1363,150 +1394,6 @@ export declare const bingGetTopNSearchResultUrlsOutputSchema: z.ZodObject<{
|
|
1363
1394
|
}>;
|
1364
1395
|
export type bingGetTopNSearchResultUrlsOutputType = z.infer<typeof bingGetTopNSearchResultUrlsOutputSchema>;
|
1365
1396
|
export type bingGetTopNSearchResultUrlsFunction = ActionFunction<bingGetTopNSearchResultUrlsParamsType, AuthParamsType, bingGetTopNSearchResultUrlsOutputType>;
|
1366
|
-
export declare const credalCallCopilotParamsSchema: z.ZodObject<{
|
1367
|
-
agentId: z.ZodString;
|
1368
|
-
query: z.ZodString;
|
1369
|
-
userEmail: z.ZodString;
|
1370
|
-
}, "strip", z.ZodTypeAny, {
|
1371
|
-
query: string;
|
1372
|
-
userEmail: string;
|
1373
|
-
agentId: string;
|
1374
|
-
}, {
|
1375
|
-
query: string;
|
1376
|
-
userEmail: string;
|
1377
|
-
agentId: string;
|
1378
|
-
}>;
|
1379
|
-
export type credalCallCopilotParamsType = z.infer<typeof credalCallCopilotParamsSchema>;
|
1380
|
-
export declare const credalCallCopilotOutputSchema: z.ZodObject<{
|
1381
|
-
response: z.ZodString;
|
1382
|
-
referencedSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
1383
|
-
id: z.ZodString;
|
1384
|
-
externalResourceId: z.ZodObject<{
|
1385
|
-
externalResourceId: z.ZodString;
|
1386
|
-
resourceType: z.ZodString;
|
1387
|
-
}, "strip", z.ZodTypeAny, {
|
1388
|
-
externalResourceId: string;
|
1389
|
-
resourceType: string;
|
1390
|
-
}, {
|
1391
|
-
externalResourceId: string;
|
1392
|
-
resourceType: string;
|
1393
|
-
}>;
|
1394
|
-
name: z.ZodString;
|
1395
|
-
url: z.ZodOptional<z.ZodString>;
|
1396
|
-
}, "strip", z.ZodTypeAny, {
|
1397
|
-
name: string;
|
1398
|
-
id: string;
|
1399
|
-
externalResourceId: {
|
1400
|
-
externalResourceId: string;
|
1401
|
-
resourceType: string;
|
1402
|
-
};
|
1403
|
-
url?: string | undefined;
|
1404
|
-
}, {
|
1405
|
-
name: string;
|
1406
|
-
id: string;
|
1407
|
-
externalResourceId: {
|
1408
|
-
externalResourceId: string;
|
1409
|
-
resourceType: string;
|
1410
|
-
};
|
1411
|
-
url?: string | undefined;
|
1412
|
-
}>, "many">>;
|
1413
|
-
sourcesInDataContext: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
1414
|
-
id: z.ZodString;
|
1415
|
-
externalResourceId: z.ZodObject<{
|
1416
|
-
externalResourceId: z.ZodString;
|
1417
|
-
resourceType: z.ZodString;
|
1418
|
-
}, "strip", z.ZodTypeAny, {
|
1419
|
-
externalResourceId: string;
|
1420
|
-
resourceType: string;
|
1421
|
-
}, {
|
1422
|
-
externalResourceId: string;
|
1423
|
-
resourceType: string;
|
1424
|
-
}>;
|
1425
|
-
name: z.ZodString;
|
1426
|
-
url: z.ZodOptional<z.ZodString>;
|
1427
|
-
}, "strip", z.ZodTypeAny, {
|
1428
|
-
name: string;
|
1429
|
-
id: string;
|
1430
|
-
externalResourceId: {
|
1431
|
-
externalResourceId: string;
|
1432
|
-
resourceType: string;
|
1433
|
-
};
|
1434
|
-
url?: string | undefined;
|
1435
|
-
}, {
|
1436
|
-
name: string;
|
1437
|
-
id: string;
|
1438
|
-
externalResourceId: {
|
1439
|
-
externalResourceId: string;
|
1440
|
-
resourceType: string;
|
1441
|
-
};
|
1442
|
-
url?: string | undefined;
|
1443
|
-
}>, "many">>;
|
1444
|
-
webSearchResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
1445
|
-
title: z.ZodString;
|
1446
|
-
url: z.ZodString;
|
1447
|
-
contents: z.ZodOptional<z.ZodString>;
|
1448
|
-
}, "strip", z.ZodTypeAny, {
|
1449
|
-
title: string;
|
1450
|
-
url: string;
|
1451
|
-
contents?: string | undefined;
|
1452
|
-
}, {
|
1453
|
-
title: string;
|
1454
|
-
url: string;
|
1455
|
-
contents?: string | undefined;
|
1456
|
-
}>, "many">>;
|
1457
|
-
}, "strip", z.ZodTypeAny, {
|
1458
|
-
response: string;
|
1459
|
-
referencedSources?: {
|
1460
|
-
name: string;
|
1461
|
-
id: string;
|
1462
|
-
externalResourceId: {
|
1463
|
-
externalResourceId: string;
|
1464
|
-
resourceType: string;
|
1465
|
-
};
|
1466
|
-
url?: string | undefined;
|
1467
|
-
}[] | undefined;
|
1468
|
-
sourcesInDataContext?: {
|
1469
|
-
name: string;
|
1470
|
-
id: string;
|
1471
|
-
externalResourceId: {
|
1472
|
-
externalResourceId: string;
|
1473
|
-
resourceType: string;
|
1474
|
-
};
|
1475
|
-
url?: string | undefined;
|
1476
|
-
}[] | undefined;
|
1477
|
-
webSearchResults?: {
|
1478
|
-
title: string;
|
1479
|
-
url: string;
|
1480
|
-
contents?: string | undefined;
|
1481
|
-
}[] | undefined;
|
1482
|
-
}, {
|
1483
|
-
response: string;
|
1484
|
-
referencedSources?: {
|
1485
|
-
name: string;
|
1486
|
-
id: string;
|
1487
|
-
externalResourceId: {
|
1488
|
-
externalResourceId: string;
|
1489
|
-
resourceType: string;
|
1490
|
-
};
|
1491
|
-
url?: string | undefined;
|
1492
|
-
}[] | undefined;
|
1493
|
-
sourcesInDataContext?: {
|
1494
|
-
name: string;
|
1495
|
-
id: string;
|
1496
|
-
externalResourceId: {
|
1497
|
-
externalResourceId: string;
|
1498
|
-
resourceType: string;
|
1499
|
-
};
|
1500
|
-
url?: string | undefined;
|
1501
|
-
}[] | undefined;
|
1502
|
-
webSearchResults?: {
|
1503
|
-
title: string;
|
1504
|
-
url: string;
|
1505
|
-
contents?: string | undefined;
|
1506
|
-
}[] | undefined;
|
1507
|
-
}>;
|
1508
|
-
export type credalCallCopilotOutputType = z.infer<typeof credalCallCopilotOutputSchema>;
|
1509
|
-
export type credalCallCopilotFunction = ActionFunction<credalCallCopilotParamsType, AuthParamsType, credalCallCopilotOutputType>;
|
1510
1397
|
export declare const zendeskCreateZendeskTicketParamsSchema: z.ZodObject<{
|
1511
1398
|
subject: z.ZodString;
|
1512
1399
|
body: z.ZodOptional<z.ZodString>;
|
@@ -2961,22 +2848,22 @@ export declare const googleOauthListGroupMembersOutputSchema: z.ZodObject<{
|
|
2961
2848
|
}>, "many">;
|
2962
2849
|
error: z.ZodOptional<z.ZodString>;
|
2963
2850
|
}, "strip", z.ZodTypeAny, {
|
2964
|
-
success: boolean;
|
2965
2851
|
members: {
|
2966
2852
|
type: string;
|
2967
2853
|
id: string;
|
2968
2854
|
email: string;
|
2969
2855
|
role: string;
|
2970
2856
|
}[];
|
2857
|
+
success: boolean;
|
2971
2858
|
error?: string | undefined;
|
2972
2859
|
}, {
|
2973
|
-
success: boolean;
|
2974
2860
|
members: {
|
2975
2861
|
type: string;
|
2976
2862
|
id: string;
|
2977
2863
|
email: string;
|
2978
2864
|
role: string;
|
2979
2865
|
}[];
|
2866
|
+
success: boolean;
|
2980
2867
|
error?: string | undefined;
|
2981
2868
|
}>;
|
2982
2869
|
export type googleOauthListGroupMembersOutputType = z.infer<typeof googleOauthListGroupMembersOutputSchema>;
|
@@ -1,10 +1,42 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
exports.googleOauthDeleteCalendarEventParamsSchema = exports.googleOauthUpdateCalendarEventOutputSchema = exports.googleOauthUpdateCalendarEventParamsSchema = exports.googleOauthListCalendarEventsOutputSchema = exports.googleOauthListCalendarEventsParamsSchema = exports.googleOauthListCalendarsOutputSchema = exports.googleOauthListCalendarsParamsSchema = 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 =
|
5
|
-
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.googlemailListGmailThreadsOutputSchema = exports.googlemailListGmailThreadsParamsSchema = exports.googlemailSearchGmailMessagesOutputSchema = exports.googlemailSearchGmailMessagesParamsSchema = exports.googleOauthDeleteGroupMemberOutputSchema = exports.googleOauthDeleteGroupMemberParamsSchema = exports.googleOauthAddGroupMemberOutputSchema = exports.googleOauthAddGroupMemberParamsSchema = exports.googleOauthHasGroupMemberOutputSchema = exports.googleOauthHasGroupMemberParamsSchema = exports.googleOauthListGroupMembersOutputSchema = exports.googleOauthListGroupMembersParamsSchema = exports.googleOauthGetGroupOutputSchema = exports.googleOauthGetGroupParamsSchema = exports.googleOauthListGroupsOutputSchema = exports.googleOauthListGroupsParamsSchema = exports.googleOauthSearchDriveByKeywordsOutputSchema = exports.googleOauthSearchDriveByKeywordsParamsSchema = exports.googleOauthUpdatePresentationOutputSchema = exports.googleOauthUpdatePresentationParamsSchema = exports.googleOauthCreatePresentationOutputSchema = exports.googleOauthCreatePresentationParamsSchema = exports.googleOauthUpdateSpreadsheetOutputSchema = exports.googleOauthUpdateSpreadsheetParamsSchema = exports.googleOauthCreateSpreadsheetOutputSchema = exports.googleOauthCreateSpreadsheetParamsSchema =
|
6
|
-
exports.jamfGetJamfComputerInventoryOutputSchema = exports.jamfGetJamfComputerInventoryParamsSchema = exports.jamfGetJamfFileVaultRecoveryKeyOutputSchema = exports.jamfGetJamfFileVaultRecoveryKeyParamsSchema = 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 = 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 =
|
3
|
+
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 = exports.ProviderName = void 0;
|
4
|
+
exports.googleOauthDeleteCalendarEventOutputSchema = exports.googleOauthDeleteCalendarEventParamsSchema = exports.googleOauthUpdateCalendarEventOutputSchema = exports.googleOauthUpdateCalendarEventParamsSchema = exports.googleOauthListCalendarEventsOutputSchema = exports.googleOauthListCalendarEventsParamsSchema = exports.googleOauthListCalendarsOutputSchema = exports.googleOauthListCalendarsParamsSchema = 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 = void 0;
|
5
|
+
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.googlemailListGmailThreadsOutputSchema = exports.googlemailListGmailThreadsParamsSchema = exports.googlemailSearchGmailMessagesOutputSchema = exports.googlemailSearchGmailMessagesParamsSchema = exports.googleOauthDeleteGroupMemberOutputSchema = exports.googleOauthDeleteGroupMemberParamsSchema = exports.googleOauthAddGroupMemberOutputSchema = exports.googleOauthAddGroupMemberParamsSchema = exports.googleOauthHasGroupMemberOutputSchema = exports.googleOauthHasGroupMemberParamsSchema = exports.googleOauthListGroupMembersOutputSchema = exports.googleOauthListGroupMembersParamsSchema = exports.googleOauthGetGroupOutputSchema = exports.googleOauthGetGroupParamsSchema = exports.googleOauthListGroupsOutputSchema = exports.googleOauthListGroupsParamsSchema = exports.googleOauthSearchDriveByKeywordsOutputSchema = exports.googleOauthSearchDriveByKeywordsParamsSchema = exports.googleOauthUpdatePresentationOutputSchema = exports.googleOauthUpdatePresentationParamsSchema = exports.googleOauthCreatePresentationOutputSchema = exports.googleOauthCreatePresentationParamsSchema = exports.googleOauthUpdateSpreadsheetOutputSchema = exports.googleOauthUpdateSpreadsheetParamsSchema = exports.googleOauthCreateSpreadsheetOutputSchema = exports.googleOauthCreateSpreadsheetParamsSchema = void 0;
|
6
|
+
exports.jamfGetJamfComputerInventoryOutputSchema = exports.jamfGetJamfComputerInventoryParamsSchema = exports.jamfGetJamfFileVaultRecoveryKeyOutputSchema = exports.jamfGetJamfFileVaultRecoveryKeyParamsSchema = 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 = 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 = void 0;
|
7
7
|
const zod_1 = require("zod");
|
8
|
+
var ProviderName;
|
9
|
+
(function (ProviderName) {
|
10
|
+
ProviderName["GENERIC"] = "generic";
|
11
|
+
ProviderName["ASANA"] = "asana";
|
12
|
+
ProviderName["SLACK"] = "slack";
|
13
|
+
ProviderName["MATH"] = "math";
|
14
|
+
ProviderName["CONFLUENCE"] = "confluence";
|
15
|
+
ProviderName["JIRA"] = "jira";
|
16
|
+
ProviderName["KANDJI"] = "kandji";
|
17
|
+
ProviderName["GOOGLEMAPS"] = "googlemaps";
|
18
|
+
ProviderName["BING"] = "bing";
|
19
|
+
ProviderName["ZENDESK"] = "zendesk";
|
20
|
+
ProviderName["LINKEDIN"] = "linkedin";
|
21
|
+
ProviderName["X"] = "x";
|
22
|
+
ProviderName["MONGO"] = "mongo";
|
23
|
+
ProviderName["SNOWFLAKE"] = "snowflake";
|
24
|
+
ProviderName["OPENSTREETMAP"] = "openstreetmap";
|
25
|
+
ProviderName["NWS"] = "nws";
|
26
|
+
ProviderName["FIRECRAWL"] = "firecrawl";
|
27
|
+
ProviderName["RESEND"] = "resend";
|
28
|
+
ProviderName["GOOGLEOAUTH"] = "googleOauth";
|
29
|
+
ProviderName["GOOGLEMAIL"] = "googlemail";
|
30
|
+
ProviderName["GONG"] = "gong";
|
31
|
+
ProviderName["FINNHUB"] = "finnhub";
|
32
|
+
ProviderName["LOOKER"] = "looker";
|
33
|
+
ProviderName["ASHBY"] = "ashby";
|
34
|
+
ProviderName["SALESFORCE"] = "salesforce";
|
35
|
+
ProviderName["MICROSOFT"] = "microsoft";
|
36
|
+
ProviderName["GITHUB"] = "github";
|
37
|
+
ProviderName["NOTION"] = "notion";
|
38
|
+
ProviderName["JAMF"] = "jamf";
|
39
|
+
})(ProviderName || (exports.ProviderName = ProviderName = {}));
|
8
40
|
exports.AuthParamsSchema = zod_1.z.object({
|
9
41
|
authToken: zod_1.z.string().optional(),
|
10
42
|
baseUrl: zod_1.z.string().optional(),
|
@@ -413,56 +445,6 @@ exports.bingGetTopNSearchResultUrlsOutputSchema = zod_1.z.object({
|
|
413
445
|
}))
|
414
446
|
.describe("The top five search result objects"),
|
415
447
|
});
|
416
|
-
exports.credalCallCopilotParamsSchema = zod_1.z.object({
|
417
|
-
agentId: zod_1.z.string().describe("The ID of the copilot to call"),
|
418
|
-
query: zod_1.z.string().describe("The query to ask Credal Copilot"),
|
419
|
-
userEmail: zod_1.z.string().describe("The email of the user sending or authorizing the query"),
|
420
|
-
});
|
421
|
-
exports.credalCallCopilotOutputSchema = zod_1.z.object({
|
422
|
-
response: zod_1.z.string().describe("The response from the Credal Copilot"),
|
423
|
-
referencedSources: zod_1.z
|
424
|
-
.array(zod_1.z
|
425
|
-
.object({
|
426
|
-
id: zod_1.z.string().describe("The id of the source"),
|
427
|
-
externalResourceId: zod_1.z
|
428
|
-
.object({
|
429
|
-
externalResourceId: zod_1.z.string().describe("The external resource id of the source"),
|
430
|
-
resourceType: zod_1.z.string().describe("The type of the resource"),
|
431
|
-
})
|
432
|
-
.describe("The external resource id of the source"),
|
433
|
-
name: zod_1.z.string().describe("The name of the source"),
|
434
|
-
url: zod_1.z.string().describe("The url of the source").optional(),
|
435
|
-
})
|
436
|
-
.describe("The source referenced in the response"))
|
437
|
-
.describe("The sources referenced in the response")
|
438
|
-
.optional(),
|
439
|
-
sourcesInDataContext: zod_1.z
|
440
|
-
.array(zod_1.z
|
441
|
-
.object({
|
442
|
-
id: zod_1.z.string().describe("The id of the source"),
|
443
|
-
externalResourceId: zod_1.z
|
444
|
-
.object({
|
445
|
-
externalResourceId: zod_1.z.string().describe("The external resource id of the source"),
|
446
|
-
resourceType: zod_1.z.string().describe("The type of the resource"),
|
447
|
-
})
|
448
|
-
.describe("The external resource id of the source"),
|
449
|
-
name: zod_1.z.string().describe("The name of the source"),
|
450
|
-
url: zod_1.z.string().describe("The url of the source").optional(),
|
451
|
-
})
|
452
|
-
.describe("The source in the data context of the response"))
|
453
|
-
.describe("The sources in the data context of the response")
|
454
|
-
.optional(),
|
455
|
-
webSearchResults: zod_1.z
|
456
|
-
.array(zod_1.z
|
457
|
-
.object({
|
458
|
-
title: zod_1.z.string().describe("The title of the web search result"),
|
459
|
-
url: zod_1.z.string().describe("The url of the web search result"),
|
460
|
-
contents: zod_1.z.string().describe("The contents of the web search result").optional(),
|
461
|
-
})
|
462
|
-
.describe("The web search result in the response"))
|
463
|
-
.describe("The web search results in the response")
|
464
|
-
.optional(),
|
465
|
-
});
|
466
448
|
exports.zendeskCreateZendeskTicketParamsSchema = zod_1.z.object({
|
467
449
|
subject: zod_1.z.string().describe("The subject of the ticket"),
|
468
450
|
body: zod_1.z.string().describe("The body of the ticket").optional(),
|
package/dist/actions/groups.js
CHANGED
@@ -60,10 +60,6 @@ exports.ACTION_GROUPS = {
|
|
60
60
|
description: "Actions for interacting with Gmail",
|
61
61
|
actions: [templates_1.googlemailSearchGmailMessagesDefinition, templates_1.googlemailListGmailThreadsDefinition],
|
62
62
|
},
|
63
|
-
CREDAL_CALL_COPILOT: {
|
64
|
-
description: "Action for calling a Credal Copilot",
|
65
|
-
actions: [templates_1.credalCallCopilotDefinition],
|
66
|
-
},
|
67
63
|
LINKEDIN_SHARE_POST: {
|
68
64
|
description: "Action for creating a share post url on linkedin",
|
69
65
|
actions: [templates_1.linkedinCreateShareLinkedinPostUrlDefinition],
|
package/dist/actions/parse.js
CHANGED
@@ -142,6 +142,16 @@ function generateTypes(_a) {
|
|
142
142
|
const project = new ts_morph_1.Project();
|
143
143
|
const templatesFile = project.createSourceFile(outputPath, "", { overwrite: true });
|
144
144
|
const typesFile = project.createSourceFile(templatesOutputPath, "", { overwrite: true });
|
145
|
+
// Set the ProviderName enum based on the schema providers
|
146
|
+
typesFile
|
147
|
+
.addEnum({
|
148
|
+
name: "ProviderName",
|
149
|
+
members: Object.keys(parsedConfig.actions).map(providerName => ({
|
150
|
+
name: providerName.toUpperCase().replace(/-/g, "_"),
|
151
|
+
value: providerName,
|
152
|
+
})),
|
153
|
+
})
|
154
|
+
.setIsExported(true);
|
145
155
|
// Add imports
|
146
156
|
templatesFile.addImportDeclaration({
|
147
157
|
moduleSpecifier: "../../actions/parse",
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const axios_1 = __importDefault(require("axios"));
|
16
|
+
function getConfluenceApi(baseUrl, username, apiToken) {
|
17
|
+
const api = axios_1.default.create({
|
18
|
+
baseURL: baseUrl,
|
19
|
+
headers: {
|
20
|
+
Accept: "application/json",
|
21
|
+
// Tokens are associated with a specific user.
|
22
|
+
Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
|
23
|
+
},
|
24
|
+
});
|
25
|
+
return api;
|
26
|
+
}
|
27
|
+
const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
28
|
+
const { pageId, username, content, title } = params;
|
29
|
+
const { baseUrl, authToken } = authParams;
|
30
|
+
const api = getConfluenceApi(baseUrl, username, authToken);
|
31
|
+
// Get current version number
|
32
|
+
const response = yield api.get(`/api/v2/pages/${pageId}`);
|
33
|
+
const currVersion = response.data.version.number;
|
34
|
+
yield api.put(`/api/v2/pages/${pageId}`, {
|
35
|
+
id: pageId,
|
36
|
+
status: "current",
|
37
|
+
title,
|
38
|
+
body: {
|
39
|
+
representation: "storage",
|
40
|
+
value: content,
|
41
|
+
},
|
42
|
+
version: {
|
43
|
+
number: currVersion + 1,
|
44
|
+
},
|
45
|
+
});
|
46
|
+
});
|
47
|
+
exports.default = confluenceUpdatePage;
|
package/dist/app.d.ts
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
import type { ActionTemplate } from "./actions/parse";
|
2
2
|
import type { AuthParamsType } from "./actions/autogen/types";
|
3
3
|
export declare function runAction(name: string, provider: string, authentication: AuthParamsType, parameters: Record<string, any>): Promise<any>;
|
4
|
+
/**
|
5
|
+
* HELPER FUNCTIONS
|
6
|
+
*/
|
7
|
+
export declare function getActions(): Promise<ActionTemplate[]>;
|
4
8
|
export type ActionGroupsReturn = {
|
5
9
|
name: string;
|
6
10
|
description: string;
|
7
11
|
actions: ActionTemplate[];
|
8
12
|
}[];
|
9
|
-
export declare function getActionGroups(): Promise<ActionGroupsReturn>;
|
package/dist/app.js
CHANGED
@@ -43,8 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
43
43
|
};
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
45
45
|
exports.runAction = runAction;
|
46
|
-
exports.
|
47
|
-
const groups_1 = require("./actions/groups");
|
46
|
+
exports.getActions = getActions;
|
48
47
|
const templates = __importStar(require("./actions/autogen/templates"));
|
49
48
|
const invoke_1 = require("./actions/invoke");
|
50
49
|
function runAction(name, provider, authentication,
|
@@ -76,22 +75,3 @@ function getActions() {
|
|
76
75
|
return Object.values(templates);
|
77
76
|
});
|
78
77
|
}
|
79
|
-
function getActionGroups() {
|
80
|
-
return __awaiter(this, void 0, void 0, function* () {
|
81
|
-
const allDefinitions = yield getActions();
|
82
|
-
const result = [];
|
83
|
-
for (const [key, value] of Object.entries(groups_1.ACTION_GROUPS)) {
|
84
|
-
const actionGroupDetails = [];
|
85
|
-
for (const action of value.actions) {
|
86
|
-
const definition = allDefinitions.find(def => def.name === action.name);
|
87
|
-
if (definition) {
|
88
|
-
actionGroupDetails.push(definition);
|
89
|
-
}
|
90
|
-
}
|
91
|
-
if (actionGroupDetails.length > 0) {
|
92
|
-
result.push({ name: key, description: value.description, actions: actionGroupDetails });
|
93
|
-
}
|
94
|
-
}
|
95
|
-
return result;
|
96
|
-
});
|
97
|
-
}
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
export { runAction,
|
2
|
-
export { ACTION_GROUPS, type ActionGroups } from "./actions/groups";
|
1
|
+
export { runAction, getActions } from "./app";
|
3
2
|
export { ActionMapper } from "./actions/actionMapper";
|
4
3
|
export { ActionTemplate } from "./actions/parse";
|
5
4
|
export * from "./actions/autogen/templates";
|
package/dist/index.js
CHANGED
@@ -15,12 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
16
16
|
};
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
18
|
-
exports.ActionMapper = exports.
|
18
|
+
exports.ActionMapper = exports.getActions = exports.runAction = void 0;
|
19
19
|
var app_1 = require("./app");
|
20
20
|
Object.defineProperty(exports, "runAction", { enumerable: true, get: function () { return app_1.runAction; } });
|
21
|
-
Object.defineProperty(exports, "
|
22
|
-
var groups_1 = require("./actions/groups");
|
23
|
-
Object.defineProperty(exports, "ACTION_GROUPS", { enumerable: true, get: function () { return groups_1.ACTION_GROUPS; } });
|
21
|
+
Object.defineProperty(exports, "getActions", { enumerable: true, get: function () { return app_1.getActions; } });
|
24
22
|
var actionMapper_1 = require("./actions/actionMapper");
|
25
23
|
Object.defineProperty(exports, "ActionMapper", { enumerable: true, get: function () { return actionMapper_1.ActionMapper; } });
|
26
24
|
__exportStar(require("./actions/autogen/templates"), exports);
|
package/package.json
CHANGED
@@ -1,98 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const axiosClient_1 = require("../../util/axiosClient");
|
13
|
-
const missingAuthConstants_1 = require("../../util/missingAuthConstants");
|
14
|
-
const decodeMessage_1 = require("./utils/decodeMessage");
|
15
|
-
const listGmailThreads = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
16
|
-
if (!authParams.authToken) {
|
17
|
-
return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN, threads: [] };
|
18
|
-
}
|
19
|
-
const { query, maxResults } = params;
|
20
|
-
const allThreads = [];
|
21
|
-
const errorMessages = [];
|
22
|
-
const max = maxResults !== null && maxResults !== void 0 ? maxResults : 100;
|
23
|
-
let fetched = 0;
|
24
|
-
let pageToken = undefined;
|
25
|
-
try {
|
26
|
-
while (fetched < max) {
|
27
|
-
const url = `https://gmail.googleapis.com/gmail/v1/users/me/threads?q=${encodeURIComponent(query)}` +
|
28
|
-
(pageToken ? `&pageToken=${encodeURIComponent(pageToken)}` : "") +
|
29
|
-
`&maxResults=${Math.min(100, max - fetched)}`;
|
30
|
-
const listRes = yield axiosClient_1.axiosClient.get(url, {
|
31
|
-
headers: {
|
32
|
-
Authorization: `Bearer ${authParams.authToken}`,
|
33
|
-
},
|
34
|
-
});
|
35
|
-
const { threads: threadList = [], nextPageToken } = listRes.data;
|
36
|
-
if (!Array.isArray(threadList) || threadList.length === 0)
|
37
|
-
break;
|
38
|
-
const remaining = max - allThreads.length;
|
39
|
-
const batch = threadList.slice(0, remaining);
|
40
|
-
const results = yield Promise.all(batch.map((thread) => __awaiter(void 0, void 0, void 0, function* () {
|
41
|
-
try {
|
42
|
-
const threadRes = yield axiosClient_1.axiosClient.get(`https://gmail.googleapis.com/gmail/v1/users/me/threads/${thread.id}?format=full`, {
|
43
|
-
headers: {
|
44
|
-
Authorization: `Bearer ${authParams.authToken}`,
|
45
|
-
},
|
46
|
-
});
|
47
|
-
const { id, historyId, messages } = threadRes.data;
|
48
|
-
return {
|
49
|
-
id,
|
50
|
-
historyId,
|
51
|
-
messages: Array.isArray(messages)
|
52
|
-
? messages.map(msg => {
|
53
|
-
const { id, threadId, snippet, labelIds, internalDate } = msg;
|
54
|
-
const emailBody = (0, decodeMessage_1.getEmailContent)(msg) || "";
|
55
|
-
return {
|
56
|
-
id,
|
57
|
-
threadId,
|
58
|
-
snippet,
|
59
|
-
labelIds,
|
60
|
-
internalDate,
|
61
|
-
emailBody,
|
62
|
-
};
|
63
|
-
})
|
64
|
-
: [],
|
65
|
-
};
|
66
|
-
}
|
67
|
-
catch (err) {
|
68
|
-
errorMessages.push(err instanceof Error ? err.message : "Failed to fetch thread details");
|
69
|
-
return {
|
70
|
-
id: thread.id,
|
71
|
-
snippet: "",
|
72
|
-
historyId: "",
|
73
|
-
messages: [],
|
74
|
-
error: err instanceof Error ? err.message : "Failed to fetch thread details",
|
75
|
-
};
|
76
|
-
}
|
77
|
-
})));
|
78
|
-
allThreads.push(...results);
|
79
|
-
fetched = allThreads.length;
|
80
|
-
if (!nextPageToken || allThreads.length >= max)
|
81
|
-
break;
|
82
|
-
pageToken = nextPageToken;
|
83
|
-
}
|
84
|
-
return {
|
85
|
-
success: errorMessages.length === 0,
|
86
|
-
threads: allThreads,
|
87
|
-
error: errorMessages.join("; "),
|
88
|
-
};
|
89
|
-
}
|
90
|
-
catch (error) {
|
91
|
-
return {
|
92
|
-
success: false,
|
93
|
-
error: error instanceof Error ? error.message : "Unknown error listing Gmail threads",
|
94
|
-
threads: [],
|
95
|
-
};
|
96
|
-
}
|
97
|
-
});
|
98
|
-
exports.default = listGmailThreads;
|
@@ -1,91 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const axiosClient_1 = require("../../util/axiosClient");
|
13
|
-
const missingAuthConstants_1 = require("../../util/missingAuthConstants");
|
14
|
-
const decodeMessage_1 = require("./utils/decodeMessage");
|
15
|
-
const searchGmailMessages = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
16
|
-
if (!authParams.authToken) {
|
17
|
-
return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN, messages: [] };
|
18
|
-
}
|
19
|
-
const { query, maxResults } = params;
|
20
|
-
const allMessages = [];
|
21
|
-
const max = maxResults !== null && maxResults !== void 0 ? maxResults : 100;
|
22
|
-
const errorMessages = [];
|
23
|
-
let pageToken = undefined;
|
24
|
-
let fetched = 0;
|
25
|
-
try {
|
26
|
-
while (fetched < max) {
|
27
|
-
const url = `https://gmail.googleapis.com/gmail/v1/users/me/messages?q=${encodeURIComponent(query)}` +
|
28
|
-
(pageToken ? `&pageToken=${encodeURIComponent(pageToken)}` : "") +
|
29
|
-
`&maxResults=${Math.min(100, max - fetched)}`;
|
30
|
-
const listRes = yield axiosClient_1.axiosClient.get(url, {
|
31
|
-
headers: {
|
32
|
-
Authorization: `Bearer ${authParams.authToken}`,
|
33
|
-
},
|
34
|
-
});
|
35
|
-
const { messages: messageList = [], nextPageToken } = listRes.data;
|
36
|
-
if (!Array.isArray(messageList) || messageList.length === 0)
|
37
|
-
break;
|
38
|
-
const remaining = max - allMessages.length;
|
39
|
-
const batch = messageList.slice(0, remaining);
|
40
|
-
const results = yield Promise.all(batch.map((msg) => __awaiter(void 0, void 0, void 0, function* () {
|
41
|
-
try {
|
42
|
-
const msgRes = yield axiosClient_1.axiosClient.get(`https://gmail.googleapis.com/gmail/v1/users/me/messages/${msg.id}?format=full`, {
|
43
|
-
headers: {
|
44
|
-
Authorization: `Bearer ${authParams.authToken}`,
|
45
|
-
},
|
46
|
-
});
|
47
|
-
const { id, threadId, snippet, labelIds, internalDate } = msgRes.data;
|
48
|
-
const emailBody = (0, decodeMessage_1.getEmailContent)(msgRes.data) || "";
|
49
|
-
return {
|
50
|
-
id,
|
51
|
-
threadId,
|
52
|
-
snippet,
|
53
|
-
labelIds,
|
54
|
-
internalDate,
|
55
|
-
emailBody,
|
56
|
-
};
|
57
|
-
}
|
58
|
-
catch (err) {
|
59
|
-
errorMessages.push(err instanceof Error ? err.message : "Failed to fetch message details");
|
60
|
-
return {
|
61
|
-
id: msg.id,
|
62
|
-
threadId: "",
|
63
|
-
snippet: "",
|
64
|
-
labelIds: [],
|
65
|
-
internalDate: "",
|
66
|
-
payload: {},
|
67
|
-
error: err instanceof Error ? err.message : "Failed to fetch message details",
|
68
|
-
};
|
69
|
-
}
|
70
|
-
})));
|
71
|
-
allMessages.push(...results);
|
72
|
-
fetched = allMessages.length;
|
73
|
-
if (!nextPageToken || allMessages.length >= max)
|
74
|
-
break;
|
75
|
-
pageToken = nextPageToken;
|
76
|
-
}
|
77
|
-
return {
|
78
|
-
success: errorMessages.length === 0,
|
79
|
-
messages: allMessages,
|
80
|
-
error: errorMessages.join("; "),
|
81
|
-
};
|
82
|
-
}
|
83
|
-
catch (error) {
|
84
|
-
return {
|
85
|
-
success: false,
|
86
|
-
error: error instanceof Error ? error.message : "Unknown error searching Gmail",
|
87
|
-
messages: [],
|
88
|
-
};
|
89
|
-
}
|
90
|
-
});
|
91
|
-
exports.default = searchGmailMessages;
|
@@ -1,45 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const axiosClient_1 = require("../../util/axiosClient");
|
13
|
-
const getComputerInventory = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
14
|
-
const { authToken, baseUrl } = authParams;
|
15
|
-
const { section } = params;
|
16
|
-
if (!baseUrl) {
|
17
|
-
throw new Error("Base URL is required to fetch computer inventory");
|
18
|
-
}
|
19
|
-
const apiUrl = `${baseUrl}/v1/computer-inventory`;
|
20
|
-
const queryParams = {};
|
21
|
-
if (section) {
|
22
|
-
queryParams.section = section;
|
23
|
-
}
|
24
|
-
try {
|
25
|
-
const response = yield axiosClient_1.axiosClient.get(apiUrl, {
|
26
|
-
headers: {
|
27
|
-
Authorization: `Bearer ${authToken}`,
|
28
|
-
Accept: "application/json",
|
29
|
-
},
|
30
|
-
params: queryParams,
|
31
|
-
});
|
32
|
-
return {
|
33
|
-
success: true,
|
34
|
-
data: response.data,
|
35
|
-
};
|
36
|
-
}
|
37
|
-
catch (error) {
|
38
|
-
console.error("Error retrieving computer inventory: ", error);
|
39
|
-
return {
|
40
|
-
success: false,
|
41
|
-
error: error instanceof Error ? error.message : "Unknown error",
|
42
|
-
};
|
43
|
-
}
|
44
|
-
});
|
45
|
-
exports.default = getComputerInventory;
|
@@ -1,40 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const axiosClient_1 = require("../../util/axiosClient");
|
13
|
-
const getFileVaultRecoveryKey = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
14
|
-
const { authToken, baseUrl } = authParams;
|
15
|
-
const { computerId } = params;
|
16
|
-
if (!baseUrl || !computerId) {
|
17
|
-
throw new Error("Base URL and Computer ID are required to fetch FileVault2 recovery key");
|
18
|
-
}
|
19
|
-
const apiUrl = `${baseUrl}/JSSResource/computers/${computerId}/FileVault2RecoveryKey`;
|
20
|
-
try {
|
21
|
-
const response = yield axiosClient_1.axiosClient.get(apiUrl, {
|
22
|
-
headers: {
|
23
|
-
Authorization: `Bearer ${authToken}`,
|
24
|
-
Accept: "application/json",
|
25
|
-
},
|
26
|
-
});
|
27
|
-
return {
|
28
|
-
success: true,
|
29
|
-
data: response.data,
|
30
|
-
};
|
31
|
-
}
|
32
|
-
catch (error) {
|
33
|
-
console.error("Error retrieving FileVault2 recovery key: ", error);
|
34
|
-
return {
|
35
|
-
success: false,
|
36
|
-
error: error instanceof Error ? error.message : "Unknown error",
|
37
|
-
};
|
38
|
-
}
|
39
|
-
});
|
40
|
-
exports.default = getFileVaultRecoveryKey;
|