@credal/actions 0.1.101 → 0.2.2
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 +0 -144
- package/dist/actions/autogen/types.js +4 -54
- package/dist/actions/groups.js +0 -4
- package/dist/actions/parse.js +10 -0
- package/dist/actions/providers/jamf/getJamfComputerInventory.js +5 -21
- package/dist/actions/providers/jamf/getJamfFileVaultRecoveryKey.js +4 -21
- 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
@@ -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: [],
|
@@ -1363,150 +1363,6 @@ export declare const bingGetTopNSearchResultUrlsOutputSchema: z.ZodObject<{
|
|
1363
1363
|
}>;
|
1364
1364
|
export type bingGetTopNSearchResultUrlsOutputType = z.infer<typeof bingGetTopNSearchResultUrlsOutputSchema>;
|
1365
1365
|
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
1366
|
export declare const zendeskCreateZendeskTicketParamsSchema: z.ZodObject<{
|
1511
1367
|
subject: z.ZodString;
|
1512
1368
|
body: z.ZodOptional<z.ZodString>;
|
@@ -1,9 +1,9 @@
|
|
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 =
|
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 =
|
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 =
|
3
|
+
exports.zendeskCreateZendeskTicketParamsSchema = exports.bingGetTopNSearchResultUrlsOutputSchema = exports.bingGetTopNSearchResultUrlsParamsSchema = exports.googlemapsNearbysearchRestaurantsOutputSchema = exports.googlemapsNearbysearchRestaurantsParamsSchema = exports.googlemapsValidateAddressOutputSchema = exports.googlemapsValidateAddressParamsSchema = exports.kandjiGetFVRecoveryKeyForDeviceOutputSchema = exports.kandjiGetFVRecoveryKeyForDeviceParamsSchema = exports.jiraGetJiraIssuesByQueryOutputSchema = exports.jiraGetJiraIssuesByQueryParamsSchema = exports.jiraUpdateJiraTicketStatusOutputSchema = exports.jiraUpdateJiraTicketStatusParamsSchema = exports.jiraUpdateJiraTicketDetailsOutputSchema = exports.jiraUpdateJiraTicketDetailsParamsSchema = exports.jiraGetJiraTicketHistoryOutputSchema = exports.jiraGetJiraTicketHistoryParamsSchema = exports.jiraGetJiraTicketDetailsOutputSchema = exports.jiraGetJiraTicketDetailsParamsSchema = exports.jiraCreateJiraTicketOutputSchema = exports.jiraCreateJiraTicketParamsSchema = exports.jiraCommentJiraTicketOutputSchema = exports.jiraCommentJiraTicketParamsSchema = exports.jiraAssignJiraTicketOutputSchema = exports.jiraAssignJiraTicketParamsSchema = exports.confluenceFetchPageContentOutputSchema = exports.confluenceFetchPageContentParamsSchema = exports.confluenceOverwritePageOutputSchema = exports.confluenceOverwritePageParamsSchema = exports.mathAddOutputSchema = exports.mathAddParamsSchema = exports.slackGetChannelMessagesOutputSchema = exports.slackGetChannelMessagesParamsSchema = exports.slackSendMessageOutputSchema = exports.slackSendMessageParamsSchema = exports.asanaGetTasksDetailsOutputSchema = exports.asanaGetTasksDetailsParamsSchema = exports.asanaSearchTasksOutputSchema = exports.asanaSearchTasksParamsSchema = exports.asanaUpdateTaskOutputSchema = exports.asanaUpdateTaskParamsSchema = exports.asanaCreateTaskOutputSchema = exports.asanaCreateTaskParamsSchema = exports.asanaListAsanaTasksByProjectOutputSchema = exports.asanaListAsanaTasksByProjectParamsSchema = exports.asanaCommentTaskOutputSchema = exports.asanaCommentTaskParamsSchema = exports.genericFillTemplateOutputSchema = exports.genericFillTemplateParamsSchema = exports.AuthParamsSchema = void 0;
|
4
|
+
exports.googleOauthCreateSpreadsheetParamsSchema = 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 = void 0;
|
5
|
+
exports.salesforceUpdateRecordParamsSchema = exports.ashbyUpdateCandidateOutputSchema = exports.ashbyUpdateCandidateParamsSchema = exports.ashbyCreateCandidateOutputSchema = exports.ashbyCreateCandidateParamsSchema = exports.ashbyListCandidateNotesOutputSchema = exports.ashbyListCandidateNotesParamsSchema = exports.ashbySearchCandidatesOutputSchema = exports.ashbySearchCandidatesParamsSchema = exports.ashbyListCandidatesOutputSchema = exports.ashbyListCandidatesParamsSchema = exports.ashbyAddCandidateToProjectOutputSchema = exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = exports.ashbyCreateNoteParamsSchema = exports.lookerEnableUserByEmailOutputSchema = exports.lookerEnableUserByEmailParamsSchema = exports.finnhubGetBasicFinancialsOutputSchema = exports.finnhubGetBasicFinancialsParamsSchema = exports.finnhubSymbolLookupOutputSchema = exports.finnhubSymbolLookupParamsSchema = exports.gongGetGongTranscriptsOutputSchema = exports.gongGetGongTranscriptsParamsSchema = exports.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 = 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 = void 0;
|
7
7
|
const zod_1 = require("zod");
|
8
8
|
exports.AuthParamsSchema = zod_1.z.object({
|
9
9
|
authToken: zod_1.z.string().optional(),
|
@@ -413,56 +413,6 @@ exports.bingGetTopNSearchResultUrlsOutputSchema = zod_1.z.object({
|
|
413
413
|
}))
|
414
414
|
.describe("The top five search result objects"),
|
415
415
|
});
|
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
416
|
exports.zendeskCreateZendeskTicketParamsSchema = zod_1.z.object({
|
467
417
|
subject: zod_1.z.string().describe("The subject of the ticket"),
|
468
418
|
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",
|
@@ -10,42 +10,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
const axiosClient_1 = require("../../util/axiosClient");
|
13
|
-
const types_1 = require("./types");
|
14
13
|
const getJamfComputerInventory = (_a) => __awaiter(void 0, [_a], void 0, function* ({ authParams, }) {
|
15
|
-
const {
|
16
|
-
if (!subdomain || !
|
17
|
-
throw new Error("
|
14
|
+
const { authToken, subdomain } = authParams;
|
15
|
+
if (!subdomain || !authToken) {
|
16
|
+
throw new Error("Instance and authToken are required to fetch Jamf computer inventory");
|
18
17
|
}
|
19
18
|
const url = `https://${subdomain}.jamfcloud.com`;
|
20
|
-
const auth = "Basic " + Buffer.from(`${username}:${password}`).toString("base64");
|
21
19
|
try {
|
22
|
-
const response = yield axiosClient_1.axiosClient.post(`${url}/api/v1/auth/token`, {}, {
|
23
|
-
headers: {
|
24
|
-
Authorization: auth,
|
25
|
-
Accept: "application/json",
|
26
|
-
},
|
27
|
-
});
|
28
|
-
const token = types_1.TokenResponseSchema.parse(response.data).token;
|
29
20
|
const computers = yield axiosClient_1.axiosClient.get(`${url}/api/v1/computers-inventory`, {
|
30
21
|
headers: {
|
31
|
-
Authorization: `Bearer ${
|
22
|
+
Authorization: `Bearer ${authToken}`,
|
32
23
|
Accept: "application/json",
|
33
24
|
},
|
34
25
|
});
|
35
|
-
yield axiosClient_1.axiosClient.post(`${url}/api/v1/auth/invalidate-token`, {}, {
|
36
|
-
headers: {
|
37
|
-
Authorization: `Bearer ${token}`,
|
38
|
-
},
|
39
|
-
// Accept all status codes so we can handle them manually
|
40
|
-
validateStatus: () => true,
|
41
|
-
});
|
42
26
|
return {
|
43
27
|
success: true,
|
44
28
|
data: computers.data,
|
45
29
|
};
|
46
30
|
}
|
47
31
|
catch (error) {
|
48
|
-
console.error("Error retrieving
|
32
|
+
console.error("Error retrieving Jamf computer inventory: ", error);
|
49
33
|
return {
|
50
34
|
success: false,
|
51
35
|
error: error instanceof Error ? error.message : "Unknown error",
|
@@ -10,38 +10,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
const axiosClient_1 = require("../../util/axiosClient");
|
13
|
-
const types_1 = require("./types");
|
14
13
|
const getJamfFileVaultRecoveryKey = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
15
|
-
const {
|
14
|
+
const { authToken, subdomain } = authParams;
|
16
15
|
const { computerId } = params;
|
17
|
-
if (!subdomain || !
|
18
|
-
throw new Error("
|
16
|
+
if (!subdomain || !authToken) {
|
17
|
+
throw new Error("Instance and authToken are required to fetch FileVault2 recovery key");
|
19
18
|
}
|
20
19
|
// const apiUrl = `${baseUrl}/api/v1/computers-inventory/${computerId}/filevault`;
|
21
20
|
const url = `https://${subdomain}.jamfcloud.com`;
|
22
|
-
const auth = "Basic " + Buffer.from(`${username}:${password}`).toString("base64");
|
23
|
-
console.log("Fetching FileVault2 recovery key for computer ID:", computerId, auth, url);
|
24
21
|
try {
|
25
|
-
const response = yield axiosClient_1.axiosClient.post(`${url}/api/v1/auth/token`, {}, {
|
26
|
-
headers: {
|
27
|
-
Authorization: auth,
|
28
|
-
Accept: "application/json",
|
29
|
-
},
|
30
|
-
});
|
31
|
-
const token = types_1.TokenResponseSchema.parse(response.data).token;
|
32
22
|
const fileVaultResponse = yield axiosClient_1.axiosClient.get(`${url}/api/v1/computers-inventory/${computerId}/filevault`, {
|
33
23
|
headers: {
|
34
|
-
Authorization: `Bearer ${
|
24
|
+
Authorization: `Bearer ${authToken}`,
|
35
25
|
Accept: "application/json",
|
36
26
|
},
|
37
27
|
});
|
38
|
-
yield axiosClient_1.axiosClient.post(`${url}/api/v1/auth/invalidate-token`, {}, {
|
39
|
-
headers: {
|
40
|
-
Authorization: `Bearer ${token}`,
|
41
|
-
},
|
42
|
-
// Accept all status codes so we can handle them manually
|
43
|
-
validateStatus: () => true,
|
44
|
-
});
|
45
28
|
return {
|
46
29
|
success: true,
|
47
30
|
data: fileVaultResponse.data,
|
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);
|