Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
4354f6e
chore(package.json): remove unused `watchpack` dependency
Mar 18, 2016
e6b47b5
chore(package.json): update webpack to version 1.12.14
Mar 18, 2016
59d328a
chore(build): update babel to v6.x
Mar 18, 2016
37c3301
chore(webpack): use tabs instead of spaces for indentation
Mar 18, 2016
ad47a01
chore(webpack): correct closing bracket style
Mar 18, 2016
72e366c
chore(webpack): remove `.jsx` extension
Mar 18, 2016
c21c830
chore(webpack): use `include` property instead of `exclude`
Mar 18, 2016
d58ef26
chore(webpack): use single quotes
Mar 18, 2016
caed187
style(index): use tabs instead of spaces for indentation
Mar 18, 2016
f521a8f
docs(index): add reference link to `getByteLen()`
Mar 18, 2016
263fae6
docs(index): correct jsdoc for `getByteLen()`
Mar 18, 2016
de1afb4
feat(api): add `DocumentsAPI`
Mar 18, 2016
abd9320
feat(Client): replace document methods with an instance of `Documents…
Mar 18, 2016
ea045a7
feat(SchemaAPI): add `SchemaAPI`
Mar 18, 2016
ec23afe
feat(Client): replace schema methods with an instance of `SchemaAPI`
Mar 18, 2016
fc2b1c7
feat(UserAPI): add `UserAPI`
Mar 18, 2016
bf9dcfd
feat(Client): add an instance of the `UserAPI` as a property of `Client`
Mar 18, 2016
5374f07
feat(RoleAPI): add `RoleAPI`
Mar 18, 2016
f3f9eab
feat(Client): add an instance of the `RoleAPI` as a property of `Client`
Mar 18, 2016
80029f9
feat(FileAPI): add `FileAPI`
Mar 18, 2016
d167c6e
refactor(getByteLen): don't export `getByteLen`
Apr 2, 2016
a210d5e
feat(Client): don't attempt to parse JSON when the HTTP status is 204…
Apr 2, 2016
4e8185b
feat(Client): add an instance of the `FileAPI` to `Client`
Apr 2, 2016
ed7e337
refactor(DocumentsAPI): move `DocumentsAPI` into its own file
Apr 2, 2016
e54176f
refactor(FileAPI): move `FileAPI` into its own file
Apr 2, 2016
a141b01
refactor(SchemaAPI): move `SchemaAPI` into its own file
Apr 2, 2016
975100b
refactor(UserAPI): move `UserAPI` into its own file
Apr 2, 2016
90cf5d4
refactor(RoleAPI): move `RoleAPI` into the `api` directory
Apr 2, 2016
bb480f7
refactor(index): export an object with `Client` and `Query` as proper…
Apr 2, 2016
16a985b
refactor(Query): move `Query` into its own file
Apr 2, 2016
ccca717
refactor(Client): move `Client` into its own file
Apr 2, 2016
19e977c
chore(build): use tabs instead of spaces
Apr 2, 2016
96b6b5a
chore(build): rename `myConfig` to `webpackConfig`
Apr 2, 2016
790bca1
chore(build): rename `to5` to `babel`
Apr 2, 2016
f8512e1
refactor(DocumentAPI): use the singular form for `DocumentAPI` to mat…
Apr 2, 2016
58e1542
chore(build): create `.babelrc`
Apr 3, 2016
050bc1e
chore(build): use babel config in `.babelrc`
Apr 3, 2016
4f3365d
chore(gulpfile): update to use babel 6
Apr 3, 2016
d03d49f
chore(gulpfile): use default mocha reporter
Apr 3, 2016
9ee5be8
chore(gulpfile): don't read the contents of source files before passi…
Apr 3, 2016
4f35e9c
chore(gulpfile): require an underscore before "test.js"
Apr 3, 2016
4928a1f
tests(*): use tabs instead of spaces
Apr 3, 2016
4530678
tests(client): remove tests for methods that have been moved to their…
Apr 4, 2016
b0f8479
tests(mocha): use the `min` reporter
Apr 4, 2016
716c686
feat(client): mirror the `python-montage` wrapper's implemenation of …
Apr 4, 2016
b1a616a
feat(query): mirror `python-montage` wrapper's implementation of Query
Apr 4, 2016
fe14bf9
feat(field): create a `Field` class that allows users to apply filter…
Apr 5, 2016
824a86d
feat(PolicyAPI): create `PolicyAPI`
Apr 5, 2016
574f4cf
feat(scripting): create `Script` and `RunLua` classes
Apr 5, 2016
3a2ec6f
chore(package.js): use `dist/montage.js` as the `main` file
Apr 16, 2016
8049331
feat(query): Implement get_nearest and get_intersecting.
dmpayton Apr 20, 2016
cd394c7
style(query): change snake_case to camelCase
Apr 20, 2016
88536fe
Merge pull request #11 from EditLLC/feature/v3-geospatial-terms
nick-herrera Apr 20, 2016
727ed6a
refactor(client): remove the `url` parameter. use `this.host` instead
May 3, 2016
163e4fe
feat(client): allow users to specify a protocol
May 3, 2016
44d7278
refactor(client): rename `subdomain` to `project`
May 3, 2016
e06b7d2
fix(client): add `babel-polyfill` to fix an issue with undefined `Pro…
Jul 19, 2016
f0a0a62
emergency fix to pass query along
zbyte64 Aug 4, 2016
3c974ef
nodejs loads a non-minified version of montage [dist/index.js], bower…
zbyte64 Sep 13, 2016
45baa14
babel-polyfill is a runtime requirement
zbyte64 Sep 20, 2016
694be36
feat: add index.d.ts to dist/ for ts typings
FelixVicis Oct 14, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"plugins": ["transform-runtime"],
"presets": ["es2015"]
}
17 changes: 17 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "montagedata",
"description": "Client library for Montage Data",
"main": "dist/montage.js",
"authors": [
"Jason Kraus <jkraus@editllc.com>"
],
"license": "MIT",
"homepage": "https://github.com/Montage-Inc/javascript-montage",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
64 changes: 64 additions & 0 deletions dist/api/document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var DocumentAPI = function () {
function DocumentAPI(client) {
(0, _classCallCheck3.default)(this, DocumentAPI);

this.client = client;
}

(0, _createClass3.default)(DocumentAPI, [{
key: 'list',
value: function list(schema) {
var endpoint = 'schemas/' + schema + '/documents/';
return this.client.request(endpoint);
}
}, {
key: 'save',
value: function save(schema, documents) {
var endpoint = 'schemas/' + schema + '/documents/';
return this.client.request(endpoint, 'POST', documents);
}
}, {
key: 'get',
value: function get(schema, document_id) {
var endpoint = 'schemas/' + schema + '/documents/' + document_id + '/';
return this.client.request(endpoint);
}
}, {
key: 'replace',
value: function replace(schema, document) {
var endpoint = 'schemas/' + schema + '/documents/' + document.id + '/';
return this.client.request(endpoint, 'PUT', document);
}
}, {
key: 'update',
value: function update(schema, document) {
var endpoint = 'schemas/' + schema + '/documents/' + document.id + '/';
return this.client.request(endpoint, 'PATCH', document);
}
}, {
key: 'remove',
value: function remove(schema, document_id) {
var endpoint = 'schemas/' + schema + '/documents/' + document_id + '/';
return this.client.request(endpoint, 'DELETE');
}
}]);
return DocumentAPI;
}();

