import { DataStore } from "../../data-store.mjs"; import { ClientPlugin, DeclaredFields, StrictConfig } from "../../define-plugin.mjs"; import { CancelInvitationInput, CheckSlugInput, CheckSlugResult, CreateInvitationInput, CreateOrganizationInput, CreateOrganizationRoleInput, DeleteOrganizationInput, DeleteOrganizationRoleInput, EmbeddedOrganization, EmbeddedUser, Invitation, InvitationStatus, InvitationTokenInput, LeaveOrganizationInput, ListInvitationsInput, ListMembersInput, ListOrganizationRolesInput, ListOrganizationsInput, Member, MemberRoleInput, Organization, OrganizationModelFields, OrganizationPermissions, OrganizationPluginConfig, OrganizationRole, RemoveMemberInput, SwitchOrganizationInput, UpdateOrganizationInput, UpdateOrganizationRoleInput } from "./types.mjs"; import { OrganizationRoutes } from "./routes.mjs"; import { activeMembershipStore, activeOrganizationStore } from "./stores.mjs"; //#region src/plugins/organization/index.d.ts /** * Declare the app's own columns on the organization models — type-only. Pass * the result as the plugin's `fields`. * * @example * organizationPlugin({ fields: fields<{ organization: { industry: string } }>() }) */ declare const fields: , never>>() => T; declare function organizationPlugin = Record>(config?: Config): ClientPlugin<"organization", "/organizations", OrganizationRoutes>, { organization: { active: () => Organization> | null; activeId: () => string | null; /** Reload the active organization, and return it — `null` when there is none. */ getActive: () => Promise> | null>; /** Reload and return the active membership, or `null` when there is none. */ getActiveMembership: () => Promise> | null>; }; }, unknown, { readonly activeOrganization: DataStore> | null>; readonly activeMembership: DataStore> | null>; }>; //#endregion export { type CancelInvitationInput, type CheckSlugInput, type CheckSlugResult, type CreateInvitationInput, type CreateOrganizationInput, type CreateOrganizationRoleInput, type DeleteOrganizationInput, type DeleteOrganizationRoleInput, type EmbeddedOrganization, type EmbeddedUser, type Invitation, type InvitationStatus, type InvitationTokenInput, type LeaveOrganizationInput, type ListInvitationsInput, type ListMembersInput, type ListOrganizationRolesInput, type ListOrganizationsInput, type Member, type MemberRoleInput, type Organization, type OrganizationModelFields, type OrganizationPermissions, type OrganizationPluginConfig, type OrganizationRole, type RemoveMemberInput, type SwitchOrganizationInput, type UpdateOrganizationInput, type UpdateOrganizationRoleInput, activeMembershipStore, activeOrganizationStore, fields, organizationPlugin };