import { ITGlueClient } from '../client'; import { QueryUtilOptions, QueryParams, RequestBody, BaseListResponse, BaseItemResponse, OrganizationStatusResource } from '../types'; /** * OrganizationStatuses resource module for IT Glue API * * Provides methods to interact with the /organization_statuses endpoint. * Organization statuses define the operational status of organizations (Active, Inactive, etc.). * These statuses help track the current state and lifecycle of your organizations. * * ## Related Resources * Organization statuses are commonly used with: * - {@link Organizations} - Organizations that are classified by these statuses * - {@link OrganizationTypes} - Type classifications used alongside organization statuses * - {@link Contacts} - People associated with organizations of specific statuses * - {@link Locations} - Physical sites for organizations of specific statuses * - {@link Configurations} - IT assets belonging to organizations of specific statuses * - {@link Documents} - Documentation related to organization statuses and policies * - {@link FlexibleAssets} - Custom tracking of organization status-specific data * - {@link Passwords} - Credentials associated with organizations of specific statuses * - {@link RelatedItems} - Create relationships between organization statuses and other resources * - {@link Tags} - Additional categorization of organization statuses * - {@link Contracts} - Business agreements affected by organization status * - {@link Attachments} - Store documentation related to organization statuses * * @see {@link Organizations#list} for retrieving organizations by status * @see {@link OrganizationTypes#list} for retrieving organization types * @see {@link Contacts#list} for retrieving contacts by organization status * @see {@link Configurations#list} for retrieving assets by organization status * * @example * import { ITGlueClient } from '../client'; * import { OrganizationStatuses } from './resources/organization-statuses'; * * const client = new ITGlueClient({ apiKey: 'your-api-key' }); * const orgStatuses = new OrganizationStatuses(client); * * // List organization statuses * const list = await orgStatuses.list(); * * // Get a single organization status * const status = await orgStatuses.get('123'); * * // Create a new organization status * const created = await orgStatuses.create({ * data: { * type: 'organization_statuses', * attributes: { * name: 'Under Review' * } * } * }); * * // Update an organization status * const updated = await orgStatuses.update('123', { * data: { * type: 'organization_statuses', * attributes: { * name: 'Approved' * } * } * }); * * // Delete an organization status * await orgStatuses.delete('123'); * * @category Organizations */ export declare class OrganizationStatuses { private client; private basePath; private paginationUtil; /** * Create an OrganizationStatuses resource instance * @param {ITGlueClient} client - ITGlueClient instance */ constructor(client: ITGlueClient); /** * List all organization statuses * @param {QueryUtilOptions} [options] - Optional query parameters (filter, sort, page, etc.) * @param {boolean} [allPages=false] - If true, fetches all pages automatically * @returns {Promise>} List of organization statuses and pagination metadata * @example * // List all organization statuses * await orgStatuses.list(); * @example * // List organization statuses with filtering * await orgStatuses.list({ * filter: { name: 'Active' }, * sort: 'name' * }); * @example * // List organization statuses with pagination * await orgStatuses.list({ * page: { number: 1, size: 25 }, * sort: '-created_at' * }); */ list(options?: QueryUtilOptions, allPages?: boolean): Promise>; /** * Get a single organization status by ID * @param {string} id - Organization status ID * @param {QueryParams} [params] - Optional query parameters * @returns {Promise>} Organization status resource * @example * const status = await orgStatuses.get('123'); * @example * // Get organization status with additional parameters * const status = await orgStatuses.get('123', { * include: ['organizations'] * }); */ get(id: string, params?: QueryParams): Promise>; /** * Create a new organization status * @param {RequestBody} data - Organization status data (must be formatted according to JSON:API spec) * @returns {Promise>} Created organization status resource * @example * const created = await orgStatuses.create({ * data: { * type: 'organization_statuses', * attributes: { * name: 'Under Review' * } * } * }); * @example * // Create organization status with additional attributes * const created = await orgStatuses.create({ * data: { * type: 'organization_statuses', * attributes: { * name: 'Pending Approval', * description: 'Organizations awaiting management approval' * } * } * }); */ create(data: RequestBody): Promise>; /** * Update an organization status by ID * @param {string} id - Organization status ID * @param {RequestBody} data - Updated organization status data (must be formatted according to JSON:API spec) * @returns {Promise>} Updated organization status resource * @example * const updated = await orgStatuses.update('123', { * data: { * type: 'organization_statuses', * attributes: { * name: 'Approved' * } * } * }); * @example * // Update multiple attributes * const updated = await orgStatuses.update('123', { * data: { * type: 'organization_statuses', * attributes: { * name: 'Active Client', * description: 'Fully approved and active client organizations' * } * } * }); */ update(id: string, data: RequestBody): Promise>; /** * Delete an organization status by ID * @param {string} id - Organization status ID * @returns {Promise} * @example * await orgStatuses.delete('123'); */ delete(id: string): Promise; }