SDK
SDK Dart v2.x
2

updateUserMapping #

Updates the internal user storage mapping.


Copied to clipboard!
Future<Map<String, dynamic>> updateUserMapping(
      Map<String, dynamic> mapping)

Property Type Description
mapping
Map<String, dynamic>
User collection mapping definition

Return #

Returns a Map representing the new mapping.

Usage #

Copied to clipboard!
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'
      }
    }
  }
*/