@emuanalytics/flow-engine-client 1.3.137 → 1.3.153
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/bundle.js +2 -2
- package/dist/bundle.js.map +4 -4
- package/dist/cjs/lib/__mocks__/client.js +57 -0
- package/dist/cjs/lib/__mocks__/client.js.map +1 -0
- package/dist/cjs/lib/api-interfaces.js.map +1 -1
- package/dist/cjs/lib/apikey.endpoints.js.map +1 -1
- package/dist/cjs/lib/appconfig.endpoints.js.map +1 -1
- package/dist/cjs/lib/application.endpoints.js.map +1 -1
- package/dist/cjs/lib/auth.edpoints.js.map +1 -1
- package/dist/cjs/lib/base.endpoints.js.map +1 -1
- package/dist/cjs/lib/client.js +2 -0
- package/dist/cjs/lib/client.js.map +1 -1
- package/dist/cjs/lib/database.endpoints.js.map +1 -1
- package/dist/cjs/lib/dataset.endpoints.js.map +1 -1
- package/dist/cjs/lib/errors.js.map +1 -1
- package/dist/cjs/lib/job.endpoints.js.map +1 -1
- package/dist/cjs/lib/maplayer.endpoints.js.map +1 -1
- package/dist/cjs/lib/pipeline-component.endpoints.js +37 -0
- package/dist/cjs/lib/pipeline-component.endpoints.js.map +1 -0
- package/dist/cjs/lib/pipeline-metric.endpoint.js +31 -0
- package/dist/cjs/lib/pipeline-metric.endpoint.js.map +1 -0
- package/dist/cjs/lib/pipeline.endpoints.js +87 -0
- package/dist/cjs/lib/pipeline.endpoints.js.map +1 -0
- package/dist/cjs/lib/style.endpoint.js.map +1 -1
- package/dist/cjs/lib/tile-source.endpoints.js.map +1 -1
- package/dist/cjs/lib/upload.endpoints.js +7 -7
- package/dist/cjs/lib/upload.endpoints.js.map +1 -1
- package/dist/cjs/lib/user.endpoints.js.map +1 -1
- package/dist/cjs/lib/web-socket-gateway.js +1 -1
- package/dist/cjs/lib/web-socket-gateway.js.map +1 -1
- package/dist/esm/lib/__mocks__/client.js +54 -0
- package/dist/esm/lib/__mocks__/client.js.map +1 -0
- package/dist/esm/lib/api-interfaces.js.map +1 -1
- package/dist/esm/lib/apikey.endpoints.js.map +1 -1
- package/dist/esm/lib/appconfig.endpoints.js.map +1 -1
- package/dist/esm/lib/application.endpoints.js.map +1 -1
- package/dist/esm/lib/auth.edpoints.js.map +1 -1
- package/dist/esm/lib/base.endpoints.js.map +1 -1
- package/dist/esm/lib/client.js +2 -0
- package/dist/esm/lib/client.js.map +1 -1
- package/dist/esm/lib/database.endpoints.js.map +1 -1
- package/dist/esm/lib/dataset.endpoints.js.map +1 -1
- package/dist/esm/lib/errors.js.map +1 -1
- package/dist/esm/lib/job.endpoints.js.map +1 -1
- package/dist/esm/lib/maplayer.endpoints.js.map +1 -1
- package/dist/esm/lib/pipeline-component.endpoints.js +34 -0
- package/dist/esm/lib/pipeline-component.endpoints.js.map +1 -0
- package/dist/esm/lib/pipeline-metric.endpoint.js +28 -0
- package/dist/esm/lib/pipeline-metric.endpoint.js.map +1 -0
- package/dist/esm/lib/pipeline.endpoints.js +84 -0
- package/dist/esm/lib/pipeline.endpoints.js.map +1 -0
- package/dist/esm/lib/style.endpoint.js.map +1 -1
- package/dist/esm/lib/tile-source.endpoints.js.map +1 -1
- package/dist/esm/lib/upload.endpoints.js +7 -7
- package/dist/esm/lib/upload.endpoints.js.map +1 -1
- package/dist/esm/lib/user.endpoints.js.map +1 -1
- package/dist/esm/lib/web-socket-gateway.js.map +1 -1
- package/dist/types/lib/__mocks__/client.d.ts +3 -0
- package/dist/types/lib/__mocks__/client.d.ts.map +1 -0
- package/dist/types/lib/api-interfaces.d.ts +46 -3
- package/dist/types/lib/api-interfaces.d.ts.map +1 -1
- package/dist/types/lib/client.d.ts +3 -1
- package/dist/types/lib/client.d.ts.map +1 -1
- package/dist/types/lib/dataset.endpoints.d.ts +1 -1
- package/dist/types/lib/dataset.endpoints.d.ts.map +1 -1
- package/dist/types/lib/pipeline-component.endpoints.d.ts +13 -0
- package/dist/types/lib/pipeline-component.endpoints.d.ts.map +1 -0
- package/dist/types/lib/pipeline-metric.endpoint.d.ts +10 -0
- package/dist/types/lib/pipeline-metric.endpoint.d.ts.map +1 -0
- package/dist/types/lib/pipeline.endpoints.d.ts +14 -0
- package/dist/types/lib/pipeline.endpoints.d.ts.map +1 -0
- package/dist/types/lib/web-socket-gateway.d.ts +6 -6
- package/dist/types/lib/web-socket-gateway.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Client = void 0;
|
|
15
|
+
var client_1 = require("../client");
|
|
16
|
+
client_1.Client.prototype._get = function (path, options) {
|
|
17
|
+
var _a;
|
|
18
|
+
if (options === void 0) { options = {}; }
|
|
19
|
+
// Move apiKey from params
|
|
20
|
+
if ((_a = options.params) === null || _a === void 0 ? void 0 : _a.apiKey) {
|
|
21
|
+
options.apiKey = options.params.apiKey;
|
|
22
|
+
delete options.params.apiKey;
|
|
23
|
+
}
|
|
24
|
+
return __assign(__assign({ method: 'get', url: path }, options), this.headers(options));
|
|
25
|
+
};
|
|
26
|
+
client_1.Client.prototype._post = function (path, data, options) {
|
|
27
|
+
var _a;
|
|
28
|
+
if (options === void 0) { options = {}; }
|
|
29
|
+
// Move apiKey from params
|
|
30
|
+
if ((_a = options.params) === null || _a === void 0 ? void 0 : _a.apiKey) {
|
|
31
|
+
options.apiKey = options.params.apiKey;
|
|
32
|
+
delete options.params.apiKey;
|
|
33
|
+
}
|
|
34
|
+
return __assign(__assign({ method: 'post', url: path, data: data }, options), this.headers(options));
|
|
35
|
+
};
|
|
36
|
+
client_1.Client.prototype._put = function (path, data, options) {
|
|
37
|
+
var _a;
|
|
38
|
+
if (options === void 0) { options = {}; }
|
|
39
|
+
// Move apiKey from params
|
|
40
|
+
if ((_a = options.params) === null || _a === void 0 ? void 0 : _a.apiKey) {
|
|
41
|
+
options.apiKey = options.params.apiKey;
|
|
42
|
+
delete options.params.apiKey;
|
|
43
|
+
}
|
|
44
|
+
return __assign(__assign({ method: 'put', url: path, data: data }, options), this.headers(options));
|
|
45
|
+
};
|
|
46
|
+
client_1.Client.prototype._delete = function (path, options) {
|
|
47
|
+
var _a;
|
|
48
|
+
if (options === void 0) { options = {}; }
|
|
49
|
+
// Move apiKey from params
|
|
50
|
+
if ((_a = options.params) === null || _a === void 0 ? void 0 : _a.apiKey) {
|
|
51
|
+
options.apiKey = options.params.apiKey;
|
|
52
|
+
delete options.params.apiKey;
|
|
53
|
+
}
|
|
54
|
+
return __assign(__assign({ method: 'delete', url: path }, options), this.headers(options));
|
|
55
|
+
};
|
|
56
|
+
exports.Client = client_1.Client;
|
|
57
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/lib/__mocks__/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,oCAAiD;AAEjD,eAAU,CAAC,SAAS,CAAC,IAAI,GAAG,UAAS,IAAY,EAAE,OAAiB;;IAAjB,wBAAA,EAAA,YAAiB;IAClE,0BAA0B;IAC1B,IAAI,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;QACvC,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;IAC/B,CAAC;IAED,2BACE,MAAM,EAAE,KAAK,EACb,GAAG,EAAE,IAA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AC;QACvC,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;IAC/B,CAAC;IAED,2BACE,MAAM,EAAE,QAAQ,EAChB,GAAG,EAAE,IAAI,IACN,OAAO,GACN,IAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EACjC;AACJ,CAAC,CAAC;AAEW,QAAA,MAAM,GAAG,eAAU,CAAC","sourcesContent":["import { Client as MockClient } from '../client';\n\nMockClient.prototype._get = function(path: string, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return {\n method: 'get',\n url: path,\n ...options,\n ...(this as any).headers(options)\n };\n};\n\nMockClient.prototype._post = function(path: string, data: object, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return {\n method: 'post',\n url: path,\n data,\n ...options,\n ...(this as any).headers(options)\n };\n};\n\nMockClient.prototype._put = function(path: string, data: object, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return {\n method: 'put',\n url: path,\n data,\n ...options,\n ...(this as any).headers(options)\n };\n};\n\nMockClient.prototype._delete = function(path: string, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return {\n method: 'delete',\n url: path,\n ...options,\n ...(this as any).headers(options)\n };\n};\n\nexport const Client = MockClient;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-interfaces.js","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}\nexport interface IMapLayer extends IBaseResource {\n applicationId: string;\n application?: IApplication;\n ownerId: string;\n createdAt: string;\n updatedAt: string;\n\n id: string;\n name: string;\n description: string;\n layerSpec: any;\n type: string;\n group: string;\n metadata: IMetadata;\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\nexport type IngestAction = 'insert' | 'upsert' | 'delete';\nexport interface IIngestMessage {\n datasetId: string;\n action: IngestAction;\n data: any;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"api-interfaces.js","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}\nexport interface IMapLayer extends IBaseResource {\n applicationId: string;\n application?: IApplication;\n ownerId: string;\n createdAt: string;\n updatedAt: string;\n\n id: string;\n name: string;\n description: string;\n layerSpec: any;\n type: string;\n group: string;\n metadata: IMetadata;\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\nexport type IngestAction = 'insert' | 'upsert' | 'delete';\nexport interface IIngestMessage {\n datasetId: string;\n action: IngestAction;\n data: any;\n}\n\nexport interface IPipeline extends IBaseResource {\n applicationId: string;\n application?: IApplication;\n id: string;\n environment: string;\n description: string;\n config: Record<string, any>;\n type: 'app' | 'master';\n metadata: IMetadata;\n startedAt: string;\n heartbeatAt: string;\n createdAt: string;\n updatedAt: string;\n components: IPipelineComponent[];\n}\n\nexport interface IPipelineComponent extends IBaseResource {\n applicationId: string;\n application?: IApplication;\n pipelineId: string;\n pipeline?: IPipeline;\n id: string;\n description: string;\n config: Record<string, any>;\n type: 'app' | 'master';\n metadata: IMetadata;\n createdAt: string;\n updatedAt: string;\n metrics: IPipelineMetric[];\n}\n\nexport interface IPipelineMetric extends IBaseResource {\n applicationId: string;\n application?: IApplication;\n pipelineId: string;\n pipeline?: IPipeline;\n componentId: string;\n component?: IPipelineComponent;\n name: string;\n timestamp: string;\n value: number;\n labels: Record<string, string>;\n createdAt: string;\n updatedAt: string;\n}\n"]}
|
|
@@ -1 +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;
|
|
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;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,SAAS,CAAC,SAAC;IAC3B,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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appconfig.endpoints.js","sourceRoot":"","sources":["../../../src/lib/appconfig.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAKH;IACE,4BAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C,sBAAY,gDAAgB;aAA5B;YACE,OAAO,mBAAmB,CAAC;QAC7B,CAAC;;;OAAA;IAED,gCAAG,GAAH,UAAI,IAAa,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QACjD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,UAAG,IAAI,CAAC,gBAAgB,cAAI,IAAI,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,gCAAG,GAAH,UAAI,IAAmB,EAAE,KAAU,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QACnE,kCAAkC;QAClC,IACE,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,SAAS;YAC1B,KAAK,KAAK,IAAI;YACd,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EACpB;
|
|
1
|
+
{"version":3,"file":"appconfig.endpoints.js","sourceRoot":"","sources":["../../../src/lib/appconfig.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAKH;IACE,4BAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C,sBAAY,gDAAgB;aAA5B;YACE,OAAO,mBAAmB,CAAC;QAC7B,CAAC;;;OAAA;IAED,gCAAG,GAAH,UAAI,IAAa,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QACjD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,UAAG,IAAI,CAAC,gBAAgB,cAAI,IAAI,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,gCAAG,GAAH,UAAI,IAAmB,EAAE,KAAU,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QACnE,kCAAkC;QAClC,IACE,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,SAAS;YAC1B,KAAK,KAAK,IAAI;YACd,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EACpB,CAAC;YACD,KAAK,GAAG,EAAE,KAAK,OAAA,EAAE,CAAC;QACpB,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,UAAG,IAAI,CAAC,gBAAgB,cAAI,IAAI,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,EAAE;YAChG,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,MAAM,QAAA;SACP,CAAC,CAAC;IACL,CAAC;IAED,mCAAM,GAAN,UAAO,IAAY,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAG,IAAI,CAAC,gBAAgB,cAAI,IAAI,CAAE,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,sCAAS,GAAT,UAAU,EAA8B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACjD,CAAC;IACH,yBAAC;AAAD,CAAC,AAtCD,IAsCC;AAtCY,gDAAkB","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { WebSocketSubscribeCallback, WebSocketUnsubscriber } from './web-socket-gateway';\n\nexport class AppConfigEndpoints {\n constructor(private readonly client: Client) {}\n\n private get resourceEndpoint(): string {\n return `/api/v1/appconfig`;\n }\n\n get(path?: string, params: Record<string, any> = {}): Promise<any> {\n return this.client._get(path ? `${this.resourceEndpoint}/${path}` : this.resourceEndpoint, { params });\n }\n\n set(path: string | null, value: any, params: Record<string, any> = {}): Promise<any> {\n // Wrap primitives in value object\n if (\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n value === null ||\n Array.isArray(value)\n ) {\n value = { value };\n }\n\n return this.client._put(path ? `${this.resourceEndpoint}/${path}` : this.resourceEndpoint, value, {\n headers: {\n 'Content-Type': 'application/json'\n },\n params\n });\n }\n\n delete(path: string, params: Record<string, any> = {}): Promise<any> {\n return this.client._delete(`${this.resourceEndpoint}/${path}`, { params });\n }\n\n subscribe(cb: WebSocketSubscribeCallback): WebSocketUnsubscriber {\n return this.client._subscribe('appconfig', cb);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.endpoints.js","sourceRoot":"","sources":["../../../src/lib/application.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAA0C,wCAA2B;IACnE,8BAAY,MAAc;
|
|
1
|
+
{"version":3,"file":"application.endpoints.js","sourceRoot":"","sources":["../../../src/lib/application.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAA0C,wCAA2B;IACnE,8BAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,cAAc,CAAC,SAAC;IAChC,CAAC;IACH,2BAAC;AAAD,CAAC,AAJD,CAA0C,8BAAa,GAItD;AAJY,oDAAoB","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { BaseEndpoints } from './base.endpoints';\nimport { IApplication } from './api-interfaces';\n\nexport class ApplicationEndpoints extends BaseEndpoints<IApplication> {\n constructor(client: Client) {\n super(client, 'applications');\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.edpoints.js","sourceRoot":"","sources":["../../../src/lib/auth.edpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,mDAAgD;AAEhD;IAGE,uBAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAF3C,UAAK,GAAG,IAAI,6BAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEQ,CAAC;IAE/C,6BAAK,GAAL,UAAM,KAAa,EAAE,QAAgB,EAAE,aAAsB;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,EAAE,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,EAAE,aAAa,eAAA,EAAE,CAAC,CAAC;IACrF,CAAC;IAED,8BAAM,GAAN,UAAO,WAAmB,EAAE,YAAoB;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,qBAAqB,EACrB,EAAE,YAAY,cAAA,EAAE,EAChB;YACE,OAAO,EAAE,EAAE,aAAa,EAAE,iBAAU,WAAW,CAAE,EAAE;SACpD,CACF,CAAC;IACJ,CAAC;IAED,+BAAO,GAAP,UAAQ,YAAoB,EAAE,aAAqB;QACjD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,YAAY,cAAA,EAAE,aAAa,eAAA,EAAE,CAAC,CAAC;IACpF,CAAC;IAED,sCAAc,GAAd,UAAe,QAAgB,EAAE,WAAmB,EAAE,KAAa;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,6BAA6B,EAC7B;YACE,QAAQ,UAAA;YACR,WAAW,aAAA;SACZ,EACD;YACE,OAAO,EAAE,EAAE,aAAa,EAAE,iBAAU,KAAK,CAAE,EAAE;SAC9C,CACF,CAAC;IACJ,CAAC;IAED,8BAAM,GAAN,UACE,SAAiB,EACjB,QAAgB,EAChB,KAAa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ics\n */\n\nimport { ILoginResponse, ITokenRefreshResponse } from './api-interfaces';\nimport { Client } from './client';\nimport { UserEndpoint } from './user.endpoints';\n\nexport class AuthEndpoints {\n users = new UserEndpoint(this.client);\n\n constructor(private readonly client: Client) {}\n\n login(email: string, password: string, applicationId?: string): Promise<ILoginResponse> {\n return this.client._post('/api/v1/auth/login', { email, password, applicationId });\n }\n\n logout(accessToken: string, refreshToken: string): Promise<void> {\n return this.client._post(\n '/api/v1/auth/logout',\n { refreshToken },\n {\n headers: { Authorization: `Bearer ${accessToken}` }\n }\n );\n }\n\n refresh(refreshToken: string, applicationId: string): Promise<ITokenRefreshResponse> {\n return this.client._post('/api/v1/auth/refresh', { refreshToken, applicationId });\n }\n\n changePassword(password: string, newPassword: string, token: string): Promise<void> {\n return this.client._post(\n '/api/v1/auth/changepassword',\n {\n password,\n newPassword\n },\n {\n headers: { Authorization: `Bearer ${token}` }\n }\n );\n }\n\n signUp(\n firstName: string,\n lastName: string,\n email: string,\n password: string,\n applicationId: string,\n confirmUrl: string,\n redirectUrl?: string\n ): Promise<void> {\n // Support legacy signature, which was missing confirmUrl\n if (!redirectUrl) {\n redirectUrl = confirmUrl;\n confirmUrl = `${this.client.baseUrl}/api/v1/auth/confirmsignup`;\n }\n\n return this.client._post('/api/v1/auth/signup', {\n firstName,\n lastName,\n email,\n password,\n applicationId,\n confirmUrl,\n redirectUrl\n });\n }\n\n confirmSignUp(email: string, token: string, redirect?: string): Promise<void> {\n return this.client._get(`/api/v1/auth/confirmsignup`, { params: { email, token, redirect } });\n }\n\n requestPasswordReset(email: string, applicationId: string, redirectUrl: string): Promise<void> {\n return this.client._post('/api/v1/auth/requestpasswordreset', { email, applicationId, redirectUrl });\n }\n\n resetPassword(email: string, password: string, applicationId: string, token: string): Promise<void> {\n return this.client._post('/api/v1/auth/resetpassword', { email, password, applicationId, token });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.endpoints.js","sourceRoot":"","sources":["../../../src/lib/base.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAKH;IACE,uBAA+B,MAAc,EAAmB,YAAoB;QAArD,WAAM,GAAN,MAAM,CAAQ;QAAmB,iBAAY,GAAZ,YAAY,CAAQ;IAAG,CAAC;IAExF,sBAAc,2CAAgB;aAA9B;YACE,OAAO,kBAAW,IAAI,CAAC,YAAY,CAAE,CAAC;QACxC,CAAC;;;OAAA;IAED,4BAAI,GAAJ,UAAK,MAAe;QAClB,mCAAmC;QACnC,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"base.endpoints.js","sourceRoot":"","sources":["../../../src/lib/base.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAKH;IACE,uBAA+B,MAAc,EAAmB,YAAoB;QAArD,WAAM,GAAN,MAAM,CAAQ;QAAmB,iBAAY,GAAZ,YAAY,CAAQ;IAAG,CAAC;IAExF,sBAAc,2CAAgB;aAA9B;YACE,OAAO,kBAAW,IAAI,CAAC,YAAY,CAAE,CAAC;QACxC,CAAC;;;OAAA;IAED,4BAAI,GAAJ,UAAK,MAAe;QAClB,mCAAmC;QACnC,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,EAAE,CAAC;YACnB,IAAM,QAAM,GAAG,MAAM,CAAC,MAAM,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG;gBAC5B,MAAc,CAAC,iBAAU,GAAG,MAAG,CAAC,GAAG,QAAM,CAAC,GAAG,CAAC,CAAC;YAClD,CAAC,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,MAAM,CAAC;QACvB,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,2BAAG,GAAH,UAAI,EA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IAChD,CAAC;IAED,mCAAW,GAAX,UAAY,EAAU,EAAE,GAAW,EAAE,KAAU,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QAC/E,kCAAkC;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;YACzF,KAAK,GAAG,EAAE,KAAK,OAAA,EAAE,CAAC;QACpB,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAG,IAAI,CAAC,gBAAgB,cAAI,EAAE,uBAAa,GAAG,CAAE,EAAE,KAAK,EAAE;YAC/E,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,MAAM,QAAA;SACP,CAAC,CAAC;IACL,CAAC;IAED,sCAAc,GAAd,UAAe,EAAU,EAAE,GAAW,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QACtE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAG,IAAI,CAAC,gBAAgB,cAAI,EAAE,uBAAa,GAAG,CAAE,EAAE;YAC3E,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,MAAM,QAAA;SACP,CAAC,CAAC;IACL,CAAC;IACH,oBAAC;AAAD,CAAC,AAjED,IAiEC;AAjEY,sCAAa","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { IBaseResource, IQuery } from './api-interfaces';\n\nexport class BaseEndpoints<T extends IBaseResource> {\n constructor(protected readonly client: Client, private readonly resourcePath: string) {}\n\n protected get resourceEndpoint(): string {\n return `/api/v1/${this.resourcePath}`;\n }\n\n list(params?: IQuery): Promise<T[]> {\n // Reformat filter for query string\n if (params?.filter) {\n const filter = params.filter;\n Object.keys(filter).forEach(key => {\n (params as any)[`filter[${key}]`] = filter[key];\n });\n delete params.filter;\n }\n\n return this.client._get(this.resourceEndpoint, { params });\n }\n\n get(id: string, params: Record<string, any> = {}): Promise<T> {\n return this.client._get(`${this.resourceEndpoint}/${id}`, { params });\n }\n\n create(data: Partial<T>, params: Record<string, any> = {}): Promise<T> {\n return this.client._post(`${this.resourceEndpoint}`, data, { params });\n }\n\n update(id: string, data: Partial<T>, params: Record<string, any> = {}): Promise<T> {\n return this.client._put(`${this.resourceEndpoint}/${id}`, data, { params });\n }\n\n delete(id: string, params: Record<string, any> = {}) {\n return this.client._delete(`${this.resourceEndpoint}/${id}`, { params });\n }\n\n getMetadata(id: string, key?: string, params: Record<string, any> = {}): Promise<any> {\n const endpoint = key\n ? `${this.resourceEndpoint}/${id}/metadata/${key}`\n : `${this.resourceEndpoint}/${id}/metadata`;\n return this.client._get(endpoint, { params });\n }\n\n setMetadata(id: string, key: string, value: any, params: Record<string, any> = {}): Promise<any> {\n // Wrap primitives in value object\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n value = { value };\n }\n\n return this.client._put(`${this.resourceEndpoint}/${id}/metadata/${key}`, value, {\n headers: {\n 'Content-Type': 'application/json'\n },\n params\n });\n }\n\n deleteMetadata(id: string, key: string, params: Record<string, any> = {}): Promise<any> {\n return this.client._delete(`${this.resourceEndpoint}/${id}/metadata/${key}`, {\n headers: {\n 'Content-Type': 'application/json'\n },\n params\n });\n }\n}\n"]}
|
package/dist/cjs/lib/client.js
CHANGED
|
@@ -30,6 +30,7 @@ var errors_1 = require("./errors");
|
|
|
30
30
|
var job_endpoints_1 = require("./job.endpoints");
|
|
31
31
|
var map_endoints_1 = require("./map.endoints");
|
|
32
32
|
var maplayer_endpoints_1 = require("./maplayer.endpoints");
|
|
33
|
+
var pipeline_endpoints_1 = require("./pipeline.endpoints");
|
|
33
34
|
var style_endpoint_1 = require("./style.endpoint");
|
|
34
35
|
var tile_source_endpoints_1 = require("./tile-source.endpoints");
|
|
35
36
|
var tile_endpoints_1 = require("./tile.endpoints");
|
|
@@ -55,6 +56,7 @@ var Client = /** @class */ (function () {
|
|
|
55
56
|
this.uploads = new upload_endpoints_1.UploadEndpoints(this);
|
|
56
57
|
this.jobs = new job_endpoints_1.JobEndpoints(this);
|
|
57
58
|
this.maplayers = new maplayer_endpoints_1.MapLayerEndpoints(this);
|
|
59
|
+
this.pipelines = new pipeline_endpoints_1.PipelineEndpoints(this);
|
|
58
60
|
this.axios = axios_1.default.create({
|
|
59
61
|
baseURL: baseUrl,
|
|
60
62
|
maxContentLength: 524288000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/lib/client.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAEH,gDAAyD;AACzD,gDAA0B;AAE1B,uDAAqD;AACrD,6DAA2D;AAC3D,iEAA+D;AAC/D,iDAAgD;AAChD,2DAAyD;AACzD,yDAAuD;AACvD,mCAA2C;AAC3C,iDAA+C;AAC/C,+CAA8C;AAC9C,2DAAyD;AACzD,mDAAkD;AAClD,iEAA8D;AAC9D,mDAAiD;AACjD,uDAAqD;AACrD,2DAM8B;AAI9B;IAsBE,gBAAmB,OAAe,EAAkB,MAA4B,EAAE,OAAuB;QAArD,uBAAA,EAAA,aAA4B;QAA7D,YAAO,GAAP,OAAO,CAAQ;QAAkB,WAAM,GAAN,MAAM,CAAsB;QApBvE,UAAK,GAAG,IAAA,eAAK,EAAC,oBAAoB,CAAC,CAAC;QAI7C,gBAAW,GAAkB,IAAI,CAAC;QAElC,SAAI,GAAG,IAAI,6BAAa,CAAC,IAAI,CAAC,CAAC;QAC/B,UAAK,GAAG,IAAI,8BAAa,CAAC,IAAI,CAAC,CAAC;QAChC,SAAI,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,CAAC;QAC9B,YAAO,GAAG,IAAI,kCAAe,CAAC,IAAI,CAAC,CAAC;QACpC,iBAAY,GAAG,IAAI,4CAAoB,CAAC,IAAI,CAAC,CAAC;QAC9C,cAAS,GAAG,IAAI,wCAAkB,CAAC,IAAI,C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UAAgB,OAAY;QAC1B,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QAEtC,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE;YACjC,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;SACtD;QAED,2EAA2E;QAC3E,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,iBAAU,IAAI,CAAC,WAAW,CAAE,CAAC;SAC/E;QAED,OAAO,EAAE,OAAO,SAAA,EAAE,CAAC;IACrB,CAAC;IACH,aAAC;AAAD,CAAC,AA1LD,IA0LC;AA1LY,wBAAM","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport Axios, { AxiosError, AxiosInstance } from 'axios';\nimport Debug from 'debug';\nimport { IConfig } from './api-interfaces';\nimport { ApiKeyEndpoints } from './apikey.endpoints';\nimport { AppConfigEndpoints } from './appconfig.endpoints';\nimport { ApplicationEndpoints } from './application.endpoints';\nimport { AuthEndpoints } from './auth.edpoints';\nimport { DatabaseEndpoints } from './database.endpoints';\nimport { DatasetEndpoints } from './dataset.endpoints';\nimport { FlowEngineError } from './errors';\nimport { JobEndpoints } from './job.endpoints';\nimport { MapEndpoints } from './map.endoints';\nimport { MapLayerEndpoints } from './maplayer.endpoints';\nimport { StyleEndpoints } from './style.endpoint';\nimport { TileSourceEndpoints } from './tile-source.endpoints';\nimport { TileEndpoints } from './tile.endpoints';\nimport { UploadEndpoints } from './upload.endpoints';\nimport {\n WebSocketGateway,\n WebSocketManagerOptions,\n WebSocketSubscribeCallback,\n WebSocketUnsubscribeCallback,\n WebSocketUnsubscriber\n} from './web-socket-gateway';\n\nexport type ClientOptions = WebSocketManagerOptions;\n\nexport class Client {\n private readonly axios: AxiosInstance;\n readonly debug = Debug('flow-engine-client');\n\n public webSocketGateway: WebSocketGateway;\n\n accessToken: string | null = null;\n\n auth = new AuthEndpoints(this);\n tiles = new TileEndpoints(this);\n maps = new MapEndpoints(this);\n apiKeys = new ApiKeyEndpoints(this);\n applications = new ApplicationEndpoints(this);\n appconfig = new AppConfigEndpoints(this);\n databases = new DatabaseEndpoints(this);\n datasets = new DatasetEndpoints(this);\n styles = new StyleEndpoints(this);\n tileSources = new TileSourceEndpoints(this);\n uploads = new UploadEndpoints(this);\n jobs = new JobEndpoints(this);\n maplayers = new MapLayerEndpoints(this);\n\n constructor(public baseUrl: string, public readonly apiKey: string | null = null, options?: ClientOptions) {\n this.axios = Axios.create({\n baseURL: baseUrl,\n maxContentLength: 524288000,\n transformResponse: [\n function transformResponse(data, headers) {\n if (headers?.['content-type']?.startsWith('application/json')) {\n // Force parsing of data if expected content type is JSON\n // This ensures that errors are thrown if JSON is truncated due to a query timeout\n // (default Axios behavior is simply to return a string if JSON parsing fails)\n return JSON.parse(data);\n }\n\n return data;\n }\n ]\n });\n\n this.webSocketGateway = new WebSocketGateway(this, options);\n }\n\n connect(): Promise<void> {\n return this.webSocketGateway.connect();\n }\n\n disconnect(): Promise<void> {\n return this.webSocketGateway.disconnect();\n }\n\n config(): Promise<IConfig> {\n return this._get('/api/v1/config');\n }\n\n _get(path: string, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return this.axios({\n method: 'get',\n url: path,\n ...options,\n ...this.headers(options)\n })\n .then(res => res.data)\n .catch(this.handleError);\n }\n\n _post(path: string, data: object, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return this.axios({\n method: 'post',\n url: path,\n data,\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n ...options,\n ...this.headers(options)\n })\n .then(res => res.data)\n .catch(this.handleError);\n }\n\n _put(path: string, data: object, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return this.axios({\n method: 'put',\n url: path,\n data,\n ...options,\n ...this.headers(options)\n })\n .then(res => res.data)\n .catch(this.handleError);\n }\n\n _delete(path: string, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return this.axios({\n method: 'delete',\n url: path,\n ...options,\n ...this.headers(options)\n })\n .then(res => res.data)\n .catch(this.handleError);\n }\n\n // Subscribe to named channel - errors and messages are delivered via the callback\n _subscribe(channel: string, cb: WebSocketSubscribeCallback): WebSocketUnsubscriber {\n if (!this.webSocketGateway.isConnected) {\n this.webSocketGateway.connect();\n }\n\n return this.webSocketGateway.subscribe(channel, cb);\n }\n\n // Unsubscribe from named channel - optional callback is called on completion\n _unsubscribe(channel: string, cb?: WebSocketUnsubscribeCallback) {\n if (!this.webSocketGateway.isConnected) {\n this.webSocketGateway.connect();\n }\n this.webSocketGateway.unsubscribe(channel, cb);\n }\n\n /**\n * Normalize errors\n * Throws a new error based on type of input error\n *\n * @param {AxiosError} e\n */\n private handleError(e: AxiosError) {\n // Flow API error\n if (e.response && e.response.data) {\n if (typeof e.response.data === 'object') {\n const data: any = e.response.data;\n throw new FlowEngineError(data.message || data.error, data.error, e.response.status);\n } else if (typeof e.response.data === 'string') {\n throw new FlowEngineError(e.response.data, null, e.response.status);\n }\n }\n\n // Generic error\n\n // Don't leak information in error\n const cleanError: any = e;\n delete cleanError.config;\n delete cleanError.request;\n delete cleanError.response;\n\n throw new FlowEngineError(cleanError.message, cleanError);\n }\n\n private headers(options: any) {\n const headers = options.headers || {};\n\n if (options.apiKey || this.apiKey) {\n headers['X-Api-Key'] = options.apiKey || this.apiKey;\n }\n\n // Add default auth header if token supplied and not already set in options\n if (this.accessToken) {\n headers.Authorization = headers.Authorization || `Bearer ${this.accessToken}`;\n }\n\n return { headers };\n }\n}\n"]}
|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IAAI,CAAC,MAAM,EAAE,CAAC;YAClC,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;QACvD,CAAC;QAED,2EAA2E;QAC3E,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,iBAAU,IAAI,CAAC,WAAW,CAAE,CAAC;QAChF,CAAC;QAED,OAAO,EAAE,OAAO,SAAA,EAAE,CAAC;IACrB,CAAC;IACH,aAAC;AAAD,CAAC,AA3LD,IA2LC;AA3LY,wBAAM","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport Axios, { AxiosError, AxiosInstance } from 'axios';\nimport Debug from 'debug';\nimport { IConfig } from './api-interfaces';\nimport { ApiKeyEndpoints } from './apikey.endpoints';\nimport { AppConfigEndpoints } from './appconfig.endpoints';\nimport { ApplicationEndpoints } from './application.endpoints';\nimport { AuthEndpoints } from './auth.edpoints';\nimport { DatabaseEndpoints } from './database.endpoints';\nimport { DatasetEndpoints } from './dataset.endpoints';\nimport { FlowEngineError } from './errors';\nimport { JobEndpoints } from './job.endpoints';\nimport { MapEndpoints } from './map.endoints';\nimport { MapLayerEndpoints } from './maplayer.endpoints';\nimport { PipelineEndpoints } from './pipeline.endpoints';\nimport { StyleEndpoints } from './style.endpoint';\nimport { TileSourceEndpoints } from './tile-source.endpoints';\nimport { TileEndpoints } from './tile.endpoints';\nimport { UploadEndpoints } from './upload.endpoints';\nimport {\n WebSocketGateway,\n WebSocketManagerOptions,\n WebSocketSubscribeCallback,\n WebSocketUnsubscribeCallback,\n WebSocketUnsubscriber\n} from './web-socket-gateway';\n\nexport type ClientOptions = WebSocketManagerOptions;\n\nexport class Client {\n private readonly axios: AxiosInstance;\n readonly debug = Debug('flow-engine-client');\n\n public webSocketGateway: WebSocketGateway;\n\n accessToken: string | null = null;\n\n auth = new AuthEndpoints(this);\n tiles = new TileEndpoints(this);\n maps = new MapEndpoints(this);\n apiKeys = new ApiKeyEndpoints(this);\n applications = new ApplicationEndpoints(this);\n appconfig = new AppConfigEndpoints(this);\n databases = new DatabaseEndpoints(this);\n datasets = new DatasetEndpoints(this);\n styles = new StyleEndpoints(this);\n tileSources = new TileSourceEndpoints(this);\n uploads = new UploadEndpoints(this);\n jobs = new JobEndpoints(this);\n maplayers = new MapLayerEndpoints(this);\n pipelines = new PipelineEndpoints(this);\n\n constructor(public baseUrl: string, public readonly apiKey: string | null = null, options?: ClientOptions) {\n this.axios = Axios.create({\n baseURL: baseUrl,\n maxContentLength: 524288000,\n transformResponse: [\n function transformResponse(data, headers) {\n if (headers?.['content-type']?.startsWith('application/json')) {\n // Force parsing of data if expected content type is JSON\n // This ensures that errors are thrown if JSON is truncated due to a query timeout\n // (default Axios behavior is simply to return a string if JSON parsing fails)\n return JSON.parse(data);\n }\n\n return data;\n }\n ]\n });\n\n this.webSocketGateway = new WebSocketGateway(this, options);\n }\n\n connect(): Promise<void> {\n return this.webSocketGateway.connect();\n }\n\n disconnect(): Promise<void> {\n return this.webSocketGateway.disconnect();\n }\n\n config(): Promise<IConfig> {\n return this._get('/api/v1/config');\n }\n\n _get(path: string, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return this.axios({\n method: 'get',\n url: path,\n ...options,\n ...this.headers(options)\n })\n .then(res => res.data)\n .catch(this.handleError);\n }\n\n _post(path: string, data: object, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return this.axios({\n method: 'post',\n url: path,\n data,\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n ...options,\n ...this.headers(options)\n })\n .then(res => res.data)\n .catch(this.handleError);\n }\n\n _put(path: string, data: object, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return this.axios({\n method: 'put',\n url: path,\n data,\n ...options,\n ...this.headers(options)\n })\n .then(res => res.data)\n .catch(this.handleError);\n }\n\n _delete(path: string, options: any = {}): Promise<any> {\n // Move apiKey from params\n if (options.params?.apiKey) {\n options.apiKey = options.params.apiKey;\n delete options.params.apiKey;\n }\n\n return this.axios({\n method: 'delete',\n url: path,\n ...options,\n ...this.headers(options)\n })\n .then(res => res.data)\n .catch(this.handleError);\n }\n\n // Subscribe to named channel - errors and messages are delivered via the callback\n _subscribe(channel: string, cb: WebSocketSubscribeCallback): WebSocketUnsubscriber {\n if (!this.webSocketGateway.isConnected) {\n this.webSocketGateway.connect();\n }\n\n return this.webSocketGateway.subscribe(channel, cb);\n }\n\n // Unsubscribe from named channel - optional callback is called on completion\n _unsubscribe(channel: string, cb?: WebSocketUnsubscribeCallback) {\n if (!this.webSocketGateway.isConnected) {\n this.webSocketGateway.connect();\n }\n this.webSocketGateway.unsubscribe(channel, cb);\n }\n\n /**\n * Normalize errors\n * Throws a new error based on type of input error\n *\n * @param {AxiosError} e\n */\n private handleError(e: AxiosError) {\n // Flow API error\n if (e.response && e.response.data) {\n if (typeof e.response.data === 'object') {\n const data: any = e.response.data;\n throw new FlowEngineError(data.message || data.error, data.error, e.response.status);\n } else if (typeof e.response.data === 'string') {\n throw new FlowEngineError(e.response.data, null, e.response.status);\n }\n }\n\n // Generic error\n\n // Don't leak information in error\n const cleanError: any = e;\n delete cleanError.config;\n delete cleanError.request;\n delete cleanError.response;\n\n throw new FlowEngineError(cleanError.message, cleanError);\n }\n\n private headers(options: any) {\n const headers = options.headers || {};\n\n if (options.apiKey || this.apiKey) {\n headers['X-Api-Key'] = options.apiKey || this.apiKey;\n }\n\n // Add default auth header if token supplied and not already set in options\n if (this.accessToken) {\n headers.Authorization = headers.Authorization || `Bearer ${this.accessToken}`;\n }\n\n return { headers };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.endpoints.js","sourceRoot":"","sources":["../../../src/lib/database.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAAuC,qCAAwB;IAC7D,2BAAY,MAAc;
|
|
1
|
+
{"version":3,"file":"database.endpoints.js","sourceRoot":"","sources":["../../../src/lib/database.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAAuC,qCAAwB;IAC7D,2BAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,WAAW,CAAC,SAAC;IAC7B,CAAC;IAED,mCAAO,GAAP;QACE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,KAAK,CAAC,UAAA,CAAC;YAC1D,IAAI,CAAC,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBACrB,8CAA8C;gBAC9C,OAAO,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;YACvC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IACH,wBAAC;AAAD,CAAC,AAbD,CAAuC,8BAAa,GAanD;AAbY,8CAAiB","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { BaseEndpoints } from './base.endpoints';\nimport { IDatabase } from './api-interfaces';\n\nexport class DatabaseEndpoints extends BaseEndpoints<IDatabase> {\n constructor(client: Client) {\n super(client, 'databases');\n }\n\n drivers(): Promise<string[]> {\n return this.client._get(`/api/v1/databases/drivers`).catch(e => {\n if (e.status === 404) {\n // Backwards compatibility for pre-1.0.0 Flo.w\n return ['postgis', 'postgis-mapnik'];\n }\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset.endpoints.js","sourceRoot":"","sources":["../../../src/lib/dataset.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;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E,MAAM,CAAC,OAAO,IAAI,KAAK,GACjC;YACD,MAAM,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM;SAChC,CAAC;aACD,KAAK,CAAC,UAAA,CAAC;YACN,IAAI,CAAC,CAAC,OAAO,KAAK,eAAe,EAAE,CAAC;gBAClC,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACrC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED,iCAAM,GAAN,UAAO,aAA6B,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QACpE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAAoB,aAAa,CAAC,SAAS,YAAS,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;IACxG,CAAC;IAED,uCAAY,GAAZ,UAAa,SAAiB,EAAE,MAAwB;QACtD,IAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW;YACzC,CAAC,CAAC,sBAAe,IAAI,CAAC,MAAM,CAAC,WAAW,CAAE;YAC1C,CAAC,CAAC,iBAAU,IAAI,CAAC,MAAM,CAAC,MAAM,CAAE,CAAC;QACnC,OAAO,UAAG,IAAI,CAAC,MAAM,CAAC,OAAO,8BAAoB,SAAS,4BAAkB,MAAM,cAAI,WAAW,CAAE,CAAC;IACtG,CAAC;IAED,oCAAS,GAAT,UAAU,SAAiB,EAAE,EAA8B;QACzD,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,kBAAW,SAAS,CAAE,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC;IACH,uBAAC;AAAD,CAAC,AA7DD,CAAsC,8BAAa,GA6DlD;AA7DY,4CAAgB","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { FileExportFormat, IDataset, IIngestMessage } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\nimport { Client } from './client';\nimport { WebSocketSubscribeCallback, WebSocketUnsubscriber } from './web-socket-gateway';\n\nexport interface DatasetQuery {\n [key: string]: any;\n}\n\ntype QueryOutputFormat = 'plain' | 'json' | 'csv' | 'geojson';\n\nexport interface DatasetQueryOptions {\n [param: string]: any;\n format?: QueryOutputFormat;\n explain?: boolean | string;\n abortController?: AbortController;\n}\n\nexport class DatasetEndpoints extends BaseEndpoints<IDataset> {\n constructor(client: Client) {\n super(client, 'datasets');\n }\n\n query(\n datasetId: string | DatasetQuery,\n query: DatasetQuery = {},\n params: DatasetQueryOptions | QueryOutputFormat = {}\n ): Promise<any> {\n // Support Flo.w RDF-style query definition\n if (typeof datasetId === 'object') {\n params = { ...datasetId.params, format: datasetId.format || 'json' };\n query = datasetId;\n datasetId = query.datasetId;\n delete query.datasetId;\n delete query.format;\n }\n\n if (typeof params === 'string') {\n params = { format: params };\n }\n\n let abortController: AbortController | null = null;\n if (params.abortController) {\n abortController = params.abortController;\n delete params.abortController;\n }\n\n return this.client\n ._post(`/api/v1/datasets/${datasetId}/query`, query, {\n params: {\n ...params,\n format: params.format || 'json',\n explain: params.explain || false\n },\n signal: abortController?.signal\n })\n .catch(e => {\n if (e.message === 'Network Error') {\n throw new Error('Query timed out');\n } else {\n throw e;\n }\n });\n }\n\n ingest(ingestMessage: IIngestMessage, params: Record<string, any> = {}): Promise<any> {\n return this.client._post(`/api/v1/datasets/${ingestMessage.datasetId}/ingest`, ingestMessage, params);\n }\n\n getExportUrl(datasetId: string, format: FileExportFormat): string {\n const credentials = this.client.accessToken\n ? `accesstoken=${this.client.accessToken}`\n : `apikey=${this.client.apiKey}`;\n return `${this.client.baseUrl}/api/v1/datasets/${datasetId}/export?format=${format}&${credentials}`;\n }\n\n subscribe(datasetId: string, cb: WebSocketSubscribeCallback): WebSocketUnsubscriber {\n return this.client._subscribe(`dataset/${datasetId}`, cb);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/lib/errors.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAEH;IAAqC,mCAAK;IAIxC,yBAAY,OAAe,EAAE,eAAoC,EAAE,UAAgB;QAAtD,gCAAA,EAAA,sBAAoC;QAAE,2BAAA,EAAA,gBAAgB;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/lib/errors.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAEH;IAAqC,mCAAK;IAIxC,yBAAY,OAAe,EAAE,eAAoC,EAAE,UAAgB;QAAtD,gCAAA,EAAA,sBAAoC;QAAE,2BAAA,EAAA,gBAAgB;QACjF,YAAA,MAAK,YAAC,OAAO,IAAI,eAAe,CAAC,SAAC;QAElC,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;QAEvD,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAI,CAAC,KAAK,GAAG,eAAe,CAAC;;IAC/B,CAAC;IACH,sBAAC;AAAD,CAAC,AAZD,CAAqC,KAAK,GAYzC;AAZY,0CAAe","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nexport class FlowEngineError extends Error {\n error: object | null;\n statusCode: number;\n\n constructor(message: string, underlyingError: Error | null = null, statusCode = 500) {\n super(message || 'Unknown Error');\n\n Object.setPrototypeOf(this, FlowEngineError.prototype);\n\n this.statusCode = statusCode;\n this.error = underlyingError;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job.endpoints.js","sourceRoot":"","sources":["../../../src/lib/job.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAAkC,gCAAmB;IACnD,sBAAY,MAAc;
|
|
1
|
+
{"version":3,"file":"job.endpoints.js","sourceRoot":"","sources":["../../../src/lib/job.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAAkC,gCAAmB;IACnD,sBAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,MAAM,CAAC,SAAC;IACxB,CAAC;IAED,6BAAM,GAAN,UAAO,UAA0B;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;IAC9D,CAAC;IAED,gCAAS,GAAT,UAAU,KAAa;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAgB,KAAK,YAAS,CAAC,CAAC;IAC1D,CAAC;IAED,gCAAS,GAAT,UAAU,KAAa,EAAE,MAAkB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAgB,KAAK,YAAS,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;IAED,6BAAM,GAAN,UAAO,KAAa;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAgB,KAAK,YAAS,EAAE,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,8BAAO,GAAP,UAAQ,OAAe;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IACH,mBAAC;AAAD,CAAC,AAxBD,CAAkC,8BAAa,GAwB9C;AAxBY,oCAAY","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { BaseEndpoints } from './base.endpoints';\nimport { IJob, IJobSubmission, IJobStatus } from './api-interfaces';\n\nexport class JobEndpoints extends BaseEndpoints<IJob> {\n constructor(client: Client) {\n super(client, 'jobs');\n }\n\n submit(submission: IJobSubmission): Promise<IJob> {\n return this.client._post(`/api/v1/jobs/submit`, submission);\n }\n\n getStatus(jobId: string): Promise<IJobStatus> {\n return this.client._get(`/api/v1/jobs/${jobId}/status`);\n }\n\n setStatus(jobId: string, status: IJobStatus): Promise<IJob> {\n return this.client._post(`/api/v1/jobs/${jobId}/status`, status);\n }\n\n cancel(jobId: string): Promise<IJob> {\n return this.client._post(`/api/v1/jobs/${jobId}/cancel`, {});\n }\n\n request(jobType: string): Promise<IJob> {\n return this.client._post(`/api/v1/jobs/request`, { type: jobType });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maplayer.endpoints.js","sourceRoot":"","sources":["../../../src/lib/maplayer.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAIjD;IAAuC,qCAAwB;IAC7D,2BAAY,MAAc;
|
|
1
|
+
{"version":3,"file":"maplayer.endpoints.js","sourceRoot":"","sources":["../../../src/lib/maplayer.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAIjD;IAAuC,qCAAwB;IAC7D,2BAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,WAAW,CAAC,SAAC;IAC7B,CAAC;IAED,qCAAS,GAAT,UAAU,EAA8B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACjD,CAAC;IACH,wBAAC;AAAD,CAAC,AARD,CAAuC,8BAAa,GAQnD;AARY,8CAAiB","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { IMapLayer } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\nimport { Client } from './client';\nimport { WebSocketSubscribeCallback, WebSocketUnsubscriber } from './web-socket-gateway';\n\nexport class MapLayerEndpoints extends BaseEndpoints<IMapLayer> {\n constructor(client: Client) {\n super(client, 'maplayers');\n }\n\n subscribe(cb: WebSocketSubscribeCallback): WebSocketUnsubscriber {\n return this.client._subscribe(`maplayers`, cb);\n }\n}\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2018-present 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.PipelineComponentEndpoints = void 0;
|
|
22
|
+
var base_endpoints_1 = require("./base.endpoints");
|
|
23
|
+
var pipeline_metric_endpoint_1 = require("./pipeline-metric.endpoint");
|
|
24
|
+
var PipelineComponentEndpoints = /** @class */ (function (_super) {
|
|
25
|
+
__extends(PipelineComponentEndpoints, _super);
|
|
26
|
+
function PipelineComponentEndpoints(client, pipelineId) {
|
|
27
|
+
var _this = _super.call(this, client, "pipelines/".concat(pipelineId, "/components")) || this;
|
|
28
|
+
_this.pipelineId = pipelineId;
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
PipelineComponentEndpoints.prototype.metrics = function (componentId) {
|
|
32
|
+
return new pipeline_metric_endpoint_1.PipelineMetricEndpoints(this.client, this.pipelineId, componentId);
|
|
33
|
+
};
|
|
34
|
+
return PipelineComponentEndpoints;
|
|
35
|
+
}(base_endpoints_1.BaseEndpoints));
|
|
36
|
+
exports.PipelineComponentEndpoints = PipelineComponentEndpoints;
|
|
37
|
+
//# sourceMappingURL=pipeline-component.endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-component.endpoints.js","sourceRoot":"","sources":["../../../src/lib/pipeline-component.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAEjD,uEAAqE;AAErE;IAAgD,8CAAiC;IAC/E,oCAAY,MAAc,EAAU,UAAkB;QACpD,YAAA,MAAK,YAAC,MAAM,EAAE,oBAAa,UAAU,gBAAa,CAAC,SAAC;QADlB,gBAAU,GAAV,UAAU,CAAQ;;IAEtD,CAAC;IAED,4CAAO,GAAP,UAAQ,WAAmB;QACzB,OAAO,IAAI,kDAAuB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAChF,CAAC;IACH,iCAAC;AAAD,CAAC,AARD,CAAgD,8BAAa,GAQ5D;AARY,gEAA0B","sourcesContent":["/**\n * Copyright © 2018-present Emu Analytics\n */\n\nimport { IPipelineComponent } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\nimport { Client } from './client';\nimport { PipelineMetricEndpoints } from './pipeline-metric.endpoint';\n\nexport class PipelineComponentEndpoints extends BaseEndpoints<IPipelineComponent> {\n constructor(client: Client, private pipelineId: string) {\n super(client, `pipelines/${pipelineId}/components`);\n }\n\n metrics(componentId: string) {\n return new PipelineMetricEndpoints(this.client, this.pipelineId, componentId);\n }\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2018-present 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.PipelineMetricEndpoints = void 0;
|
|
22
|
+
var base_endpoints_1 = require("./base.endpoints");
|
|
23
|
+
var PipelineMetricEndpoints = /** @class */ (function (_super) {
|
|
24
|
+
__extends(PipelineMetricEndpoints, _super);
|
|
25
|
+
function PipelineMetricEndpoints(client, pipelineId, componentId) {
|
|
26
|
+
return _super.call(this, client, "pipelines/".concat(pipelineId, "/components/").concat(componentId, "/metrics")) || this;
|
|
27
|
+
}
|
|
28
|
+
return PipelineMetricEndpoints;
|
|
29
|
+
}(base_endpoints_1.BaseEndpoints));
|
|
30
|
+
exports.PipelineMetricEndpoints = PipelineMetricEndpoints;
|
|
31
|
+
//# sourceMappingURL=pipeline-metric.endpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-metric.endpoint.js","sourceRoot":"","sources":["../../../src/lib/pipeline-metric.endpoint.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAA6C,2CAA8B;IACzE,iCAAY,MAAc,EAAE,UAAkB,EAAE,WAAmB;QACjE,OAAA,MAAK,YAAC,MAAM,EAAE,oBAAa,UAAU,yBAAe,WAAW,aAAU,CAAC,SAAC;IAC7E,CAAC;IACH,8BAAC;AAAD,CAAC,AAJD,CAA6C,8BAAa,GAIzD;AAJY,0DAAuB","sourcesContent":["/**\n * Copyright © 2018-present Emu Analytics\n */\n\nimport { IPipelineMetric } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\nimport { Client } from './client';\n\nexport class PipelineMetricEndpoints extends BaseEndpoints<IPipelineMetric> {\n constructor(client: Client, pipelineId: string, componentId: string) {\n super(client, `pipelines/${pipelineId}/components/${componentId}/metrics`);\n }\n}\n"]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2018-present 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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
24
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
25
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
26
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
30
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
31
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
32
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
33
|
+
function step(op) {
|
|
34
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
35
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
36
|
+
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;
|
|
37
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
38
|
+
switch (op[0]) {
|
|
39
|
+
case 0: case 1: t = op; break;
|
|
40
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
41
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
42
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
43
|
+
default:
|
|
44
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
45
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
46
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
47
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
48
|
+
if (t[2]) _.ops.pop();
|
|
49
|
+
_.trys.pop(); continue;
|
|
50
|
+
}
|
|
51
|
+
op = body.call(thisArg, _);
|
|
52
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
53
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.PipelineEndpoints = void 0;
|
|
58
|
+
var base_endpoints_1 = require("./base.endpoints");
|
|
59
|
+
var pipeline_component_endpoints_1 = require("./pipeline-component.endpoints");
|
|
60
|
+
var PipelineEndpoints = /** @class */ (function (_super) {
|
|
61
|
+
__extends(PipelineEndpoints, _super);
|
|
62
|
+
function PipelineEndpoints(client) {
|
|
63
|
+
return _super.call(this, client, 'pipelines') || this;
|
|
64
|
+
}
|
|
65
|
+
PipelineEndpoints.prototype.components = function (pipelineId) {
|
|
66
|
+
return new pipeline_component_endpoints_1.PipelineComponentEndpoints(this.client, pipelineId);
|
|
67
|
+
};
|
|
68
|
+
PipelineEndpoints.prototype.heartbeat = function (id_1) {
|
|
69
|
+
return __awaiter(this, arguments, void 0, function (id, params) {
|
|
70
|
+
if (params === void 0) { params = {}; }
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
return [2 /*return*/, this.client._post("".concat(this.resourceEndpoint, "/").concat(id, "/heartbeat"), { params: params })];
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
PipelineEndpoints.prototype.publishMetrics = function (metrics_1) {
|
|
77
|
+
return __awaiter(this, arguments, void 0, function (metrics, params) {
|
|
78
|
+
if (params === void 0) { params = {}; }
|
|
79
|
+
return __generator(this, function (_a) {
|
|
80
|
+
return [2 /*return*/, this.client._post("".concat(this.resourceEndpoint, "/publish-metrics"), metrics, { params: params })];
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
return PipelineEndpoints;
|
|
85
|
+
}(base_endpoints_1.BaseEndpoints));
|
|
86
|
+
exports.PipelineEndpoints = PipelineEndpoints;
|
|
87
|
+
//# sourceMappingURL=pipeline.endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.endpoints.js","sourceRoot":"","sources":["../../../src/lib/pipeline.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAEjD,+EAA4E;AAE5E;IAAuC,qCAAwB;IAC7D,2BAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,WAAW,CAAC,SAAC;IAC7B,CAAC;IAED,sCAAU,GAAV,UAAW,UAAkB;QAC3B,OAAO,IAAI,yDAA0B,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACjE,CAAC;IAEK,qCAAS,GAAf;4DAAgB,EAAU,EAAE,MAAgC;YAAhC,uBAAA,EAAA,WAAgC;;gBAC1D,sBAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAG,IAAI,CAAC,gBAAgB,cAAI,EAAE,eAAY,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,EAAC;;;KAClF;IAEK,0CAAc,GAApB;4DAAqB,OAAe,EAAE,MAAgC;YAAhC,uBAAA,EAAA,WAAgC;;gBACpE,sBAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAG,IAAI,CAAC,gBAAgB,qBAAkB,EAAE,OAAO,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,EAAC;;;KAC3F;IACH,wBAAC;AAAD,CAAC,AAhBD,CAAuC,8BAAa,GAgBnD;AAhBY,8CAAiB","sourcesContent":["/**\n * Copyright © 2018-present Emu Analytics\n */\n\nimport { IPipeline } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\nimport { Client } from './client';\nimport { PipelineComponentEndpoints } from './pipeline-component.endpoints';\n\nexport class PipelineEndpoints extends BaseEndpoints<IPipeline> {\n constructor(client: Client) {\n super(client, 'pipelines');\n }\n\n components(pipelineId: string) {\n return new PipelineComponentEndpoints(this.client, pipelineId);\n }\n\n async heartbeat(id: string, params: Record<string, any> = {}): Promise<void> {\n return this.client._post(`${this.resourceEndpoint}/${id}/heartbeat`, { params });\n }\n\n async publishMetrics(metrics: object, params: Record<string, any> = {}): Promise<void> {\n return this.client._post(`${this.resourceEndpoint}/publish-metrics`, metrics, { params });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.endpoint.js","sourceRoot":"","sources":["../../../src/lib/style.endpoint.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAIH,mDAAiD;AAEjD;IAAoC,kCAAqB;IACvD,wBAAY,MAAc;
|
|
1
|
+
{"version":3,"file":"style.endpoint.js","sourceRoot":"","sources":["../../../src/lib/style.endpoint.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAIH,mDAAiD;AAEjD;IAAoC,kCAAqB;IACvD,wBAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,QAAQ,CAAC,SAAC;IAC1B,CAAC;IACH,qBAAC;AAAD,CAAC,AAJD,CAAoC,8BAAa,GAIhD;AAJY,wCAAc","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { IStyle } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\n\nexport class StyleEndpoints extends BaseEndpoints<IStyle> {\n constructor(client: Client) {\n super(client, 'styles');\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile-source.endpoints.js","sourceRoot":"","sources":["../../../src/lib/tile-source.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAAyC,uCAA0B;IACjE,6BAAY,MAAc;
|
|
1
|
+
{"version":3,"file":"tile-source.endpoints.js","sourceRoot":"","sources":["../../../src/lib/tile-source.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAAyC,uCAA0B;IACjE,6BAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,aAAa,CAAC,SAAC;IAC/B,CAAC;IAED,qCAAO,GAAP;QACE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,KAAK,CAAC,UAAA,CAAC;YAC5D,IAAI,CAAC,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBACzB,8CAA8C;gBAC9C,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;YACjC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IACH,0BAAC;AAAD,CAAC,AAbD,CAAyC,8BAAa,GAarD;AAbY,kDAAmB","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { BaseEndpoints } from './base.endpoints';\nimport { ITileSource } from './api-interfaces';\n\nexport class TileSourceEndpoints extends BaseEndpoints<ITileSource> {\n constructor(client: Client) {\n super(client, 'tilesources');\n }\n\n drivers(): Promise<string[]> {\n return this.client._get(`/api/v1/tilesources/drivers`).catch(e => {\n if (e.statusCode === 404) {\n // Backwards compatibility for pre-1.0.0 Flo.w\n return ['tilelive', 'dataset'];\n }\n });\n }\n}\n"]}
|
|
@@ -24,12 +24,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
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;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -65,11 +65,11 @@ var UploadEndpoints = /** @class */ (function (_super) {
|
|
|
65
65
|
function UploadEndpoints(client) {
|
|
66
66
|
return _super.call(this, client, 'uploads') || this;
|
|
67
67
|
}
|
|
68
|
-
UploadEndpoints.prototype.upload = function (
|
|
69
|
-
|
|
70
|
-
if (params === void 0) { params = {}; }
|
|
71
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
+
UploadEndpoints.prototype.upload = function (options_1) {
|
|
69
|
+
return __awaiter(this, arguments, void 0, function (options, params) {
|
|
72
70
|
var form, upload;
|
|
71
|
+
var _a, _b, _c;
|
|
72
|
+
if (params === void 0) { params = {}; }
|
|
73
73
|
return __generator(this, function (_d) {
|
|
74
74
|
switch (_d.label) {
|
|
75
75
|
case 0:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.endpoints.js","sourceRoot":"","sources":["../../../src/lib/upload.endpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,wDAAiC;AAEjC,mDAAiD;AAoBjD;IAAqC,mCAAsB;IACzD,yBAAY,MAAc;
|
|
1
|
+
{"version":3,"file":"upload.endpoints.js","sourceRoot":"","sources":["../../../src/lib/up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QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;wBACxC,CAAC;wBACD,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;4BACrB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;wBAC5D,CAAC;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,gDAAgD;gCAChD,OAAO,EAAE,MAAA,MAAA,IAAI,CAAC,UAAU,oDAAI,mCAAI,EAAE,cAAc,EAAE,qBAAqB,EAAE;gCACzE,mBAAmB;gCACnB,MAAM,EAAE,MAAA,OAAO,CAAC,eAAe,0CAAE,MAAM;gCACvC,MAAM,QAAA;gCACN,iDAAiD;gCACjD,gBAAgB,EAAE,OAAO,CAAC,QAAQ;6BACnC,CAAC,EAAA;;wBARI,MAAM,GAAY,SAQtB;wBAEF,sBAAO,MAAM,EAAC;;;;KACf;IACH,sBAAC;AAAD,CAAC,AA7CD,CAAqC,8BAAa,GA6CjD;AA7CY,0CAAe","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\nimport FormData from 'form-data';\nimport { IUpload } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\nimport { Client } from './client';\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 metadata?: any;\n abortController?: AbortController;\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 if (options.metadata) {\n form.append('metadata', JSON.stringify(options.metadata));\n }\n form.append('file', options.data, options.filename);\n\n const upload: IUpload = await this.client._post(this.resourceEndpoint, form, {\n // Note - only Node FormData supports getHeaders\n headers: form.getHeaders?.() ?? { 'Content-Type': 'multipart/form-data' },\n // Add abort signal\n signal: options.abortController?.signal,\n params,\n // Note that progress only works in the browser!!\n onUploadProgress: options.progress\n });\n\n return upload;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.endpoints.js","sourceRoot":"","sources":["../../../src/lib/user.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAIH,mDAAiD;AAEjD;IAAkC,gCAAoB;IACpD,sBAAY,MAAc;
|
|
1
|
+
{"version":3,"file":"user.endpoints.js","sourceRoot":"","sources":["../../../src/lib/user.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAIH,mDAAiD;AAEjD;IAAkC,gCAAoB;IACpD,sBAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,YAAY,CAAC,SAAC;IAC9B,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,8BAAa,GAU9C;AAVY,oCAAY","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"]}
|