/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { groupsCreateGroup } from "../funcs/groups-create-group.js"; import { groupsDeleteGroup } from "../funcs/groups-delete-group.js"; import { groupsGetGroup } from "../funcs/groups-get-group.js"; import { groupsQueryGroup } from "../funcs/groups-query-group.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { unwrapAsync } from "../types/fp.js"; import * as models from "./models/index.js"; export class Groups extends ClientSDK { /** * Create group * * @remarks * Use when organizing entities into a group (e.g. for filtering prices or plans by product line or region). */ async createGroup( request: models.CreateGroupRequest, options?: RequestOptions, ): Promise { return unwrapAsync(groupsCreateGroup( this, request, options, )); } /** * Query groups * * @remarks * Use when listing or searching groups (e.g. admin catalog). Returns a paginated list; supports filtering and sorting. */ async queryGroup( request: models.GroupFilter, options?: RequestOptions, ): Promise { return unwrapAsync(groupsQueryGroup( this, request, options, )); } /** * Get group * * @remarks * Use when you need to load a single group (e.g. for display or to assign entities). */ async getGroup( id: string, options?: RequestOptions, ): Promise { return unwrapAsync(groupsGetGroup( this, id, options, )); } /** * Delete group * * @remarks * Use when removing a group and clearing its entity associations (e.g. retiring a product line). Returns 204 or 200 on success. */ async deleteGroup( id: string, options?: RequestOptions, ): Promise { return unwrapAsync(groupsDeleteGroup( this, id, options, )); } }