lamp-core-lst 2025.11.1-3.basic
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/.github/workflows/publish.yml +34 -0
- package/LICENSE.md +29 -0
- package/MANUAL.md +26 -0
- package/README.md +126 -0
- package/cli.js +2 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +311 -0
- package/dist/model/Activity.d.ts +81 -0
- package/dist/model/Activity.js +30 -0
- package/dist/model/ActivityEvent.d.ts +51 -0
- package/dist/model/ActivityEvent.js +21 -0
- package/dist/model/ActivitySpec.d.ts +38 -0
- package/dist/model/ActivitySpec.js +12 -0
- package/dist/model/Credential.d.ts +21 -0
- package/dist/model/Credential.js +12 -0
- package/dist/model/DynamicAttachment.d.ts +34 -0
- package/dist/model/DynamicAttachment.js +12 -0
- package/dist/model/Participant.d.ts +30 -0
- package/dist/model/Participant.js +12 -0
- package/dist/model/Researcher.d.ts +27 -0
- package/dist/model/Researcher.js +12 -0
- package/dist/model/ResearcherSettings.d.ts +57 -0
- package/dist/model/ResearcherSettings.js +12 -0
- package/dist/model/Sensor.d.ts +22 -0
- package/dist/model/Sensor.js +12 -0
- package/dist/model/SensorEvent.d.ts +18 -0
- package/dist/model/SensorEvent.js +12 -0
- package/dist/model/SensorSpec.d.ts +13 -0
- package/dist/model/SensorSpec.js +12 -0
- package/dist/model/Study.d.ts +24 -0
- package/dist/model/Study.js +12 -0
- package/dist/model/Type.d.ts +56 -0
- package/dist/model/Type.js +30 -0
- package/dist/model/index.d.ts +12 -0
- package/dist/model/index.js +24 -0
- package/dist/service/API.service.d.ts +12 -0
- package/dist/service/API.service.js +82 -0
- package/dist/service/Activity.service.d.ts +101 -0
- package/dist/service/Activity.service.js +756 -0
- package/dist/service/ActivityEvent.service.d.ts +46 -0
- package/dist/service/ActivityEvent.service.js +303 -0
- package/dist/service/ActivitySpec.service.d.ts +31 -0
- package/dist/service/ActivitySpec.service.js +173 -0
- package/dist/service/Credential.service.d.ts +38 -0
- package/dist/service/Credential.service.js +319 -0
- package/dist/service/Demo.d.ts +14 -0
- package/dist/service/Demo.js +24 -0
- package/dist/service/Fetch.d.ts +30 -0
- package/dist/service/Fetch.js +245 -0
- package/dist/service/Participant.service.d.ts +42 -0
- package/dist/service/Participant.service.js +312 -0
- package/dist/service/Researcher.service.d.ts +34 -0
- package/dist/service/Researcher.service.js +252 -0
- package/dist/service/ResearcherSettings.service.d.ts +16 -0
- package/dist/service/ResearcherSettings.service.js +114 -0
- package/dist/service/Sensor.service.d.ts +47 -0
- package/dist/service/Sensor.service.js +372 -0
- package/dist/service/SensorEvent.service.d.ts +44 -0
- package/dist/service/SensorEvent.service.js +302 -0
- package/dist/service/SensorSpec.service.d.ts +31 -0
- package/dist/service/SensorSpec.service.js +171 -0
- package/dist/service/Study.service.d.ts +42 -0
- package/dist/service/Study.service.js +286 -0
- package/dist/service/Type.service.d.ts +48 -0
- package/dist/service/Type.service.js +352 -0
- package/dist/service/index.d.ts +13 -0
- package/dist/service/index.js +25 -0
- package/docs/APIApi.md +82 -0
- package/docs/AccessCitation.md +11 -0
- package/docs/Activity.md +13 -0
- package/docs/ActivityApi.md +356 -0
- package/docs/ActivityEvent.md +13 -0
- package/docs/ActivityEventApi.md +251 -0
- package/docs/ActivitySpec.md +14 -0
- package/docs/ActivitySpecApi.md +222 -0
- package/docs/Credential.md +12 -0
- package/docs/CredentialApi.md +175 -0
- package/docs/Document.md +9 -0
- package/docs/DurationInterval.md +11 -0
- package/docs/DurationIntervalLegacy.md +10 -0
- package/docs/DynamicAttachment.md +14 -0
- package/docs/Error.md +8 -0
- package/docs/Metadata.md +8 -0
- package/docs/Participant.md +14 -0
- package/docs/ParticipantApi.md +312 -0
- package/docs/Researcher.md +12 -0
- package/docs/ResearcherApi.md +223 -0
- package/docs/Sensor.md +12 -0
- package/docs/SensorApi.md +356 -0
- package/docs/SensorEvent.md +11 -0
- package/docs/SensorEventApi.md +250 -0
- package/docs/SensorSpec.md +10 -0
- package/docs/SensorSpecApi.md +222 -0
- package/docs/Study.md +11 -0
- package/docs/StudyApi.md +268 -0
- package/docs/TemporalSlice.md +13 -0
- package/docs/TypeApi.md +274 -0
- package/package.json +44 -0
- package/src/index.ts +256 -0
- package/src/model/Activity.ts +93 -0
- package/src/model/ActivityEvent.ts +63 -0
- package/src/model/ActivitySpec.ts +45 -0
- package/src/model/Credential.ts +26 -0
- package/src/model/DynamicAttachment.ts +42 -0
- package/src/model/Participant.ts +37 -0
- package/src/model/Researcher.ts +33 -0
- package/src/model/ResearcherSettings.ts +65 -0
- package/src/model/Sensor.ts +27 -0
- package/src/model/SensorEvent.ts +22 -0
- package/src/model/SensorSpec.ts +16 -0
- package/src/model/Study.ts +29 -0
- package/src/model/Type.ts +68 -0
- package/src/model/index.ts +12 -0
- package/src/service/API.service.ts +29 -0
- package/src/service/Activity.service.ts +625 -0
- package/src/service/ActivityEvent.service.ts +244 -0
- package/src/service/ActivitySpec.service.ts +98 -0
- package/src/service/Credential.service.ts +268 -0
- package/src/service/Demo.ts +21 -0
- package/src/service/Fetch.ts +187 -0
- package/src/service/Participant.service.ts +217 -0
- package/src/service/Researcher.service.ts +147 -0
- package/src/service/ResearcherSettings.service.ts +62 -0
- package/src/service/Sensor.service.ts +256 -0
- package/src/service/SensorEvent.service.ts +239 -0
- package/src/service/SensorSpec.service.ts +96 -0
- package/src/service/Study.service.ts +187 -0
- package/src/service/Type.service.ts +297 -0
- package/src/service/index.ts +13 -0
- package/tsconfig.json +29 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Document = exports.Metadata = exports.AccessCitation = void 0;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
var AccessCitation = /** @class */ (function () {
|
|
8
|
+
function AccessCitation() {
|
|
9
|
+
}
|
|
10
|
+
return AccessCitation;
|
|
11
|
+
}());
|
|
12
|
+
exports.AccessCitation = AccessCitation;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
var Metadata = /** @class */ (function () {
|
|
17
|
+
function Metadata() {
|
|
18
|
+
}
|
|
19
|
+
return Metadata;
|
|
20
|
+
}());
|
|
21
|
+
exports.Metadata = Metadata;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
var Document = /** @class */ (function () {
|
|
26
|
+
function Document() {
|
|
27
|
+
}
|
|
28
|
+
return Document;
|
|
29
|
+
}());
|
|
30
|
+
exports.Document = Document;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './Activity';
|
|
2
|
+
export * from './ActivityEvent';
|
|
3
|
+
export * from './ActivitySpec';
|
|
4
|
+
export * from './Credential';
|
|
5
|
+
export * from './Participant';
|
|
6
|
+
export * from './Researcher';
|
|
7
|
+
export * from './ResearcherSettings';
|
|
8
|
+
export * from './Sensor';
|
|
9
|
+
export * from './SensorEvent';
|
|
10
|
+
export * from './SensorSpec';
|
|
11
|
+
export * from './Study';
|
|
12
|
+
export * from './Type';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Activity"), exports);
|
|
14
|
+
__exportStar(require("./ActivityEvent"), exports);
|
|
15
|
+
__exportStar(require("./ActivitySpec"), exports);
|
|
16
|
+
__exportStar(require("./Credential"), exports);
|
|
17
|
+
__exportStar(require("./Participant"), exports);
|
|
18
|
+
__exportStar(require("./Researcher"), exports);
|
|
19
|
+
__exportStar(require("./ResearcherSettings"), exports);
|
|
20
|
+
__exportStar(require("./Sensor"), exports);
|
|
21
|
+
__exportStar(require("./SensorEvent"), exports);
|
|
22
|
+
__exportStar(require("./SensorSpec"), exports);
|
|
23
|
+
__exportStar(require("./Study"), exports);
|
|
24
|
+
__exportStar(require("./Type"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Configuration } from "./Fetch";
|
|
2
|
+
export declare class APIService {
|
|
3
|
+
configuration?: Configuration;
|
|
4
|
+
/**
|
|
5
|
+
* Query the LAMP Database.
|
|
6
|
+
*/
|
|
7
|
+
query(transform: string): Promise<{}>;
|
|
8
|
+
/**
|
|
9
|
+
* View the API schema document.
|
|
10
|
+
*/
|
|
11
|
+
schema(): Promise<{}>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
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;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.APIService = void 0;
|
|
40
|
+
var Fetch_1 = require("./Fetch");
|
|
41
|
+
var APIService = /** @class */ (function () {
|
|
42
|
+
function APIService() {
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Query the LAMP Database.
|
|
46
|
+
*/
|
|
47
|
+
APIService.prototype.query = function (transform) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
49
|
+
return __generator(this, function (_a) {
|
|
50
|
+
switch (_a.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
if (this.configuration.base === "https://demo.lamp.digital") {
|
|
53
|
+
// DEMO
|
|
54
|
+
return [2 /*return*/, Promise.resolve({ error: "500.demo-unavailable" })];
|
|
55
|
+
}
|
|
56
|
+
return [4 /*yield*/, Fetch_1.Fetch.post("/", transform, this.configuration)];
|
|
57
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* View the API schema document.
|
|
64
|
+
*/
|
|
65
|
+
APIService.prototype.schema = function () {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
return __generator(this, function (_a) {
|
|
68
|
+
switch (_a.label) {
|
|
69
|
+
case 0:
|
|
70
|
+
if (this.configuration.base === "https://demo.lamp.digital") {
|
|
71
|
+
// DEMO
|
|
72
|
+
return [2 /*return*/, Promise.resolve({ error: "500.demo-unavailable" })];
|
|
73
|
+
}
|
|
74
|
+
return [4 /*yield*/, Fetch_1.Fetch.get("/", this.configuration)];
|
|
75
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
return APIService;
|
|
81
|
+
}());
|
|
82
|
+
exports.APIService = APIService;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Configuration } from "./Fetch";
|
|
2
|
+
import { Activity } from "../model/Activity";
|
|
3
|
+
import { Identifier } from "../model/Type";
|
|
4
|
+
export declare class ActivityService {
|
|
5
|
+
configuration?: Configuration;
|
|
6
|
+
/**
|
|
7
|
+
* Get the set of all activities.
|
|
8
|
+
*/
|
|
9
|
+
all(transform?: string): Promise<Activity[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Get the set of all activities available to a participant, by participant identifier.
|
|
12
|
+
* @param participantId
|
|
13
|
+
*/
|
|
14
|
+
allByParticipant(participantId: Identifier, transform?: string, ignore_binary?: boolean, limit?: number, offset?: number): Promise<{
|
|
15
|
+
data: Activity[];
|
|
16
|
+
total: number;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Get the set of all activities available to participants of any study conducted by a researcher, by researcher identifier.
|
|
20
|
+
* @param researcherId
|
|
21
|
+
*/
|
|
22
|
+
allByResearcher(researcherId: Identifier, transform?: string): Promise<Activity[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Get the set of all activities available to participants of a single study, by study identifier.
|
|
25
|
+
* @param studyId
|
|
26
|
+
*/
|
|
27
|
+
allByStudy(studyId: Identifier, transform?: string, ignore_binary?: boolean): Promise<Activity[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Get the set of all activities available to participants of a single study, by participant identifier.
|
|
30
|
+
* @param participantId
|
|
31
|
+
*/
|
|
32
|
+
listActivities(participantId: Identifier, tab?: string, transform?: string, limit?: number, offset?: number): Promise<{
|
|
33
|
+
data: any;
|
|
34
|
+
total: number;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Create a new Activity under the given Study.
|
|
38
|
+
* @param studyId
|
|
39
|
+
* @param activity
|
|
40
|
+
*/
|
|
41
|
+
create(studyId: Identifier, activity: Activity): Promise<Identifier>;
|
|
42
|
+
/**
|
|
43
|
+
* Delete an Activity.
|
|
44
|
+
* @param activityId
|
|
45
|
+
*/
|
|
46
|
+
delete(activityId: Identifier): Promise<Identifier>;
|
|
47
|
+
/**
|
|
48
|
+
* Update an Activity's settings.
|
|
49
|
+
* @param activityId
|
|
50
|
+
* @param activity
|
|
51
|
+
*/
|
|
52
|
+
update(activityId: Identifier, activity: Activity): Promise<Identifier>;
|
|
53
|
+
/**
|
|
54
|
+
* Get a single activity, by identifier.
|
|
55
|
+
* @param activityId
|
|
56
|
+
*/
|
|
57
|
+
view(activityId: Identifier, transform?: string, ignore_binary?: boolean): Promise<Activity>;
|
|
58
|
+
/**
|
|
59
|
+
* Get the set of all sub-activities available to a module, by module identifier.
|
|
60
|
+
* @param moduleId
|
|
61
|
+
* @param participantId
|
|
62
|
+
*/
|
|
63
|
+
moduleByParticipant(moduleId: Identifier, participantId: Identifier, startTime?: number, endTime?: number): Promise<any[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Get the set of all scheduled activities available to a participant, by participant identifier.
|
|
66
|
+
* @param participantId
|
|
67
|
+
*/
|
|
68
|
+
scheduledActivities(participantId: Identifier, transform?: string, ignore_binary?: boolean): Promise<Activity[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Get the set of all empty tabs by participant identifier.
|
|
71
|
+
* @param participantId
|
|
72
|
+
*/
|
|
73
|
+
emptyTabs(participantId: Identifier, transform?: string): Promise<Activity[]>;
|
|
74
|
+
/**
|
|
75
|
+
* Delete multiple activities.
|
|
76
|
+
* @param activities
|
|
77
|
+
*/
|
|
78
|
+
deleteActivities(activities: any): Promise<{
|
|
79
|
+
error?: string;
|
|
80
|
+
}>;
|
|
81
|
+
/**
|
|
82
|
+
* Get the set of all sub-activities available to a module in participant feed, by module identifier,participant Identifier,startTime and EndTime.
|
|
83
|
+
* @param participantId
|
|
84
|
+
* @param modules
|
|
85
|
+
*/
|
|
86
|
+
feedModules(participantId: Identifier, modules: any): Promise<any[]>;
|
|
87
|
+
/**
|
|
88
|
+
* Get the list of favorite activity IDs for a participant.
|
|
89
|
+
* Returns custom selected activity IDs if Researcher_settings choice is "custom",
|
|
90
|
+
* otherwise returns the last 10 activity IDs most recently added to lamp.dashboard.favorite_activities tag.
|
|
91
|
+
* @param participantId
|
|
92
|
+
* @param transform
|
|
93
|
+
*/
|
|
94
|
+
favoriteActivityIds(participantId: Identifier, transform?: string): Promise<string[]>;
|
|
95
|
+
/**
|
|
96
|
+
* Get feed details (schedule window entries with completion) for a participant and optional date (ms since epoch).
|
|
97
|
+
* @param participantId
|
|
98
|
+
* @param dateMs optional UTC ms for the day to fetch; defaults to today if omitted
|
|
99
|
+
*/
|
|
100
|
+
feedDetails(participantId: Identifier, dateMs?: string): Promise<any>;
|
|
101
|
+
}
|