/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as WorkOS from "../../.."; import { AuditLogsRetention } from "../resources/auditLogsRetention/client/Client"; export declare namespace Organizations { interface Options { environment?: core.Supplier; authorizationToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { timeoutInSeconds?: number; maxRetries?: number; } } export declare class Organizations { protected readonly _options: Organizations.Options; constructor(_options?: Organizations.Options); /** * Get the configured event retention period for the given Organization * @throws {@link WorkOS.NotFoundError} * * @example * await workOs.organizations.getAuditLogsRetention("string") */ getAuditLogsRetention(id: string, requestOptions?: Organizations.RequestOptions): Promise; /** * Get a list of all of your existing organizations matching the criteria specified * * @example * await workOs.organizations.list({ * environmentID: "string", * limit: 10, * order: WorkOS.Order.Normal * }) */ list(request?: WorkOS.ListOrganizationsOpts, requestOptions?: Organizations.RequestOptions): Promise>; /** * Creates a new organization in the current environment * @throws {@link WorkOS.BadRequestError} * @throws {@link WorkOS.ConflictError} * @throws {@link WorkOS.UnprocessableEntityError} * * @example * await workOs.organizations.create({ * name: "string" * }) */ create(request: WorkOS.CreateOrganizationOpts, requestOptions?: Organizations.RequestOptions): Promise; /** * Get the details of an existing organization * @throws {@link WorkOS.NotFoundError} * * @example * await workOs.organizations.get("string") */ get(id: string, requestOptions?: Organizations.RequestOptions): Promise; /** * Updates an organization in the current environment * @throws {@link WorkOS.BadRequestError} * @throws {@link WorkOS.NotFoundError} * @throws {@link WorkOS.ConflictError} * * @example * await workOs.organizations.update("string", { * name: "string" * }) */ update(id: string, request: WorkOS.UpdateOrganizationOpts, requestOptions?: Organizations.RequestOptions): Promise; delete(id: string, requestOptions?: Organizations.RequestOptions): Promise; protected _auditLogsRetention: AuditLogsRetention | undefined; get auditLogsRetention(): AuditLogsRetention; protected _getAuthorizationHeader(): Promise; }