Add additional default fields to _Installation class (#1852)
Fields are appVersion, appName, appIdentifier, and parseVersion. These fields are sent by Android and iOS SDKs.
This commit is contained in:
@@ -28,6 +28,15 @@ describe('MongoSchemaCollection', () => {
|
|||||||
"deviceType":"string",
|
"deviceType":"string",
|
||||||
"channels":"array",
|
"channels":"array",
|
||||||
"user":"*_User",
|
"user":"*_User",
|
||||||
|
"pushType":"string",
|
||||||
|
"GCMSenderId":"string",
|
||||||
|
"timeZone":"string",
|
||||||
|
"localeIdentifier":"string",
|
||||||
|
"badge":"number",
|
||||||
|
"appVersion":"string",
|
||||||
|
"appName":"string",
|
||||||
|
"appIdentifier":"string",
|
||||||
|
"parseVersion":"string",
|
||||||
})).toEqual({
|
})).toEqual({
|
||||||
className: '_Installation',
|
className: '_Installation',
|
||||||
fields: {
|
fields: {
|
||||||
@@ -36,6 +45,15 @@ describe('MongoSchemaCollection', () => {
|
|||||||
deviceType: { type: 'String' },
|
deviceType: { type: 'String' },
|
||||||
channels: { type: 'Array' },
|
channels: { type: 'Array' },
|
||||||
user: { type: 'Pointer', targetClass: '_User' },
|
user: { type: 'Pointer', targetClass: '_User' },
|
||||||
|
pushType: { type: 'String' },
|
||||||
|
GCMSenderId: { type: 'String' },
|
||||||
|
timeZone: { type: 'String' },
|
||||||
|
localeIdentifier: { type: 'String' },
|
||||||
|
badge: { type: 'Number' },
|
||||||
|
appVersion: { type: 'String' },
|
||||||
|
appName: { type: 'String' },
|
||||||
|
appIdentifier: { type: 'String' },
|
||||||
|
parseVersion: { type: 'String' },
|
||||||
ACL: { type: 'ACL' },
|
ACL: { type: 'ACL' },
|
||||||
createdAt: { type: 'Date' },
|
createdAt: { type: 'Date' },
|
||||||
updatedAt: { type: 'Date' },
|
updatedAt: { type: 'Date' },
|
||||||
|
|||||||
@@ -453,6 +453,10 @@ describe('SchemaController', () => {
|
|||||||
timeZone: { type: 'String' },
|
timeZone: { type: 'String' },
|
||||||
localeIdentifier: { type: 'String' },
|
localeIdentifier: { type: 'String' },
|
||||||
badge: { type: 'Number' },
|
badge: { type: 'Number' },
|
||||||
|
appVersion: { type: 'String' },
|
||||||
|
appName: { type: 'String' },
|
||||||
|
appIdentifier: { type: 'String' },
|
||||||
|
parseVersion: { type: 'String' },
|
||||||
},
|
},
|
||||||
classLevelPermissions: {
|
classLevelPermissions: {
|
||||||
find: { '*': true },
|
find: { '*': true },
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const defaultColumns = Object.freeze({
|
|||||||
"email": {type:'String'},
|
"email": {type:'String'},
|
||||||
"emailVerified": {type:'Boolean'},
|
"emailVerified": {type:'Boolean'},
|
||||||
},
|
},
|
||||||
// The additional default columns for the _User collection (in addition to DefaultCols)
|
// The additional default columns for the _Installation collection (in addition to DefaultCols)
|
||||||
_Installation: {
|
_Installation: {
|
||||||
"installationId": {type:'String'},
|
"installationId": {type:'String'},
|
||||||
"deviceToken": {type:'String'},
|
"deviceToken": {type:'String'},
|
||||||
@@ -43,15 +43,19 @@ const defaultColumns = Object.freeze({
|
|||||||
"GCMSenderId": {type:'String'},
|
"GCMSenderId": {type:'String'},
|
||||||
"timeZone": {type:'String'},
|
"timeZone": {type:'String'},
|
||||||
"localeIdentifier": {type:'String'},
|
"localeIdentifier": {type:'String'},
|
||||||
"badge": {type:'Number'}
|
"badge": {type:'Number'},
|
||||||
|
"appVersion": {type:'String'},
|
||||||
|
"appName": {type:'String'},
|
||||||
|
"appIdentifier": {type:'String'},
|
||||||
|
"parseVersion": {type:'String'},
|
||||||
},
|
},
|
||||||
// The additional default columns for the _User collection (in addition to DefaultCols)
|
// The additional default columns for the _Role collection (in addition to DefaultCols)
|
||||||
_Role: {
|
_Role: {
|
||||||
"name": {type:'String'},
|
"name": {type:'String'},
|
||||||
"users": {type:'Relation', targetClass:'_User'},
|
"users": {type:'Relation', targetClass:'_User'},
|
||||||
"roles": {type:'Relation', targetClass:'_Role'}
|
"roles": {type:'Relation', targetClass:'_Role'}
|
||||||
},
|
},
|
||||||
// The additional default columns for the _User collection (in addition to DefaultCols)
|
// The additional default columns for the _Session collection (in addition to DefaultCols)
|
||||||
_Session: {
|
_Session: {
|
||||||
"restricted": {type:'Boolean'},
|
"restricted": {type:'Boolean'},
|
||||||
"user": {type:'Pointer', targetClass:'_User'},
|
"user": {type:'Pointer', targetClass:'_User'},
|
||||||
|
|||||||
Reference in New Issue
Block a user