import type { RawAxiosRequestHeaders } from 'axios'; import type { GetTeamMembershipParams, GetOrganizationParams, QueryParams, CollectionProp, GetTeamParams } from '../../common-types'; import type { TeamMembershipProps, CreateTeamMembershipProps } from '../../export-types'; import type { OptionalDefaults } from '../wrappers/wrap'; export type TeamMembershipPlainClientAPI = { /** * Fetch a single team membership by its ID * @param params the team, team-membership, and organization IDs * @returns the requested team membership * @throws if the request fails, or the team membership or organization are not found * @example * ```javascript * const teamMembership = await client.teamMembership.get({ * organizationId: '', * teamMembershipId: '' * }) * ``` */ get(params: OptionalDefaults): Promise; /** * Fetch all team memberships for a given organization * @param params the organization ID and optional pagination query parameters * @returns A collection of team memberships * @throws if the request fails, or the organization is not found * @example * ```javascript * const teamMemberships = await client.teamMembership.getMany({ * organizationId: '', * query: { * limit: 10, * } * }) * ``` */ getManyForOrganization(params: OptionalDefaults): Promise>; /** * Fetch all team memberships for a given team * @param params the organization and team IDs and optional pagination query parameters * @returns A collection of team memberships * @throws if the request fails, or the organization or team are not found * @example * ```javascript * const teamMemberships = await client.teamMembership.getManyForTeam({ * organizationId: '', * teamId: '', * query: { * limit: 10, * } * }) * ``` */ getManyForTeam(params: OptionalDefaults): Promise>; /** * Create a new team membership * @param params the organization and team IDs * @param rawData the organization membership ID and a flag indicating whether or not the user is an admin * @returns the created team membership * @throws if the request fails, or the organization or team are not found * @example * ```javascript * const teamMembership = await client.teamMembership.create({ * organizationId: '', * teamId: '', * }, { * admin: false, * organizationMembershipId: '', * }) * ``` */ create(params: OptionalDefaults, rawData: CreateTeamMembershipProps, headers?: RawAxiosRequestHeaders): Promise; /** * Update a team membership * @param params the team, team-membership, and organization IDs * @param rawData the team membership data * @returns the updated team membership * @throws if the request fails, or the organization, team, or team membership are not found * @example * ```javascript * let teamMembership = await client.teamMembership.get({ * organizationId: '', * teamId: '', * teamMembershipId: '', * }) * * teamMembership = await client.teamMembership.update({ * organizationId: '', * teamId: '', * teamMembershipId: '', * }, { * ...teamMembership, * admin: true, * }) * ``` */ update(params: OptionalDefaults, rawData: TeamMembershipProps, headers?: RawAxiosRequestHeaders): Promise; /** * Delete a team membership * @param params the team, team-membership, and organization IDs * @throws if the request fails, or the organization, team, or team membership are not found * @example * ```javascript * await client.teamMembership.delete({ * organizationId: '', * teamId: '', * teamMembershipId: '', * }) * ``` */ delete(params: OptionalDefaults): Promise; };