@octostar/platform-api 0.5.20 → 0.5.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './permissions';
6
6
  export * from './components';
7
7
  export * from './lib/JWTProvider';
8
8
  export * from './lib/AIClientImpl';
9
+ export * from './lib/FilesAPIImpl';
9
10
  export * from './lib/Proxy';
10
11
  export * from './lib/userWorkspace';
11
12
  export * from './lib/LiveContextAPI';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ export * from './permissions';
6
6
  export * from './components';
7
7
  export * from './lib/JWTProvider';
8
8
  export * from './lib/AIClientImpl';
9
+ export * from './lib/FilesAPIImpl';
9
10
  export * from './lib/Proxy';
10
11
  export * from './lib/userWorkspace';
11
12
  export * from './lib/LiveContextAPI';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
@@ -25,7 +25,7 @@ export class FilesAPIImpl {
25
25
  if (options?.fileOffset !== undefined)
26
26
  params.append('file_offset', String(options.fileOffset));
27
27
  const queryString = params.toString();
28
- const url = `/api/v1/files/list/${os_workspace}/${path}${queryString ? `?${queryString}` : ''}`;
28
+ const url = `/api/v1/files/list/${os_workspace}${path ? `/${path}` : ''}${queryString ? `?${queryString}` : ''}`;
29
29
  return this.osAPIClient.fetchData({
30
30
  endpoint: url,
31
31
  method: 'GET',
@@ -1 +1 @@
1
- {"version":3,"file":"FilesAPIImpl.js","sourceRoot":"","sources":["../../src/lib/FilesAPIImpl.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,YAAY;IAGvB,YAAY,WAAwB;QAClC,I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AC,YAAY,CAAC,CAAC,CAAC;QAC/D,IAAI,OAAO,EAAE,UAAU,KAAK,SAAS;YACnC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QAE3D,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,sBAAsB,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GACrE,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,EACpC,EAAE,CAAC;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAmB;YAClD,QAAQ,EAAE,GAAG;YACb,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -6684,7 +6684,7 @@ var forwardCallsToFutureObject = exports.forwardCallsToFutureObject = function f
6684
6684
  });
6685
6685
  };
6686
6686
 
6687
- },{"./constants":33,"./utils":44,"post-robot":5}],35:[function(require,module,exports){
6687
+ },{"./constants":33,"./utils":45,"post-robot":5}],35:[function(require,module,exports){
6688
6688
  "use strict";
6689
6689
 
6690
6690
  Object.defineProperty(exports, "__esModule", {
@@ -6778,6 +6778,17 @@ Object.keys(_AIClientImpl).forEach(function (key) {
6778
6778
  }
6779
6779
  });
6780
6780
  });
6781
+ var _FilesAPIImpl = require("./lib/FilesAPIImpl");
6782
+ Object.keys(_FilesAPIImpl).forEach(function (key) {
6783
+ if (key === "default" || key === "__esModule") return;
6784
+ if (key in exports && exports[key] === _FilesAPIImpl[key]) return;
6785
+ Object.defineProperty(exports, key, {
6786
+ enumerable: true,
6787
+ get: function get() {
6788
+ return _FilesAPIImpl[key];
6789
+ }
6790
+ });
6791
+ });
6781
6792
  var _Proxy = require("./lib/Proxy");
6782
6793
  Object.keys(_Proxy).forEach(function (key) {
6783
6794
  if (key === "default" || key === "__esModule") return;
@@ -6812,7 +6823,7 @@ Object.keys(_LiveContextAPI).forEach(function (key) {
6812
6823
  });
6813
6824
  });
6814
6825
 
6815
- },{"./apis":22,"./components":32,"./constants":33,"./lib/AIClientImpl":36,"./lib/JWTProvider":38,"./lib/LiveContextAPI":39,"./lib/Proxy":40,"./lib/userWorkspace":41,"./permissions":42,"./types":43,"./utils":44}],36:[function(require,module,exports){
6826
+ },{"./apis":22,"./components":32,"./constants":33,"./lib/AIClientImpl":36,"./lib/FilesAPIImpl":38,"./lib/JWTProvider":39,"./lib/LiveContextAPI":40,"./lib/Proxy":41,"./lib/userWorkspace":42,"./permissions":43,"./types":44,"./utils":45}],36:[function(require,module,exports){
6816
6827
  "use strict";
6817
6828
 
6818
6829
  Object.defineProperty(exports, "__esModule", {
@@ -7062,6 +7073,90 @@ AsyncServiceLocator.instances = {};
7062
7073
  },{}],38:[function(require,module,exports){
7063
7074
  "use strict";
7064
7075
 
7076
+ Object.defineProperty(exports, "__esModule", {
7077
+ value: true
7078
+ });
7079
+ exports.FilesAPIImpl = void 0;
7080
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
7081
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
7082
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
7083
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
7084
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
7085
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
7086
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
7087
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
7088
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7089
+ var FilesAPIImpl = exports.FilesAPIImpl = /*#__PURE__*/function () {
7090
+ function FilesAPIImpl(osAPIClient) {
7091
+ _classCallCheck(this, FilesAPIImpl);
7092
+ this.osAPIClient = osAPIClient;
7093
+ }
7094
+ return _createClass(FilesAPIImpl, [{
7095
+ key: "stat",
7096
+ value: function () {
7097
+ var _stat = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(os_workspace, path) {
7098
+ var url;
7099
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
7100
+ while (1) switch (_context.prev = _context.next) {
7101
+ case 0:
7102
+ url = path ? "/api/v1/files/stat/".concat(os_workspace, "/").concat(encodeURIComponent(path)) : "/api/v1/files/stat/".concat(os_workspace);
7103
+ return _context.abrupt("return", this.osAPIClient.fetchData({
7104
+ endpoint: url,
7105
+ method: 'GET',
7106
+ headers: {
7107
+ 'Content-Type': 'application/json'
7108
+ }
7109
+ }));
7110
+ case 2:
7111
+ case "end":
7112
+ return _context.stop();
7113
+ }
7114
+ }, _callee, this);
7115
+ }));
7116
+ function stat(_x, _x2) {
7117
+ return _stat.apply(this, arguments);
7118
+ }
7119
+ return stat;
7120
+ }()
7121
+ }, {
7122
+ key: "list_folder",
7123
+ value: function () {
7124
+ var _list_folder = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(os_workspace, path, options) {
7125
+ var params, queryString, url;
7126
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7127
+ while (1) switch (_context2.prev = _context2.next) {
7128
+ case 0:
7129
+ params = new URLSearchParams();
7130
+ if ((options === null || options === void 0 ? void 0 : options.maxFolders) !== undefined) params.append('max_folders', String(options.maxFolders));
7131
+ if ((options === null || options === void 0 ? void 0 : options.maxFiles) !== undefined) params.append('max_files', String(options.maxFiles));
7132
+ if ((options === null || options === void 0 ? void 0 : options.folderOffset) !== undefined) params.append('folder_offset', String(options.folderOffset));
7133
+ if ((options === null || options === void 0 ? void 0 : options.fileOffset) !== undefined) params.append('file_offset', String(options.fileOffset));
7134
+ queryString = params.toString();
7135
+ url = "/api/v1/files/list/".concat(os_workspace).concat(path ? "/".concat(path) : '').concat(queryString ? "?".concat(queryString) : '');
7136
+ return _context2.abrupt("return", this.osAPIClient.fetchData({
7137
+ endpoint: url,
7138
+ method: 'GET',
7139
+ headers: {
7140
+ 'Content-Type': 'application/json'
7141
+ }
7142
+ }));
7143
+ case 8:
7144
+ case "end":
7145
+ return _context2.stop();
7146
+ }
7147
+ }, _callee2, this);
7148
+ }));
7149
+ function list_folder(_x3, _x4, _x5) {
7150
+ return _list_folder.apply(this, arguments);
7151
+ }
7152
+ return list_folder;
7153
+ }()
7154
+ }]);
7155
+ }();
7156
+
7157
+ },{}],39:[function(require,module,exports){
7158
+ "use strict";
7159
+
7065
7160
  Object.defineProperty(exports, "__esModule", {
7066
7161
  value: true
7067
7162
  });
@@ -7145,7 +7240,7 @@ var JWTProvider = exports.JWTProvider = /*#__PURE__*/function () {
7145
7240
  }]);
