fleeta-api-lib
Version:
A comprehensive library for fleet management applications - API, Auth, Device management
88 lines • 3.46 kB
TypeScript
/**
* Group Lifecycle API Functions
* Handles group creation, deletion, and renaming operations
*/
import type { AddGroupParams, AddGroupResponse, GroupData, DeleteGroupParams, DeleteGroupResponse, RenameGroupParams, RenameGroupResponse, GroupRenameItem } from '../types';
/**
* Add new groups to the fleet (Master privilege only)
* Creates one or more groups with specified names
*
* @param params - Group creation parameters (email and user_token from AuthStore if not provided)
* @returns Promise with group creation response
*/
export declare function addGroup(params: Omit<AddGroupParams, 'email' | 'user_token'> & {
email?: string;
user_token?: string;
}): Promise<AddGroupResponse>;
/**
* Add a single group to the fleet
* Convenience function for adding a single group
*
* @param groupName - Name of the group to create
* @returns Promise with group creation response
*/
export declare function addSingleGroup(groupName: string): Promise<GroupData>;
/**
* Add multiple groups to the fleet
* Convenience function for adding multiple groups at once
*
* @param groupNames - Array of group names to create
* @returns Promise with group creation response
*/
export declare function addMultipleGroups(groupNames: string[]): Promise<GroupData[]>;
/**
* Delete groups from the fleet (Master privilege only)
* Removes one or more groups by their IDs
*
* @param params - Group deletion parameters (email and user_token from AuthStore if not provided)
* @returns Promise with group deletion response
*/
export declare function deleteGroup(params: Omit<DeleteGroupParams, 'email' | 'user_token'> & {
email?: string;
user_token?: string;
}): Promise<DeleteGroupResponse>;
/**
* Delete a single group from the fleet
* Convenience function for deleting a single group
*
* @param groupId - Group management ID to delete
* @returns Promise with group deletion response
*/
export declare function deleteSingleGroup(groupId: string): Promise<DeleteGroupResponse>;
/**
* Delete multiple groups from the fleet
* Convenience function for deleting multiple groups at once
*
* @param groupIds - Array of group management IDs to delete
* @returns Promise with group deletion response
*/
export declare function deleteMultipleGroups(groupIds: string[]): Promise<DeleteGroupResponse>;
/**
* Rename groups in the fleet (Master privilege only)
* Changes names of one or more groups
*
* @param params - Group rename parameters (email and user_token from AuthStore if not provided)
* @returns Promise with group rename response
*/
export declare function renameGroup(params: Omit<RenameGroupParams, 'email' | 'user_token'> & {
email?: string;
user_token?: string;
}): Promise<RenameGroupResponse>;
/**
* Rename a single group in the fleet
* Convenience function for renaming a single group
*
* @param groupId - Group management ID to rename
* @param newGroupName - New name for the group
* @returns Promise with group rename response
*/
export declare function renameSingleGroup(groupId: string, newGroupName: string): Promise<RenameGroupResponse>;
/**
* Rename multiple groups in the fleet
* Convenience function for renaming multiple groups at once
*
* @param renameList - Array of group rename items
* @returns Promise with group rename response
*/
export declare function renameMultipleGroups(renameList: GroupRenameItem[]): Promise<RenameGroupResponse>;
//# sourceMappingURL=groupLifecycle.d.ts.map