2013-07-08 23:59:11 +00:00
|
|
|
/**
|
|
|
|
* Data model for Application
|
|
|
|
*/
|
2013-06-26 23:25:51 +00:00
|
|
|
var ApplicationSchema = {
|
|
|
|
|
|
|
|
// Basic information
|
|
|
|
id: {type: String, required: true},
|
|
|
|
name: {type: String, required: true},
|
|
|
|
description: String, // description
|
2013-07-08 23:59:11 +00:00
|
|
|
icon: String, // The icon image url
|
|
|
|
|
|
|
|
public: Boolean, // Do we list the application in the public catalog?
|
2013-06-26 23:25:51 +00:00
|
|
|
permissions: [String],
|
|
|
|
|
2013-07-08 23:59:11 +00:00
|
|
|
owner: String, // The user id of the developer who registers the application
|
|
|
|
collaborators: [String], // A list of users ids who have permissions to work on this app
|
|
|
|
|
|
|
|
// EMail
|
|
|
|
email: String, // e-mail address
|
|
|
|
emailVerified: Boolean, // Is the e-mail verified
|
2013-06-26 23:25:51 +00:00
|
|
|
|
2013-07-08 23:59:11 +00:00
|
|
|
|
|
|
|
status: String, // Status of the application, enabled/disabled
|
2013-06-26 23:25:51 +00:00
|
|
|
|
|
|
|
// Keys
|
|
|
|
clientKey: String,
|
|
|
|
javaScriptKey: String,
|
|
|
|
restApiKey: String,
|
|
|
|
windowsKey: String,
|
|
|
|
masterKey: String,
|
|
|
|
|
|
|
|
// Push notification
|
|
|
|
pushPlatforms: [String],
|
|
|
|
pushCredentials: [],
|
|
|
|
|
2013-07-08 23:59:11 +00:00
|
|
|
// User Authentication
|
2013-06-26 23:25:51 +00:00
|
|
|
authenticationEnabled: Boolean,
|
|
|
|
anonymousAllowed: Boolean,
|
|
|
|
schemes: [String], // Basic, facebook, github, google
|
|
|
|
attachedCredentials: [],
|
|
|
|
|
|
|
|
|
|
|
|
created: Date,
|
|
|
|
lastUpdated: Date
|
|
|
|
};
|
2013-07-08 23:59:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Application management functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Register a new application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|