@uwrl/qc-utils 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -16
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/models/dataSource.d.ts +0 -173
- package/dist/models/index.d.ts +0 -2
- package/dist/models/payload.d.ts +0 -24
- package/dist/models/settings.d.ts +0 -65
- package/dist/models/timestamp.d.ts +0 -150
- package/dist/services/__tests__/createPatchObject.spec.d.ts +0 -1
- package/dist/services/__tests__/requestInterceptor.spec.d.ts +0 -1
- package/dist/services/__tests__/responseInterceptor.spec.d.ts +0 -1
- package/dist/services/api.d.ts +0 -147
- package/dist/services/apiMethods.d.ts +0 -8
- package/dist/services/createPatchObject.d.ts +0 -17
- package/dist/services/getCSRFToken.d.ts +0 -1
- package/dist/services/index.d.ts +0 -6
- package/dist/services/requestInterceptor.d.ts +0 -12
- package/dist/services/responseInterceptor.d.ts +0 -2
- package/dist/types/index.d.ts +0 -372
- package/dist/utils/__tests__/ellapsed-time.spec.d.ts +0 -1
- package/dist/utils/__tests__/format.spec.d.ts +0 -1
- package/dist/utils/__tests__/notifications.spec.d.ts +0 -1
- package/dist/utils/__tests__/observations.spec.d.ts +0 -1
- package/dist/utils/ellapsed-time.d.ts +0 -4
- package/dist/utils/format.d.ts +0 -4
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/notifications.d.ts +0 -46
- package/dist/utils/observations.d.ts +0 -5
- package/dist/utils/plotting/__tests__/calibration.spec.d.ts +0 -16
- package/dist/utils/plotting/__tests__/mock.d.ts +0 -4
- package/dist/utils/plotting/__tests__/observation-record-paths.spec.d.ts +0 -21
- package/dist/utils/plotting/__tests__/observation-record.spec.d.ts +0 -1
- package/dist/utils/plotting/__tests__/operation-cores.spec.d.ts +0 -12
- package/dist/utils/plotting/__tests__/workerMocks.d.ts +0 -119
- package/dist/utils/plotting/__tests__/workers.spec.d.ts +0 -18
- package/dist/utils/plotting/add-data.worker.d.ts +0 -1
- package/dist/utils/plotting/calibration.d.ts +0 -99
- package/dist/utils/plotting/change-values.worker.d.ts +0 -1
- package/dist/utils/plotting/change.worker.d.ts +0 -1
- package/dist/utils/plotting/delete-data.worker.d.ts +0 -1
- package/dist/utils/plotting/drift-correction.worker.d.ts +0 -1
- package/dist/utils/plotting/fill-gaps.worker.d.ts +0 -1
- package/dist/utils/plotting/find-gaps.worker.d.ts +0 -1
- package/dist/utils/plotting/interpolate.worker.d.ts +0 -1
- package/dist/utils/plotting/observation-record.d.ts +0 -281
- package/dist/utils/plotting/operation-cores.d.ts +0 -139
- package/dist/utils/plotting/persistence.worker.d.ts +0 -1
- package/dist/utils/plotting/rate-of-change.worker.d.ts +0 -1
- package/dist/utils/plotting/shift-datetimes.worker.d.ts +0 -1
- package/dist/utils/plotting/value-threshold.worker.d.ts +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/services/api.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { Unit, Thing, Sensor, ResultQualifier, ProcessingLevel, ObservedProperty, Datastream, Tag, PostHydroShareArchive, HydroShareArchive, User, Workspace, ApiKey } from '@/types';
|
|
2
|
-
import { DataSource } from '@/models';
|
|
3
|
-
import { OrchestrationSystem } from '@/models/dataSource';
|
|
4
|
-
export declare const BASE_URL: string;
|
|
5
|
-
export declare const AUTH_BASE: string;
|
|
6
|
-
export declare const ACCOUNT_BASE: string;
|
|
7
|
-
export declare const SESSION_BASE: string;
|
|
8
|
-
export declare const PROVIDER_BASE: string;
|
|
9
|
-
export declare const THINGS_BASE: string;
|
|
10
|
-
export declare const TAG_BASE: string;
|
|
11
|
-
type DatastreamFilterKey = 'unit_id' | 'sensor_id' | 'observed_property_id' | 'processing_level_id' | 'result_qualifier_id';
|
|
12
|
-
export declare const getObservationsEndpoint: (id: string, pageSize: number, startTime: string, endTime?: string, page?: number) => string;
|
|
13
|
-
export declare const api: {
|
|
14
|
-
fetchSession: () => Promise<any>;
|
|
15
|
-
login: (email: string, password: string) => Promise<any>;
|
|
16
|
-
logout: () => Promise<any>;
|
|
17
|
-
fetchUser: () => Promise<any>;
|
|
18
|
-
signup: (user: User) => Promise<any>;
|
|
19
|
-
updateUser: (user: User, oldUser: User) => Promise<any>;
|
|
20
|
-
deleteUser: () => Promise<any>;
|
|
21
|
-
sendVerificationEmail: (email: string) => Promise<any>;
|
|
22
|
-
verifyEmailWithCode: (key: string) => Promise<any>;
|
|
23
|
-
requestPasswordReset: (email: string) => Promise<any>;
|
|
24
|
-
resetPassword: (key: string, password: string) => Promise<any>;
|
|
25
|
-
fetchWorkspaces: () => Promise<any>;
|
|
26
|
-
fetchAssociatedWorkspaces: () => Promise<any>;
|
|
27
|
-
fetchWorkspace: (id: string) => Promise<any>;
|
|
28
|
-
createWorkspace: (postWorkspace: Workspace) => Promise<any>;
|
|
29
|
-
updateWorkspace: (newWorkspace: Workspace, oldWorkspace?: Workspace | null) => Promise<any>;
|
|
30
|
-
deleteWorkspace: (id: string) => Promise<any>;
|
|
31
|
-
transferWorkspace: (id: string, newOwner: string) => Promise<any>;
|
|
32
|
-
acceptWorkspaceTransfer: (id: string) => Promise<any>;
|
|
33
|
-
rejectWorkspaceTransfer: (id: string) => Promise<any>;
|
|
34
|
-
getCollaboratorRoles: (id: string) => Promise<any>;
|
|
35
|
-
getAPIKeyRoles: (id: string) => Promise<any>;
|
|
36
|
-
getRole: (roleId: string) => Promise<any>;
|
|
37
|
-
getCollaborators: (id: string) => Promise<any>;
|
|
38
|
-
addCollaborator: (id: string, email: string, roleId: string) => Promise<any>;
|
|
39
|
-
updateCollaboratorRole: (id: string, email: string, roleId: string) => Promise<any>;
|
|
40
|
-
removeCollaborator: (id: string, email: string) => Promise<any>;
|
|
41
|
-
fetchApiKeys: (workspaceId: string) => Promise<any>;
|
|
42
|
-
fetchApiKey: (workspaceId: string, apiKeyId: string) => Promise<any>;
|
|
43
|
-
createApiKey: (apiKey: ApiKey) => Promise<any>;
|
|
44
|
-
updateApiKey: (newKey: ApiKey, oldKey?: ApiKey) => Promise<any>;
|
|
45
|
-
regenerateApiKey: (id: string, apiKeyId: string) => Promise<any>;
|
|
46
|
-
deleteApiKey: (id: string, apiKeyId: string) => Promise<any>;
|
|
47
|
-
fetchConnectedProviders: () => Promise<any>;
|
|
48
|
-
providerRedirect: (provider: string, callbackUrl: string, process: string) => void;
|
|
49
|
-
providerSignup: (user: User) => Promise<any>;
|
|
50
|
-
deleteProvider: (provider: string, account: string) => Promise<any>;
|
|
51
|
-
createUnit: (unit: Unit) => Promise<any>;
|
|
52
|
-
fetchUnits: () => Promise<any>;
|
|
53
|
-
fetchWorkspaceUnits: (id: string) => Promise<any>;
|
|
54
|
-
updateUnit: (newUnit: Unit, oldUnit?: Unit | null) => Promise<any>;
|
|
55
|
-
deleteUnit: (id: string) => Promise<any>;
|
|
56
|
-
getUnit: (id: string) => Promise<any>;
|
|
57
|
-
removeThingOwner: (id: string, email: string) => Promise<any>;
|
|
58
|
-
addSecondaryOwner: (id: string, email: string) => Promise<any>;
|
|
59
|
-
transferPrimaryOwnership: (id: string, email: string) => Promise<any>;
|
|
60
|
-
createThing: (thing: Thing) => Promise<any>;
|
|
61
|
-
fetchThings: () => Promise<any>;
|
|
62
|
-
fetchThingsForWorkspace: (id: string) => Promise<any>;
|
|
63
|
-
fetchOwnedThings: () => Promise<any>;
|
|
64
|
-
fetchThing: (id: string) => Promise<any>;
|
|
65
|
-
updateThing: (thing: Thing) => Promise<any>;
|
|
66
|
-
updateThingPrivacy: (id: string, isPrivate: boolean) => Promise<any>;
|
|
67
|
-
deleteThing: (id: string) => Promise<any>;
|
|
68
|
-
fetchMetadataForThingOwner: (thingId: string) => Promise<any>;
|
|
69
|
-
fetchMetadataForThing: (thingId: string) => Promise<any>;
|
|
70
|
-
uploadSitePhotos: (thingId: string, data: FormData) => Promise<any>;
|
|
71
|
-
fetchSitePhotos: (thingId: string) => Promise<any>;
|
|
72
|
-
deleteSitePhoto: (thingId: string, name: string) => Promise<any>;
|
|
73
|
-
createSiteTag: (thingId: string, tag: Tag) => Promise<any>;
|
|
74
|
-
editSiteTag: (thingId: string, tag: Tag) => Promise<any>;
|
|
75
|
-
fetchSiteTags: (thingId: string) => Promise<any>;
|
|
76
|
-
fetchUsersSiteTags: () => Promise<any>;
|
|
77
|
-
deleteSiteTag: (thingId: string, tag: Tag) => Promise<any>;
|
|
78
|
-
fetchWorkspaceTags: (workspaceId: string) => Promise<any>;
|
|
79
|
-
createHydroShareArchive: (archive: PostHydroShareArchive) => Promise<any>;
|
|
80
|
-
updateHydroShareArchive: (newArchive: HydroShareArchive, oldArchive?: HydroShareArchive) => Promise<any>;
|
|
81
|
-
fetchHydroShareArchive: (thingId: string) => Promise<any>;
|
|
82
|
-
deleteHydroShareArchive: (thingId: string) => Promise<any>;
|
|
83
|
-
archiveToHydroShare: (thingId: string) => Promise<any>;
|
|
84
|
-
createDatastream: (datastream: Datastream) => Promise<any>;
|
|
85
|
-
fetchDatastreams: (filters?: Partial<Record<DatastreamFilterKey, string>>) => Promise<any>;
|
|
86
|
-
fetchDatastreamsForThing: (thingId: string) => Promise<any>;
|
|
87
|
-
fetchExpandedDatastreamsForThing: (thingId: string) => Promise<any>;
|
|
88
|
-
fetchDatastreamsForDataSource: (id: string) => Promise<any>;
|
|
89
|
-
fetchDatastream: (id: string) => Promise<any>;
|
|
90
|
-
fetchDatastreamExpanded: (id: string) => Promise<any>;
|
|
91
|
-
fetchUsersDatastreams: () => Promise<any>;
|
|
92
|
-
updateDatastream: (newDS: Datastream, oldDS?: Datastream | null) => Promise<any>;
|
|
93
|
-
deleteDatastream: (id: string) => Promise<any>;
|
|
94
|
-
downloadDatastreamCSV: (id: string) => Promise<any>;
|
|
95
|
-
createObservedProperty: (op: ObservedProperty) => Promise<any>;
|
|
96
|
-
fetchObservedProperty: (id: string) => Promise<any>;
|
|
97
|
-
fetchObservedProperties: () => Promise<any>;
|
|
98
|
-
fetchWorkspaceObservedProperties: (id: string) => Promise<any>;
|
|
99
|
-
updateObservedProperty: (newOP: ObservedProperty, oldOP?: ObservedProperty | null) => Promise<any>;
|
|
100
|
-
deleteObservedProperty: (id: string) => Promise<any>;
|
|
101
|
-
createProcessingLevel: (pl: ProcessingLevel) => Promise<any>;
|
|
102
|
-
fetchProcessingLevels: () => Promise<any>;
|
|
103
|
-
fetchProcessingLevel: (id: string) => Promise<any>;
|
|
104
|
-
fetchWorkspaceProcessingLevels: (id: string) => Promise<any>;
|
|
105
|
-
updateProcessingLevel: (newPL: ProcessingLevel, oldPL?: ProcessingLevel | null) => Promise<any>;
|
|
106
|
-
deleteProcessingLevel: (id: string) => Promise<any>;
|
|
107
|
-
createSensor: (sensor: Sensor) => Promise<any>;
|
|
108
|
-
fetchSensors: () => Promise<any>;
|
|
109
|
-
fetchSensor: (id: string) => Promise<any>;
|
|
110
|
-
fetchWorkspaceSensors: (id: string) => Promise<any>;
|
|
111
|
-
updateSensor: (newSensor: Sensor, oldSensor?: Sensor | null) => Promise<any>;
|
|
112
|
-
deleteSensor: (id: string) => Promise<any>;
|
|
113
|
-
createResultQualifier: (resultQualifier: ResultQualifier) => Promise<any>;
|
|
114
|
-
fetchResultQualifiers: () => Promise<any>;
|
|
115
|
-
fetchWorkspaceResultQualifiers: (id: string) => Promise<any>;
|
|
116
|
-
updateResultQualifier: (newResultQualifier: ResultQualifier, oldResultQualifier?: ResultQualifier | null) => Promise<any>;
|
|
117
|
-
deleteResultQualifier: (id: string) => Promise<any>;
|
|
118
|
-
createOrchestrationSystem: (system: OrchestrationSystem) => Promise<any>;
|
|
119
|
-
fetchOrchestrationSystems: () => Promise<any>;
|
|
120
|
-
fetchWorkspaceOrchestrationSystems: (id: string) => Promise<any>;
|
|
121
|
-
fetchOrchestrationSystem: (id: string) => Promise<any>;
|
|
122
|
-
updateOrchestrationSystem: (id: string, system: OrchestrationSystem) => Promise<any>;
|
|
123
|
-
deleteOrchestrationSystem: (id: string) => Promise<any>;
|
|
124
|
-
createDataSource: (dataSource: DataSource) => Promise<any>;
|
|
125
|
-
fetchDataSources: () => Promise<any>;
|
|
126
|
-
fetchWorkspaceDataSources: (id: string) => Promise<any>;
|
|
127
|
-
fetchDataSource: (id: string) => Promise<any>;
|
|
128
|
-
updateDataSource: (newS: DataSource) => Promise<any>;
|
|
129
|
-
updateDataSourcePartial: (newS: DataSource) => Promise<any>;
|
|
130
|
-
deleteDataSource: (id: string) => Promise<any>;
|
|
131
|
-
linkDatastreamToDataSource: (dataSourceId: string, datastreamId: string) => Promise<any>;
|
|
132
|
-
unlinkDatastreamFromDataSource: (dataSourceId: string, datastreamId: string) => Promise<any>;
|
|
133
|
-
fetchObservations: (endpoint: string) => Promise<any>;
|
|
134
|
-
deleteObservationsForDatastream: (datastreamId: string) => Promise<any>;
|
|
135
|
-
fetchUserTypes: () => Promise<any>;
|
|
136
|
-
fetchOrganizationTypes: () => Promise<any>;
|
|
137
|
-
fetchSiteTypes: () => Promise<any>;
|
|
138
|
-
fetchSamplingFeatureTypes: () => Promise<any>;
|
|
139
|
-
fetchSensorEncodingTypes: () => Promise<any>;
|
|
140
|
-
fetchMethodTypes: () => Promise<any>;
|
|
141
|
-
fetchVariableTypes: () => Promise<any>;
|
|
142
|
-
fetchUnitTypes: () => Promise<any>;
|
|
143
|
-
fetchDatastreamStatuses: () => Promise<any>;
|
|
144
|
-
fetchDatastreamAggregations: () => Promise<any>;
|
|
145
|
-
fetchSampledMediums: () => Promise<any>;
|
|
146
|
-
};
|
|
147
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const apiMethods: {
|
|
2
|
-
fetch(endpoint: string, options?: any): Promise<any>;
|
|
3
|
-
patch(endpoint: string, body: any, originalBody?: any, options?: any): Promise<any>;
|
|
4
|
-
post(endpoint: string, body?: any, options?: any): Promise<any>;
|
|
5
|
-
put(endpoint: string, body?: any, options?: any): Promise<any>;
|
|
6
|
-
delete(endpoint: string, body?: any, options?: any): Promise<any>;
|
|
7
|
-
paginatedFetch<T>(base: string, pageSize?: number): Promise<any>;
|
|
8
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates an object that represents the differences (patches) between the
|
|
3
|
-
* original and the updated objects.
|
|
4
|
-
*
|
|
5
|
-
* This function iterates through the properties of the updated object and compares each property
|
|
6
|
-
* with the corresponding property in the original object. If a difference is found:
|
|
7
|
-
* 1. For properties that are objects, it recursively computes the nested differences.
|
|
8
|
-
* 2. For other properties, it directly assigns the updated value.
|
|
9
|
-
*
|
|
10
|
-
* Note: The function only checks properties that exist in the updated object.
|
|
11
|
-
*
|
|
12
|
-
* @param {any} original - The original object to compare from.
|
|
13
|
-
* @param {any} updated - The updated object to compare against.
|
|
14
|
-
* @returns {any} An object representing the differences between the two input objects.
|
|
15
|
-
* If two properties are identical, they won't appear in the result.
|
|
16
|
-
*/
|
|
17
|
-
export declare function createPatchObject(original: any, updated: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getCSRFToken(): string | null;
|
package/dist/services/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Intercepts and enhances a request options object.
|
|
3
|
-
*
|
|
4
|
-
* - Adds Django AllAuth 'sessionid' to all requests
|
|
5
|
-
* - Adds CSRF Token to non-GET requests
|
|
6
|
-
* - If a body is present and it's an object, the body is stringified.
|
|
7
|
-
*
|
|
8
|
-
* @param {any} options - The original request options object.
|
|
9
|
-
*
|
|
10
|
-
* @returns {any} The enhanced request options with possible modified headers and body.
|
|
11
|
-
*/
|
|
12
|
-
export declare function requestInterceptor(options: any): any;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
import { DataSource } from "@/models";
|
|
2
|
-
import { ObservationRecord } from "@/utils/plotting/observation-record";
|
|
3
|
-
export type EnumDictionary<T extends string | symbol | number, U> = {
|
|
4
|
-
[K in T]: U;
|
|
5
|
-
};
|
|
6
|
-
export declare enum TimeUnit {
|
|
7
|
-
SECOND = "s",
|
|
8
|
-
MINUTE = "m",
|
|
9
|
-
HOUR = "h",
|
|
10
|
-
DAY = "D",
|
|
11
|
-
WEEK = "W",
|
|
12
|
-
MONTH = "M",
|
|
13
|
-
YEAR = "Y"
|
|
14
|
-
}
|
|
15
|
-
export declare enum EnumEditOperations {
|
|
16
|
-
ADD_POINTS = "ADD_POINTS",
|
|
17
|
-
CHANGE_VALUES = "CHANGE_VALUES",
|
|
18
|
-
/**
|
|
19
|
-
* Single-operation assignment of distinct values at distinct indices.
|
|
20
|
-
* Args: `(indices: number[], values: number[])` — parallel arrays where
|
|
21
|
-
* `values[i]` is written to `dataY[indices[i]]`. No workers, no per-row
|
|
22
|
-
* ceremony. Intended for table-driven edits.
|
|
23
|
-
*/
|
|
24
|
-
ASSIGN_VALUES_BULK = "ASSIGN_VALUES_BULK",
|
|
25
|
-
DELETE_POINTS = "DELETE_POINTS",
|
|
26
|
-
DRIFT_CORRECTION = "DRIFT_CORRECTION",
|
|
27
|
-
INTERPOLATE = "INTERPOLATE",
|
|
28
|
-
SHIFT_DATETIMES = "SHIFT_DATETIMES",
|
|
29
|
-
/**
|
|
30
|
-
* Single-operation assignment of distinct datetimes at distinct indices.
|
|
31
|
-
* Args: `(indices: number[], datetimes: number[])` — parallel arrays of
|
|
32
|
-
* epoch-milliseconds. Runs one combined delete + add under the hood.
|
|
33
|
-
*/
|
|
34
|
-
ASSIGN_DATETIMES_BULK = "ASSIGN_DATETIMES_BULK",
|
|
35
|
-
FILL_GAPS = "FILL_GAPS"
|
|
36
|
-
}
|
|
37
|
-
export declare enum EnumFilterOperations {
|
|
38
|
-
FIND_GAPS = "FIND_GAPS",
|
|
39
|
-
PERSISTENCE = "PERSISTENCE",
|
|
40
|
-
CHANGE = "CHANGE",
|
|
41
|
-
RATE_OF_CHANGE = "RATE_OF_CHANGE",
|
|
42
|
-
VALUE_THRESHOLD = "VALUE_THRESHOLD",
|
|
43
|
-
DATETIME_RANGE = "DATETIME_RANGE",
|
|
44
|
-
SELECTION = "SELECTION"
|
|
45
|
-
}
|
|
46
|
-
export declare enum FilterOperation {
|
|
47
|
-
LT = "Less than",
|
|
48
|
-
LTE = "Less than or equal to",
|
|
49
|
-
GT = "Greater than",
|
|
50
|
-
GTE = "Greater than or equal to",
|
|
51
|
-
E = "Equal"
|
|
52
|
-
}
|
|
53
|
-
export declare enum Operator {
|
|
54
|
-
ADD = "ADD",
|
|
55
|
-
SUB = "SUB",
|
|
56
|
-
MULT = "MULT",
|
|
57
|
-
DIV = "DIV",
|
|
58
|
-
ASSIGN = "ASSIGN"
|
|
59
|
-
}
|
|
60
|
-
export declare enum LogicalOperation {
|
|
61
|
-
LT = "Less than",
|
|
62
|
-
LTE = "Less than or equal to",
|
|
63
|
-
GT = "Greater than",
|
|
64
|
-
GTE = "Greater than or equal to",
|
|
65
|
-
E = "Equal"
|
|
66
|
-
}
|
|
67
|
-
export type HistoryItem = {
|
|
68
|
-
method: EnumEditOperations | EnumFilterOperations;
|
|
69
|
-
icon: string;
|
|
70
|
-
isLoading: boolean;
|
|
71
|
-
args?: any[];
|
|
72
|
-
duration?: number;
|
|
73
|
-
selected?: number[];
|
|
74
|
-
status?: "success" | "failed";
|
|
75
|
-
/**
|
|
76
|
-
* Whether the operation actually ran on a web worker or inline on
|
|
77
|
-
* the main thread. Populated by the `ObservationRecord` dispatch
|
|
78
|
-
* site based on the calibration decision and any always-inline /
|
|
79
|
-
* always-worker handler behaviour. Mainly useful in dev for
|
|
80
|
-
* verifying that the calibration layer is routing as expected —
|
|
81
|
-
* the qc-app surfaces a small badge per history entry when
|
|
82
|
-
* `import.meta.env.DEV` is truthy.
|
|
83
|
-
*/
|
|
84
|
-
executionMode?: "worker" | "inline";
|
|
85
|
-
};
|
|
86
|
-
export type DataPoint = {
|
|
87
|
-
date: Date;
|
|
88
|
-
value: number;
|
|
89
|
-
};
|
|
90
|
-
export type DataArray = [string, number][];
|
|
91
|
-
export interface GraphSeries {
|
|
92
|
-
id: string;
|
|
93
|
-
name: string;
|
|
94
|
-
data: ObservationRecord;
|
|
95
|
-
yAxisLabel: string;
|
|
96
|
-
seriesOption: any;
|
|
97
|
-
}
|
|
98
|
-
export type TimeSpacingUnit = "seconds" | "minutes" | "hours" | "days";
|
|
99
|
-
export interface Tag {
|
|
100
|
-
key: string;
|
|
101
|
-
value: string;
|
|
102
|
-
}
|
|
103
|
-
export type Frequency = "daily" | "weekly" | "monthly" | null;
|
|
104
|
-
export declare class HydroShareArchive {
|
|
105
|
-
id: string;
|
|
106
|
-
thingId: string;
|
|
107
|
-
link: string;
|
|
108
|
-
frequency: Frequency;
|
|
109
|
-
path: string;
|
|
110
|
-
datastreamIds: string[];
|
|
111
|
-
publicResource: boolean;
|
|
112
|
-
constructor();
|
|
113
|
-
}
|
|
114
|
-
export declare class PostHydroShareArchive extends HydroShareArchive {
|
|
115
|
-
resourceTitle?: string;
|
|
116
|
-
resourceAbstract?: string;
|
|
117
|
-
resourceKeywords?: string[];
|
|
118
|
-
constructor();
|
|
119
|
-
}
|
|
120
|
-
export declare class Location {
|
|
121
|
-
latitude?: number | "";
|
|
122
|
-
longitude?: number | "";
|
|
123
|
-
elevation_m?: number | "";
|
|
124
|
-
elevationDatum: string;
|
|
125
|
-
state: string;
|
|
126
|
-
county: string;
|
|
127
|
-
country: string;
|
|
128
|
-
constructor();
|
|
129
|
-
}
|
|
130
|
-
export declare class Thing {
|
|
131
|
-
id: string;
|
|
132
|
-
workspaceId: string;
|
|
133
|
-
name: string;
|
|
134
|
-
location: Location;
|
|
135
|
-
tags: Tag[];
|
|
136
|
-
hydroShareArchive?: HydroShareArchive | null;
|
|
137
|
-
siteType: string;
|
|
138
|
-
samplingFeatureCode: string;
|
|
139
|
-
isPrivate: boolean;
|
|
140
|
-
description: string;
|
|
141
|
-
samplingFeatureType: string;
|
|
142
|
-
dataDisclaimer: string;
|
|
143
|
-
constructor();
|
|
144
|
-
}
|
|
145
|
-
export interface ThingWithColor extends Thing {
|
|
146
|
-
color?: {
|
|
147
|
-
borderColor: string;
|
|
148
|
-
background: string;
|
|
149
|
-
glyphColor: string;
|
|
150
|
-
};
|
|
151
|
-
tagValue?: string;
|
|
152
|
-
}
|
|
153
|
-
export declare class Datastream {
|
|
154
|
-
id: string;
|
|
155
|
-
workspaceId: string;
|
|
156
|
-
name: string;
|
|
157
|
-
description: string;
|
|
158
|
-
thingId: string;
|
|
159
|
-
observationType: string;
|
|
160
|
-
resultType?: string;
|
|
161
|
-
status?: string;
|
|
162
|
-
sampledMedium: string;
|
|
163
|
-
noDataValue: number;
|
|
164
|
-
aggregationStatistic: string;
|
|
165
|
-
unitId: string;
|
|
166
|
-
observedPropertyId: string;
|
|
167
|
-
sensorId: string;
|
|
168
|
-
processingLevelId: string;
|
|
169
|
-
isPrivate: boolean;
|
|
170
|
-
isVisible: boolean;
|
|
171
|
-
phenomenonBeginTime?: string | null;
|
|
172
|
-
phenomenonEndTime?: string | null;
|
|
173
|
-
intendedTimeSpacing?: number;
|
|
174
|
-
intendedTimeSpacingUnit?: TimeSpacingUnit | null;
|
|
175
|
-
timeAggregationInterval: number | null;
|
|
176
|
-
timeAggregationIntervalUnit: TimeSpacingUnit;
|
|
177
|
-
dataSourceId?: string | null;
|
|
178
|
-
valueCount: number;
|
|
179
|
-
constructor(thingId?: string);
|
|
180
|
-
}
|
|
181
|
-
export interface DatastreamExtended {
|
|
182
|
-
id: string;
|
|
183
|
-
name: string;
|
|
184
|
-
description: string;
|
|
185
|
-
observationType: string;
|
|
186
|
-
resultType?: string;
|
|
187
|
-
status?: string;
|
|
188
|
-
sampledMedium: string;
|
|
189
|
-
noDataValue: number;
|
|
190
|
-
aggregationStatistic: string;
|
|
191
|
-
isPrivate: boolean;
|
|
192
|
-
isVisible: boolean;
|
|
193
|
-
phenomenonBeginTime?: string | null;
|
|
194
|
-
phenomenonEndTime?: string | null;
|
|
195
|
-
intendedTimeSpacing?: number;
|
|
196
|
-
intendedTimeSpacingUnit?: TimeSpacingUnit | null;
|
|
197
|
-
timeAggregationInterval: number | null;
|
|
198
|
-
timeAggregationIntervalUnit: TimeSpacingUnit;
|
|
199
|
-
dataSourceId?: string | null;
|
|
200
|
-
valueCount: number;
|
|
201
|
-
thing: Thing;
|
|
202
|
-
workspace: Workspace;
|
|
203
|
-
unit: Unit;
|
|
204
|
-
observedProperty: ObservedProperty;
|
|
205
|
-
sensor: Sensor;
|
|
206
|
-
processingLevel: ProcessingLevel;
|
|
207
|
-
dataSource: DataSource;
|
|
208
|
-
}
|
|
209
|
-
export declare class Unit {
|
|
210
|
-
id: string;
|
|
211
|
-
workspaceId: string;
|
|
212
|
-
name: string;
|
|
213
|
-
symbol: string;
|
|
214
|
-
definition: string;
|
|
215
|
-
type: string;
|
|
216
|
-
constructor();
|
|
217
|
-
}
|
|
218
|
-
export declare class Sensor {
|
|
219
|
-
id: string;
|
|
220
|
-
workspaceId: string;
|
|
221
|
-
name: string;
|
|
222
|
-
description: string;
|
|
223
|
-
manufacturer: string;
|
|
224
|
-
model: string;
|
|
225
|
-
methodType: string;
|
|
226
|
-
methodCode: string;
|
|
227
|
-
methodLink: string;
|
|
228
|
-
encodingType: string;
|
|
229
|
-
modelLink: string;
|
|
230
|
-
constructor();
|
|
231
|
-
}
|
|
232
|
-
export declare class ObservedProperty {
|
|
233
|
-
id: string;
|
|
234
|
-
workspaceId: string;
|
|
235
|
-
name: string;
|
|
236
|
-
definition: string;
|
|
237
|
-
description: string;
|
|
238
|
-
type: string;
|
|
239
|
-
code: string;
|
|
240
|
-
constructor();
|
|
241
|
-
}
|
|
242
|
-
export declare class ProcessingLevel {
|
|
243
|
-
id: string;
|
|
244
|
-
workspaceId: string;
|
|
245
|
-
code: string;
|
|
246
|
-
definition: string;
|
|
247
|
-
explanation: string;
|
|
248
|
-
constructor();
|
|
249
|
-
}
|
|
250
|
-
export declare class ResultQualifier {
|
|
251
|
-
id: string;
|
|
252
|
-
workspaceId: string;
|
|
253
|
-
code: string;
|
|
254
|
-
description: string;
|
|
255
|
-
constructor();
|
|
256
|
-
}
|
|
257
|
-
export declare class Organization {
|
|
258
|
-
name?: string;
|
|
259
|
-
code?: string;
|
|
260
|
-
type?: string;
|
|
261
|
-
description?: string;
|
|
262
|
-
link?: string;
|
|
263
|
-
constructor();
|
|
264
|
-
}
|
|
265
|
-
export declare class User {
|
|
266
|
-
id: string;
|
|
267
|
-
email: string;
|
|
268
|
-
password: string;
|
|
269
|
-
firstName: string;
|
|
270
|
-
middleName: string;
|
|
271
|
-
lastName: string;
|
|
272
|
-
phone: string;
|
|
273
|
-
address: string;
|
|
274
|
-
organization?: Organization | null;
|
|
275
|
-
type: string;
|
|
276
|
-
link: string;
|
|
277
|
-
accountType: "admin" | "standard" | "limited";
|
|
278
|
-
hydroShareConnected: boolean;
|
|
279
|
-
constructor();
|
|
280
|
-
}
|
|
281
|
-
export interface Photo {
|
|
282
|
-
name: string;
|
|
283
|
-
link: string;
|
|
284
|
-
}
|
|
285
|
-
export declare class OAuthProvider {
|
|
286
|
-
id: string;
|
|
287
|
-
name: string;
|
|
288
|
-
iconLink: string;
|
|
289
|
-
signupEnabled: boolean;
|
|
290
|
-
connectEnabled: boolean;
|
|
291
|
-
constructor();
|
|
292
|
-
}
|
|
293
|
-
export declare enum PermissionAction {
|
|
294
|
-
Global = "*",
|
|
295
|
-
View = "view",
|
|
296
|
-
Create = "create",
|
|
297
|
-
Edit = "edit",
|
|
298
|
-
Delete = "delete"
|
|
299
|
-
}
|
|
300
|
-
export declare enum PermissionResource {
|
|
301
|
-
Global = "*",
|
|
302
|
-
Workspace = "Workspace",
|
|
303
|
-
Collaborator = "Collaborator",
|
|
304
|
-
Thing = "Thing",
|
|
305
|
-
Datastream = "Datastream",
|
|
306
|
-
Sensor = "Sensor",
|
|
307
|
-
Unit = "Unit",
|
|
308
|
-
ObservedProperty = "ObservedProperty",
|
|
309
|
-
ProcessingLevel = "ProcessingLevel",
|
|
310
|
-
Observation = "Observation"
|
|
311
|
-
}
|
|
312
|
-
export interface Permission {
|
|
313
|
-
action: PermissionAction;
|
|
314
|
-
resource: PermissionResource;
|
|
315
|
-
}
|
|
316
|
-
export interface CollaboratorRole {
|
|
317
|
-
name: string;
|
|
318
|
-
description: string;
|
|
319
|
-
id: string;
|
|
320
|
-
workspaceId: string;
|
|
321
|
-
isApikeyRole: boolean;
|
|
322
|
-
isUserRole: boolean;
|
|
323
|
-
permissions: Permission[];
|
|
324
|
-
}
|
|
325
|
-
export declare class ApiKey {
|
|
326
|
-
id: string;
|
|
327
|
-
key: string;
|
|
328
|
-
name: string;
|
|
329
|
-
description: string;
|
|
330
|
-
isActive: boolean;
|
|
331
|
-
expiresAt: string;
|
|
332
|
-
createdAt: string;
|
|
333
|
-
lastUsed: string;
|
|
334
|
-
workspaceId: string;
|
|
335
|
-
role: CollaboratorRole | null;
|
|
336
|
-
constructor(init?: Partial<ApiKey>);
|
|
337
|
-
}
|
|
338
|
-
export interface WorkspaceData {
|
|
339
|
-
id: string;
|
|
340
|
-
name: string;
|
|
341
|
-
isPrivate: boolean;
|
|
342
|
-
owner: User;
|
|
343
|
-
collaboratorRole: CollaboratorRole;
|
|
344
|
-
pendingTransferTo?: User | null;
|
|
345
|
-
}
|
|
346
|
-
export declare class Workspace {
|
|
347
|
-
id: string;
|
|
348
|
-
name: string;
|
|
349
|
-
isPrivate: boolean;
|
|
350
|
-
owner: UserInfo | null;
|
|
351
|
-
collaboratorRole: CollaboratorRole | null;
|
|
352
|
-
pendingTransferTo?: UserInfo | null;
|
|
353
|
-
constructor();
|
|
354
|
-
}
|
|
355
|
-
export interface UserInfo {
|
|
356
|
-
name: string;
|
|
357
|
-
email: string;
|
|
358
|
-
phone: string;
|
|
359
|
-
address: string;
|
|
360
|
-
link: string;
|
|
361
|
-
type: string;
|
|
362
|
-
organizationName: string;
|
|
363
|
-
}
|
|
364
|
-
export declare class Collaborator {
|
|
365
|
-
user: UserInfo;
|
|
366
|
-
role: CollaboratorRole;
|
|
367
|
-
constructor();
|
|
368
|
-
}
|
|
369
|
-
export interface ApiError {
|
|
370
|
-
status: number;
|
|
371
|
-
message?: string;
|
|
372
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/utils/format.d.ts
DELETED
package/dist/utils/index.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_SNACK_DURATION = 3000;
|
|
2
|
-
export declare enum SnackColor {
|
|
3
|
-
Warning = "warning",
|
|
4
|
-
Success = "success",
|
|
5
|
-
Error = "error",
|
|
6
|
-
Info = "info"
|
|
7
|
-
}
|
|
8
|
-
export declare enum SnackIcon {
|
|
9
|
-
Success = "mdi-checkbox-marked-circle",
|
|
10
|
-
Warning = "mdi-alert",
|
|
11
|
-
Error = "mdi-alert-circle",
|
|
12
|
-
Info = "mdi-information",
|
|
13
|
-
None = "none"
|
|
14
|
-
}
|
|
15
|
-
export declare enum SnackTitle {
|
|
16
|
-
Warning = "Warning",
|
|
17
|
-
Success = "Success",
|
|
18
|
-
Error = "Error",
|
|
19
|
-
Info = "Info"
|
|
20
|
-
}
|
|
21
|
-
export declare enum Position {
|
|
22
|
-
Center = "center",
|
|
23
|
-
Left = "left",
|
|
24
|
-
Right = "right",
|
|
25
|
-
Bottom = "bottom",
|
|
26
|
-
Top = "top"
|
|
27
|
-
}
|
|
28
|
-
export declare class Snack {
|
|
29
|
-
message: string;
|
|
30
|
-
color: SnackColor;
|
|
31
|
-
icon: SnackIcon;
|
|
32
|
-
title: SnackTitle;
|
|
33
|
-
timeout: number;
|
|
34
|
-
position: Position;
|
|
35
|
-
visible: boolean;
|
|
36
|
-
constructor(message?: string, color?: SnackColor, icon?: SnackIcon, title?: SnackTitle, timeout?: number, position?: Position, visible?: boolean);
|
|
37
|
-
}
|
|
38
|
-
export declare class Snackbar {
|
|
39
|
-
private static subject;
|
|
40
|
-
static get snack$(): import("rxjs").Observable<Snack>;
|
|
41
|
-
private static createSnackbar;
|
|
42
|
-
static success(message: string): void;
|
|
43
|
-
static warn(message: string): void;
|
|
44
|
-
static error(message: string): void;
|
|
45
|
-
static info(message: string): void;
|
|
46
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function subtractHours(timestamp: string, hours: number): string;
|
|
2
|
-
/** Returns the index of the first value that is greater or equal to the target value */
|
|
3
|
-
export declare const findFirstGreaterOrEqual: (array: number[] | Float64Array<SharedArrayBuffer>, target: number) => number;
|
|
4
|
-
/** Returns the index of the last value that is lesser or equal to the target value */
|
|
5
|
-
export declare const findLastLessOrEqual: (array: number[] | Float64Array<SharedArrayBuffer>, target: number) => number;
|