/** * Account Manager organization management operations. * * This module provides high-level functions for managing organizations in Account Manager, * including retrieving organization details. * * ## Core Organization Functions * * - {@link getOrg} - Get organization details by ID * - {@link getOrgByName} - Get organization details by name * - {@link listOrgs} - List organizations with pagination * * ## Usage * * ```typescript * import { * getOrg, * getOrgByName, * listOrgs, * } from '@salesforce/b2c-tooling-sdk/operations/orgs'; * import {createAccountManagerOrgsClient} from '@salesforce/b2c-tooling-sdk/clients'; * import {OAuthStrategy} from '@salesforce/b2c-tooling-sdk/auth'; * * const auth = new OAuthStrategy({ * clientId: 'your-client-id', * clientSecret: 'your-client-secret', * }); * * const client = createAccountManagerOrgsClient({}, auth); * * // Get an organization by ID * const org = await getOrg(client, 'org-id'); * * // Get an organization by name * const org = await getOrgByName(client, 'My Organization'); * * // List organizations * const orgs = await listOrgs(client, {size: 25, page: 0}); * ``` * * ## Authentication * * Organization operations require OAuth authentication with appropriate Account Manager permissions. * * @module operations/orgs */ import type { AccountManagerOrgsClient, AccountManagerOrganization, OrganizationCollection, ListOrgsOptions } from '../../clients/am-api.js'; /** * Core organization types re-exported for convenience: * * - {@link AccountManagerOrganization} - Single organization from Account Manager * - {@link OrganizationCollection} - Paginated collection of organizations with pagination metadata (totalElements, totalPages, number, size) * - {@link ListOrgsOptions} - Options for listing organizations with pagination and bulk retrieval (size, page, all) */ export type { AccountManagerOrganization, OrganizationCollection, ListOrgsOptions } from '../../clients/am-api.js'; /** * Gets an organization by ID. * * @param client - Account Manager Organizations client * @param orgId - Organization ID * @returns Organization details * @throws {Error} If the organization is not found (404), authentication fails (401), permission is denied (403), or other request failures occur */ export declare function getOrg(client: AccountManagerOrgsClient, orgId: string): Promise; /** * Gets an organization by name (performs case-sensitive prefix search using startsWith, filters to exact match if multiple results are found, throws if ambiguous). * * @param client - Account Manager Organizations client * @param name - Organization name * @returns Organization details * @throws {Error} If the organization is not found or if multiple organizations match the name */ export declare function getOrgByName(client: AccountManagerOrgsClient, name: string): Promise; /** * Lists organizations with pagination. * * @param client - Account Manager Organizations client * @param options - Pagination options. Set `all: true` to retrieve all organizations using the max page size of 5000 * @returns {OrganizationCollection} Paginated organization collection with pagination metadata (totalElements, totalPages, number, size) */ export declare function listOrgs(client: AccountManagerOrgsClient, options?: ListOrgsOptions): Promise;