import type { MergeConflicts as MergeConflictsCore, MergeUserConflict as MergeUserConflictCore, MergeUserConflictResolution as MergeUserConflictResolutionCore, MergeUser as MergeUserCore } from '@dynamic-labs/sdk-api-core';
/**
 * One side of a single field-level merge conflict: the id of a user involved in
 * the merge together with that user's value for the conflicting profile field.
 *
 * Surfaced (via {@link MergeUserConflict}) when a credential being linked
 * already belongs to another user and the two accounts hold different values
 * for the same field. The `userId` is what you pass back as
 * `MergeUserConflictResolution.userId` to choose whose value to keep.
 *
 * @example
 * ```ts
 * const chosen: MergeUser = conflict.currentUser;
 * console.log(chosen.userId, chosen.value);
 * ```
 * @see MergeUserConflict
 * @see MergeUserConflictResolution
 */
export type MergeUser = MergeUserCore;
/**
 * A single field-level conflict between the two accounts being merged: the
 * `field` in question plus the differing values held by `fromUser` (the account
 * that owns the credential) and `currentUser` (the signed-in account).
 *
 * The user resolves each conflict by choosing which side to keep; that choice
 * becomes a {@link MergeUserConflictResolution} passed to `mergeUserAccounts`.
 *
 * @example
 * ```ts
 * conflicts.forEach((conflict: MergeUserConflict) => {
 *   console.log(conflict.field, conflict.fromUser.value, conflict.currentUser.value);
 * });
 * ```
 * @see MergeUser
 * @see MergeConflicts
 */
export type MergeUserConflict = MergeUserConflictCore;
/**
 * The full set of field-level conflicts surfaced when a merge is offered:
 * the `fromUser` being merged in and the list of `conflicts` to resolve.
 *
 * This is the shape carried on `MergeAccountsConfirmationError.mergeConflicts`;
 * present it to the user, collect a {@link MergeUserConflictResolution} per
 * conflict, and pass those to `mergeUserAccounts`.
 *
 * @example
 * ```ts
 * catch (error) {
 *   if (error instanceof MergeAccountsConfirmationError) {
 *     const conflicts: MergeConflicts | undefined = error.mergeConflicts;
 *   }
 * }
 * ```
 * @see MergeUserConflict
 * @see MergeUserConflictResolution
 */
export type MergeConflicts = MergeConflictsCore;
/**
 * The user's decision for one field-level conflict: `fieldKey` identifies the
 * conflicting field, `userId` selects whose value to keep, and `type` is the
 * field's kind.
 *
 * Build one of these per {@link MergeUserConflict} and pass the array to
 * `mergeUserAccounts` to complete a merge that had conflicts.
 *
 * @example
 * ```ts
 * const resolution: MergeUserConflictResolution = {
 *   fieldKey: conflict.field.key,
 *   userId: conflict.currentUser.userId,
 *   type: conflict.field.type,
 * };
 * ```
 * @see MergeUserConflict
 * @see MergeConflicts
 */
export type MergeUserConflictResolution = MergeUserConflictResolutionCore;
//# sourceMappingURL=mergeUserAccounts.types.d.ts.map