import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class Organization extends APIResource { /** * Return the organization the current user most recently landed in. Answers a * cross-organization question, so no X-Tenant-ID is required and any value sent is * ignored. Returns null when there is no usable history. */ retrieveLastVisited(params?: OrganizationRetrieveLastVisitedParams | null | undefined, options?: RequestOptions): APIPromise; /** * Record that the current user landed in the organization resolved from * X-Tenant-ID. Call this once after landing on an organization page; repeat calls * for the same organization are cheap no-ops. */ visit(params?: OrganizationVisitParams | null | undefined, options?: RequestOptions): APIPromise; } /** * Response for the last visited organization lookup. * * `organization` is None when the user has no usable history. That is a normal * outcome, not an error: the column is added without backfill, so every user * reports None until their first recorded visit. * * Attributes: organization (LastVisitedOrganization | None): The most recent * organization, or None. */ export interface OrganizationRetrieveLastVisitedResponse { /** * An organization the user most recently landed in. * * Deliberately narrower than TenantModel: only what the UI needs to navigate. The * contract documents exactly these three fields, so adding TenantModel's optional * icon columns here would widen the response beyond it. * * Attributes: id (str): Organization UUID. name (str): Display name. slug (str): * URL slug the UI navigates with (`/o/{slug}`). */ organization?: OrganizationRetrieveLastVisitedResponse.Organization | null; } export declare namespace OrganizationRetrieveLastVisitedResponse { /** * An organization the user most recently landed in. * * Deliberately narrower than TenantModel: only what the UI needs to navigate. The * contract documents exactly these three fields, so adding TenantModel's optional * icon columns here would widen the response beyond it. * * Attributes: id (str): Organization UUID. name (str): Display name. slug (str): * URL slug the UI navigates with (`/o/{slug}`). */ interface Organization { id: string; name: string; slug: string; } } export interface OrganizationRetrieveLastVisitedParams { 'Accept-Language'?: string; /** * Set to `structured` to receive errors in the structured envelope. Omit it to * keep the legacy error body. */ 'X-Error-Format'?: string; } export interface OrganizationVisitParams { 'Accept-Language'?: string; /** * Set to `structured` to receive errors in the structured envelope. Omit it to * keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace Organization { export { type OrganizationRetrieveLastVisitedResponse as OrganizationRetrieveLastVisitedResponse, type OrganizationRetrieveLastVisitedParams as OrganizationRetrieveLastVisitedParams, type OrganizationVisitParams as OrganizationVisitParams, }; } //# sourceMappingURL=organization.d.mts.map