/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { "/user": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List users * @description List all users in your organization. */ get: operations["user:list"]; put?: never; /** * Create a user * @description Create a new user in your organization. */ post: operations["user:create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/user/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read a user * @description Read a user by ID. */ get: operations["user:read"]; put?: never; post?: never; delete?: never; options?: never; head?: never; /** * Update a user * @description Updates a user in your organization. * * :::info Only users of type `PERSON` can be updated. * ::: */ patch: operations["user:write"]; trace?: never; }; } export type webhooks = Record; export interface components { schemas: { userListResponse: { paging: { /** @description The start of the paging window. Minimum is 0. */ offset: number; /** @description Maximum number of elements to retrieve per call. Maximum is 200. */ limit: number; }; results: components["schemas"]["userResponse"][]; }; userResponse: { /** * @description The ID of the user. * @example 123456 */ id: number; /** * @description The email of the user. * @example alex.mgr@crypto-inc.com */ email: string; /** * @description The first name of the user. * @example Alex */ first_name: string | null; /** * @description The last name of the user. * @example Doe */ last_name: string | null; /** * @description The organization ID of the user. * @example 1234 */ organization_id: number; /** * @description The status of the user. * @example active * @enum {string} */ status?: "active" | "inactive"; /** * @description The avatar of the user. * @example https://my-avatar-url.com */ avatar?: string | null; /** * @description The type of the user. * @example PERSON * @enum {string} */ type?: "PERSON" | "MACHINE"; /** * @description The provider of the user. * @example COGNITO * @enum {string|null} */ provider?: "COGNITO" | "SAML" | null; /** * @description The NRN of the user. * @example organization=123 */ nrn: string; /** * @description The metadata of the user. * @example { * "key": "value" * } */ metadata?: Record; }; UserCreate: { /** * @description The email of the user you want to create. * @example alex.doe@email.com */ email: string; /** * @description The first name of the user you want to create. * @example Alex */ first_name: string; /** * @description The last name of the user you want to create. * @example Doe */ last_name: string; /** * @description The organization ID of the user you want to create. * @example 1234 */ organization_id: number; /** * @description The avatar of the user you want to create. * @example https://my-avatar-url.com */ avatar?: string; }; userWrite: { /** * @description The email of the user you want to update. * @example alex.doe@email.com */ email?: string; /** * @description The first name of the user you want to update. * @example Alex */ first_name?: string; /** * @description The last name of the user you want to update. * @example Doe */ last_name?: string; /** * @description The organization ID of the user you want to update. * @example 1234 */ organization_id?: number; /** * @description The avatar of the user you want to update. * @example https://my-avatar-url.com */ avatar?: string; }; }; responses: { /** @description Client error responses due to invalid input or missing parameters. */ "4XX": { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description HTTP status code representing the specific client error (e.g., 400, 401, 403, 404). * @example 400 */ statusCode: number; /** * @description A machine-readable error code that categorizes the server failure. * @example bad_request */ code?: string; /** * @description A brief, human-readable description of the error type (e.g., "Bad Request", "Unauthorized"). * @example Bad Request */ error: string; /** * @description Additional details about the error. * @example The request was malformed or contained invalid parameters. */ message: string; }; }; }; /** @description Server error responses indicating an issue on the API side. */ "5XX": { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description HTTP status code representing the specific server error (e.g., 500, 502, 503). * @example 500 */ statusCode: number; /** * @description A machine-readable error code that categorizes the server failure. * @example internal_server_error */ code?: string; /** * @description A brief, human-readable description of the error type (e.g., "Internal Server Error", "Service Unavailable"). * @example Internal Server Error */ error: string; /** * @description Additional details about the error. * @example An unexpected error occurred. Please try again later. */ message: string; }; }; }; }; parameters: never; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { "user:list": { parameters: { query: { /** * @description Filter users by the ID of the organization. * @example 123 */ organization_id: string; /** * @description Filter users by their email address. * @example alex.mgr@crypto-inc.com */ email?: string; /** * @description Filter users by their first name. * @example Alex */ first_name?: string; /** * @description Filter users by their last name. * @example Doe */ last_name?: string; /** * @description Filter users by their status. Multiple values can be provided, separated by commas. * @example active,inactive */ status?: "active" | "inactive" | "pending" | "invited"; /** * @description Filter users by their ID. Multiple values can be provided, separated by commas. * @example 123456,987654 */ id?: string; /** * @description Filter users by user type. * @example PERSON */ type?: "MACHINE" | "PERSON"; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The list of users matching the query. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["userListResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "user:create": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["UserCreate"]; }; }; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["userResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "user:read": { parameters: { query?: never; header?: never; path: { /** @description The ID of the user you want to get information about. */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["userResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "user:write": { parameters: { query?: never; header?: never; path: { /** * @description The ID of the user you want to update. * * > Only users of type `PERSON` can be updated. */ id: number; }; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["userWrite"]; }; }; responses: { /** @description The operation was successful. */ 204: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["userResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; }