# Member (*project.member*) ## Overview ### Available Operations * [delete](#delete) - Remove a user from a project. * [getAll](#getall) - Retrieve a list of all members of a specific project. ## delete Delete a user's project membership. The user attempting this action needs to have the necessary permissions, and they cannot remove the project's owner. ### Example Usage ```typescript import { Starton } from "@starton/sdk"; const starton = new Starton({ apiKey: "", }); async function run() { const result = await starton.project.member.delete({ userId: "", }); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { StartonCore } from "@starton/sdk/core.js"; import { projectMemberDelete } from "@starton/sdk/funcs/projectMemberDelete.js"; // Use `StartonCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const starton = new StartonCore({ apiKey: "", }); async function run() { const res = await projectMemberDelete(starton, { userId: "", }); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.DeleteProjectMemberRequest](../../sdk/models/operations/deleteprojectmemberrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[operations.DeleteProjectMemberResponse](../../sdk/models/operations/deleteprojectmemberresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------------- | -------------------------------- | -------------------------------- | | errors.BadRequestException | 400 | application/json | | errors.CouldNotFindResource | 404 | application/json | | errors.MicroserviceNotResponding | 500 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## getAll Fetches all the members associated with a project. The user must have the appropriate permissions to access this data. ### Example Usage ```typescript import { Starton } from "@starton/sdk"; const starton = new Starton({ apiKey: "", }); async function run() { const result = await starton.project.member.getAll(); // Handle the result console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { StartonCore } from "@starton/sdk/core.js"; import { projectMemberGetAll } from "@starton/sdk/funcs/projectMemberGetAll.js"; // Use `StartonCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const starton = new StartonCore({ apiKey: "", }); async function run() { const res = await projectMemberGetAll(starton); if (!res.ok) { throw res.error; } const { value: result } = res; // Handle the result console.log(result); } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[operations.GetAllProjectMemberResponse](../../sdk/models/operations/getallprojectmemberresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.BadRequestException | 400 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* |