/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { "/dw/rest/v1/users": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all users. * @description Retrieve a paginated list of all users. */ get: operations["getUsers"]; put?: never; /** * Create user. * @description Create a new user with the specified properties. * Note: Users are created in INITIAL state. */ post: operations["createUser"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/dw/rest/v1/users/search/findByLogin": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Find user by login. * @description Search for a user by their login (email address). Returns the user if found. */ get: operations["findUserByLogin"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/dw/rest/v1/users/{userId}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get user by ID. * @description Retrieve a specific user by ID. Use the expand parameter to retrieve more information on related organizations and roles. */ get: operations["getUser"]; /** * Update user. * @description Apply a partial update to an existing user, i.e. an omitted field stays at its previous value, a contained field replaces the previously saved value. */ put: operations["updateUser"]; post?: never; /** * Purge user. * @description Purge a user. Only users in state Deleted may be purged. */ delete: operations["purgeUser"]; options?: never; head?: never; patch?: never; trace?: never; }; "/dw/rest/v1/users/{userId}/reset": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Reset user to INITIAL status * @description Reset a user to INITIAL status and send activation instructions. */ post: operations["resetUser"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/dw/rest/v1/users/{userId}/disable": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Disable user. * @description Disable a user, setting their userState to DELETED. This is a prerequisite for purging a user. */ post: operations["disableUser"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; } export type webhooks = Record; export interface components { schemas: { /** @description Request body for creating a new user. */ UserCreate: { /** @description Email address of the user. */ mail: string; /** @description First name of the user. */ firstName: string; /** @description Last name of the user. */ lastName: string; /** @description Display name of the user. */ displayName?: string; /** @description Business phone number. */ businessPhone?: string | null; /** @description Home phone number. */ homePhone?: string | null; /** @description Mobile phone number. */ mobilePhone?: string | null; /** * @description Preferred locale for the user. * @enum {string|null} */ preferredLocale?: "none" | "de" | "de_DE" | "en" | "en_CA" | "en_US" | "es" | "fr" | "fr_CA" | "nl" | null; /** @description List of IDs of the roles this user possesses. */ roles?: string[]; /** @description List of organization IDs this user belongs to. */ organizations: string[]; /** @description Primary organization ID for the user. */ primaryOrganization: string; roleTenantFilter?: components["schemas"]["RoleTenantFilter"]; /** @description Only required for users of the Salesforce organization. */ supportTicketId?: string; }; /** @description Request body for updating an existing user. */ UserUpdate: { /** @description Email address of the user. */ mail?: string; /** @description First name of the user. */ firstName?: string; /** @description Last name of the user. */ lastName?: string; /** @description Display name of the user. */ displayName?: string; /** @description Business phone number. */ businessPhone?: string | null; /** @description Home phone number. */ homePhone?: string | null; /** @description Mobile phone number. */ mobilePhone?: string | null; /** * @description Preferred locale for the user. * @enum {string|null} */ preferredLocale?: "none" | "de" | "de_DE" | "en" | "en_CA" | "en_US" | "es" | "fr" | "fr_CA" | "nl" | null; /** @description List of IDs of the roles this user possesses. */ roles?: string[]; /** @description List of organization IDs this user belongs to. */ organizations?: string[]; /** @description Primary organization ID for the user. */ primaryOrganization?: string; roleTenantFilter?: components["schemas"]["RoleTenantFilter"]; /** @description Only required for users of the Salesforce organization. */ supportTicketId?: string; }; /** @description User object returned in read operations. */ UserRead: { /** @description Email address of the user. */ mail?: string; /** @description First name of the user. */ firstName?: string; /** @description Last name of the user. */ lastName?: string; /** @description Display name of the user. */ displayName?: string; /** @description Business phone number. */ businessPhone?: string | null; /** @description Home phone number. */ homePhone?: string | null; /** @description Mobile phone number. */ mobilePhone?: string | null; /** * @description Preferred locale for the user. * @enum {string|null} */ preferredLocale?: "none" | "de" | "de_DE" | "en" | "en_CA" | "en_US" | "es" | "fr" | "fr_CA" | "nl" | null; /** @description List of IDs of the roles this user possesses. */ roles?: (string | components["schemas"]["Role"])[]; /** @description List of organization IDs this user belongs to. */ organizations?: (string | components["schemas"]["Organization"])[]; /** @description Primary organization ID for the user. */ primaryOrganization?: string; roleTenantFilter?: components["schemas"]["RoleTenantFilter"]; /** * Format: int64 * @description Timestamp when the password expires. */ readonly passwordExpirationTimestamp?: number | null; /** * Format: int64 * @description Timestamp of the last password modification. */ readonly passwordModificationTimestamp?: number | null; /** * Format: date-time * @description Timestamp when the user was created. */ readonly createdAt?: string | null; /** * Format: date-time * @description Timestamp of the last modification. */ readonly lastModified?: string | null; /** * Format: date * @description Date of the last successful login. */ readonly lastLoginDate?: string | null; /** * @description Current state of the user account. * @enum {string} */ readonly userState?: "INITIAL" | "ENABLED" | "DELETED"; /** * Format: int64 * @description Timestamp when the activation code was created. */ readonly activationCodeCreationTimestamp?: number | null; /** @description Salesforce user identifier. */ readonly sfUserId?: string | null; /** @description List of authentication verifiers (e.g., MFA devices). */ readonly verifiers?: components["schemas"]["Verifier"][]; /** * Format: int64 * @description Timestamp when the user was marked for deletion. */ readonly deleteTimestamp?: number | null; /** @description Map of role tenant filter assignments. */ readonly roleTenantFilterMap?: Record; /** @description Indicates if the user is linked to a Salesforce identity. */ readonly linkedToSfIdentity?: boolean; /** * Format: uuid * @description Unique identifier of the user. */ readonly id?: string; /** @description Only required for users of the Salesforce organization. */ supportTicketId?: string; }; /** @description A verifier represents a two-factor authentication device or method associated with a user account. */ Verifier: { /** @description Unique identifier of the verifier. */ id: string; /** @description Type of verifier (e.g., SMS, TOTP, WebAuthn). */ type: string; /** @description Human-readable name for the verifier. */ displayName: string; /** @description Current status of the verifier. */ status: string; }; /** @description Request body for resetting a user to INITIAL state. */ UserResetResource: { /** @description Only required for users of the Salesforce organization. */ supportTicketId?: string; }; /** @description Request body for disabling a user. */ UserDeactivationResource: { /** @description Only required for users of the Salesforce organization. */ supportTicketId?: string; }; /** @description Pagination parameters for list operations. */ Pageable: { /** * Format: int32 * @description Zero-based page index. */ page?: number; /** * Format: int32 * @description Number of items to return per page. * @default 20 */ size: number; }; /** @description A paginated collection of users. */ UserCollection: { content?: components["schemas"]["UserRead"][]; }; /** @description A role defines permissions and access levels that can be assigned to Users and API Clients. */ Role: { /** @description Description of the role. */ description?: string; /** @description Enumeration name of the role. */ roleEnumName?: string; /** @description List of permissions granted by this role. */ permissions?: string[]; /** * @description Scope level of the role (global or instance-specific). * @enum {string} */ scope?: "GLOBAL" | "INSTANCE"; /** * @description Type of entity this role can be assigned to. * @enum {string|null} */ targetType?: "ApiClient" | "User" | null; /** @description Indicates if two-factor authentication is required for this role. */ twoFAEnabled?: boolean; /** @description Unique identifier of the role. */ id?: string; }; /** @description An organization represents a customer, partner, or internal entity within the Account Manager system. */ Organization: { /** @description Name of the organization. */ name?: string; /** @description List of contact user IDs. */ contactUsers?: string[]; /** @description List of realm identifiers. */ realms?: string[]; /** @description Minimum password entropy requirement. */ passwordMinEntropy?: number; /** @description Number of previous passwords to remember. */ passwordHistorySize?: number; /** @description Number of days until password expires. */ passwordDaysExpiration?: number; /** @description Salesforce account identifiers. */ sfAccountIds?: string[]; /** * @description Type of organization. * @enum {string} */ type?: "CUSTOMER" | "PARTNER" | "INTERNAL"; /** @description List of role IDs that require two-factor authentication. */ twoFARoles?: string[]; /** @description Indicates if two-factor authentication is enabled for the organization. */ twoFAEnabled?: boolean; /** @description Salesforce My Domain name. */ sfMyDomain?: string | null; /** @description Salesforce My Domain suffix. */ sfMyDomainSuffix?: string; /** @description Indicates if Salesforce My Domain is verified. */ sfMyDomainVerified?: boolean; /** * Format: date-time * @description Timestamp when Salesforce My Domain was verified. */ sfMyDomainVerificationTimestamp?: string | null; /** * @description Salesforce identity federation status. * @enum {string} */ sfIdentityFederation?: "DISABLED" | "ENABLED"; /** @description Indicates if just-in-time user provisioning is enabled. */ justInTimeUserProvisioningEnabled?: boolean; /** @description List of allowed verifier types for authentication. */ allowedVerifierTypes?: string[]; /** @description Indicates if inactive users should be automatically disabled. */ disableInactiveUsers?: boolean; /** @description Number of days before a user is considered inactive. */ inactiveUserDays?: number; /** @description Unique identifier of the organization. */ readonly id?: string; }; /** @description Standard error response format returned when API requests fail. */ ErrorResponse: { /** @description The list of errors. */ errors?: { /** @description Error message. */ message?: string; /** @description Error code. */ code?: string; /** @description Field-specific errors. */ fieldErrors?: { /** @description List of error codes. */ codes?: string[]; /** @description Arguments for the error message. */ arguments?: unknown; /** @description Default error message. */ defaultMessage?: string; /** @description Name of the object that failed validation. */ objectName?: string; /** @description The field that contained the erroneous value. */ field?: string; /** @description The value that was rejected. */ rejectedValue?: unknown; /** @description Whether this error was caused by failed binding (e.g. type mismatch). */ bindingFailure?: boolean; /** @description Error code. */ code?: string; }[] | null; }[]; }; /** * @description Filter for role tenant assignments. Format: ROLE_ENUM_NAME:instance_id,instance_id;ROLE_ENUM_NAME:instance_id * - Role enum names are separated by semicolons (;) * - Each role enum name is followed by a colon (:) and its tenant filters * - Tenant filters are comma-separated (,) * - Each tenant filter consists of a 4-character realm and 3-character instance_id separated by underscore (_) * - A special case is an instance_id ending in _sbx, as it gives access to all sandboxes of a realm * * Example: CC_USER:aabc_prd,aabc_t12;LOGCENTER_USER:aamn_sbx */ RoleTenantFilter: string; }; responses: { /** @description Request has been rate-limited. The X-RateLimit-* headers can be used to improve retry behavior. */ RateLimitedError: { headers: { "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"]; "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"]; "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"]; [name: string]: unknown; }; content?: never; }; }; parameters: never; requestBodies: never; headers: { /** @description Rate limit per minute. */ "X-RateLimit-Limit": number; /** @description The number of requests left in the current time window. */ "X-RateLimit-Remaining": number; /** @description The UTC timestamp at which the current rate limit window resets. */ "X-RateLimit-Reset": string; }; pathItems: never; } export type $defs = Record; export interface operations { getUsers: { parameters: { query?: { pageable?: components["schemas"]["Pageable"]; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"]; "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"]; "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"]; [name: string]: unknown; }; content: { /** * @example { * "content": [ * { * "id": "a7f3c8e2-91d4-4b5a-8c6f-2e9d1a3b7f4c", * "mail": "alice.johnson@example.com", * "firstName": "Alice", * "lastName": "Johnson", * "displayName": "Alice Johnson", * "mobilePhone": "+1-555-9876", * "preferredLocale": "en_US", * "roles": [ * "bm-user" * ], * "roleTenantFilter": "ECOM_USER:abcd_prd", * "organizations": [ * "b2c8f7a3-45d6-4e9a-8b1c-3f7e2d9a6c5b" * ], * "primaryOrganization": "b2c8f7a3-45d6-4e9a-8b1c-3f7e2d9a6c5b", * "userState": "ENABLED", * "createdAt": "2024-01-15T10:30:00Z", * "lastModified": "2024-11-20T14:22:00Z", * "lastLoginDate": "2024-12-03", * "linkedToSfIdentity": false * }, * { * "id": "c9b5e7f1-84a2-4d6c-9e3b-7f2a1c8d5e9a", * "mail": "robert.williams@example.com", * "firstName": "Robert", * "lastName": "Williams", * "displayName": "Robert Williams", * "preferredLocale": "en_US", * "roles": [ * "bm-user" * ], * "roleTenantFilter": "ECOM_USER:wxyz_stg", * "organizations": [ * "d4f8a2c6-53e9-4b7a-9c1d-6e3f9a2b8c7d" * ], * "primaryOrganization": "d4f8a2c6-53e9-4b7a-9c1d-6e3f9a2b8c7d", * "userState": "INITIAL", * "createdAt": "2024-12-04T09:15:00Z", * "linkedToSfIdentity": false * } * ] * } */ "application/json": components["schemas"]["UserCollection"]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Access token is missing or invalid. */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; 429: components["responses"]["RateLimitedError"]; }; }; createUser: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { /** * @example { * "mail": "john.doe@example.com", * "firstName": "John", * "lastName": "Doe", * "primaryOrganization": "e39dbb7a-63bd-4972-980b-0f6fb3a24bd6", * "organizations": [ * "e39dbb7a-63bd-4972-980b-0f6fb3a24bd6" * ], * "roles": [ * "bm-user" * ], * "roleTenantFilter": "ECOM_USER:abcd_prd" * } */ "application/json": components["schemas"]["UserCreate"]; }; }; responses: { /** @description Created */ 201: { headers: { "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"]; "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"]; "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"]; /** @description URL to read created user */ Location?: string; [name: string]: unknown; }; content: { /** * @example { * "id": "c9b5e7f1-84a2-4d6c-9e3b-7f2a1c8d5e9a", * "mail": "robert.williams@example.com", * "firstName": "Robert", * "lastName": "Williams", * "displayName": "Robert Williams", * "primaryOrganization": "d4f8a2c6-53e9-4b7a-9c1d-6e3f9a2b8c7d", * "organizations": [ * "d4f8a2c6-53e9-4b7a-9c1d-6e3f9a2b8c7d" * ], * "userState": "INITIAL", * "createdAt": "2024-12-04T09:15:00Z", * "roles": [ * "bm-user" * ], * "roleTenantFilter": "ECOM_USER:abcd_prd" * } */ "application/json": components["schemas"]["UserRead"]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; /** @description Access token is missing or invalid. */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; 429: components["responses"]["RateLimitedError"]; }; }; findUserByLogin: { parameters: { query: { /** @description The user's login (email address). */ login: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"]; "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"]; "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"]; [name: string]: unknown; }; content: { "application/json": components["schemas"]["UserRead"]; }; }; /** @description Access token is missing or invalid. */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; /** @description A user with this login was not found. */ 404: { headers: { [name: string]: unknown; }; content?: never; }; 429: components["responses"]["RateLimitedError"]; }; }; getUser: { parameters: { query?: { /** * @description Comma-separated list of fields that should be expanded in the response. Ensures that fully inlined organization and/or role objects get returned. * @example organizations */ expand?: ("organizations" | "roles")[]; }; header?: never; path: { userId: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"]; "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"]; "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"]; [name: string]: unknown; }; content: { /** * @example { * "id": "a7f3c8e2-91d4-4b5a-8c6f-2e9d1a3b7f4c", * "mail": "alice.johnson@example.com", * "firstName": "Alice", * "lastName": "Johnson", * "displayName": "Alice Johnson", * "mobilePhone": "+1-555-9876", * "preferredLocale": "en_US", * "roles": [ * "bm-user" * ], * "roleTenantFilter": "ECOM_USER:abcd_prd", * "organizations": [ * "b2c8f7a3-45d6-4e9a-8b1c-3f7e2d9a6c5b" * ], * "primaryOrganization": "b2c8f7a3-45d6-4e9a-8b1c-3f7e2d9a6c5b", * "userState": "ENABLED", * "createdAt": "2024-01-15T10:30:00Z", * "lastModified": "2024-11-20T14:22:00Z", * "lastLoginDate": "2024-12-03", * "linkedToSfIdentity": false * } */ "application/json": components["schemas"]["UserRead"]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Access token is missing or invalid. */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; /** @description A user with this ID was not found. */ 404: { headers: { [name: string]: unknown; }; content?: never; }; 429: components["responses"]["RateLimitedError"]; }; }; updateUser: { parameters: { query?: never; header?: never; path: { userId: string; }; cookie?: never; }; requestBody: { content: { /** * @example { * "firstName": "Jane", * "lastName": "Smith", * "displayName": "Jane Smith", * "mobilePhone": "+1-555-0123", * "preferredLocale": "en_US", * "roles": [ * "bm-user" * ], * "roleTenantFilter": "ECOM_USER:abcd_prd" * } */ "application/json": components["schemas"]["UserUpdate"]; }; }; responses: { /** @description OK */ 200: { headers: { "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"]; "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"]; "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"]; [name: string]: unknown; }; content: { "application/json": components["schemas"]["UserRead"]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; /** @description Access token is missing or invalid. */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; 429: components["responses"]["RateLimitedError"]; }; }; purgeUser: { parameters: { query?: never; header?: never; path: { userId: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description User has been purged. */ 204: { headers: { "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"]; "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"]; "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"]; [name: string]: unknown; }; content?: never; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Access token is missing or invalid. */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; /** @description A user with this ID was not found. */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Precondition Failed - User must be in status DELETED to be purged. */ 412: { headers: { [name: string]: unknown; }; content?: never; }; 429: components["responses"]["RateLimitedError"]; }; }; resetUser: { parameters: { query?: never; header?: never; path: { userId: string; }; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["UserResetResource"]; }; }; responses: { /** @description User has been reset. */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Access token is missing or invalid. */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; /** @description User not found. */ 404: { headers: { [name: string]: unknown; }; content?: never; }; 429: components["responses"]["RateLimitedError"]; }; }; disableUser: { parameters: { query?: never; header?: never; path: { userId: string; }; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["UserDeactivationResource"]; }; }; responses: { /** @description User has been disabled. */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Access token is missing or invalid. */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; /** @description User not found. */ 404: { headers: { [name: string]: unknown; }; content?: never; }; 429: components["responses"]["RateLimitedError"]; }; }; }