strong-arc
Version:
A visual suite for the StrongLoop API Platform
1,351 lines (1,291 loc) • 724 kB
JavaScript
// CommonJS package manager support
if (typeof module !== 'undefined' && typeof exports !== 'undefined' &&
module.exports === exports) {
// Export the *name* of this Angular module
// Sample usage:
//
// import lbServices from './lb-services';
// angular.module('app', [lbServices]);
//
module.exports = "lbServices";
}
(function(window, angular, undefined) {
'use strict';
var urlBase = "/workspace/api";
var authHeader = 'authorization';
function getHost(url) {
var m = url.match(/^(?:https?:)?\/\/([^\/]+)/);
return m ? m[1] : null;
}
var urlBaseHost = getHost(urlBase) || location.host;
/**
* @ngdoc overview
* @name lbServices
* @module
* @description
*
* The `lbServices` module provides services for interacting with
* the models exposed by the LoopBack server via the REST API.
*
*/
var module = angular.module("lbServices", ['ngResource']);
/**
* @ngdoc object
* @name lbServices.Workspace
* @header lbServices.Workspace
* @object
*
* @description
*
* A $resource object for interacting with the `Workspace` model.
*
* ## Example
*
* See
* {@link http://docs.angularjs.org/api/ngResource.$resource#example $resource}
* for an example of using this object.
*
*/
module.factory(
"Workspace",
[
'LoopBackResource', 'LoopBackAuth', '$injector',
function(Resource, LoopBackAuth, $injector) {
var R = Resource(
urlBase + "/Workspaces/:id",
{ 'id': '@id' },
{
/**
* @ngdoc method
* @name lbServices.Workspace#getAvailableTemplates
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* Data properties:
*
* - `templates` – `{*=}` -
*/
"getAvailableTemplates": {
url: urlBase + "/Workspaces/component-templates",
method: "GET",
},
/**
* @ngdoc method
* @name lbServices.Workspace#addComponent
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* This method returns no data.
*/
"addComponent": {
url: urlBase + "/Workspaces/component",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.Workspace#createFromTemplate
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* - `templateName` – `{string=}` -
*
* - `name` – `{string=}` -
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* This method returns no data.
*/
"createFromTemplate": {
url: urlBase + "/Workspaces",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.Workspace#listAvailableConnectors
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {function(Array.<Object>,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Array.<Object>} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `Workspace` object.)
* </em>
*/
"listAvailableConnectors": {
isArray: true,
url: urlBase + "/Workspaces/connectors",
method: "GET",
},
/**
* @ngdoc method
* @name lbServices.Workspace#start
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method does not accept any data. Supply an empty object.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `Workspace` object.)
* </em>
*/
"start": {
url: urlBase + "/Workspaces/start",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.Workspace#stop
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method does not accept any data. Supply an empty object.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `Workspace` object.)
* </em>
*/
"stop": {
url: urlBase + "/Workspaces/stop",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.Workspace#restart
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method does not accept any data. Supply an empty object.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `Workspace` object.)
* </em>
*/
"restart": {
url: urlBase + "/Workspaces/restart",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.Workspace#isRunning
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `Workspace` object.)
* </em>
*/
"isRunning": {
url: urlBase + "/Workspaces/is-running",
method: "GET",
},
/**
* @ngdoc method
* @name lbServices.Workspace#getWorkspace
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* Data properties:
*
* - `path` – `{string=}` -
*/
"getWorkspace": {
url: urlBase + "/Workspaces/get-workspace",
method: "GET",
},
/**
* @ngdoc method
* @name lbServices.Workspace#loadWorkspace
* @methodOf lbServices.Workspace
*
* @description
*
* <em>
* (The remote method definition does not provide any description.)
* </em>
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* - `path` – `{string=}` -
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `Workspace` object.)
* </em>
*/
"loadWorkspace": {
url: urlBase + "/Workspaces/load-workspace",
method: "POST",
},
}
);
/**
* @ngdoc property
* @name lbServices.Workspace#modelName
* @propertyOf lbServices.Workspace
* @description
* The name of the model represented by this $resource,
* i.e. `Workspace`.
*/
R.modelName = "Workspace";
return R;
}]);
/**
* @ngdoc object
* @name lbServices.PackageDefinition
* @header lbServices.PackageDefinition
* @object
*
* @description
*
* A $resource object for interacting with the `PackageDefinition` model.
*
* ## Example
*
* See
* {@link http://docs.angularjs.org/api/ngResource.$resource#example $resource}
* for an example of using this object.
*
*/
module.factory(
"PackageDefinition",
[
'LoopBackResource', 'LoopBackAuth', '$injector',
function(Resource, LoopBackAuth, $injector) {
var R = Resource(
urlBase + "/PackageDefinitions/:id",
{ 'id': '@id' },
{
/**
* @ngdoc method
* @name lbServices.PackageDefinition#create
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Create a new instance of the model and persist it into the data source.
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"create": {
url: urlBase + "/PackageDefinitions",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#createMany
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Create a new instance of the model and persist it into the data source.
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Array.<Object>,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Array.<Object>} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"createMany": {
isArray: true,
url: urlBase + "/PackageDefinitions",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#upsert
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Patch an existing model instance or insert a new one into the data source.
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"upsert": {
url: urlBase + "/PackageDefinitions",
method: "PUT",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#replaceOrCreate
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Replace an existing model instance or insert a new one into the data source.
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"replaceOrCreate": {
url: urlBase + "/PackageDefinitions/replaceOrCreate",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#upsertWithWhere
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Update an existing model instance or insert a new one into the data source based on the where criteria.
*
* @param {Object=} parameters Request parameters.
*
* - `where` – `{object=}` - Criteria to match model instances
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"upsertWithWhere": {
url: urlBase + "/PackageDefinitions/upsertWithWhere",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#exists
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Check whether a model instance exists in the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `id` – `{*}` - Model id
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* Data properties:
*
* - `exists` – `{boolean=}` -
*/
"exists": {
url: urlBase + "/PackageDefinitions/:id/exists",
method: "GET",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#findById
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Find a model instance by {{id}} from the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `id` – `{*}` - Model id
*
* - `filter` – `{object=}` - Filter defining fields and include
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"findById": {
url: urlBase + "/PackageDefinitions/:id",
method: "GET",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#replaceById
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Replace attributes for a model instance and persist it into the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `id` – `{*}` - Model id
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"replaceById": {
url: urlBase + "/PackageDefinitions/:id/replace",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#find
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Find all instances of the model matched by filter from the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `filter` – `{object=}` - Filter defining fields, where, include, order, offset, and limit
*
* @param {function(Array.<Object>,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Array.<Object>} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"find": {
isArray: true,
url: urlBase + "/PackageDefinitions",
method: "GET",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#findOne
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Find first instance of the model matched by filter from the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `filter` – `{object=}` - Filter defining fields, where, include, order, offset, and limit
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"findOne": {
url: urlBase + "/PackageDefinitions/findOne",
method: "GET",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#updateAll
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Update instances of the model matched by {{where}} from the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `where` – `{object=}` - Criteria to match model instances
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* The number of instances updated
*/
"updateAll": {
url: urlBase + "/PackageDefinitions/update",
method: "POST",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#deleteById
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Delete a model instance by {{id}} from the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `id` – `{*}` - Model id
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"deleteById": {
url: urlBase + "/PackageDefinitions/:id",
method: "DELETE",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#count
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Count instances of the model matched by where from the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `where` – `{object=}` - Criteria to match model instances
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* Data properties:
*
* - `count` – `{number=}` -
*/
"count": {
url: urlBase + "/PackageDefinitions/count",
method: "GET",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#prototype$updateAttributes
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Patch attributes for a model instance and persist it into the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `id` – `{*}` - Definition id
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
"prototype$updateAttributes": {
url: urlBase + "/PackageDefinitions/:id",
method: "PUT",
},
/**
* @ngdoc method
* @name lbServices.PackageDefinition#createChangeStream
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Create a change stream.
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* - `options` – `{object=}` -
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* Data properties:
*
* - `changes` – `{ReadableStream=}` -
*/
"createChangeStream": {
url: urlBase + "/PackageDefinitions/change-stream",
method: "POST",
},
}
);
/**
* @ngdoc method
* @name lbServices.PackageDefinition#patchOrCreate
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Patch an existing model instance or insert a new one into the data source.
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
R["patchOrCreate"] = R["upsert"];
/**
* @ngdoc method
* @name lbServices.PackageDefinition#updateOrCreate
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Patch an existing model instance or insert a new one into the data source.
*
* @param {Object=} parameters Request parameters.
*
* This method does not accept any parameters.
* Supply an empty object or omit this argument altogether.
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
R["updateOrCreate"] = R["upsert"];
/**
* @ngdoc method
* @name lbServices.PackageDefinition#patchOrCreateWithWhere
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Update an existing model instance or insert a new one into the data source based on the where criteria.
*
* @param {Object=} parameters Request parameters.
*
* - `where` – `{object=}` - Criteria to match model instances
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
R["patchOrCreateWithWhere"] = R["upsertWithWhere"];
/**
* @ngdoc method
* @name lbServices.PackageDefinition#update
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Update instances of the model matched by {{where}} from the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `where` – `{object=}` - Criteria to match model instances
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* The number of instances updated
*/
R["update"] = R["updateAll"];
/**
* @ngdoc method
* @name lbServices.PackageDefinition#destroyById
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Delete a model instance by {{id}} from the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `id` – `{*}` - Model id
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
R["destroyById"] = R["deleteById"];
/**
* @ngdoc method
* @name lbServices.PackageDefinition#removeById
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Delete a model instance by {{id}} from the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `id` – `{*}` - Model id
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
R["removeById"] = R["deleteById"];
/**
* @ngdoc method
* @name lbServices.PackageDefinition#patchAttributes
* @methodOf lbServices.PackageDefinition
*
* @description
*
* Patch attributes for a model instance and persist it into the data source.
*
* @param {Object=} parameters Request parameters.
*
* - `id` – `{*}` - Definition id
*
* @param {Object} postData Request data.
*
* This method expects a subset of model properties as request parameters.
*
* @param {function(Object,Object)=} successCb
* Success callback with two arguments: `value`, `responseHeaders`.
*
* @param {function(Object)=} errorCb Error callback with one argument:
* `httpResponse`.
*
* @returns {Object} An empty reference that will be
* populated with the actual data once the response is returned
* from the server.
*
* <em>
* (The remote method definition does not provide any description.
* This usually means the response is a `PackageDefinition` object.)
* </em>
*/
R["patchAttributes"] = R["prototype$updateAttributes"];
/**
* @ngdoc property
* @name lbServices.PackageDefinition#modelName
* @propertyOf lbServices.PackageDefinition
* @description
* The name of the model represented by this $resource,
* i.e. `PackageDefinition`.
*/
R.modelName = "PackageDefinition";
return R;
}]);
/**
* @ngdoc object
* @name lbServices.Facet
* @header lbServices.Facet
* @object
*
* @description
*
* A $resource object for interacting with the `Facet` model.
*
* ## Example
*
* See
* {@link http://docs.angularjs.org/api/ngResource.$resource#example $resource}
* for an example of using this object.
*
*/
module.factory(
"Facet",
[
'LoopBackResource', 'LoopBackAuth', '$injector',
function(Resource, LoopBackAuth, $injector) {
var R = Resource(
urlBase + "/Facets/:id",
{ 'id': '@id' },
{
// INTERNAL. Use Facet.settings.findById() instead.
"prototype$__findById__settings": {
params: {
'fk': '@fk',
},
url: urlBase + "/Facets/:id/settings/:fk",
method: "GET",
},
// INTERNAL. Use Facet.settings.destroyById() instead.
"prototype$__destroyById__settings": {
params: {
'fk': '@fk',
},
url: urlBase + "/Facets/:id/settings/:fk",
method: "DELETE",
},
// INTERNAL. Use Facet.settings.updateById() instead.
"prototype$__updateById__settings": {
params: {
'fk': '@fk',
},
url: urlBase + "/Facets/:id/settings/:fk",
method: "PUT",
},
// INTERNAL. Use Facet.modelConfigs.findById() instead.
"prototype$__findById__modelConfigs": {
params: {
'fk': '@fk',
},
url: urlBase + "/Facets/:id/modelConfigs/:fk",
method: "GET",
},
// INTERNAL. Use Facet.modelConfigs.destroyById() instead.
"prototype$__destroyById__modelConfigs": {
params: {
'fk': '@fk',
},
url: urlBase + "/Facets/:id/modelConfigs/:fk",
method: "DELETE",
},
// INTERNAL. Use Facet.modelConfigs.updateById() instead.
"prototype$__updateById__modelConfigs": {
params: {
'fk': '@fk',
},
url