@emuanalytics/flow-engine-client 2.1.0 → 2.2.0
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 +9 -3
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +668 -0
- package/dist/index.d.mts +668 -0
- package/dist/index.d.ts +668 -0
- package/dist/index.mjs +1 -0
- package/package.json +33 -40
- package/dist/bundle.js.map +0 -7
- package/dist/cjs/index.js +0 -25
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/lib/__mocks__/client.js +0 -57
- package/dist/cjs/lib/__mocks__/client.js.map +0 -1
- package/dist/cjs/lib/api-interfaces.js +0 -6
- package/dist/cjs/lib/api-interfaces.js.map +0 -1
- package/dist/cjs/lib/apikey.endpoints.js +0 -31
- package/dist/cjs/lib/apikey.endpoints.js.map +0 -1
- package/dist/cjs/lib/appconfig.endpoints.js +0 -49
- package/dist/cjs/lib/appconfig.endpoints.js.map +0 -1
- package/dist/cjs/lib/application.endpoints.js +0 -31
- package/dist/cjs/lib/application.endpoints.js.map +0 -1
- package/dist/cjs/lib/auth.edpoints.js +0 -60
- package/dist/cjs/lib/auth.edpoints.js.map +0 -1
- package/dist/cjs/lib/base.endpoints.js +0 -78
- package/dist/cjs/lib/base.endpoints.js.map +0 -1
- package/dist/cjs/lib/client.js +0 -198
- package/dist/cjs/lib/client.js.map +0 -1
- package/dist/cjs/lib/contact-point.endpoints.js +0 -46
- package/dist/cjs/lib/contact-point.endpoints.js.map +0 -1
- package/dist/cjs/lib/database.endpoints.js +0 -39
- package/dist/cjs/lib/database.endpoints.js.map +0 -1
- package/dist/cjs/lib/dataset.endpoints.js +0 -88
- package/dist/cjs/lib/dataset.endpoints.js.map +0 -1
- package/dist/cjs/lib/errors.js +0 -36
- package/dist/cjs/lib/errors.js.map +0 -1
- package/dist/cjs/lib/job.endpoints.js +0 -46
- package/dist/cjs/lib/job.endpoints.js.map +0 -1
- package/dist/cjs/lib/map.endoints.js +0 -18
- package/dist/cjs/lib/map.endoints.js.map +0 -1
- package/dist/cjs/lib/maplayer.endpoints.js +0 -34
- package/dist/cjs/lib/maplayer.endpoints.js.map +0 -1
- package/dist/cjs/lib/media.endpoints.js +0 -106
- package/dist/cjs/lib/media.endpoints.js.map +0 -1
- package/dist/cjs/lib/pipeline-component.endpoints.js +0 -37
- package/dist/cjs/lib/pipeline-component.endpoints.js.map +0 -1
- package/dist/cjs/lib/pipeline-metric.endpoint.js +0 -31
- package/dist/cjs/lib/pipeline-metric.endpoint.js.map +0 -1
- package/dist/cjs/lib/pipeline.endpoints.js +0 -87
- package/dist/cjs/lib/pipeline.endpoints.js.map +0 -1
- package/dist/cjs/lib/style.endpoint.js +0 -31
- package/dist/cjs/lib/style.endpoint.js.map +0 -1
- package/dist/cjs/lib/tile-source.endpoints.js +0 -39
- package/dist/cjs/lib/tile-source.endpoints.js.map +0 -1
- package/dist/cjs/lib/tile.endpoints.js +0 -22
- package/dist/cjs/lib/tile.endpoints.js.map +0 -1
- package/dist/cjs/lib/upload.endpoints.js +0 -121
- package/dist/cjs/lib/upload.endpoints.js.map +0 -1
- package/dist/cjs/lib/user.endpoints.js +0 -36
- package/dist/cjs/lib/user.endpoints.js.map +0 -1
- package/dist/cjs/lib/web-socket-gateway.js +0 -160
- package/dist/cjs/lib/web-socket-gateway.js.map +0 -1
- package/dist/esm/index.js +0 -9
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lib/__mocks__/client.js +0 -54
- package/dist/esm/lib/__mocks__/client.js.map +0 -1
- package/dist/esm/lib/api-interfaces.js +0 -5
- package/dist/esm/lib/api-interfaces.js.map +0 -1
- package/dist/esm/lib/apikey.endpoints.js +0 -28
- package/dist/esm/lib/apikey.endpoints.js.map +0 -1
- package/dist/esm/lib/appconfig.endpoints.js +0 -46
- package/dist/esm/lib/appconfig.endpoints.js.map +0 -1
- package/dist/esm/lib/application.endpoints.js +0 -28
- package/dist/esm/lib/application.endpoints.js.map +0 -1
- package/dist/esm/lib/auth.edpoints.js +0 -57
- package/dist/esm/lib/auth.edpoints.js.map +0 -1
- package/dist/esm/lib/base.endpoints.js +0 -75
- package/dist/esm/lib/base.endpoints.js.map +0 -1
- package/dist/esm/lib/client.js +0 -192
- package/dist/esm/lib/client.js.map +0 -1
- package/dist/esm/lib/contact-point.endpoints.js +0 -43
- package/dist/esm/lib/contact-point.endpoints.js.map +0 -1
- package/dist/esm/lib/database.endpoints.js +0 -36
- package/dist/esm/lib/database.endpoints.js.map +0 -1
- package/dist/esm/lib/dataset.endpoints.js +0 -85
- package/dist/esm/lib/dataset.endpoints.js.map +0 -1
- package/dist/esm/lib/errors.js +0 -33
- package/dist/esm/lib/errors.js.map +0 -1
- package/dist/esm/lib/job.endpoints.js +0 -43
- package/dist/esm/lib/job.endpoints.js.map +0 -1
- package/dist/esm/lib/map.endoints.js +0 -15
- package/dist/esm/lib/map.endoints.js.map +0 -1
- package/dist/esm/lib/maplayer.endpoints.js +0 -31
- package/dist/esm/lib/maplayer.endpoints.js.map +0 -1
- package/dist/esm/lib/media.endpoints.js +0 -100
- package/dist/esm/lib/media.endpoints.js.map +0 -1
- package/dist/esm/lib/pipeline-component.endpoints.js +0 -34
- package/dist/esm/lib/pipeline-component.endpoints.js.map +0 -1
- package/dist/esm/lib/pipeline-metric.endpoint.js +0 -28
- package/dist/esm/lib/pipeline-metric.endpoint.js.map +0 -1
- package/dist/esm/lib/pipeline.endpoints.js +0 -84
- package/dist/esm/lib/pipeline.endpoints.js.map +0 -1
- package/dist/esm/lib/style.endpoint.js +0 -28
- package/dist/esm/lib/style.endpoint.js.map +0 -1
- package/dist/esm/lib/tile-source.endpoints.js +0 -36
- package/dist/esm/lib/tile-source.endpoints.js.map +0 -1
- package/dist/esm/lib/tile.endpoints.js +0 -19
- package/dist/esm/lib/tile.endpoints.js.map +0 -1
- package/dist/esm/lib/upload.endpoints.js +0 -115
- package/dist/esm/lib/upload.endpoints.js.map +0 -1
- package/dist/esm/lib/user.endpoints.js +0 -33
- package/dist/esm/lib/user.endpoints.js.map +0 -1
- package/dist/esm/lib/web-socket-gateway.js +0 -157
- package/dist/esm/lib/web-socket-gateway.js.map +0 -1
- package/dist/types/index.d.ts +0 -9
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/lib/__mocks__/client.d.ts +0 -3
- package/dist/types/lib/__mocks__/client.d.ts.map +0 -1
- package/dist/types/lib/api-interfaces.d.ts +0 -314
- package/dist/types/lib/api-interfaces.d.ts.map +0 -1
- package/dist/types/lib/apikey.endpoints.d.ts +0 -10
- package/dist/types/lib/apikey.endpoints.d.ts.map +0 -1
- package/dist/types/lib/appconfig.endpoints.d.ts +0 -15
- package/dist/types/lib/appconfig.endpoints.d.ts.map +0 -1
- package/dist/types/lib/application.endpoints.d.ts +0 -10
- package/dist/types/lib/application.endpoints.d.ts.map +0 -1
- package/dist/types/lib/auth.edpoints.d.ts +0 -20
- package/dist/types/lib/auth.edpoints.d.ts.map +0 -1
- package/dist/types/lib/base.endpoints.d.ts +0 -20
- package/dist/types/lib/base.endpoints.d.ts.map +0 -1
- package/dist/types/lib/client.d.ts +0 -68
- package/dist/types/lib/client.d.ts.map +0 -1
- package/dist/types/lib/contact-point.endpoints.d.ts +0 -20
- package/dist/types/lib/contact-point.endpoints.d.ts.map +0 -1
- package/dist/types/lib/database.endpoints.d.ts +0 -11
- package/dist/types/lib/database.endpoints.d.ts.map +0 -1
- package/dist/types/lib/dataset.endpoints.d.ts +0 -26
- package/dist/types/lib/dataset.endpoints.d.ts.map +0 -1
- package/dist/types/lib/errors.d.ts +0 -9
- package/dist/types/lib/errors.d.ts.map +0 -1
- package/dist/types/lib/job.endpoints.d.ts +0 -15
- package/dist/types/lib/job.endpoints.d.ts.map +0 -1
- package/dist/types/lib/map.endoints.d.ts +0 -11
- package/dist/types/lib/map.endoints.d.ts.map +0 -1
- package/dist/types/lib/maplayer.endpoints.d.ts +0 -12
- package/dist/types/lib/maplayer.endpoints.d.ts.map +0 -1
- package/dist/types/lib/media.endpoints.d.ts +0 -20
- package/dist/types/lib/media.endpoints.d.ts.map +0 -1
- package/dist/types/lib/pipeline-component.endpoints.d.ts +0 -13
- package/dist/types/lib/pipeline-component.endpoints.d.ts.map +0 -1
- package/dist/types/lib/pipeline-metric.endpoint.d.ts +0 -10
- package/dist/types/lib/pipeline-metric.endpoint.d.ts.map +0 -1
- package/dist/types/lib/pipeline.endpoints.d.ts +0 -14
- package/dist/types/lib/pipeline.endpoints.d.ts.map +0 -1
- package/dist/types/lib/style.endpoint.d.ts +0 -10
- package/dist/types/lib/style.endpoint.d.ts.map +0 -1
- package/dist/types/lib/tile-source.endpoints.d.ts +0 -11
- package/dist/types/lib/tile-source.endpoints.d.ts.map +0 -1
- package/dist/types/lib/tile.endpoints.d.ts +0 -12
- package/dist/types/lib/tile.endpoints.d.ts.map +0 -1
- package/dist/types/lib/upload.endpoints.d.ts +0 -22
- package/dist/types/lib/upload.endpoints.d.ts.map +0 -1
- package/dist/types/lib/user.endpoints.d.ts +0 -11
- package/dist/types/lib/user.endpoints.d.ts.map +0 -1
- package/dist/types/lib/web-socket-gateway.d.ts +0 -42
- package/dist/types/lib/web-socket-gateway.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
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,qEAAkE;AAClE,2DAAyD;AACzD,yDAAuD;AACvD,mCAA2C;AAC3C,iDAA+C;AAC/C,+CAA8C;AAC9C,2DAAyD;AACzD,qDAAmD;AACnD,2DAAyD;AACzD,mDAAkD;AAClD,iEAA8D;AAC9D,mDAAiD;AACjD,uDAAqD;AACrD,2DAM8B;AAI9B;IAiCE,gBAAmB,OAAe,EAAkB,MAA4B,EAAE,OAAuB;QAArD,uBA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,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,AArMD,IAqMC;AArMY,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 { ContactPointEndpoints } from './contact-point.endpoints';\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 { MediaEndpoints } from './media.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 contactpoints = new ContactPointEndpoints(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 media = new MediaEndpoints(this);\n pipelines = new PipelineEndpoints(this);\n\n useRequestInterceptor(interceptor: (config: any) => any) {\n return this.axios.interceptors.request.use(interceptor);\n }\n\n ejectRequestInterceptor(id: number) {\n this.axios.interceptors.request.eject(id);\n }\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,46 +0,0 @@
|
|
|
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.ContactPointEndpoints = void 0;
|
|
22
|
-
var base_endpoints_1 = require("./base.endpoints");
|
|
23
|
-
var ContactPointEndpoints = /** @class */ (function (_super) {
|
|
24
|
-
__extends(ContactPointEndpoints, _super);
|
|
25
|
-
function ContactPointEndpoints(client) {
|
|
26
|
-
return _super.call(this, client, 'contactpoints') || this;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Send a notification to a contact point.
|
|
30
|
-
*/
|
|
31
|
-
ContactPointEndpoints.prototype.send = function (contactPointId, params) {
|
|
32
|
-
if (params === void 0) { params = {}; }
|
|
33
|
-
return this.client._post("".concat(this.resourceEndpoint, "/").concat(contactPointId, "/send"), params);
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Get a list of available contact point drivers. Supported types include 'email', 'slack', 'teams', 'sns'.
|
|
37
|
-
*
|
|
38
|
-
* Drivers have different required parameters - refer to documentation for details.
|
|
39
|
-
*/
|
|
40
|
-
ContactPointEndpoints.prototype.drivers = function () {
|
|
41
|
-
return this.client._get("".concat(this.resourceEndpoint, "/drivers"));
|
|
42
|
-
};
|
|
43
|
-
return ContactPointEndpoints;
|
|
44
|
-
}(base_endpoints_1.BaseEndpoints));
|
|
45
|
-
exports.ContactPointEndpoints = ContactPointEndpoints;
|
|
46
|
-
//# sourceMappingURL=contact-point.endpoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contact-point.endpoints.js","sourceRoot":"","sources":["../../../src/lib/contact-point.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAGjD;IAA2C,yCAA4B;IACrE,+BAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,eAAe,CAAC,SAAC;IACjC,CAAC;IAED;;OAEG;IACH,oCAAI,GAAJ,UAAK,cAAsB,EAAE,MAAqC;QAArC,uBAAA,EAAA,WAAqC;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAG,IAAI,CAAC,gBAAgB,cAAI,cAAc,UAAO,EAAE,MAAM,CAAC,CAAC;IACtF,CAAC;IAED;;;;OAIG;IACH,uCAAO,GAAP;QACE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAG,IAAI,CAAC,gBAAgB,aAAU,CAAC,CAAC;IAC9D,CAAC;IACH,4BAAC;AAAD,CAAC,AApBD,CAA2C,8BAAa,GAoBvD;AApBY,sDAAqB","sourcesContent":["/**\n * Copyright © 2018-present Emu Analytics\n */\n\nimport { IContactPoint, IContactPointSendRequest } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\nimport { Client } from './client';\n\nexport class ContactPointEndpoints extends BaseEndpoints<IContactPoint> {\n constructor(client: Client) {\n super(client, 'contactpoints');\n }\n\n /**\n * Send a notification to a contact point.\n */\n send(contactPointId: string, params: IContactPointSendRequest = {}): Promise<void> {\n return this.client._post(`${this.resourceEndpoint}/${contactPointId}/send`, params);\n }\n\n /**\n * Get a list of available contact point drivers. Supported types include 'email', 'slack', 'teams', 'sns'.\n *\n * Drivers have different required parameters - refer to documentation for details.\n */\n drivers(): Promise<string[]> {\n return this.client._get(`${this.resourceEndpoint}/drivers`);\n }\n}\n"]}
|
|
@@ -1,39 +0,0 @@
|
|
|
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.DatabaseEndpoints = void 0;
|
|
22
|
-
var base_endpoints_1 = require("./base.endpoints");
|
|
23
|
-
var DatabaseEndpoints = /** @class */ (function (_super) {
|
|
24
|
-
__extends(DatabaseEndpoints, _super);
|
|
25
|
-
function DatabaseEndpoints(client) {
|
|
26
|
-
return _super.call(this, client, 'databases') || this;
|
|
27
|
-
}
|
|
28
|
-
DatabaseEndpoints.prototype.drivers = function () {
|
|
29
|
-
return this.client._get("/api/v1/databases/drivers").catch(function (e) {
|
|
30
|
-
if (e.status === 404) {
|
|
31
|
-
// Backwards compatibility for pre-1.0.0 Flo.w
|
|
32
|
-
return ['postgis', 'postgis-mapnik'];
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
return DatabaseEndpoints;
|
|
37
|
-
}(base_endpoints_1.BaseEndpoints));
|
|
38
|
-
exports.DatabaseEndpoints = DatabaseEndpoints;
|
|
39
|
-
//# sourceMappingURL=database.endpoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,88 +0,0 @@
|
|
|
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
|
-
var __assign = (this && this.__assign) || function () {
|
|
21
|
-
__assign = Object.assign || function(t) {
|
|
22
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
23
|
-
s = arguments[i];
|
|
24
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
25
|
-
t[p] = s[p];
|
|
26
|
-
}
|
|
27
|
-
return t;
|
|
28
|
-
};
|
|
29
|
-
return __assign.apply(this, arguments);
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.DatasetEndpoints = void 0;
|
|
33
|
-
var base_endpoints_1 = require("./base.endpoints");
|
|
34
|
-
var DatasetEndpoints = /** @class */ (function (_super) {
|
|
35
|
-
__extends(DatasetEndpoints, _super);
|
|
36
|
-
function DatasetEndpoints(client) {
|
|
37
|
-
return _super.call(this, client, 'datasets') || this;
|
|
38
|
-
}
|
|
39
|
-
DatasetEndpoints.prototype.query = function (datasetId, query, params) {
|
|
40
|
-
if (query === void 0) { query = {}; }
|
|
41
|
-
if (params === void 0) { params = {}; }
|
|
42
|
-
// Support Flo.w RDF-style query definition
|
|
43
|
-
if (typeof datasetId === 'object') {
|
|
44
|
-
params = __assign(__assign({}, datasetId.params), { format: datasetId.format || 'json' });
|
|
45
|
-
query = datasetId;
|
|
46
|
-
datasetId = query.datasetId;
|
|
47
|
-
delete query.datasetId;
|
|
48
|
-
delete query.format;
|
|
49
|
-
}
|
|
50
|
-
if (typeof params === 'string') {
|
|
51
|
-
params = { format: params };
|
|
52
|
-
}
|
|
53
|
-
var abortController = null;
|
|
54
|
-
if (params.abortController) {
|
|
55
|
-
abortController = params.abortController;
|
|
56
|
-
delete params.abortController;
|
|
57
|
-
}
|
|
58
|
-
return this.client
|
|
59
|
-
._post("/api/v1/datasets/".concat(datasetId, "/query"), query, {
|
|
60
|
-
params: __assign(__assign({}, params), { format: params.format || 'json', explain: params.explain || false }),
|
|
61
|
-
signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal
|
|
62
|
-
})
|
|
63
|
-
.catch(function (e) {
|
|
64
|
-
if (e.message === 'Network Error') {
|
|
65
|
-
throw new Error('Query timed out');
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
throw e;
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
DatasetEndpoints.prototype.ingest = function (ingestMessage, params) {
|
|
73
|
-
if (params === void 0) { params = {}; }
|
|
74
|
-
return this.client._post("/api/v1/datasets/".concat(ingestMessage.datasetId, "/ingest"), ingestMessage, params);
|
|
75
|
-
};
|
|
76
|
-
DatasetEndpoints.prototype.getExportUrl = function (datasetId, format) {
|
|
77
|
-
var credentials = this.client.accessToken
|
|
78
|
-
? "accesstoken=".concat(this.client.accessToken)
|
|
79
|
-
: "apikey=".concat(this.client.apiKey);
|
|
80
|
-
return "".concat(this.client.baseUrl, "/api/v1/datasets/").concat(datasetId, "/export?format=").concat(format, "&").concat(credentials);
|
|
81
|
-
};
|
|
82
|
-
DatasetEndpoints.prototype.subscribe = function (datasetId, cb) {
|
|
83
|
-
return this.client._subscribe("dataset/".concat(datasetId), cb);
|
|
84
|
-
};
|
|
85
|
-
return DatasetEndpoints;
|
|
86
|
-
}(base_endpoints_1.BaseEndpoints));
|
|
87
|
-
exports.DatasetEndpoints = DatasetEndpoints;
|
|
88
|
-
//# sourceMappingURL=dataset.endpoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataset.endpoints.js","sourceRoot":"","sources":["../../../src/lib/dataset.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,mDAAiD;AAiBjD;IAAsC,oCAAuB;IAC3D,0BAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,UAAU,CAAC,SAAC;IAC5B,CAAC;IAED,gCAAK,GAAL,UACE,SAAgC,EAChC,KAAwB,EACxB,MAAoD;QADpD,sBAAA,EAAA,UAAwB;QACxB,uBAAA,EAAA,WAAoD;QAEpD,2CAA2C;QAC3C,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;YAClC,MAAM,yBAAQ,SAAS,CAAC,MAAM,KAAE,MAAM,EAAE,SAAS,CAAC,MAAM,IAAI,MAAM,GAAE,CAAC;YACrE,KAAK,GAAG,SAAS,CAAC;YAClB,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;YAC5B,OAAO,KAAK,CAAC,SAAS,CAAC;YACvB,OAAO,KAAK,CAAC,MAAM,CAAC;QACtB,CAAC;QAED,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAC9B,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AED,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"]}
|
package/dist/cjs/lib/errors.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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.FlowEngineError = void 0;
|
|
22
|
-
var FlowEngineError = /** @class */ (function (_super) {
|
|
23
|
-
__extends(FlowEngineError, _super);
|
|
24
|
-
function FlowEngineError(message, underlyingError, statusCode) {
|
|
25
|
-
if (underlyingError === void 0) { underlyingError = null; }
|
|
26
|
-
if (statusCode === void 0) { statusCode = 500; }
|
|
27
|
-
var _this = _super.call(this, message || 'Unknown Error') || this;
|
|
28
|
-
Object.setPrototypeOf(_this, FlowEngineError.prototype);
|
|
29
|
-
_this.statusCode = statusCode;
|
|
30
|
-
_this.error = underlyingError;
|
|
31
|
-
return _this;
|
|
32
|
-
}
|
|
33
|
-
return FlowEngineError;
|
|
34
|
-
}(Error));
|
|
35
|
-
exports.FlowEngineError = FlowEngineError;
|
|
36
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,46 +0,0 @@
|
|
|
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.JobEndpoints = void 0;
|
|
22
|
-
var base_endpoints_1 = require("./base.endpoints");
|
|
23
|
-
var JobEndpoints = /** @class */ (function (_super) {
|
|
24
|
-
__extends(JobEndpoints, _super);
|
|
25
|
-
function JobEndpoints(client) {
|
|
26
|
-
return _super.call(this, client, 'jobs') || this;
|
|
27
|
-
}
|
|
28
|
-
JobEndpoints.prototype.submit = function (submission) {
|
|
29
|
-
return this.client._post("/api/v1/jobs/submit", submission);
|
|
30
|
-
};
|
|
31
|
-
JobEndpoints.prototype.getStatus = function (jobId) {
|
|
32
|
-
return this.client._get("/api/v1/jobs/".concat(jobId, "/status"));
|
|
33
|
-
};
|
|
34
|
-
JobEndpoints.prototype.setStatus = function (jobId, status) {
|
|
35
|
-
return this.client._post("/api/v1/jobs/".concat(jobId, "/status"), status);
|
|
36
|
-
};
|
|
37
|
-
JobEndpoints.prototype.cancel = function (jobId) {
|
|
38
|
-
return this.client._post("/api/v1/jobs/".concat(jobId, "/cancel"), {});
|
|
39
|
-
};
|
|
40
|
-
JobEndpoints.prototype.request = function (jobType) {
|
|
41
|
-
return this.client._post("/api/v1/jobs/request", { type: jobType });
|
|
42
|
-
};
|
|
43
|
-
return JobEndpoints;
|
|
44
|
-
}(base_endpoints_1.BaseEndpoints));
|
|
45
|
-
exports.JobEndpoints = JobEndpoints;
|
|
46
|
-
//# sourceMappingURL=job.endpoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright © 2018 Emu Analytics
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MapEndpoints = void 0;
|
|
7
|
-
var MapEndpoints = /** @class */ (function () {
|
|
8
|
-
function MapEndpoints(client) {
|
|
9
|
-
this.client = client;
|
|
10
|
-
}
|
|
11
|
-
MapEndpoints.prototype.get = function (id, params) {
|
|
12
|
-
if (params === void 0) { params = {}; }
|
|
13
|
-
return this.client._get("/maps/".concat(id, ".json"), { params: params });
|
|
14
|
-
};
|
|
15
|
-
return MapEndpoints;
|
|
16
|
-
}());
|
|
17
|
-
exports.MapEndpoints = MapEndpoints;
|
|
18
|
-
//# sourceMappingURL=map.endoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map.endoints.js","sourceRoot":"","sources":["../../../src/lib/map.endoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAKH;IACE,sBAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C,0BAAG,GAAH,UAAI,EAAU,EAAE,MAAgC;QAAhC,uBAAA,EAAA,WAAgC;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAS,EAAE,UAAO,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IAC1D,CAAC;IACH,mBAAC;AAAD,CAAC,AAND,IAMC;AANY,oCAAY","sourcesContent":["/**\n * Copyright © 2018 Emu Analytics\n */\n\nimport { Client } from './client';\nimport { IStyle } from './api-interfaces';\n\nexport class MapEndpoints {\n constructor(private readonly client: Client) {}\n\n get(id: string, params: Record<string, any> = {}): Promise<IStyle> {\n return this.client._get(`/maps/${id}.json`, { params });\n }\n}\n"]}
|
|
@@ -1,34 +0,0 @@
|
|
|
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.MapLayerEndpoints = void 0;
|
|
22
|
-
var base_endpoints_1 = require("./base.endpoints");
|
|
23
|
-
var MapLayerEndpoints = /** @class */ (function (_super) {
|
|
24
|
-
__extends(MapLayerEndpoints, _super);
|
|
25
|
-
function MapLayerEndpoints(client) {
|
|
26
|
-
return _super.call(this, client, 'maplayers') || this;
|
|
27
|
-
}
|
|
28
|
-
MapLayerEndpoints.prototype.subscribe = function (cb) {
|
|
29
|
-
return this.client._subscribe("maplayers", cb);
|
|
30
|
-
};
|
|
31
|
-
return MapLayerEndpoints;
|
|
32
|
-
}(base_endpoints_1.BaseEndpoints));
|
|
33
|
-
exports.MapLayerEndpoints = MapLayerEndpoints;
|
|
34
|
-
//# sourceMappingURL=maplayer.endpoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,106 +0,0 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
57
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.MediaEndpoints = void 0;
|
|
61
|
-
var form_data_1 = __importDefault(require("form-data"));
|
|
62
|
-
var base_endpoints_1 = require("./base.endpoints");
|
|
63
|
-
var MediaEndpoints = /** @class */ (function (_super) {
|
|
64
|
-
__extends(MediaEndpoints, _super);
|
|
65
|
-
function MediaEndpoints(client) {
|
|
66
|
-
return _super.call(this, client, 'media') || this;
|
|
67
|
-
}
|
|
68
|
-
MediaEndpoints.prototype.upload = function (mediaId_1, request_1) {
|
|
69
|
-
return __awaiter(this, arguments, void 0, function (mediaId, request, params) {
|
|
70
|
-
var form, media;
|
|
71
|
-
var _a, _b;
|
|
72
|
-
if (params === void 0) { params = {}; }
|
|
73
|
-
return __generator(this, function (_c) {
|
|
74
|
-
switch (_c.label) {
|
|
75
|
-
case 0:
|
|
76
|
-
form = new form_data_1.default();
|
|
77
|
-
form.append('id', mediaId);
|
|
78
|
-
if (request.type) {
|
|
79
|
-
form.append('type', request.type);
|
|
80
|
-
}
|
|
81
|
-
if (request.mimeType) {
|
|
82
|
-
form.append('mimeType', request.mimeType);
|
|
83
|
-
}
|
|
84
|
-
if (request.metadata) {
|
|
85
|
-
form.append('metadata', JSON.stringify(request.metadata));
|
|
86
|
-
}
|
|
87
|
-
form.append('file', request.data, request.fileName);
|
|
88
|
-
return [4 /*yield*/, this.client._post(this.resourceEndpoint, form, {
|
|
89
|
-
// Note - only Node FormData supports getHeaders
|
|
90
|
-
headers: (_b = (_a = form.getHeaders) === null || _a === void 0 ? void 0 : _a.call(form)) !== null && _b !== void 0 ? _b : { 'Content-Type': 'multipart/form-data' },
|
|
91
|
-
params: params
|
|
92
|
-
})];
|
|
93
|
-
case 1:
|
|
94
|
-
media = _c.sent();
|
|
95
|
-
return [2 /*return*/, media];
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
MediaEndpoints.prototype.content = function (mediaId) {
|
|
101
|
-
return this.client._get("".concat(this.resourceEndpoint, "/").concat(mediaId, "/content"), { responseType: 'stream' });
|
|
102
|
-
};
|
|
103
|
-
return MediaEndpoints;
|
|
104
|
-
}(base_endpoints_1.BaseEndpoints));
|
|
105
|
-
exports.MediaEndpoints = MediaEndpoints;
|
|
106
|
-
//# sourceMappingURL=media.endpoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media.endpoints.js","sourceRoot":"","sources":["../../../src/lib/media.endpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wDAAiC;AAEjC,mDAAiD;AAWjD;IAAoC,kCAAqB;IACvD,wBAAY,MAAc;QACxB,OAAA,MAAK,YAAC,MAAM,EAAE,OAAO,CAAC,SAAC;IACzB,CAAC;IAEK,+BAAM,GAAZ;4DACE,OAAe,EACf,OAA4B,EAC5B,MAAgC;;;YAAhC,uBAAA,EAAA,WAAgC;;;;wBAE1B,IAAI,GAAG,IAAI,mBAAQ,EAAE,CAAC;wBAE5B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;wBAE3B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;4BACjB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;wBACpC,CAAC;wBAED,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;4BACrB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;wBAC5C,CAAC;wBAED,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;wBAED,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;wBAE9B,qBAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE;gCACzE,gDAAgD;gCAChD,OAAO,EAAE,MAAA,MAAA,IAAI,CAAC,UAAU,oDAAI,mCAAI,EAAE,cAAc,EAAE,qBAAqB,EAAE;gCACzE,MAAM,QAAA;6BACP,CAAC,EAAA;;wBAJI,KAAK,GAAW,SAIpB;wBAEF,sBAAO,KAAK,EAAC;;;;KACd;IAED,gCAAO,GAAP,UAAQ,OAAe;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAG,IAAI,CAAC,gBAAgB,cAAI,OAAO,aAAU,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrG,CAAC;IACH,qBAAC;AAAD,CAAC,AAxCD,CAAoC,8BAAa,GAwChD;AAxCY,wCAAc","sourcesContent":["/**\n * Copyright © 2018-present Emu Analytics\n */\n\nimport FormData from 'form-data';\nimport { IMedia, IMetadata } from './api-interfaces';\nimport { BaseEndpoints } from './base.endpoints';\nimport { Client } from './client';\n\ninterface IMediaUploadRequest {\n type: string;\n mimeType?: string;\n metadata?: IMetadata;\n fileName: string;\n data: any;\n}\n\nexport class MediaEndpoints extends BaseEndpoints<IMedia> {\n constructor(client: Client) {\n super(client, 'media');\n }\n\n async upload(\n mediaId: string,\n request: IMediaUploadRequest,\n params: Record<string, any> = {}\n ): Promise<IMedia> {\n const form = new FormData();\n\n form.append('id', mediaId);\n\n if (request.type) {\n form.append('type', request.type);\n }\n\n if (request.mimeType) {\n form.append('mimeType', request.mimeType);\n }\n\n if (request.metadata) {\n form.append('metadata', JSON.stringify(request.metadata));\n }\n\n form.append('file', request.data, request.fileName);\n\n const media: IMedia = await this.client._post(this.resourceEndpoint, form, {\n // Note - only Node FormData supports getHeaders\n headers: form.getHeaders?.() ?? { 'Content-Type': 'multipart/form-data' },\n params\n });\n\n return media;\n }\n\n content(mediaId: string): Promise<any> {\n return this.client._get(`${this.resourceEndpoint}/${mediaId}/content`, { responseType: 'stream' });\n }\n}\n"]}
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|