import { type FromSchema } from 'json-schema-to-ts'; import { type IterablePromise } from '../client/method.js'; import { Resource } from '../client/resource.js'; import { type RequestOptions } from '../client/types.js'; import * as schemas from '../schemas/users.js'; import { UsersNotifications } from './users/notifications.js'; import { UsersPushSubscriptions } from './users/push-subscriptions.js'; type CreateUsersResponse = FromSchema; type CreateUsersPayload = FromSchema; type ListUsersResponse = FromSchema; type ListUsersPayload = FromSchema; type GetUsersResponse = FromSchema; type UpdateUsersResponse = FromSchema; type UpdateUsersPayload = FromSchema; type UpdateByEmailUsersResponse = FromSchema; type UpdateByEmailUsersPayload = FromSchema; type UpdateByExternalIdUsersResponse = FromSchema; type UpdateByExternalIdUsersPayload = FromSchema; export declare class Users extends Resource { path: string; entity: string; notifications: UsersNotifications; pushSubscriptions: UsersPushSubscriptions; /** * Create a user. Please note that you must provide the user's email or the * external id so MagicBell can uniquely identify the user. * * The external id, if provided, must be unique to the user. * * @param options - override client request options. * @returns **/ create(options?: RequestOptions): Promise; /** * Create a user. Please note that you must provide the user's email or the * external id so MagicBell can uniquely identify the user. * * The external id, if provided, must be unique to the user. * * @param data * @param options - override client request options. * @returns **/ create(data: CreateUsersPayload, options?: RequestOptions): Promise; /** * Fetches users for the project identified by the auth keys. Supports filtering, * ordering, and pagination. * * @param options - override client request options. * @returns **/ list(options?: RequestOptions): IterablePromise; /** * Fetches users for the project identified by the auth keys. Supports filtering, * ordering, and pagination. * * @param data * @param options - override client request options. * @returns **/ list(data: ListUsersPayload, options?: RequestOptions): IterablePromise; /** * Fetch a user by id, for the project identified by the auth keys. * * @param userId - The user id is the MagicBell user id. Accepts a UUID * @param options - override client request options. * @returns **/ get(userId: string, options?: RequestOptions): Promise; /** * Update a user's data. If you identify users by their email addresses, you need * to update the MagicBell data, so this user can still access their notifications. * * @param userId - The user id is the MagicBell user id. Alternatively, provide an * id like `email:theusersemail@example.com` or `external_id:theusersexternalid` as * the user id. * @param options - override client request options. * @returns **/ update(userId: string, options?: RequestOptions): Promise; /** * Update a user's data. If you identify users by their email addresses, you need * to update the MagicBell data, so this user can still access their notifications. * * @param userId - The user id is the MagicBell user id. Alternatively, provide an * id like `email:theusersemail@example.com` or `external_id:theusersexternalid` as * the user id. * @param data * @param options - override client request options. * @returns **/ update(userId: string, data: UpdateUsersPayload, options?: RequestOptions): Promise; /** * Update a user's data. If you identify users by their email addresses, you need * to update the MagicBell data, so this user can still access their notifications. * * @param userEmail * @param options - override client request options. * @returns **/ updateByEmail(userEmail: string, options?: RequestOptions): Promise; /** * Update a user's data. If you identify users by their email addresses, you need * to update the MagicBell data, so this user can still access their notifications. * * @param userEmail * @param data * @param options - override client request options. * @returns **/ updateByEmail(userEmail: string, data: UpdateByEmailUsersPayload, options?: RequestOptions): Promise; /** * Update a user's data. If you identify users by their email addresses, you need * to update the MagicBell data, so this user can still access their notifications. * * @param externalId * @param options - override client request options. * @returns **/ updateByExternalId(externalId: string, options?: RequestOptions): Promise; /** * Update a user's data. If you identify users by their email addresses, you need * to update the MagicBell data, so this user can still access their notifications. * * @param externalId * @param data * @param options - override client request options. * @returns **/ updateByExternalId(externalId: string, data: UpdateByExternalIdUsersPayload, options?: RequestOptions): Promise; /** * Immediately deletes a user. * * @param userId - The user id is the MagicBell user id. Alternatively, provide an * id like `email:theusersemail@example.com` or `external_id:theusersexternalid` as * the user id. * @param options - override client request options. **/ delete(userId: string, options?: RequestOptions): Promise; /** * Immediately deletes a user. * * @param userEmail * @param options - override client request options. **/ deleteByEmail(userEmail: string, options?: RequestOptions): Promise; /** * Immediately deletes a user. * * @param externalId * @param options - override client request options. **/ deleteByExternalId(externalId: string, options?: RequestOptions): Promise; } export {};