exports.default = DocumentAPI;
49 changes: 49 additions & 0 deletions dist/api/file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var FileAPI = function () {
function FileAPI(client) {
(0, _classCallCheck3.default)(this, FileAPI);

this.client = client;
}

(0, _createClass3.default)(FileAPI, [{
key: 'list',
value: function list() {
return this.client.request('files/');
}
}, {
key: 'get',
value: function get(file_id) {
return this.client.request('files/' + file_id + '/');
}
}, {
key: 'remove',
value: function remove(file_id) {
var endpoint = 'files/' + file_id + '/';
return this.client.request(endpoint, 'DELETE');
}
}, {
key: 'save',
value: function save(formData) {
return this.client.request('files/', 'POST', formData, true);
}
}]);
return FileAPI;
}();

exports.default = FileAPI;
84 changes: 84 additions & 0 deletions dist/api/policy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var PolicyAPI = function () {
function PolicyAPI(client) {
(0, _classCallCheck3.default)(this, PolicyAPI);

this.client = client;
}

(0, _createClass3.default)(PolicyAPI, [{
key: 'create',
value: function create(description, policy) {
var payload = {
description: description,
policy: policy
};

return this.client.request('policy/', 'POST', payload);
}
}, {
key: 'list',
value: function list() {
return this.client.request('policy/');
}
}, {
key: 'get',
value: function get(policy_id) {
return this.client.request('policy/' + policy_id + '/');
}
}, {
key: 'update',
value: function update(policy_id, description, policy) {
if (!description && !policy) {
throw new Error('Must provide a `description` or `policy`');
}

var payload = {};

if (description) {
payload.description = description;
}

if (policy) {
payload.policy = policy;
}

if (payload) {
return this.client.request('policy/' + policy_id + '/', 'PATCH', payload);
}
}
}, {
key: 'remove',
value: function remove(policy_id) {
return this.client.request('policy/' + policy_id + '/', 'DELETE');
}
}, {
key: 'checkPermission',
value: function checkPermission(action, resource) {
var payload = {
action: action,
resource: resource
};

return this.client.request('policy/check/', 'GET', payload);
}
}]);
return PolicyAPI;
}();

