import { PaymentOptions } from '../../common/types.js'; import { BasePaymentsAPI } from '../base-payments.js'; import { CreateUserResponse, MyMembership, OrganizationActivityFilters, OrganizationActivityPage, OrganizationMemberRole, OrganizationMembersResponse, StripeCheckoutResult } from './types.js'; export declare class OrganizationsAPI extends BasePaymentsAPI { static getInstance(options: PaymentOptions): OrganizationsAPI; /** * Create a new member in the organization * @param userId - The unique external ID of the new member * @param userEmail - The email of the new member * @param userRole - The role of the new member * @returns The created member */ createMember(userId: string, userEmail?: string, userRole?: OrganizationMemberRole): Promise; /** * * @param role - The role of the members to get * @param isActive - The active status of the members to get * @param page - The page of the members to get * @param offset - The number of members to get per page * @returns The list of members */ getMembers(role?: OrganizationMemberRole, isActive?: boolean, page?: number, offset?: number): Promise; /** * Lists every organization the authenticated user is an active member of, * with their role and the organization's tier. * * Powers workspace pickers in third-party tools built on the SDK, and the * "where will this publish?" UX when a user belongs to multiple orgs. * * @returns An array of {@link MyMembership} — empty when the user has no * active memberships and operates as a personal account. * * @example * ```ts * const memberships = await payments.organizations.getMyMemberships() * for (const m of memberships) { * console.log(`${m.orgName} — ${m.role}`) * } * ``` */ getMyMemberships(): Promise; /** * Lists events emitted into the activity feed of an organization the * caller is an active member of (member invites, customer events, * subscription transitions, webhook deliveries, …). * * Requires the caller to be a Member or Admin of `orgId`; the backend * returns 403 otherwise. Premium+ entitlement is enforced server-side. * * @param orgId - The organization id (e.g. `org-…`) whose feed to read. * @param filters - Optional filter set — see {@link OrganizationActivityFilters}. * @returns A paginated {@link OrganizationActivityPage}. * * @example * ```ts * const page = await payments.organizations.getOrganizationActivity(orgId, { * eventType: OrganizationActivityEventType.MemberInvited, * page: 1, * limit: 25, * }) * ``` */ getOrganizationActivity(orgId: string, filters?: OrganizationActivityFilters): Promise; /** * Connect user with Stripe * @param userEmail - The email of the user * @param userCountryCode - The country code of the user * @param returnUrl - The return URL after the Stripe connection is completed * @returns The Stripe checkout result including the stripe account link, stripe account id, user id, user country code, link created at and link expires at. * The stripe account link is the link that the user needs to click to connect with Stripe. */ connectStripeAccount(userEmail: string, userCountryCode: string, returnUrl: string): Promise; } //# sourceMappingURL=organizations-api.d.ts.map