User resource mapper behaviour.
Summary
Callbacks
Builds the complete SCIM meta object for a user. Receives the struct and options like :location and :resource_type.
Converts a SCIM JSON map into a domain user struct.
Extracts the creation timestamp from a user struct. Used for SCIM meta.created.
Extracts the last-modified timestamp from a user struct. Used for SCIM meta.lastModified.
Computes an ETag version string from a user struct. Used for SCIM meta.version.
Converts a domain user struct into a SCIM JSON map.
Types
Callbacks
@callback format_meta( user_struct(), keyword() ) :: map()
Builds the complete SCIM meta object for a user. Receives the struct and options like :location and :resource_type.
@callback from_scim(scim_data(), ExScim.Scope.t()) :: {:ok, user_struct()} | {:error, atom() | term()}
Converts a SCIM JSON map into a domain user struct.
@callback get_meta_created(user_struct()) :: DateTime.t() | nil
Extracts the creation timestamp from a user struct. Used for SCIM meta.created.
@callback get_meta_last_modified(user_struct()) :: DateTime.t() | nil
Extracts the last-modified timestamp from a user struct. Used for SCIM meta.lastModified.
@callback get_meta_version(user_struct()) :: String.t() | nil
Computes an ETag version string from a user struct. Used for SCIM meta.version.
@callback to_scim(user_struct(), ExScim.Scope.t(), keyword()) :: {:ok, scim_data()} | {:error, atom() | term()}
Converts a domain user struct into a SCIM JSON map.