exports.default = PolicyAPI;
76 changes: 76 additions & 0 deletions dist/api/role.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});

var _keys = require('babel-runtime/core-js/object/keys');

var _keys2 = _interopRequireDefault(_keys);

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var RoleAPI = function () {
function RoleAPI(client) {
(0, _classCallCheck3.default)(this, RoleAPI);

this.client = client;
}

(0, _createClass3.default)(RoleAPI, [{
key: 'create',
value: function create(name) {
var add_users = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];

var payload = { name: name, add_users: add_users };
return this.client.request('roles/', 'POST', payload);
}
}, {
key: 'list',
value: function list() {
return this.client.request('roles/');
}
}, {
key: 'get',
value: function get(role) {
return this.client.request('roles/' + role + '/');
}
}, {
key: 'update',
value: function update(role, name, add_users, remove_users) {
var payload = {};

if (name) {
payload.name = name;
}

if (add_users) {
payload.add_users = add_users;
}

if (remove_users) {
payload.remove_users = remove_users;
}

if ((0, _keys2.default)(payload).length) {
return this.client.request('roles/' + role + '/', 'PATCH', payload);
}
}
}, {
key: 'remove',
value: function remove(role) {
return this.client.request('roles/' + role + '/', 'DELETE');
}
}]);
return RoleAPI;
}();

exports.default = RoleAPI;
72 changes: 72 additions & 0 deletions dist/api/schema.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});

var _keys = require('babel-runtime/core-js/object/keys');

var _keys2 = _interopRequireDefault(_keys);

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var SchemaAPI = function () {
function SchemaAPI(client) {
(0, _classCallCheck3.default)(this, SchemaAPI);

this.client = client;
}

(0, _createClass3.default)(SchemaAPI, [{
key: 'create',
value: function create(name) {
var fields = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];

var payload = { name: name, fields: fields };
return this.client.request('schemas/', 'POST', payload);
}
}, {
key: 'list',
value: function list() {
return this.client.request('schemas/');
}
}, {
key: 'get',
value: function get(schema) {
return this.client.request('schemas/' + schema + '/');
}
}, {
key: 'update',
value: function update(schema, name, fields) {
var payload = {};

if (name) {
payload.name = name;
}

if (fields) {
payload.fields = fields;
}

if ((0, _keys2.default)(payload).length) {
return this.client.request('schemas/' + schema + '/', 'PATCH', payload);
}
}
}, {
key: 'remove',
value: function remove(schema) {
return this.client.request('schemas/' + schema + '/', 'DELETE');
}
}]);
return SchemaAPI;
}();

exports.default = SchemaAPI;
Loading