arrow-orm
Version:
API Builder ORM
68 lines (65 loc) • 2.4 kB
JavaScript
/*
Public API.
*/
/*
* TODO: Remove me with a breaking change (RDPP-6134)
* Generates tests based upon the capabilities you have specified.
* Tests removed from source, but the function remains for (development) backwards compatibility
*/
module.exports.generateTests = () => {};
/**
* @class APIBuilder.Capabilities
* Defines various connector specific capabilities; these are used by the validator to help
* developer's add new functionality to their connectors.
* @since 1.2.8
*/
module.exports.Capabilities = {
/**
* Specifies that the first time the connector is used, it will need to connect to a particular
* data source before it can be used. For example, the MySQL connector connects to a MySQL
* server.
*/
ConnectsToADataSource: 'ConnectsToADataSource',
/**
* Define validation on your validation files to ensure you get the data you need to run.
* For example, a MongoDB connector could require a valid URL.
*/
ValidatesConfiguration: 'ValidatesConfiguration',
/**
* Connectors can provide custom types of objects, such as a MongoDB ObjectID.
*/
AddsCustomTypes: 'AddsCustomTypes',
/**
* Connectors can dynamically create models based upon loaded schema from their data sources.
*/
GeneratesModels: 'GeneratesModels',
/**
* Connectors can contain static models, defined in their "models" directory.
*/
ContainsModels: 'ContainsModels',
/**
* Enables a "create" method on this connector's models.
*/
CanCreate: 'CanCreate',
/**
* Enables several methods such as findAll, findByID, or query on this connector's models.
*/
CanRetrieve: 'CanRetrieve',
/**
* Enables an "update" method on this connector's models.
*/
CanUpdate: 'CanUpdate',
/**
* Enables several methods such as delete and deleteAll on this connector's models.
*/
CanDelete: 'CanDelete',
/**
* In addition to (or in place of) authenticating users in APIBuilder, the connector itself can
* validate a user when a request is made to one of the connector's exposed methods. This is
* done through the user of headers. For example, the Salesforce connector allows you to pass a
* Salesforce username, password, and token, or an access token. Then all queries are made as
* this provided user, allowing the connector to leverage Salesforce's access controls very
* easily.
*/
AuthenticatesThroughConnector: 'AuthenticatesThroughConnector'
};