import { Idempotence, StringAnyMap } from '../CommonTypes'; export interface AllCredentials { /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**User field for traceability of requests. Synchronous SDK APIs use this field for you.*/ requestId?: string; /**Optional User key. When calling the API, defaults to the current (calling) user's primary key. For impersonation purposes, the caller may use the key of another user, provided that the proper authorizations have been given by the impersonated user*/ owner?: string; /**List of account information for the asking user. empty if the user does not have credentials in the service. One item in this list is a map of account fields.*/ credentials?: StringAnyMap[]; } export interface BasicAuthenticatedUser extends StringAnyMap { } export interface BasicUserCreation extends StringAnyMap { /**Specify the behavior when the user already exists. The default value is IGNORE_IDENTICAL*/ idempotence?: Idempotence; } export interface ChangePasswordRequest { /**Server-provided temporary token to reset a password*/ token?: string; /**account key in the realm. (configured 'unique key' used for authentication)*/ key?: string; /**New password*/ password: string; } export interface CheckPasswordRequest { /**account key in the realm. (configured 'unique key' used for authentication)*/ key?: string; /**Password to be checked*/ password: string; } export interface CheckPasswordResult { /**Whether the password matches*/ matches?: boolean; /**account key in the realm. (configured 'unique key' used for authentication)*/ key?: string; } export interface ExistenceCheck { /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**User field for traceability of requests. Synchronous SDK APIs use this field for you.*/ requestId?: string; /**User key within the realm ('login' field, by default)*/ key: string; /**Whether to fail is the user does not exist. When true, fails silently.*/ softFail?: boolean; } export interface ImpersonatedTraceableRequest { /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**User field for traceability of requests. Synchronous SDK APIs use this field for you.*/ requestId?: string; /**Optional User key. When calling the API, defaults to the current (calling) user's primary key. For impersonation purposes, the caller may use the key of another user, provided that the proper authorizations have been given by the impersonated user*/ owner?: string; } export interface ResetInfo { /**Server-provided temporary token to reset a password*/ token?: string; /**account key in the realm. (configured 'unique key' used for authentication)*/ key?: string; } export interface ResetRequest { /**account key in the realm. (configured 'unique key' used for authentication)*/ key?: string; } export interface SimpleAccountCreation { /**Status after creation. If status.active is false, the account cannot immediately be used to log in.*/ status?: SimpleAccountStatus; /**Arbitrary map of fields. MUST contain the login field ('login') and the 'password' field*/ fields?: StringAnyMap; /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**User field for traceability of requests. Synchronous SDK APIs use this field for you.*/ requestId?: string; /**Specify the behavior when the user already exists. The default value is IGNORE_IDENTICAL*/ idempotence?: Idempotence; } export interface SimpleAccountInfo { /**Status. If status.active is false, the account cannot be used to log in.*/ status?: SimpleAccountStatus; /**Arbitrary map of fields. MUST contain the login field ('login') and the 'password' field*/ fields?: StringAnyMap; /**Server generated user key (global unique key for a user, a user can be logged in via several accounts)*/ userKey?: string; /**User field for traceability of requests. The value was generated by the client requester.*/ requestId?: string; } export interface SimpleAccountStatus { /**Optional developer-defined status object which contents should depend on the 'active' field.*/ data?: any; /**Whether this account should be usable for actual login by end users*/ active?: boolean; } export interface SimpleAccountStatusChangeRequest { /**New status. If status.active is false, the account cannot be used to log in.*/ status: SimpleAccountStatus; /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**User field for traceability of requests. Synchronous SDK APIs use this field for you.*/ requestId?: string; /**User key within the realm ('login' field, by default)*/ key: string; } export interface SimpleAccountUpdate { /**Arbitrary map of fields. MUST contain the login field ('login') and the 'password' field*/ fields?: StringAnyMap; /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**User field for traceability of requests. Synchronous SDK APIs use this field for you.*/ requestId?: string; /**account key in the realm. (configured 'unique key' used for authentication)*/ key: string; } export interface UserLoginchange { /**New account key within this realm. Must not be already in use.*/ newKey: string; /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**Existing account key within this realm (login). Will be free for use upon successful completion.*/ oldKey: string; /**Optional User key. When calling the API, defaults to the current (calling) user's primary key. For impersonation purposes, the caller may use the key of another user, provided that the proper authorizations have been given by the impersonated user*/ owner?: string; }