SDK
SDK Dart v2.x
2

updateUserMapping #

Updates the internal user storage mapping.


Future<Map<String, dynamic>> updateUserMapping(
      Map<String, dynamic> mapping)

PropertyTypeDescription
mapping
Map<String, dynamic>
User collection mapping definition

Return #

Returns a Map representing the new mapping.

Usage #

final result = await kuzzle.security.updateUserMapping({
  'properties': {
    'firstName': { 'type': 'text' },
    'lastName': { 'type': 'text' },
    'birthDate': {
      'type': 'date',
      'format': 'yyyy-mm-dd'
    }
  }
});
/*
  {
    properties: {
      firstName: { type: 'text' },
      lastName: { type: 'text' },
      birthDate: {
        type: 'date',
        format: 'yyyy-mm-dd'
      }
    }
  }
*/