@emuanalytics/flow-engine-client 1.3.31 → 1.3.34
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/CHANGELOG.md +57 -0
- package/dist/bundle.js.map +1 -1
- package/esm/index.d.ts +7 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +7 -0
- package/esm/index.js.map +1 -0
- package/esm/lib/api-interfaces.d.ts +207 -0
- package/esm/lib/api-interfaces.d.ts.map +1 -0
- package/esm/lib/api-interfaces.js +5 -0
- package/esm/lib/api-interfaces.js.map +1 -0
- package/esm/lib/apikey.endpoints.d.ts +10 -0
- package/esm/lib/apikey.endpoints.d.ts.map +1 -0
- package/esm/lib/apikey.endpoints.js +28 -0
- package/esm/lib/apikey.endpoints.js.map +1 -0
- package/esm/lib/appconfig.endpoints.d.ts +10 -0
- package/esm/lib/appconfig.endpoints.d.ts.map +1 -0
- package/esm/lib/appconfig.endpoints.js +28 -0
- package/esm/lib/appconfig.endpoints.js.map +1 -0
- package/esm/lib/application.endpoints.d.ts +10 -0
- package/esm/lib/application.endpoints.d.ts.map +1 -0
- package/esm/lib/application.endpoints.js +28 -0
- package/esm/lib/application.endpoints.js.map +1 -0
- package/esm/lib/auth.edpoints.d.ts +19 -0
- package/esm/lib/auth.edpoints.d.ts.map +1 -0
- package/esm/lib/auth.edpoints.js +49 -0
- package/esm/lib/auth.edpoints.js.map +1 -0
- package/esm/lib/base.endpoints.d.ts +20 -0
- package/esm/lib/base.endpoints.d.ts.map +1 -0
- package/esm/lib/base.endpoints.js +71 -0
- package/esm/lib/base.endpoints.js.map +1 -0
- package/esm/lib/client.d.ts +49 -0
- package/esm/lib/client.d.ts.map +1 -0
- package/esm/lib/client.js +142 -0
- package/esm/lib/client.js.map +1 -0
- package/esm/lib/database.endpoints.d.ts +11 -0
- package/esm/lib/database.endpoints.d.ts.map +1 -0
- package/esm/lib/database.endpoints.js +36 -0
- package/esm/lib/database.endpoints.js.map +1 -0
- package/esm/lib/dataset.endpoints.d.ts +22 -0
- package/esm/lib/dataset.endpoints.d.ts.map +1 -0
- package/esm/lib/dataset.endpoints.js +72 -0
- package/esm/lib/dataset.endpoints.js.map +1 -0
- package/esm/lib/errors.d.ts +9 -0
- package/esm/lib/errors.d.ts.map +1 -0
- package/esm/lib/errors.js +33 -0
- package/esm/lib/errors.js.map +1 -0
- package/esm/lib/job.endpoints.d.ts +15 -0
- package/esm/lib/job.endpoints.d.ts.map +1 -0
- package/esm/lib/job.endpoints.js +43 -0
- package/esm/lib/job.endpoints.js.map +1 -0
- package/esm/lib/map.endoints.d.ts +11 -0
- package/esm/lib/map.endoints.d.ts.map +1 -0
- package/esm/lib/map.endoints.js +15 -0
- package/esm/lib/map.endoints.js.map +1 -0
- package/esm/lib/style.endpoint.d.ts +10 -0
- package/esm/lib/style.endpoint.d.ts.map +1 -0
- package/esm/lib/style.endpoint.js +28 -0
- package/esm/lib/style.endpoint.js.map +1 -0
- package/esm/lib/tile-source.endpoints.d.ts +11 -0
- package/esm/lib/tile-source.endpoints.d.ts.map +1 -0
- package/esm/lib/tile-source.endpoints.js +36 -0
- package/esm/lib/tile-source.endpoints.js.map +1 -0
- package/esm/lib/tile.endpoints.d.ts +12 -0
- package/esm/lib/tile.endpoints.d.ts.map +1 -0
- package/esm/lib/tile.endpoints.js +19 -0
- package/esm/lib/tile.endpoints.js.map +1 -0
- package/esm/lib/upload.endpoints.d.ts +23 -0
- package/esm/lib/upload.endpoints.d.ts.map +1 -0
- package/esm/lib/upload.endpoints.js +105 -0
- package/esm/lib/upload.endpoints.js.map +1 -0
- package/esm/lib/user.endpoints.d.ts +11 -0
- package/esm/lib/user.endpoints.d.ts.map +1 -0
- package/esm/lib/user.endpoints.js +33 -0
- package/esm/lib/user.endpoints.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +23 -0
- package/lib/index.js.map +1 -0
- package/lib/lib/api-interfaces.d.ts +207 -0
- package/lib/lib/api-interfaces.d.ts.map +1 -0
- package/lib/lib/api-interfaces.js +6 -0
- package/lib/lib/api-interfaces.js.map +1 -0
- package/lib/lib/apikey.endpoints.d.ts +10 -0
- package/lib/lib/apikey.endpoints.d.ts.map +1 -0
- package/lib/lib/apikey.endpoints.js +31 -0
- package/lib/lib/apikey.endpoints.js.map +1 -0
- package/lib/lib/appconfig.endpoints.d.ts +10 -0
- package/lib/lib/appconfig.endpoints.d.ts.map +1 -0
- package/lib/lib/appconfig.endpoints.js +31 -0
- package/lib/lib/appconfig.endpoints.js.map +1 -0
- package/lib/lib/application.endpoints.d.ts +10 -0
- package/lib/lib/application.endpoints.d.ts.map +1 -0
- package/lib/lib/application.endpoints.js +31 -0
- package/lib/lib/application.endpoints.js.map +1 -0
- package/lib/lib/auth.edpoints.d.ts +19 -0
- package/lib/lib/auth.edpoints.d.ts.map +1 -0
- package/lib/lib/auth.edpoints.js +52 -0
- package/lib/lib/auth.edpoints.js.map +1 -0
- package/lib/lib/base.endpoints.d.ts +20 -0
- package/lib/lib/base.endpoints.d.ts.map +1 -0
- package/lib/lib/base.endpoints.js +74 -0
- package/lib/lib/base.endpoints.js.map +1 -0
- package/lib/lib/client.d.ts +49 -0
- package/lib/lib/client.d.ts.map +1 -0
- package/lib/lib/client.js +148 -0
- package/lib/lib/client.js.map +1 -0
- package/lib/lib/database.endpoints.d.ts +11 -0
- package/lib/lib/database.endpoints.d.ts.map +1 -0
- package/lib/lib/database.endpoints.js +39 -0
- package/lib/lib/database.endpoints.js.map +1 -0
- package/lib/lib/dataset.endpoints.d.ts +22 -0
- package/lib/lib/dataset.endpoints.d.ts.map +1 -0
- package/lib/lib/dataset.endpoints.js +75 -0
- package/lib/lib/dataset.endpoints.js.map +1 -0
- package/lib/lib/errors.d.ts +9 -0
- package/lib/lib/errors.d.ts.map +1 -0
- package/lib/lib/errors.js +36 -0
- package/lib/lib/errors.js.map +1 -0
- package/lib/lib/job.endpoints.d.ts +15 -0
- package/lib/lib/job.endpoints.d.ts.map +1 -0
- package/lib/lib/job.endpoints.js +46 -0
- package/lib/lib/job.endpoints.js.map +1 -0
- package/lib/lib/map.endoints.d.ts +11 -0
- package/lib/lib/map.endoints.d.ts.map +1 -0
- package/lib/lib/map.endoints.js +18 -0
- package/lib/lib/map.endoints.js.map +1 -0
- package/lib/lib/style.endpoint.d.ts +10 -0
- package/lib/lib/style.endpoint.d.ts.map +1 -0
- package/lib/lib/style.endpoint.js +31 -0
- package/lib/lib/style.endpoint.js.map +1 -0
- package/lib/lib/tile-source.endpoints.d.ts +11 -0
- package/lib/lib/tile-source.endpoints.d.ts.map +1 -0
- package/lib/lib/tile-source.endpoints.js +39 -0
- package/lib/lib/tile-source.endpoints.js.map +1 -0
- package/lib/lib/tile.endpoints.d.ts +12 -0
- package/lib/lib/tile.endpoints.d.ts.map +1 -0
- package/lib/lib/tile.endpoints.js +22 -0
- package/lib/lib/tile.endpoints.js.map +1 -0
- package/lib/lib/upload.endpoints.d.ts +23 -0
- package/lib/lib/upload.endpoints.d.ts.map +1 -0
- package/lib/lib/upload.endpoints.js +111 -0
- package/lib/lib/upload.endpoints.js.map +1 -0
- package/lib/lib/user.endpoints.d.ts +11 -0
- package/lib/lib/user.endpoints.d.ts.map +1 -0
- package/lib/lib/user.endpoints.js +36 -0
- package/lib/lib/user.endpoints.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2018 Emu Analytics
|
|
3
|
+
*/
|
|
4
|
+
var TileEndpoints = /** @class */ (function () {
|
|
5
|
+
function TileEndpoints(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
TileEndpoints.prototype.getTileSpec = function (tilesourceId, params) {
|
|
9
|
+
if (params === void 0) { params = {}; }
|
|
10
|
+
return this.client._get("/tiles/".concat(tilesourceId, "/index.json"), { params: params });
|
|
11
|
+
};
|
|
12
|
+
TileEndpoints.prototype.getPreviewStyle = function (tilesourceId, params) {
|
|
13
|
+
if (params === void 0) { params = {}; }
|
|
14
|
+
return this.client._get("/tiles/".concat(tilesourceId, "/style.json"), { params: params });
|
|
15
|
+
};
|
|
16
|
+
return TileEndpoints;
|
|
17
|
+
}());
|
|
18
|
+
export { TileEndpoints };
|
|
19
|
+
//# sourceMappingURL=tile.endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tile.endpoints.js","sourceRoot":"","sources":["../../src/lib/tile.endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;IACE,uBAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C,mCAAW,GAAX,UAAY,YAAoB,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAU,YAAY,gBAAa,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,uCAAe,GAAf,UAAgB,YAAoB,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QACpE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAU,YAAY,gBAAa,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IAC3E,CAAC;IACH,oBAAC;AAAD,CAAC,AAVD,IAUC","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { ITileSpec } from './api-interfaces';\n\nexport class TileEndpoints {\n constructor(private readonly client: Client) {}\n\n getTileSpec(tilesourceId: string, params: Record<string, any> = {}): Promise<ITileSpec> {\n return this.client._get(`/tiles/${tilesourceId}/index.json`, { params });\n }\n\n getPreviewStyle(tilesourceId: string, params: Record<string, any> = {}): Promise<ITileSpec> {\n return this.client._get(`/tiles/${tilesourceId}/style.json`, { params });\n }\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2018 Emu Analytics
|
|
3
|
+
*/
|
|
4
|
+
import { Client } from './client';
|
|
5
|
+
import { BaseEndpoints } from './base.endpoints';
|
|
6
|
+
import { IUpload } from './api-interfaces';
|
|
7
|
+
export interface UploadOptions {
|
|
8
|
+
data: any;
|
|
9
|
+
filename: string;
|
|
10
|
+
datasetId?: string;
|
|
11
|
+
datasetName?: string;
|
|
12
|
+
datasetDescription?: string;
|
|
13
|
+
attribution?: string;
|
|
14
|
+
sourceSrid?: number;
|
|
15
|
+
targetSrid?: number;
|
|
16
|
+
schema?: string;
|
|
17
|
+
progress?: (event: any) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare class UploadEndpoints extends BaseEndpoints<IUpload> {
|
|
20
|
+
constructor(client: Client);
|
|
21
|
+
upload(options: UploadOptions, params?: Record<string, any>): Promise<IUpload>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=upload.endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.endpoints.d.ts","sourceRoot":"","sources":["../../src/lib/upload.endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAK3C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC;AAED,qBAAa,eAAgB,SAAQ,aAAa,CAAC,OAAO,CAAC;gBAC7C,MAAM,EAAE,MAAM;IAIpB,MAAM,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAkCzF"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
27
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (_) try {
|
|
32
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
import { BaseEndpoints } from './base.endpoints';
|
|
53
|
+
import FormData from 'form-data';
|
|
54
|
+
var UploadEndpoints = /** @class */ (function (_super) {
|
|
55
|
+
__extends(UploadEndpoints, _super);
|
|
56
|
+
function UploadEndpoints(client) {
|
|
57
|
+
return _super.call(this, client, 'uploads') || this;
|
|
58
|
+
}
|
|
59
|
+
UploadEndpoints.prototype.upload = function (options, params) {
|
|
60
|
+
if (params === void 0) { params = {}; }
|
|
61
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
62
|
+
var form, upload;
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
switch (_a.label) {
|
|
65
|
+
case 0:
|
|
66
|
+
form = new FormData();
|
|
67
|
+
if (options.datasetName) {
|
|
68
|
+
form.append('name', options.datasetName);
|
|
69
|
+
}
|
|
70
|
+
if (options.datasetDescription) {
|
|
71
|
+
form.append('description', options.datasetDescription);
|
|
72
|
+
}
|
|
73
|
+
if (options.attribution) {
|
|
74
|
+
form.append('attribution', options.attribution);
|
|
75
|
+
}
|
|
76
|
+
if (options.datasetId) {
|
|
77
|
+
form.append('datasetId', options.datasetId);
|
|
78
|
+
}
|
|
79
|
+
if (options.sourceSrid) {
|
|
80
|
+
form.append('sourceSrid', options.sourceSrid);
|
|
81
|
+
}
|
|
82
|
+
if (options.targetSrid) {
|
|
83
|
+
form.append('targetSrid', options.targetSrid);
|
|
84
|
+
}
|
|
85
|
+
if (options.schema) {
|
|
86
|
+
form.append('schema', options.schema);
|
|
87
|
+
}
|
|
88
|
+
form.append('file', options.data, options.filename);
|
|
89
|
+
return [4 /*yield*/, this.client._post(this.resourceEndpoint, form, {
|
|
90
|
+
headers: form.getHeaders(),
|
|
91
|
+
params: params,
|
|
92
|
+
// Note that progress only works in the browser!!
|
|
93
|
+
onUploadProgress: options.progress
|
|
94
|
+
})];
|
|
95
|
+
case 1:
|
|
96
|
+
upload = _a.sent();
|
|
97
|
+
return [2 /*return*/, upload];
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
return UploadEndpoints;
|
|
103
|
+
}(BaseEndpoints));
|
|
104
|
+
export { UploadEndpoints };
|
|
105
|
+
//# sourceMappingURL=upload.endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.endpoints.js","sourceRoot":"","sources":["../../src/lib/upload.endpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,QAAQ,MAAM,WAAW,CAAC;AAiBjC;IAAqC,mCAAsB;IACzD,yBAAY,MAAc;eACxB,kBAAM,MAAM,EAAE,SAAS,CAAC;IAC1B,CAAC;IAEK,gCAAM,GAAZ,UAAa,OAAsB,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;;;;;;wBAC7D,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;wBAC5B,IAAI,OAAO,CAAC,WAAW,EAAE;4BACvB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;yBAC1C;wBACD,IAAI,OAAO,CAAC,kBAAkB,EAAE;4BAC9B,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;yBACxD;wBACD,IAAI,OAAO,CAAC,WAAW,EAAE;4BACvB,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;yBACjD;wBACD,IAAI,OAAO,CAAC,SAAS,EAAE;4BACrB,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;yBAC7C;wBACD,IAAI,OAAO,CAAC,UAAU,EAAE;4BACtB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;yBAC/C;wBACD,IAAI,OAAO,CAAC,UAAU,EAAE;4BACtB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;yBAC/C;wBACD,IAAI,OAAO,CAAC,MAAM,EAAE;4BAClB,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;yBACvC;wBACD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;wBAE5B,qBAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE;gCAC3E,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE;gCAC1B,MAAM,QAAA;gCACN,iDAAiD;gCACjD,gBAAgB,EAAE,OAAO,CAAC,QAAQ;6BACnC,CAAC,EAAA;;wBALI,MAAM,GAAY,SAKtB;wBAEF,sBAAO,MAAM,EAAC;;;;KACf;IACH,sBAAC;AAAD,CAAC,AAvCD,CAAqC,aAAa,GAuCjD","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\nimport { Client } from './client';\nimport { BaseEndpoints } from './base.endpoints';\nimport { IUpload } from './api-interfaces';\nimport FormData from 'form-data';\n\ndeclare var process: any;\n\nexport interface UploadOptions {\n data: any;\n filename: string;\n datasetId?: string;\n datasetName?: string;\n datasetDescription?: string;\n attribution?: string;\n sourceSrid?: number;\n targetSrid?: number;\n schema?: string;\n progress?: (event: any) => void;\n}\n\nexport class UploadEndpoints extends BaseEndpoints<IUpload> {\n constructor(client: Client) {\n super(client, 'uploads');\n }\n\n async upload(options: UploadOptions, params: Record<string, any> = {}): Promise<IUpload> {\n const form = new FormData();\n if (options.datasetName) {\n form.append('name', options.datasetName);\n }\n if (options.datasetDescription) {\n form.append('description', options.datasetDescription);\n }\n if (options.attribution) {\n form.append('attribution', options.attribution);\n }\n if (options.datasetId) {\n form.append('datasetId', options.datasetId);\n }\n if (options.sourceSrid) {\n form.append('sourceSrid', options.sourceSrid);\n }\n if (options.targetSrid) {\n form.append('targetSrid', options.targetSrid);\n }\n if (options.schema) {\n form.append('schema', options.schema);\n }\n form.append('file', options.data, options.filename);\n\n const upload: IUpload = await this.client._post(this.resourceEndpoint, form, {\n headers: form.getHeaders(),\n params,\n // Note that progress only works in the browser!!\n onUploadProgress: options.progress\n });\n\n return upload;\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2018 Emu Analytics
|
|
3
|
+
*/
|
|
4
|
+
import { Client } from './client';
|
|
5
|
+
import { IUser, UsersMeResponse } from './api-interfaces';
|
|
6
|
+
import { BaseEndpoints } from './base.endpoints';
|
|
7
|
+
export declare class UserEndpoint extends BaseEndpoints<IUser> {
|
|
8
|
+
constructor(client: Client);
|
|
9
|
+
me(token: string): Promise<UsersMeResponse>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=user.endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.endpoints.d.ts","sourceRoot":"","sources":["../../src/lib/user.endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAAa,YAAa,SAAQ,aAAa,CAAC,KAAK,CAAC;gBACxC,MAAM,EAAE,MAAM;IAI1B,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAK5C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2018 Emu Analytics
|
|
3
|
+
*/
|
|
4
|
+
var __extends = (this && this.__extends) || (function () {
|
|
5
|
+
var extendStatics = function (d, b) {
|
|
6
|
+
extendStatics = Object.setPrototypeOf ||
|
|
7
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
8
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
9
|
+
return extendStatics(d, b);
|
|
10
|
+
};
|
|
11
|
+
return function (d, b) {
|
|
12
|
+
if (typeof b !== "function" && b !== null)
|
|
13
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
14
|
+
extendStatics(d, b);
|
|
15
|
+
function __() { this.constructor = d; }
|
|
16
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
17
|
+
};
|
|
18
|
+
})();
|
|
19
|
+
import { BaseEndpoints } from './base.endpoints';
|
|
20
|
+
var UserEndpoint = /** @class */ (function (_super) {
|
|
21
|
+
__extends(UserEndpoint, _super);
|
|
22
|
+
function UserEndpoint(client) {
|
|
23
|
+
return _super.call(this, client, 'auth/users') || this;
|
|
24
|
+
}
|
|
25
|
+
UserEndpoint.prototype.me = function (token) {
|
|
26
|
+
return this.client._get("".concat(this.resourceEndpoint, "/me"), {
|
|
27
|
+
headers: { Authorization: "Bearer ".concat(token) }
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
return UserEndpoint;
|
|
31
|
+
}(BaseEndpoints));
|
|
32
|
+
export { UserEndpoint };
|
|
33
|
+
//# sourceMappingURL=user.endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.endpoints.js","sourceRoot":"","sources":["../../src/lib/user.endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;;;;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;IAAkC,gCAAoB;IACpD,sBAAY,MAAc;eACxB,kBAAM,MAAM,EAAE,YAAY,CAAC;IAC7B,CAAC;IAED,yBAAE,GAAF,UAAG,KAAa;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAG,IAAI,CAAC,gBAAgB,QAAK,EAAE;YACrD,OAAO,EAAE,EAAE,aAAa,EAAE,iBAAU,KAAK,CAAE,EAAE;SAC9C,CAAC,CAAC;IACL,CAAC;IACH,mBAAC;AAAD,CAAC,AAVD,CAAkC,aAAa,GAU9C","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { IUser, UsersMeResponse } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\n\nexport class UserEndpoint extends BaseEndpoints<IUser> {\n constructor(client: Client) {\n super(client, 'auth/users');\n }\n\n me(token: string): Promise<UsersMeResponse> {\n return this.client._get(`${this.resourceEndpoint}/me`, {\n headers: { Authorization: `Bearer ${token}` }\n });\n }\n}\n"]}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2022 Emu Analytics
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./lib/client"), exports);
|
|
21
|
+
__exportStar(require("./lib/api-interfaces"), exports);
|
|
22
|
+
__exportStar(require("./lib/errors"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,+CAA6B;AAC7B,uDAAqC;AACrC,+CAA6B","sourcesContent":["/**\n * Copyright © 2022 Emu Analytics\n */\n\nexport * from './lib/client';\nexport * from './lib/api-interfaces';\nexport * from './lib/errors';\n"]}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2018 Emu Analytics
|
|
3
|
+
*/
|
|
4
|
+
export interface IQuery {
|
|
5
|
+
filter?: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
attributes?: string | string[];
|
|
9
|
+
join?: string | string[];
|
|
10
|
+
limit?: number;
|
|
11
|
+
offset?: number;
|
|
12
|
+
sort?: string | string[];
|
|
13
|
+
}
|
|
14
|
+
export interface IBaseResource {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IMetadata {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
export interface IPermissions {
|
|
21
|
+
[key: string]: {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface IApiKey extends IBaseResource {
|
|
26
|
+
applicationId: string;
|
|
27
|
+
application?: IApplication;
|
|
28
|
+
id: string;
|
|
29
|
+
description: string;
|
|
30
|
+
type: 'app' | 'master';
|
|
31
|
+
permissions: IPermissions;
|
|
32
|
+
metadata: IMetadata;
|
|
33
|
+
userId: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
}
|
|
37
|
+
export interface IApplication extends IBaseResource {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
databases?: IDatabase[];
|
|
41
|
+
description: string;
|
|
42
|
+
contact: string;
|
|
43
|
+
metadata: IMetadata;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IAppConfig extends IBaseResource {
|
|
48
|
+
applicationId: string;
|
|
49
|
+
config: object;
|
|
50
|
+
}
|
|
51
|
+
export interface IDatabase extends IBaseResource {
|
|
52
|
+
applicationId: string;
|
|
53
|
+
application?: IApplication;
|
|
54
|
+
id: string;
|
|
55
|
+
type: string;
|
|
56
|
+
name: string;
|
|
57
|
+
default: boolean;
|
|
58
|
+
description: string;
|
|
59
|
+
host: string;
|
|
60
|
+
port: number;
|
|
61
|
+
user: string;
|
|
62
|
+
password: string;
|
|
63
|
+
db: string;
|
|
64
|
+
createdAt: string;
|
|
65
|
+
updatedAt: string;
|
|
66
|
+
}
|
|
67
|
+
export interface IDatasetAttribute {
|
|
68
|
+
attribute: string;
|
|
69
|
+
type: string;
|
|
70
|
+
dbType: string;
|
|
71
|
+
isGeometry?: boolean;
|
|
72
|
+
srid?: number;
|
|
73
|
+
extent?: number[];
|
|
74
|
+
extentLngLat?: number[];
|
|
75
|
+
primaryKey?: boolean;
|
|
76
|
+
default?: string;
|
|
77
|
+
nullable?: boolean;
|
|
78
|
+
description?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface IDataset extends IBaseResource {
|
|
81
|
+
applicationId: string;
|
|
82
|
+
application?: IApplication;
|
|
83
|
+
id: string;
|
|
84
|
+
type: 'table' | 'sql';
|
|
85
|
+
source: string;
|
|
86
|
+
name: string;
|
|
87
|
+
databaseId: string;
|
|
88
|
+
database?: IDatabase;
|
|
89
|
+
description: string;
|
|
90
|
+
bytes: number;
|
|
91
|
+
metadata: IMetadata;
|
|
92
|
+
ownerId: string;
|
|
93
|
+
createdAt: string;
|
|
94
|
+
updatedAt: string;
|
|
95
|
+
attributes: IDatasetAttribute[];
|
|
96
|
+
options?: {
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export declare type FileExportFormat = 'geojson' | 'gpkg' | 'shapefile';
|
|
101
|
+
export interface ITileSource extends IBaseResource {
|
|
102
|
+
applicationId: string;
|
|
103
|
+
application?: IApplication;
|
|
104
|
+
metadata: IMetadata;
|
|
105
|
+
id: string;
|
|
106
|
+
type: string;
|
|
107
|
+
source: string;
|
|
108
|
+
attribution: string;
|
|
109
|
+
minZoom: number;
|
|
110
|
+
maxZoom: number;
|
|
111
|
+
headers: {
|
|
112
|
+
[key: string]: string;
|
|
113
|
+
};
|
|
114
|
+
extentLngLat: number[];
|
|
115
|
+
createdAt: string;
|
|
116
|
+
updatedAt: string;
|
|
117
|
+
}
|
|
118
|
+
export interface IUpload extends IBaseResource {
|
|
119
|
+
id: string;
|
|
120
|
+
fileName: string;
|
|
121
|
+
path: string;
|
|
122
|
+
options: {
|
|
123
|
+
name: string;
|
|
124
|
+
description?: string;
|
|
125
|
+
datasetId: string;
|
|
126
|
+
attribution?: string;
|
|
127
|
+
schema?: string;
|
|
128
|
+
};
|
|
129
|
+
size: number;
|
|
130
|
+
status: string;
|
|
131
|
+
error: {
|
|
132
|
+
message: string;
|
|
133
|
+
stdout: string;
|
|
134
|
+
stderr: string;
|
|
135
|
+
};
|
|
136
|
+
applicationId: string;
|
|
137
|
+
application?: IApplication;
|
|
138
|
+
ownerId: string;
|
|
139
|
+
updatedAt: string;
|
|
140
|
+
createdAt: string;
|
|
141
|
+
}
|
|
142
|
+
export interface IUser extends IBaseResource {
|
|
143
|
+
[key: string]: any;
|
|
144
|
+
}
|
|
145
|
+
export interface IStyle extends IBaseResource {
|
|
146
|
+
[key: string]: any;
|
|
147
|
+
}
|
|
148
|
+
export interface ITileSpec {
|
|
149
|
+
[key: string]: any;
|
|
150
|
+
}
|
|
151
|
+
export interface IConfig {
|
|
152
|
+
version: {
|
|
153
|
+
tag: string;
|
|
154
|
+
hash: string;
|
|
155
|
+
timestamp: number;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
export interface ILoginResponse {
|
|
159
|
+
accessToken: string;
|
|
160
|
+
refreshToken: string;
|
|
161
|
+
}
|
|
162
|
+
export interface ITokenRefreshResponse {
|
|
163
|
+
accessToken: string;
|
|
164
|
+
}
|
|
165
|
+
export interface UsersMeResponse {
|
|
166
|
+
applicationId: string;
|
|
167
|
+
email: string;
|
|
168
|
+
firstName: string;
|
|
169
|
+
id: string;
|
|
170
|
+
lastName: string;
|
|
171
|
+
metadata: object;
|
|
172
|
+
roles: string[];
|
|
173
|
+
}
|
|
174
|
+
export declare type JobStatus = 'pending' | 'processing' | 'done' | 'cancelled' | 'error';
|
|
175
|
+
export interface IJob {
|
|
176
|
+
id: string;
|
|
177
|
+
applicationId: string;
|
|
178
|
+
ownerId?: string;
|
|
179
|
+
metadata: IMetadata;
|
|
180
|
+
type: string;
|
|
181
|
+
name?: string;
|
|
182
|
+
description?: string;
|
|
183
|
+
params: any;
|
|
184
|
+
status: JobStatus;
|
|
185
|
+
error?: object;
|
|
186
|
+
progress?: number;
|
|
187
|
+
progressText?: string;
|
|
188
|
+
datasetId?: string;
|
|
189
|
+
createdAt: string;
|
|
190
|
+
updatedAt: string;
|
|
191
|
+
}
|
|
192
|
+
export interface IJobStatus {
|
|
193
|
+
status?: JobStatus;
|
|
194
|
+
error?: object;
|
|
195
|
+
progress?: number;
|
|
196
|
+
progressText?: string;
|
|
197
|
+
}
|
|
198
|
+
export interface IJobSubmission {
|
|
199
|
+
type: string;
|
|
200
|
+
name?: string;
|
|
201
|
+
description?: string;
|
|
202
|
+
params: any;
|
|
203
|
+
}
|
|
204
|
+
export interface IJobRequest {
|
|
205
|
+
type: string;
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=api-interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-interfaces.d.ts","sourceRoot":"","sources":["../../src/lib/api-interfaces.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,MAAM;IACrB,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC1C;AAED,MAAM,WAAW,OAAQ,SAAQ,aAAa;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC;IACvB,WAAW,EAAE,YAAY,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,EAAE,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sourceRoot":"","sources":["../../src/lib/api-interfaces.ts"],"names":[],"mappings":";AAAA;;GAEG","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nexport interface IQuery {\n filter?: { [key: string]: any };\n attributes?: string | string[];\n join?: string | string[];\n limit?: number;\n offset?: number;\n sort?: string | string[];\n}\n\nexport interface IBaseResource {\n id: string;\n}\n\nexport interface IMetadata {\n [key: string]: any;\n}\n\nexport interface IPermissions {\n [key: string]: { [key: string]: string };\n}\n\nexport interface IApiKey extends IBaseResource {\n applicationId: string;\n application?: IApplication;\n id: string;\n description: string;\n type: 'app' | 'master';\n permissions: IPermissions;\n metadata: IMetadata;\n userId: string;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface IApplication extends IBaseResource {\n id: string;\n name: string;\n databases?: IDatabase[];\n description: string;\n contact: string;\n metadata: IMetadata;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface IAppConfig extends IBaseResource {\n applicationId: string;\n config: object;\n}\n\nexport interface IDatabase extends IBaseResource {\n applicationId: string;\n application?: IApplication;\n id: string;\n type: string;\n name: string;\n default: boolean;\n description: string;\n host: string;\n port: number;\n user: string;\n password: string;\n db: string;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface IDatasetAttribute {\n attribute: string;\n type: string;\n dbType: string;\n isGeometry?: boolean;\n srid?: number;\n extent?: number[];\n extentLngLat?: number[];\n primaryKey?: boolean;\n default?: string;\n nullable?: boolean;\n description?: string;\n}\n\nexport interface IDataset extends IBaseResource {\n applicationId: string;\n application?: IApplication;\n id: string;\n type: 'table' | 'sql';\n source: string;\n name: string;\n databaseId: string;\n database?: IDatabase;\n description: string;\n bytes: number;\n metadata: IMetadata;\n ownerId: string;\n createdAt: string;\n updatedAt: string;\n attributes: IDatasetAttribute[];\n options?: { [key: string]: any };\n}\n\nexport type FileExportFormat = 'geojson' | 'gpkg' | 'shapefile';\n\nexport interface ITileSource extends IBaseResource {\n applicationId: string;\n application?: IApplication;\n metadata: IMetadata;\n id: string;\n type: string;\n source: string;\n attribution: string;\n minZoom: number;\n maxZoom: number;\n headers: { [key: string]: string };\n extentLngLat: number[];\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface IUpload extends IBaseResource {\n id: string;\n fileName: string;\n path: string;\n options: {\n name: string;\n description?: string;\n datasetId: string;\n attribution?: string;\n schema?: string;\n };\n size: number;\n status: string;\n error: { message: string; stdout: string; stderr: string };\n applicationId: string;\n application?: IApplication;\n ownerId: string;\n updatedAt: string;\n createdAt: string;\n}\n\nexport interface IUser extends IBaseResource {\n [key: string]: any;\n}\n\nexport interface IStyle extends IBaseResource {\n [key: string]: any;\n}\n\nexport interface ITileSpec {\n [key: string]: any;\n}\n\nexport interface IConfig {\n version: {\n tag: string;\n hash: string;\n timestamp: number;\n };\n}\n\nexport interface ILoginResponse {\n accessToken: string;\n refreshToken: string;\n}\n\nexport interface ITokenRefreshResponse {\n accessToken: string;\n}\n\nexport interface UsersMeResponse {\n applicationId: string;\n email: string;\n firstName: string;\n id: string;\n lastName: string;\n metadata: object;\n roles: string[];\n}\n\n/* Job resource */\nexport type JobStatus = 'pending' | 'processing' | 'done' | 'cancelled' | 'error';\n\nexport interface IJob {\n id: string;\n applicationId: string;\n ownerId?: string;\n metadata: IMetadata;\n type: string;\n name?: string;\n description?: string;\n params: any;\n status: JobStatus;\n error?: object;\n progress?: number;\n progressText?: string;\n datasetId?: string;\n createdAt: string;\n updatedAt: string;\n}\nexport interface IJobStatus {\n status?: JobStatus;\n error?: object;\n progress?: number;\n progressText?: string;\n}\n\nexport interface IJobSubmission {\n type: string;\n name?: string;\n description?: string;\n params: any;\n}\n\nexport interface IJobRequest {\n type: string;\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2018 Emu Analytics
|
|
3
|
+
*/
|
|
4
|
+
import { Client } from './client';
|
|
5
|
+
import { BaseEndpoints } from './base.endpoints';
|
|
6
|
+
import { IApiKey } from './api-interfaces';
|
|
7
|
+
export declare class ApiKeyEndpoints extends BaseEndpoints<IApiKey> {
|
|
8
|
+
constructor(client: Client);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=apikey.endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apikey.endpoints.d.ts","sourceRoot":"","sources":["../../src/lib/apikey.endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,qBAAa,eAAgB,SAAQ,aAAa,CAAC,OAAO,CAAC;gBAC7C,MAAM,EAAE,MAAM;CAG3B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2018 Emu Analytics
|
|
4
|
+
*/
|
|
5
|
+
var __extends = (this && this.__extends) || (function () {
|
|
6
|
+
var extendStatics = function (d, b) {
|
|
7
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
+
return extendStatics(d, b);
|
|
11
|
+
};
|
|
12
|
+
return function (d, b) {
|
|
13
|
+
if (typeof b !== "function" && b !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
+
extendStatics(d, b);
|
|
16
|
+
function __() { this.constructor = d; }
|
|
17
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.ApiKeyEndpoints = void 0;
|
|
22
|
+
var base_endpoints_1 = require("./base.endpoints");
|
|
23
|
+
var ApiKeyEndpoints = /** @class */ (function (_super) {
|
|
24
|
+
__extends(ApiKeyEndpoints, _super);
|
|
25
|
+
function ApiKeyEndpoints(client) {
|
|
26
|
+
return _super.call(this, client, 'apikeys') || this;
|
|
27
|
+
}
|
|
28
|
+
return ApiKeyEndpoints;
|
|
29
|
+
}(base_endpoints_1.BaseEndpoints));
|
|
30
|
+
exports.ApiKeyEndpoints = ApiKeyEndpoints;
|
|
31
|
+
//# sourceMappingURL=apikey.endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apikey.endpoints.js","sourceRoot":"","sources":["../../src/lib/apikey.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAAqC,mCAAsB;IACzD,yBAAY,MAAc;eACxB,kBAAM,MAAM,EAAE,SAAS,CAAC;IAC1B,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,CAAqC,8BAAa,GAIjD;AAJY,0CAAe","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { BaseEndpoints } from './base.endpoints';\nimport { IApiKey } from './api-interfaces';\n\nexport class ApiKeyEndpoints extends BaseEndpoints<IApiKey> {\n constructor(client: Client) {\n super(client, 'apikeys');\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2018 Emu Analytics
|
|
3
|
+
*/
|
|
4
|
+
import { Client } from './client';
|
|
5
|
+
import { IAppConfig } from './api-interfaces';
|
|
6
|
+
import { BaseEndpoints } from './base.endpoints';
|
|
7
|
+
export declare class AppConfigEndpoints extends BaseEndpoints<IAppConfig> {
|
|
8
|
+
constructor(client: Client);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=appconfig.endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appconfig.endpoints.d.ts","sourceRoot":"","sources":["../../src/lib/appconfig.endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAAa,kBAAmB,SAAQ,aAAa,CAAC,UAAU,CAAC;gBACnD,MAAM,EAAE,MAAM;CAG3B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2018 Emu Analytics
|
|
4
|
+
*/
|
|
5
|
+
var __extends = (this && this.__extends) || (function () {
|
|
6
|
+
var extendStatics = function (d, b) {
|
|
7
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
+
return extendStatics(d, b);
|
|
11
|
+
};
|
|
12
|
+
return function (d, b) {
|
|
13
|
+
if (typeof b !== "function" && b !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
+
extendStatics(d, b);
|
|
16
|
+
function __() { this.constructor = d; }
|
|
17
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.AppConfigEndpoints = void 0;
|
|
22
|
+
var base_endpoints_1 = require("./base.endpoints");
|
|
23
|
+
var AppConfigEndpoints = /** @class */ (function (_super) {
|
|
24
|
+
__extends(AppConfigEndpoints, _super);
|
|
25
|
+
function AppConfigEndpoints(client) {
|
|
26
|
+
return _super.call(this, client, 'appconfig') || this;
|
|
27
|
+
}
|
|
28
|
+
return AppConfigEndpoints;
|
|
29
|
+
}(base_endpoints_1.BaseEndpoints));
|
|
30
|
+
exports.AppConfigEndpoints = AppConfigEndpoints;
|
|
31
|
+
//# sourceMappingURL=appconfig.endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appconfig.endpoints.js","sourceRoot":"","sources":["../../src/lib/appconfig.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAIH,mDAAiD;AAEjD;IAAwC,sCAAyB;IAC/D,4BAAY,MAAc;eACxB,kBAAM,MAAM,EAAE,WAAW,CAAC;IAC5B,CAAC;IACH,yBAAC;AAAD,CAAC,AAJD,CAAwC,8BAAa,GAIpD;AAJY,gDAAkB","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { IAppConfig } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\n\nexport class AppConfigEndpoints extends BaseEndpoints<IAppConfig> {\n constructor(client: Client) {\n super(client, 'appconfig');\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2018 Emu Analytics
|
|
3
|
+
*/
|
|
4
|
+
import { Client } from './client';
|
|
5
|
+
import { BaseEndpoints } from './base.endpoints';
|
|
6
|
+
import { IApplication } from './api-interfaces';
|
|
7
|
+
export declare class ApplicationEndpoints extends BaseEndpoints<IApplication> {
|
|
8
|
+
constructor(client: Client);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=application.endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application.endpoints.d.ts","sourceRoot":"","sources":["../../src/lib/application.endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qBAAa,oBAAqB,SAAQ,aAAa,CAAC,YAAY,CAAC;gBACvD,MAAM,EAAE,MAAM;CAG3B"}
|