UNPKG

@datocms/cma-client

Version:
79 lines (78 loc) 2.67 kB
import BaseResource from '../../BaseResource'; import type * as SchemaTypes from '../SchemaTypes'; import type * as SimpleSchemaTypes from '../SimpleSchemaTypes'; export default class SsoUser extends BaseResource { static readonly TYPE: "sso_user"; /** * List all users * * Read more: https://www.datocms.com/docs/content-management-api/resources/sso-user/instances * * @throws {ApiError} * @throws {TimeoutError} */ list(): Promise<SimpleSchemaTypes.SsoUserInstancesTargetSchema>; /** * List all users * * Read more: https://www.datocms.com/docs/content-management-api/resources/sso-user/instances * * @throws {ApiError} * @throws {TimeoutError} */ rawList(): Promise<SchemaTypes.SsoUserInstancesTargetSchema>; /** * Returns a SSO user * * Read more: https://www.datocms.com/docs/content-management-api/resources/sso-user/self * * @throws {ApiError} * @throws {TimeoutError} */ find(userId: string | SimpleSchemaTypes.UserData): Promise<SimpleSchemaTypes.SsoUser>; /** * Returns a SSO user * * Read more: https://www.datocms.com/docs/content-management-api/resources/sso-user/self * * @throws {ApiError} * @throws {TimeoutError} */ rawFind(userId: string): Promise<SchemaTypes.SsoUserSelfTargetSchema>; /** * Copy editors as SSO users * * Read more: https://www.datocms.com/docs/content-management-api/resources/sso-user/copy_users * * @throws {ApiError} * @throws {TimeoutError} */ copyUsers(): Promise<SimpleSchemaTypes.SsoUserCopyUsersTargetSchema>; /** * Copy editors as SSO users * * Read more: https://www.datocms.com/docs/content-management-api/resources/sso-user/copy_users * * @throws {ApiError} * @throws {TimeoutError} */ rawCopyUsers(): Promise<SchemaTypes.SsoUserCopyUsersTargetSchema>; /** * Delete a SSO user * * Read more: https://www.datocms.com/docs/content-management-api/resources/sso-user/destroy * * @throws {ApiError} * @throws {TimeoutError} */ destroy(userId: string | SimpleSchemaTypes.UserData, queryParams?: SimpleSchemaTypes.SsoUserDestroyHrefSchema): Promise<SimpleSchemaTypes.SsoUser>; /** * Delete a SSO user * * Read more: https://www.datocms.com/docs/content-management-api/resources/sso-user/destroy * * @throws {ApiError} * @throws {TimeoutError} */ rawDestroy(userId: string, queryParams?: SchemaTypes.SsoUserDestroyHrefSchema): Promise<SchemaTypes.SsoUserDestroyTargetSchema>; }