Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Jamf enhancement dev #160

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# v2.15.0 (Wed Jun 19 2024)

#### 🐛 Bug Fix

- Updated the code for Device Group Entity : missing groups
- updated the code for Computer Uses OSX Profile relationship : missing relationships

### Authors: 1

- Bharat (https://github.com/bharatkk-metron)
---

# v2.15.0 (Wed Jan 24 2024)

#### 🚀 Enhancement
Expand Down
15 changes: 15 additions & 0 deletions src/jamf/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Computer,
ComputerDetail,
ComputerDetailResponse,
ComputerGroup,
ComputerResponse,
Configuration,
Group,
Expand Down Expand Up @@ -54,6 +55,7 @@ export interface IJamfClient {
fetchMobileDevices(): Promise<MobileDevice[]>;
fetchMobileDeviceById(id: number): Promise<MobileDeviceDetail>;
fetchComputers(): Promise<Computer[]>;
fetchComputerGroups(): Promise<ComputerGroup[]>;
fetchComputerById(id: number): Promise<ComputerDetail>;
fetchComputerApplicationByName(name: string): Promise<ApplicationDetail>;
fetchOSXConfigurationProfiles(): Promise<Configuration[]>;
Expand Down Expand Up @@ -301,6 +303,19 @@ export class JamfClient implements IJamfClient {
return result.computers;
}

/**
* Requires "Read - Computers" permission
*/
public async fetchComputerGroups(): Promise<ComputerGroup[]> {
const result = await this.makeRequest<any>(
this.getResourceUrl('/computergroups'),
VDubber marked this conversation as resolved.
Show resolved Hide resolved
Method.GET,
{},
);

return result.computer_groups;
}

/**
* Requires "Read - Computers" permission
*/
Expand Down
6 changes: 6 additions & 0 deletions src/jamf/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ export interface Computer {
report_date_epoch: number;
}

export interface ComputerGroup {
id: number;
name: string;
is_smart: boolean;
}

export interface ComputerDetail {
general: {
id: number;
Expand Down
1 change: 1 addition & 0 deletions src/steps/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export enum IntegrationSteps {
GROUPS = 'fetch-groups',
ADMINS = 'fetch-admins',
DEVICE_USERS = 'fetch-device-users',
COMPUTER_USES_PROFILE = 'build-computer-uses-profile-relationship',
}

export const Entities: Record<
Expand Down
Loading
Loading