createUser

abstract fun createUser(classVersion: Int, userId: String? = null, className: String? = null, classLevel: PNDataSyncClassLevel? = null, status: String? = null, payload: Any? = null): CreateUser

Create a DataSync user.

Parameters

classVersion

Version of the entity class.

userId

Optional user identifier. When null the server generates one.

className

Optional entity class identifier. When null the server defaults it to User. When set it must be a User subclass.

classLevel

Optional level at which the entity class is defined. Disambiguates a class defined at more than one level. Create-only — not accepted by setUser. The built-in User class is defined at the GLOBAL level.

status

Optional user status.

payload

Optional arbitrary JSON object payload. The payload is free-form, but the built-in User class indexes the name and type properties: populating them here makes the user filterable and sortable on name / type in getUsers. Any other payload property is stored but not queryable unless a subclass that extends User declares it filterable (such a subclass inherits the name / type indexes and may add its own). The built-in fields id, createdAt, updatedAt, and status are always filterable/sortable regardless of payload.