7146
7241
  }();
7147
7242
 
7148
- },{}],39:[function(require,module,exports){
7243
+ },{}],40:[function(require,module,exports){
7149
7244
  "use strict";
7150
7245
 
7151
7246
  Object.defineProperty(exports, "__esModule", {
@@ -7418,7 +7513,7 @@ var LiveContextAPI = exports.LiveContextAPI = /*#__PURE__*/function () {
7418
7513
  }]);
7419
7514
  }();
7420
7515
 
7421
- },{"post-robot":5,"uuid":6}],40:[function(require,module,exports){
7516
+ },{"post-robot":5,"uuid":6}],41:[function(require,module,exports){
7422
7517
  "use strict";
7423
7518
 
7424
7519
  Object.defineProperty(exports, "__esModule", {
@@ -7453,7 +7548,7 @@ var makeProxy = exports.makeProxy = function makeProxy(obj) {
7453
7548
  return proxyObj;
7454
7549
  };
7455
7550
 
7456
- },{}],41:[function(require,module,exports){
7551
+ },{}],42:[function(require,module,exports){
7457
7552
  "use strict";
7458
7553
 
7459
7554
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -7506,7 +7601,7 @@ var getOrCreateUsersPrivateWorkspaceRecord = exports.getOrCreateUsersPrivateWork
7506
7601
  };
7507
7602
  }();
7508
7603
 
7509
- },{"uuid":6}],42:[function(require,module,exports){
7604
+ },{"uuid":6}],43:[function(require,module,exports){
7510
7605
  "use strict";
7511
7606
 
7512
7607
  Object.defineProperty(exports, "__esModule", {
@@ -7531,14 +7626,14 @@ var ONTOLOGY_PERMISSION_GROUP = exports.ONTOLOGY_PERMISSION_GROUP = 'octostar:on
7531
7626
  var ALL_PERMISSIONS = exports.ALL_PERMISSIONS = 'all';
7532
7627
  var ALL_PERMISSIONS_ARRAY = exports.ALL_PERMISSIONS_ARRAY = [ALL_PERMISSIONS];
7533
7628
 
7534
- },{}],43:[function(require,module,exports){
7629
+ },{}],44:[function(require,module,exports){
7535
7630
  "use strict";
7536
7631
 
7537
7632
  Object.defineProperty(exports, "__esModule", {
7538
7633
  value: true
7539
7634
  });
7540
7635
 
7541
- },{}],44:[function(require,module,exports){
7636
+ },{}],45:[function(require,module,exports){
7542
7637
  "use strict";
7543
7638
 
7544
7639
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octostar/platform-api",
3
- "version": "0.5.20",
3
+ "version": "0.5.21",
4
4
  "description": "Provides access to the API exposed by Octostar platform to an application run in an iframe",
5
5
  "keywords": [
6
6
  "octostar",