@dataworks-technology/data 0.2.0 → 0.3.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/README.md +88 -3
- package/dist/index.cjs +48922 -222
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -36
- package/dist/index.d.ts +92 -36
- package/dist/index.js +48946 -212
- package/dist/index.js.map +1 -1
- package/dist/schema.cjs +72 -0
- package/dist/schema.cjs.map +1 -0
- package/dist/schema.d.cts +1 -0
- package/dist/schema.d.ts +1 -0
- package/dist/schema.js +42 -0
- package/dist/schema.js.map +1 -0
- package/package.json +14 -3
package/dist/schema.cjs
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/schema.ts
|
|
21
|
+
var schema_exports = {};
|
|
22
|
+
__export(schema_exports, {
|
|
23
|
+
DataExplorerMetricCategory: () => DataExplorerMetricCategory,
|
|
24
|
+
DataExplorerOrderDirection: () => DataExplorerOrderDirection,
|
|
25
|
+
MetricType: () => MetricType,
|
|
26
|
+
ModelSortDirection: () => ModelSortDirection
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(schema_exports);
|
|
29
|
+
|
|
30
|
+
// ../../node_modules/@dataworks/sdk/dist/shared/interfaces/schema-data.js
|
|
31
|
+
var DataExplorerMetricCategory;
|
|
32
|
+
(function(DataExplorerMetricCategory2) {
|
|
33
|
+
DataExplorerMetricCategory2["MetricsTypeA"] = "METRICS_TYPE_A";
|
|
34
|
+
DataExplorerMetricCategory2["MetricsTypeB"] = "METRICS_TYPE_B";
|
|
35
|
+
DataExplorerMetricCategory2["MetricsTypeC"] = "METRICS_TYPE_C";
|
|
36
|
+
})(DataExplorerMetricCategory || (DataExplorerMetricCategory = {}));
|
|
37
|
+
var DataExplorerOrderDirection;
|
|
38
|
+
(function(DataExplorerOrderDirection2) {
|
|
39
|
+
DataExplorerOrderDirection2["Asc"] = "ASC";
|
|
40
|
+
DataExplorerOrderDirection2["Desc"] = "DESC";
|
|
41
|
+
})(DataExplorerOrderDirection || (DataExplorerOrderDirection = {}));
|
|
42
|
+
var MetricType;
|
|
43
|
+
(function(MetricType2) {
|
|
44
|
+
MetricType2["Altitude"] = "ALTITUDE";
|
|
45
|
+
MetricType2["Cadence"] = "CADENCE";
|
|
46
|
+
MetricType2["Checkpoint"] = "CHECKPOINT";
|
|
47
|
+
MetricType2["Distance"] = "DISTANCE";
|
|
48
|
+
MetricType2["Gps"] = "GPS";
|
|
49
|
+
MetricType2["Heartrate"] = "HEARTRATE";
|
|
50
|
+
MetricType2["Lap"] = "LAP";
|
|
51
|
+
MetricType2["Pace"] = "PACE";
|
|
52
|
+
MetricType2["Power"] = "POWER";
|
|
53
|
+
MetricType2["Rank"] = "RANK";
|
|
54
|
+
MetricType2["Sector"] = "SECTOR";
|
|
55
|
+
MetricType2["Segment"] = "SEGMENT";
|
|
56
|
+
MetricType2["Speed"] = "SPEED";
|
|
57
|
+
MetricType2["Status"] = "STATUS";
|
|
58
|
+
MetricType2["Timing"] = "TIMING";
|
|
59
|
+
})(MetricType || (MetricType = {}));
|
|
60
|
+
var ModelSortDirection;
|
|
61
|
+
(function(ModelSortDirection2) {
|
|
62
|
+
ModelSortDirection2["Asc"] = "ASC";
|
|
63
|
+
ModelSortDirection2["Desc"] = "DESC";
|
|
64
|
+
})(ModelSortDirection || (ModelSortDirection = {}));
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
DataExplorerMetricCategory,
|
|
68
|
+
DataExplorerOrderDirection,
|
|
69
|
+
MetricType,
|
|
70
|
+
ModelSortDirection
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=schema.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schema.ts","../../../node_modules/@dataworks/sdk/dist/shared/interfaces/schema-data.js"],"sourcesContent":["export * from \"@dataworks/sdk/schema-data\";\n","// DO NOT EDIT THIS FILE!\n// This file is AUTOMATICALLY GENERATED by @graphql-codegen/cli.\n// Source schema: Dataworks (Data Engine) — packages/infra/modules/appsync-rds/dw-schema.graphql\n// Codegen config: Dataworks (Data Engine) — packages/shared/codegen.ts\n// To regenerate, run `bun run codegen` from Dataworks/packages/shared/\n// After regenerating, copy to Dataworks-SDK/src/shared/interfaces/schema-data.ts and publish.\nexport var DataExplorerMetricCategory;\n(function (DataExplorerMetricCategory) {\n DataExplorerMetricCategory[\"MetricsTypeA\"] = \"METRICS_TYPE_A\";\n DataExplorerMetricCategory[\"MetricsTypeB\"] = \"METRICS_TYPE_B\";\n DataExplorerMetricCategory[\"MetricsTypeC\"] = \"METRICS_TYPE_C\";\n})(DataExplorerMetricCategory || (DataExplorerMetricCategory = {}));\nexport var DataExplorerOrderDirection;\n(function (DataExplorerOrderDirection) {\n DataExplorerOrderDirection[\"Asc\"] = \"ASC\";\n DataExplorerOrderDirection[\"Desc\"] = \"DESC\";\n})(DataExplorerOrderDirection || (DataExplorerOrderDirection = {}));\nexport var MetricType;\n(function (MetricType) {\n MetricType[\"Altitude\"] = \"ALTITUDE\";\n MetricType[\"Cadence\"] = \"CADENCE\";\n MetricType[\"Checkpoint\"] = \"CHECKPOINT\";\n MetricType[\"Distance\"] = \"DISTANCE\";\n MetricType[\"Gps\"] = \"GPS\";\n MetricType[\"Heartrate\"] = \"HEARTRATE\";\n MetricType[\"Lap\"] = \"LAP\";\n MetricType[\"Pace\"] = \"PACE\";\n MetricType[\"Power\"] = \"POWER\";\n MetricType[\"Rank\"] = \"RANK\";\n MetricType[\"Sector\"] = \"SECTOR\";\n MetricType[\"Segment\"] = \"SEGMENT\";\n MetricType[\"Speed\"] = \"SPEED\";\n MetricType[\"Status\"] = \"STATUS\";\n MetricType[\"Timing\"] = \"TIMING\";\n})(MetricType || (MetricType = {}));\n/** ENUMs */\nexport var ModelSortDirection;\n(function (ModelSortDirection) {\n ModelSortDirection[\"Asc\"] = \"ASC\";\n ModelSortDirection[\"Desc\"] = \"DESC\";\n})(ModelSortDirection || (ModelSortDirection = {}));\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,IAAI;AAAA,CACV,SAAUA,6BAA4B;AACnC,EAAAA,4BAA2B,cAAc,IAAI;AAC7C,EAAAA,4BAA2B,cAAc,IAAI;AAC7C,EAAAA,4BAA2B,cAAc,IAAI;AACjD,GAAG,+BAA+B,6BAA6B,CAAC,EAAE;AAC3D,IAAI;AAAA,CACV,SAAUC,6BAA4B;AACnC,EAAAA,4BAA2B,KAAK,IAAI;AACpC,EAAAA,4BAA2B,MAAM,IAAI;AACzC,GAAG,+BAA+B,6BAA6B,CAAC,EAAE;AAC3D,IAAI;AAAA,CACV,SAAUC,aAAY;AACnB,EAAAA,YAAW,UAAU,IAAI;AACzB,EAAAA,YAAW,SAAS,IAAI;AACxB,EAAAA,YAAW,YAAY,IAAI;AAC3B,EAAAA,YAAW,UAAU,IAAI;AACzB,EAAAA,YAAW,KAAK,IAAI;AACpB,EAAAA,YAAW,WAAW,IAAI;AAC1B,EAAAA,YAAW,KAAK,IAAI;AACpB,EAAAA,YAAW,MAAM,IAAI;AACrB,EAAAA,YAAW,OAAO,IAAI;AACtB,EAAAA,YAAW,MAAM,IAAI;AACrB,EAAAA,YAAW,QAAQ,IAAI;AACvB,EAAAA,YAAW,SAAS,IAAI;AACxB,EAAAA,YAAW,OAAO,IAAI;AACtB,EAAAA,YAAW,QAAQ,IAAI;AACvB,EAAAA,YAAW,QAAQ,IAAI;AAC3B,GAAG,eAAe,aAAa,CAAC,EAAE;AAE3B,IAAI;AAAA,CACV,SAAUC,qBAAoB;AAC3B,EAAAA,oBAAmB,KAAK,IAAI;AAC5B,EAAAA,oBAAmB,MAAM,IAAI;AACjC,GAAG,uBAAuB,qBAAqB,CAAC,EAAE;","names":["DataExplorerMetricCategory","DataExplorerOrderDirection","MetricType","ModelSortDirection"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@dataworks/sdk/schema-data';
|
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@dataworks/sdk/schema-data';
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// ../../node_modules/@dataworks/sdk/dist/shared/interfaces/schema-data.js
|
|
2
|
+
var DataExplorerMetricCategory;
|
|
3
|
+
(function(DataExplorerMetricCategory2) {
|
|
4
|
+
DataExplorerMetricCategory2["MetricsTypeA"] = "METRICS_TYPE_A";
|
|
5
|
+
DataExplorerMetricCategory2["MetricsTypeB"] = "METRICS_TYPE_B";
|
|
6
|
+
DataExplorerMetricCategory2["MetricsTypeC"] = "METRICS_TYPE_C";
|
|
7
|
+
})(DataExplorerMetricCategory || (DataExplorerMetricCategory = {}));
|
|
8
|
+
var DataExplorerOrderDirection;
|
|
9
|
+
(function(DataExplorerOrderDirection2) {
|
|
10
|
+
DataExplorerOrderDirection2["Asc"] = "ASC";
|
|
11
|
+
DataExplorerOrderDirection2["Desc"] = "DESC";
|
|
12
|
+
})(DataExplorerOrderDirection || (DataExplorerOrderDirection = {}));
|
|
13
|
+
var MetricType;
|
|
14
|
+
(function(MetricType2) {
|
|
15
|
+
MetricType2["Altitude"] = "ALTITUDE";
|
|
16
|
+
MetricType2["Cadence"] = "CADENCE";
|
|
17
|
+
MetricType2["Checkpoint"] = "CHECKPOINT";
|
|
18
|
+
MetricType2["Distance"] = "DISTANCE";
|
|
19
|
+
MetricType2["Gps"] = "GPS";
|
|
20
|
+
MetricType2["Heartrate"] = "HEARTRATE";
|
|
21
|
+
MetricType2["Lap"] = "LAP";
|
|
22
|
+
MetricType2["Pace"] = "PACE";
|
|
23
|
+
MetricType2["Power"] = "POWER";
|
|
24
|
+
MetricType2["Rank"] = "RANK";
|
|
25
|
+
MetricType2["Sector"] = "SECTOR";
|
|
26
|
+
MetricType2["Segment"] = "SEGMENT";
|
|
27
|
+
MetricType2["Speed"] = "SPEED";
|
|
28
|
+
MetricType2["Status"] = "STATUS";
|
|
29
|
+
MetricType2["Timing"] = "TIMING";
|
|
30
|
+
})(MetricType || (MetricType = {}));
|
|
31
|
+
var ModelSortDirection;
|
|
32
|
+
(function(ModelSortDirection2) {
|
|
33
|
+
ModelSortDirection2["Asc"] = "ASC";
|
|
34
|
+
ModelSortDirection2["Desc"] = "DESC";
|
|
35
|
+
})(ModelSortDirection || (ModelSortDirection = {}));
|
|
36
|
+
export {
|
|
37
|
+
DataExplorerMetricCategory,
|
|
38
|
+
DataExplorerOrderDirection,
|
|
39
|
+
MetricType,
|
|
40
|
+
ModelSortDirection
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/@dataworks/sdk/dist/shared/interfaces/schema-data.js"],"sourcesContent":["// DO NOT EDIT THIS FILE!\n// This file is AUTOMATICALLY GENERATED by @graphql-codegen/cli.\n// Source schema: Dataworks (Data Engine) — packages/infra/modules/appsync-rds/dw-schema.graphql\n// Codegen config: Dataworks (Data Engine) — packages/shared/codegen.ts\n// To regenerate, run `bun run codegen` from Dataworks/packages/shared/\n// After regenerating, copy to Dataworks-SDK/src/shared/interfaces/schema-data.ts and publish.\nexport var DataExplorerMetricCategory;\n(function (DataExplorerMetricCategory) {\n DataExplorerMetricCategory[\"MetricsTypeA\"] = \"METRICS_TYPE_A\";\n DataExplorerMetricCategory[\"MetricsTypeB\"] = \"METRICS_TYPE_B\";\n DataExplorerMetricCategory[\"MetricsTypeC\"] = \"METRICS_TYPE_C\";\n})(DataExplorerMetricCategory || (DataExplorerMetricCategory = {}));\nexport var DataExplorerOrderDirection;\n(function (DataExplorerOrderDirection) {\n DataExplorerOrderDirection[\"Asc\"] = \"ASC\";\n DataExplorerOrderDirection[\"Desc\"] = \"DESC\";\n})(DataExplorerOrderDirection || (DataExplorerOrderDirection = {}));\nexport var MetricType;\n(function (MetricType) {\n MetricType[\"Altitude\"] = \"ALTITUDE\";\n MetricType[\"Cadence\"] = \"CADENCE\";\n MetricType[\"Checkpoint\"] = \"CHECKPOINT\";\n MetricType[\"Distance\"] = \"DISTANCE\";\n MetricType[\"Gps\"] = \"GPS\";\n MetricType[\"Heartrate\"] = \"HEARTRATE\";\n MetricType[\"Lap\"] = \"LAP\";\n MetricType[\"Pace\"] = \"PACE\";\n MetricType[\"Power\"] = \"POWER\";\n MetricType[\"Rank\"] = \"RANK\";\n MetricType[\"Sector\"] = \"SECTOR\";\n MetricType[\"Segment\"] = \"SEGMENT\";\n MetricType[\"Speed\"] = \"SPEED\";\n MetricType[\"Status\"] = \"STATUS\";\n MetricType[\"Timing\"] = \"TIMING\";\n})(MetricType || (MetricType = {}));\n/** ENUMs */\nexport var ModelSortDirection;\n(function (ModelSortDirection) {\n ModelSortDirection[\"Asc\"] = \"ASC\";\n ModelSortDirection[\"Desc\"] = \"DESC\";\n})(ModelSortDirection || (ModelSortDirection = {}));\n"],"mappings":";AAMO,IAAI;AAAA,CACV,SAAUA,6BAA4B;AACnC,EAAAA,4BAA2B,cAAc,IAAI;AAC7C,EAAAA,4BAA2B,cAAc,IAAI;AAC7C,EAAAA,4BAA2B,cAAc,IAAI;AACjD,GAAG,+BAA+B,6BAA6B,CAAC,EAAE;AAC3D,IAAI;AAAA,CACV,SAAUC,6BAA4B;AACnC,EAAAA,4BAA2B,KAAK,IAAI;AACpC,EAAAA,4BAA2B,MAAM,IAAI;AACzC,GAAG,+BAA+B,6BAA6B,CAAC,EAAE;AAC3D,IAAI;AAAA,CACV,SAAUC,aAAY;AACnB,EAAAA,YAAW,UAAU,IAAI;AACzB,EAAAA,YAAW,SAAS,IAAI;AACxB,EAAAA,YAAW,YAAY,IAAI;AAC3B,EAAAA,YAAW,UAAU,IAAI;AACzB,EAAAA,YAAW,KAAK,IAAI;AACpB,EAAAA,YAAW,WAAW,IAAI;AAC1B,EAAAA,YAAW,KAAK,IAAI;AACpB,EAAAA,YAAW,MAAM,IAAI;AACrB,EAAAA,YAAW,OAAO,IAAI;AACtB,EAAAA,YAAW,MAAM,IAAI;AACrB,EAAAA,YAAW,QAAQ,IAAI;AACvB,EAAAA,YAAW,SAAS,IAAI;AACxB,EAAAA,YAAW,OAAO,IAAI;AACtB,EAAAA,YAAW,QAAQ,IAAI;AACvB,EAAAA,YAAW,QAAQ,IAAI;AAC3B,GAAG,eAAe,aAAa,CAAC,EAAE;AAE3B,IAAI;AAAA,CACV,SAAUC,qBAAoB;AAC3B,EAAAA,oBAAmB,KAAK,IAAI;AAC5B,EAAAA,oBAAmB,MAAM,IAAI;AACjC,GAAG,uBAAuB,qBAAqB,CAAC,EAAE;","names":["DataExplorerMetricCategory","DataExplorerOrderDirection","MetricType","ModelSortDirection"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dataworks-technology/data",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Dataworks Data Engine SDK — authenticate, ingest metrics, and subscribe to live data",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.js",
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./schema": {
|
|
16
|
+
"types": "./dist/schema.d.ts",
|
|
17
|
+
"import": "./dist/schema.js",
|
|
18
|
+
"require": "./dist/schema.cjs"
|
|
14
19
|
}
|
|
15
20
|
},
|
|
16
21
|
"files": [
|
|
@@ -21,6 +26,7 @@
|
|
|
21
26
|
"build": "tsup",
|
|
22
27
|
"dev": "tsup --watch",
|
|
23
28
|
"test": "vitest run",
|
|
29
|
+
"test:e2e": "cd ../.. && bun x vitest run test/e2e-data-client.test.ts",
|
|
24
30
|
"prepublishOnly": "bun run build",
|
|
25
31
|
"publish:patch": "npm version patch && npm publish --@dataworks-technology:registry=https://registry.npmjs.org/",
|
|
26
32
|
"publish:minor": "npm version minor && npm publish --@dataworks-technology:registry=https://registry.npmjs.org/",
|
|
@@ -45,10 +51,15 @@
|
|
|
45
51
|
},
|
|
46
52
|
"homepage": "https://data-sdk-docs.dataworks.live",
|
|
47
53
|
"devDependencies": {
|
|
48
|
-
"@dataworks/sdk": "
|
|
54
|
+
"@dataworks/sdk": "2.0.0",
|
|
49
55
|
"tsup": "^8.4.0",
|
|
50
56
|
"typescript": "^5.8.3",
|
|
51
57
|
"vitest": "^3.2.3"
|
|
52
58
|
},
|
|
53
|
-
"dependencies": {
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@apollo/client": "^4.2.1",
|
|
61
|
+
"aws-appsync-subscription-link": "^4.0.3",
|
|
62
|
+
"graphql": "^16.14.1",
|
|
63
|
+
"graphql-ws": "^6.0.8"
|
|
64
|
+
}
|
|
54
65
|
}
|