@aneuhold/core-ts-api-lib 3.0.10 → 3.0.12
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/CHANGELOG.md +34 -0
- package/lib/browser.d.ts +5 -4
- package/lib/browser.d.ts.map +1 -1
- package/lib/browser.js.map +1 -1
- package/lib/browser.ts +16 -4
- package/lib/services/APIService/APIService.d.ts +9 -1
- package/lib/services/APIService/APIService.d.ts.map +1 -1
- package/lib/services/APIService/APIService.js +9 -0
- package/lib/services/APIService/APIService.js.map +1 -1
- package/lib/services/APIService/APIService.ts +17 -1
- package/lib/services/GCloudAPIService/GCloudAPIService.d.ts +8 -1
- package/lib/services/GCloudAPIService/GCloudAPIService.d.ts.map +1 -1
- package/lib/services/GCloudAPIService/GCloudAPIService.js +8 -0
- package/lib/services/GCloudAPIService/GCloudAPIService.js.map +1 -1
- package/lib/services/GCloudAPIService/GCloudAPIService.ts +19 -1
- package/lib/types/AuthValidateUser.d.ts +3 -3
- package/lib/types/AuthValidateUser.d.ts.map +1 -1
- package/lib/types/AuthValidateUser.ts +3 -3
- package/lib/types/WebSocket.d.ts +14 -1
- package/lib/types/WebSocket.d.ts.map +1 -1
- package/lib/types/WebSocket.ts +16 -1
- package/lib/types/project/dashboard/DashboardConfig.d.ts.map +1 -0
- package/lib/types/project/dashboard/DashboardConfig.js.map +1 -0
- package/lib/types/{ProjectDashboard.d.ts → project/dashboard/ProjectDashboard.d.ts} +1 -1
- package/lib/types/project/dashboard/ProjectDashboard.d.ts.map +1 -0
- package/lib/types/project/dashboard/ProjectDashboard.js.map +1 -0
- package/lib/types/{ProjectDashboard.ts → project/dashboard/ProjectDashboard.ts} +1 -1
- package/lib/types/project/workout/ProjectWorkout.d.ts +271 -0
- package/lib/types/project/workout/ProjectWorkout.d.ts.map +1 -0
- package/lib/types/project/workout/ProjectWorkout.js +2 -0
- package/lib/types/project/workout/ProjectWorkout.js.map +1 -0
- package/lib/types/project/workout/ProjectWorkout.ts +284 -0
- package/package.json +2 -2
- package/lib/types/DashboardConfig.d.ts.map +0 -1
- package/lib/types/DashboardConfig.js.map +0 -1
- package/lib/types/ProjectDashboard.d.ts.map +0 -1
- package/lib/types/ProjectDashboard.js.map +0 -1
- /package/lib/types/{DashboardConfig.d.ts → project/dashboard/DashboardConfig.d.ts} +0 -0
- /package/lib/types/{DashboardConfig.js → project/dashboard/DashboardConfig.js} +0 -0
- /package/lib/types/{DashboardConfig.ts → project/dashboard/DashboardConfig.ts} +0 -0
- /package/lib/types/{ProjectDashboard.js → project/dashboard/ProjectDashboard.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,38 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 🔖 [3.0.12] (2026-02-07)
|
|
9
|
+
|
|
10
|
+
### ✅ Added
|
|
11
|
+
|
|
12
|
+
- Added new workout API types and endpoint: `ProjectWorkoutPrimaryInput`, `ProjectWorkoutPrimaryOutput`, and related types under `src/types/project/workout/`.
|
|
13
|
+
- Added `APIService.callWorkoutAPI()` and `GCloudAPIService.projectWorkout()` for workout endpoint integration.
|
|
14
|
+
- Added WebSocket types for workout events: `WorkoutWebSocketClientToServerEvents`, `WorkoutWebSocketServerToClientEvents`.
|
|
15
|
+
|
|
16
|
+
### 🏗️ Changed
|
|
17
|
+
|
|
18
|
+
- Refactored dashboard types: moved `DashboardConfig` and `ProjectDashboard` types to `src/types/project/dashboard/`.
|
|
19
|
+
- Updated all imports and exports to use new dashboard/workout type locations for improved organization.
|
|
20
|
+
- Updated API and GCloudAPI services to use new type paths and support workout endpoint.
|
|
21
|
+
|
|
22
|
+
### 🩹 Fixed
|
|
23
|
+
|
|
24
|
+
- Fixed type references and imports for dashboard and workout types throughout the codebase.
|
|
25
|
+
|
|
26
|
+
### 🔥 Removed
|
|
27
|
+
|
|
28
|
+
- Removed old dashboard type files from root of `src/types` (now under `project/dashboard/`).
|
|
29
|
+
|
|
30
|
+
## 🔖 [3.0.11] (2026-02-06)
|
|
31
|
+
|
|
32
|
+
### 🏗️ Changed
|
|
33
|
+
|
|
34
|
+
- Updated dependency: now requires `@aneuhold/core-ts-db-lib@^4.1.1`.
|
|
35
|
+
|
|
36
|
+
### 🩹 Fixed
|
|
37
|
+
|
|
38
|
+
- No direct code changes; version bump for compatibility with new major versions of dependencies.
|
|
39
|
+
|
|
8
40
|
## 🔖 [3.0.10] (2026-02-06)
|
|
9
41
|
|
|
10
42
|
### ✅ Added
|
|
@@ -202,6 +234,8 @@ No direct code changes; version bump for compatibility.
|
|
|
202
234
|
|
|
203
235
|
<!-- Link References -->
|
|
204
236
|
|
|
237
|
+
[3.0.12]: https://github.com/aneuhold/ts-libs/compare/core-ts-api-lib-v3.0.11...core-ts-api-lib-v3.0.12
|
|
238
|
+
[3.0.11]: https://github.com/aneuhold/ts-libs/compare/core-ts-api-lib-v3.0.10...core-ts-api-lib-v3.0.11
|
|
205
239
|
[3.0.10]: https://github.com/aneuhold/ts-libs/compare/core-ts-api-lib-v3.0.9...core-ts-api-lib-v3.0.10
|
|
206
240
|
[3.0.9]: https://github.com/aneuhold/ts-libs/compare/core-ts-api-lib-v3.0.8...core-ts-api-lib-v3.0.9
|
|
207
241
|
[3.0.8]: https://github.com/aneuhold/ts-libs/compare/core-ts-api-lib-v3.0.7...core-ts-api-lib-v3.0.8
|
package/lib/browser.d.ts
CHANGED
|
@@ -2,10 +2,11 @@ import APIService from './services/APIService/APIService.js';
|
|
|
2
2
|
import type { APIResponse } from './types/APIResponse.js';
|
|
3
3
|
import type { AuthCheckPasswordInput, AuthCheckPasswordOutput } from './types/AuthCheckPassword.js';
|
|
4
4
|
import type { AuthValidateUserInput, AuthValidateUserOutput } from './types/AuthValidateUser.js';
|
|
5
|
-
import type { DashboardConfig } from './types/DashboardConfig.js';
|
|
6
|
-
import type { ProjectDashboardInput, ProjectDashboardOptions, ProjectDashboardOutput } from './types/ProjectDashboard.js';
|
|
5
|
+
import type { DashboardConfig } from './types/project/dashboard/DashboardConfig.js';
|
|
6
|
+
import type { ProjectDashboardInput, ProjectDashboardOptions, ProjectDashboardOutput } from './types/project/dashboard/ProjectDashboard.js';
|
|
7
|
+
import type { ProjectWorkoutPrimaryEndpointOptions, ProjectWorkoutPrimaryInput, ProjectWorkoutPrimaryOutput } from './types/project/workout/ProjectWorkout.js';
|
|
7
8
|
import type { Translation, Translations } from './types/Translations.js';
|
|
8
|
-
import type { DashboardWebSocketClientToServerEvents, DashboardWebSocketServerToClientEvents, WebSocketHandshakeAuth } from './types/WebSocket.js';
|
|
9
|
+
import type { DashboardWebSocketClientToServerEvents, DashboardWebSocketServerToClientEvents, WebSocketHandshakeAuth, WorkoutWebSocketClientToServerEvents, WorkoutWebSocketServerToClientEvents } from './types/WebSocket.js';
|
|
9
10
|
export { APIService };
|
|
10
|
-
export type { APIResponse, AuthCheckPasswordInput, AuthCheckPasswordOutput, AuthValidateUserInput, AuthValidateUserOutput, DashboardConfig, DashboardWebSocketClientToServerEvents, DashboardWebSocketServerToClientEvents, ProjectDashboardInput, ProjectDashboardOptions, ProjectDashboardOutput, Translation, Translations, WebSocketHandshakeAuth };
|
|
11
|
+
export type { APIResponse, AuthCheckPasswordInput, AuthCheckPasswordOutput, AuthValidateUserInput, AuthValidateUserOutput, DashboardConfig, DashboardWebSocketClientToServerEvents, DashboardWebSocketServerToClientEvents, ProjectDashboardInput, ProjectDashboardOptions, ProjectDashboardOutput, ProjectWorkoutPrimaryEndpointOptions, ProjectWorkoutPrimaryInput, ProjectWorkoutPrimaryOutput, Translation, Translations, WebSocketHandshakeAuth, WorkoutWebSocketClientToServerEvents, WorkoutWebSocketServerToClientEvents };
|
|
11
12
|
//# sourceMappingURL=browser.d.ts.map
|
package/lib/browser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qCAAqC,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qCAAqC,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EACV,oCAAoC,EACpC,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EACV,sCAAsC,EACtC,sCAAsC,EACtC,sBAAsB,EACtB,oCAAoC,EACpC,oCAAoC,EACrC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,CAAC;AAGtB,YAAY,EACV,WAAW,EACX,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,sCAAsC,EACtC,sCAAsC,EACtC,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,oCAAoC,EACpC,0BAA0B,EAC1B,2BAA2B,EAC3B,WAAW,EACX,YAAY,EACZ,sBAAsB,EACtB,oCAAoC,EACpC,oCAAoC,EACrC,CAAC"}
|
package/lib/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qCAAqC,CAAC;AAwB7D,kEAAkE;AAClE,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/lib/browser.ts
CHANGED
|
@@ -2,17 +2,24 @@ import APIService from './services/APIService/APIService.js';
|
|
|
2
2
|
import type { APIResponse } from './types/APIResponse.js';
|
|
3
3
|
import type { AuthCheckPasswordInput, AuthCheckPasswordOutput } from './types/AuthCheckPassword.js';
|
|
4
4
|
import type { AuthValidateUserInput, AuthValidateUserOutput } from './types/AuthValidateUser.js';
|
|
5
|
-
import type { DashboardConfig } from './types/DashboardConfig.js';
|
|
5
|
+
import type { DashboardConfig } from './types/project/dashboard/DashboardConfig.js';
|
|
6
6
|
import type {
|
|
7
7
|
ProjectDashboardInput,
|
|
8
8
|
ProjectDashboardOptions,
|
|
9
9
|
ProjectDashboardOutput
|
|
10
|
-
} from './types/ProjectDashboard.js';
|
|
10
|
+
} from './types/project/dashboard/ProjectDashboard.js';
|
|
11
|
+
import type {
|
|
12
|
+
ProjectWorkoutPrimaryEndpointOptions,
|
|
13
|
+
ProjectWorkoutPrimaryInput,
|
|
14
|
+
ProjectWorkoutPrimaryOutput
|
|
15
|
+
} from './types/project/workout/ProjectWorkout.js';
|
|
11
16
|
import type { Translation, Translations } from './types/Translations.js';
|
|
12
17
|
import type {
|
|
13
18
|
DashboardWebSocketClientToServerEvents,
|
|
14
19
|
DashboardWebSocketServerToClientEvents,
|
|
15
|
-
WebSocketHandshakeAuth
|
|
20
|
+
WebSocketHandshakeAuth,
|
|
21
|
+
WorkoutWebSocketClientToServerEvents,
|
|
22
|
+
WorkoutWebSocketServerToClientEvents
|
|
16
23
|
} from './types/WebSocket.js';
|
|
17
24
|
|
|
18
25
|
// Export all browser-safe functions and classes from this library
|
|
@@ -31,7 +38,12 @@ export type {
|
|
|
31
38
|
ProjectDashboardInput,
|
|
32
39
|
ProjectDashboardOptions,
|
|
33
40
|
ProjectDashboardOutput,
|
|
41
|
+
ProjectWorkoutPrimaryEndpointOptions,
|
|
42
|
+
ProjectWorkoutPrimaryInput,
|
|
43
|
+
ProjectWorkoutPrimaryOutput,
|
|
34
44
|
Translation,
|
|
35
45
|
Translations,
|
|
36
|
-
WebSocketHandshakeAuth
|
|
46
|
+
WebSocketHandshakeAuth,
|
|
47
|
+
WorkoutWebSocketClientToServerEvents,
|
|
48
|
+
WorkoutWebSocketServerToClientEvents
|
|
37
49
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { APIResponse } from '../../types/APIResponse.js';
|
|
2
2
|
import type { AuthValidateUserInput, AuthValidateUserOutput } from '../../types/AuthValidateUser.js';
|
|
3
|
-
import type { ProjectDashboardInput, ProjectDashboardOutput } from '../../types/ProjectDashboard.js';
|
|
3
|
+
import type { ProjectDashboardInput, ProjectDashboardOutput } from '../../types/project/dashboard/ProjectDashboard.js';
|
|
4
|
+
import type { ProjectWorkoutPrimaryInput, ProjectWorkoutPrimaryOutput } from '../../types/project/workout/ProjectWorkout.js';
|
|
4
5
|
/**
|
|
5
6
|
* A service for making calls to the backend API for personal projects. This is
|
|
6
7
|
* abstracted so that the backend implementation can change over time.
|
|
@@ -22,6 +23,13 @@ export default class APIService {
|
|
|
22
23
|
* @returns A promise that resolves to the result of the dashboard API call.
|
|
23
24
|
*/
|
|
24
25
|
static callDashboardAPI(input: ProjectDashboardInput): Promise<APIResponse<ProjectDashboardOutput>>;
|
|
26
|
+
/**
|
|
27
|
+
* Calls the workout API and returns the result.
|
|
28
|
+
*
|
|
29
|
+
* @param input - The input for the workout API call.
|
|
30
|
+
* @returns A promise that resolves to the result of the workout API call.
|
|
31
|
+
*/
|
|
32
|
+
static callWorkoutAPI(input: ProjectWorkoutPrimaryInput): Promise<APIResponse<ProjectWorkoutPrimaryOutput>>;
|
|
25
33
|
/**
|
|
26
34
|
* Gets the current base URL for the API.
|
|
27
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"APIService.d.ts","sourceRoot":"","sources":["../../../src/services/APIService/APIService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,
|
|
1
|
+
{"version":3,"file":"APIService.d.ts","sourceRoot":"","sources":["../../../src/services/APIService/APIService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,+CAA+C,CAAC;AAGvD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B;;;;;;OAMG;WACU,YAAY,CACvB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;;;OAMG;WACU,gBAAgB,CAC3B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;;OAKG;WACU,cAAc,CACzB,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAC;IAIpD;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,MAAM;IAIjC;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAInC;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,MAAM;CAGlC"}
|
|
@@ -24,6 +24,15 @@ export default class APIService {
|
|
|
24
24
|
static async callDashboardAPI(input) {
|
|
25
25
|
return GCloudAPIService.projectDashboard(input);
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Calls the workout API and returns the result.
|
|
29
|
+
*
|
|
30
|
+
* @param input - The input for the workout API call.
|
|
31
|
+
* @returns A promise that resolves to the result of the workout API call.
|
|
32
|
+
*/
|
|
33
|
+
static async callWorkoutAPI(input) {
|
|
34
|
+
return GCloudAPIService.projectWorkout(input);
|
|
35
|
+
}
|
|
27
36
|
/**
|
|
28
37
|
* Gets the current base URL for the API.
|
|
29
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"APIService.js","sourceRoot":"","sources":["../../../src/services/APIService/APIService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"APIService.js","sourceRoot":"","sources":["../../../src/services/APIService/APIService.ts"],"names":[],"mappings":"AAaA,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AAEvE;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,YAAY,CACvB,KAA4B;QAE5B,OAAO,MAAM,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAC3B,KAA4B;QAE5B,OAAO,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,cAAc,CACzB,KAAiC;QAEjC,OAAO,gBAAgB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB;QACrB,OAAO,gBAAgB,CAAC,MAAM,EAAE,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,GAAW;QAC1B,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB;QACrB,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -6,7 +6,11 @@ import type {
|
|
|
6
6
|
import type {
|
|
7
7
|
ProjectDashboardInput,
|
|
8
8
|
ProjectDashboardOutput
|
|
9
|
-
} from '../../types/ProjectDashboard.js';
|
|
9
|
+
} from '../../types/project/dashboard/ProjectDashboard.js';
|
|
10
|
+
import type {
|
|
11
|
+
ProjectWorkoutPrimaryInput,
|
|
12
|
+
ProjectWorkoutPrimaryOutput
|
|
13
|
+
} from '../../types/project/workout/ProjectWorkout.js';
|
|
10
14
|
import GCloudAPIService from '../GCloudAPIService/GCloudAPIService.js';
|
|
11
15
|
|
|
12
16
|
/**
|
|
@@ -40,6 +44,18 @@ export default class APIService {
|
|
|
40
44
|
return GCloudAPIService.projectDashboard(input);
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Calls the workout API and returns the result.
|
|
49
|
+
*
|
|
50
|
+
* @param input - The input for the workout API call.
|
|
51
|
+
* @returns A promise that resolves to the result of the workout API call.
|
|
52
|
+
*/
|
|
53
|
+
static async callWorkoutAPI(
|
|
54
|
+
input: ProjectWorkoutPrimaryInput
|
|
55
|
+
): Promise<APIResponse<ProjectWorkoutPrimaryOutput>> {
|
|
56
|
+
return GCloudAPIService.projectWorkout(input);
|
|
57
|
+
}
|
|
58
|
+
|
|
43
59
|
/**
|
|
44
60
|
* Gets the current base URL for the API.
|
|
45
61
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { APIResponse } from '../../types/APIResponse.js';
|
|
2
2
|
import type { AuthValidateUserInput, AuthValidateUserOutput } from '../../types/AuthValidateUser.js';
|
|
3
|
-
import type { ProjectDashboardInput, ProjectDashboardOutput } from '../../types/ProjectDashboard.js';
|
|
3
|
+
import type { ProjectDashboardInput, ProjectDashboardOutput } from '../../types/project/dashboard/ProjectDashboard.js';
|
|
4
|
+
import type { ProjectWorkoutPrimaryInput, ProjectWorkoutPrimaryOutput } from '../../types/project/workout/ProjectWorkout.js';
|
|
4
5
|
/**
|
|
5
6
|
* A service for interacting with the Google Cloud API service for personal projects.
|
|
6
7
|
*/
|
|
@@ -31,6 +32,12 @@ export default class GCloudAPIService {
|
|
|
31
32
|
* @param input - The input for the project dashboard function.
|
|
32
33
|
*/
|
|
33
34
|
static projectDashboard(input: ProjectDashboardInput): Promise<APIResponse<ProjectDashboardOutput>>;
|
|
35
|
+
/**
|
|
36
|
+
* Calls the project workout endpoint to get, insert, update, or delete workout data.
|
|
37
|
+
*
|
|
38
|
+
* @param input - The input for the project workout function.
|
|
39
|
+
*/
|
|
40
|
+
static projectWorkout(input: ProjectWorkoutPrimaryInput): Promise<APIResponse<ProjectWorkoutPrimaryOutput>>;
|
|
34
41
|
/**
|
|
35
42
|
* Makes a call to the Google Cloud API.
|
|
36
43
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GCloudAPIService.d.ts","sourceRoot":"","sources":["../../../src/services/GCloudAPIService/GCloudAPIService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,
|
|
1
|
+
{"version":3,"file":"GCloudAPIService.d.ts","sourceRoot":"","sources":["../../../src/services/GCloudAPIService/GCloudAPIService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,+CAA+C,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;;IACnC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAmC;IAQrE;;;;OAIG;IACH,MAAM,CAAC,MAAM,IAAI,MAAM;IAIvB;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC;;;;OAIG;WACU,gBAAgB,CAC3B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;OAIG;WACU,gBAAgB,CAC3B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;OAIG;WACU,cAAc,CACzB,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAC;IAOpD;;;;;;OAMG;mBACkB,IAAI;IAiBzB;;;;;OAKG;mBACkB,cAAc;CAYpC"}
|
|
@@ -41,6 +41,14 @@ export default class GCloudAPIService {
|
|
|
41
41
|
static async projectDashboard(input) {
|
|
42
42
|
return this.call('project/dashboard', input);
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Calls the project workout endpoint to get, insert, update, or delete workout data.
|
|
46
|
+
*
|
|
47
|
+
* @param input - The input for the project workout function.
|
|
48
|
+
*/
|
|
49
|
+
static async projectWorkout(input) {
|
|
50
|
+
return this.call('project/workout', input);
|
|
51
|
+
}
|
|
44
52
|
/**
|
|
45
53
|
* Makes a call to the Google Cloud API.
|
|
46
54
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GCloudAPIService.js","sourceRoot":"","sources":["../../../src/services/GCloudAPIService/GCloudAPIService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"GCloudAPIService.js","sourceRoot":"","sources":["../../../src/services/GCloudAPIService/GCloudAPIService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAehE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,MAAM,CAAU,UAAU,GAAW,+BAA+B,CAAC;IAErE;;;OAGG;IACH,MAAM,CAAC,QAAQ,GAAW,IAAI,CAAC,UAAU,CAAC;IAE1C;;;;OAIG;IACH,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,GAAW;QACvB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAC3B,KAA4B;QAE5B,OAAO,IAAI,CAAC,IAAI,CAAgD,mBAAmB,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAC3B,KAA4B;QAE5B,OAAO,IAAI,CAAC,IAAI,CAAgD,mBAAmB,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,cAAc,CACzB,KAAiC;QAEjC,OAAO,IAAI,CAAC,IAAI,CACd,iBAAiB,EACjB,KAAK,CACN,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACK,MAAM,CAAC,KAAK,CAAC,IAAI,CACvB,OAAe,EACf,KAAa;QAEb,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE;YACpD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,UAAU,EAAE,YAAY;gBACxB,cAAc,EAAE,kBAAkB;gBAClC,MAAM,EAAE,kBAAkB;aAC3B;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;SAC5B,CAAC,CAAC;QACH,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,cAAc,CAAU,QAAQ,CAAC,CAAC;QACrE,OAAO,eAAe,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACK,MAAM,CAAC,KAAK,CAAC,cAAc,CAAU,QAAkB;QAC7D,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,WAAW,CAAyB,CAAC;QAC3E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,CAAC,0BAA0B,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACtE,IAAI,EAAE,EAAa;aACpB,CAAC;QACJ,CAAC;IACH,CAAC"}
|
|
@@ -7,7 +7,11 @@ import type {
|
|
|
7
7
|
import type {
|
|
8
8
|
ProjectDashboardInput,
|
|
9
9
|
ProjectDashboardOutput
|
|
10
|
-
} from '../../types/ProjectDashboard.js';
|
|
10
|
+
} from '../../types/project/dashboard/ProjectDashboard.js';
|
|
11
|
+
import type {
|
|
12
|
+
ProjectWorkoutPrimaryInput,
|
|
13
|
+
ProjectWorkoutPrimaryOutput
|
|
14
|
+
} from '../../types/project/workout/ProjectWorkout.js';
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* A service for interacting with the Google Cloud API service for personal projects.
|
|
@@ -61,6 +65,20 @@ export default class GCloudAPIService {
|
|
|
61
65
|
return this.call<ProjectDashboardInput, ProjectDashboardOutput>('project/dashboard', input);
|
|
62
66
|
}
|
|
63
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Calls the project workout endpoint to get, insert, update, or delete workout data.
|
|
70
|
+
*
|
|
71
|
+
* @param input - The input for the project workout function.
|
|
72
|
+
*/
|
|
73
|
+
static async projectWorkout(
|
|
74
|
+
input: ProjectWorkoutPrimaryInput
|
|
75
|
+
): Promise<APIResponse<ProjectWorkoutPrimaryOutput>> {
|
|
76
|
+
return this.call<ProjectWorkoutPrimaryInput, ProjectWorkoutPrimaryOutput>(
|
|
77
|
+
'project/workout',
|
|
78
|
+
input
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
64
82
|
/**
|
|
65
83
|
* Makes a call to the Google Cloud API.
|
|
66
84
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ApiKey, User } from '@aneuhold/core-ts-db-lib';
|
|
2
|
-
import type { DashboardConfig } from './DashboardConfig.js';
|
|
2
|
+
import type { DashboardConfig } from './project/dashboard/DashboardConfig.js';
|
|
3
3
|
/**
|
|
4
|
-
* Interface representing the input to the AuthValidateUser
|
|
4
|
+
* Interface representing the input to the AuthValidateUser endpoint.
|
|
5
5
|
*/
|
|
6
6
|
export interface AuthValidateUserInput {
|
|
7
7
|
/**
|
|
@@ -14,7 +14,7 @@ export interface AuthValidateUserInput {
|
|
|
14
14
|
password: string;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Interface representing the output of the AuthValidateUser
|
|
17
|
+
* Interface representing the output of the AuthValidateUser endpoint.
|
|
18
18
|
*/
|
|
19
19
|
export interface AuthValidateUserOutput {
|
|
20
20
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthValidateUser.d.ts","sourceRoot":"","sources":["../../src/types/AuthValidateUser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AuthValidateUser.d.ts","sourceRoot":"","sources":["../../src/types/AuthValidateUser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,IAAI,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,eAAe,CAAC;KAC7B,CAAC;CACH"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ApiKey, User } from '@aneuhold/core-ts-db-lib';
|
|
2
|
-
import type { DashboardConfig } from './DashboardConfig.js';
|
|
2
|
+
import type { DashboardConfig } from './project/dashboard/DashboardConfig.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Interface representing the input to the AuthValidateUser
|
|
5
|
+
* Interface representing the input to the AuthValidateUser endpoint.
|
|
6
6
|
*/
|
|
7
7
|
export interface AuthValidateUserInput {
|
|
8
8
|
/**
|
|
@@ -16,7 +16,7 @@ export interface AuthValidateUserInput {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Interface representing the output of the AuthValidateUser
|
|
19
|
+
* Interface representing the output of the AuthValidateUser endpoint.
|
|
20
20
|
*/
|
|
21
21
|
export interface AuthValidateUserOutput {
|
|
22
22
|
/**
|
package/lib/types/WebSocket.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UUID } from 'crypto';
|
|
2
|
-
import type { ProjectDashboardOutput } from './ProjectDashboard.js';
|
|
2
|
+
import type { ProjectDashboardOutput } from './project/dashboard/ProjectDashboard.js';
|
|
3
|
+
import type { ProjectWorkoutPrimaryOutput } from './project/workout/ProjectWorkout.js';
|
|
3
4
|
/**
|
|
4
5
|
* The data each client is expected to send over with a request. For example on the client side:
|
|
5
6
|
*
|
|
@@ -26,4 +27,16 @@ export type DashboardWebSocketClientToServerEvents = {
|
|
|
26
27
|
export type DashboardWebSocketServerToClientEvents = {
|
|
27
28
|
rootPostResult: (data: ProjectDashboardOutput) => void;
|
|
28
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Nothing for now, except a test event if wanted.
|
|
32
|
+
*/
|
|
33
|
+
export type WorkoutWebSocketClientToServerEvents = {
|
|
34
|
+
test: (data: string) => void;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The events that the server can send to clients.
|
|
38
|
+
*/
|
|
39
|
+
export type WorkoutWebSocketServerToClientEvents = {
|
|
40
|
+
rootPostResult: (data: ProjectWorkoutPrimaryOutput) => void;
|
|
41
|
+
};
|
|
29
42
|
//# sourceMappingURL=WebSocket.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebSocket.d.ts","sourceRoot":"","sources":["../../src/types/WebSocket.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WebSocket.d.ts","sourceRoot":"","sources":["../../src/types/WebSocket.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAEvF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,CAAC,EAAE,IAAI,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG;IACnD,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG;IACnD,cAAc,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,cAAc,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;CAC7D,CAAC"}
|
package/lib/types/WebSocket.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UUID } from 'crypto';
|
|
2
|
-
import type { ProjectDashboardOutput } from './ProjectDashboard.js';
|
|
2
|
+
import type { ProjectDashboardOutput } from './project/dashboard/ProjectDashboard.js';
|
|
3
|
+
import type { ProjectWorkoutPrimaryOutput } from './project/workout/ProjectWorkout.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* The data each client is expected to send over with a request. For example on the client side:
|
|
@@ -29,3 +30,17 @@ export type DashboardWebSocketClientToServerEvents = {
|
|
|
29
30
|
export type DashboardWebSocketServerToClientEvents = {
|
|
30
31
|
rootPostResult: (data: ProjectDashboardOutput) => void;
|
|
31
32
|
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Nothing for now, except a test event if wanted.
|
|
36
|
+
*/
|
|
37
|
+
export type WorkoutWebSocketClientToServerEvents = {
|
|
38
|
+
test: (data: string) => void;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The events that the server can send to clients.
|
|
43
|
+
*/
|
|
44
|
+
export type WorkoutWebSocketServerToClientEvents = {
|
|
45
|
+
rootPostResult: (data: ProjectWorkoutPrimaryOutput) => void;
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardConfig.d.ts","sourceRoot":"","sources":["../../../../src/types/project/dashboard/DashboardConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,2BAA2B,EAAE,MAAM,CAAC;IACpC;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,4BAA4B,EAAE,MAAM,CAAC;QACrC,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardConfig.js","sourceRoot":"","sources":["../../../../src/types/project/dashboard/DashboardConfig.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DashboardTask, DashboardUserConfig, NonogramKatanaItem, NonogramKatanaUpgrade, UserCTO } from '@aneuhold/core-ts-db-lib';
|
|
2
2
|
import type { UUID } from 'crypto';
|
|
3
|
-
import type { Translations } from '
|
|
3
|
+
import type { Translations } from '../../Translations.js';
|
|
4
4
|
/**
|
|
5
5
|
* Options for configuring the project dashboard.
|
|
6
6
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectDashboard.d.ts","sourceRoot":"","sources":["../../../../src/types/project/dashboard/ProjectDashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,OAAO,EACR,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE;QACJ;;WAEG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB;;WAEG;QACH,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB;;WAEG;QACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B;;WAEG;QACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;KAClC,CAAC;IACF,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;QACxB;;WAEG;QACH,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;QAC3C;;WAEG;QACH,sBAAsB,CAAC,EAAE,qBAAqB,EAAE,CAAC;KAClD,CAAC;IACF,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,UAAU,CAAC,EAAE,mBAAmB,CAAC;QACjC;;WAEG;QACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;QACxB;;WAEG;QACH,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;QAC3C;;WAEG;QACH,sBAAsB,CAAC,EAAE,qBAAqB,EAAE,CAAC;KAClD,CAAC;IACF,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;KACzB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,uBAAuB,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC3C,sBAAsB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectDashboard.js","sourceRoot":"","sources":["../../../../src/types/project/dashboard/ProjectDashboard.ts"],"names":[],"mappings":""}
|
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
UserCTO
|
|
7
7
|
} from '@aneuhold/core-ts-db-lib';
|
|
8
8
|
import type { UUID } from 'crypto';
|
|
9
|
-
import type { Translations } from '
|
|
9
|
+
import type { Translations } from '../../Translations.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Options for configuring the project dashboard.
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import type { CycleType, WorkoutEquipmentType, WorkoutExercise, WorkoutExerciseCalibration, WorkoutMesocycle, WorkoutMicrocycle, WorkoutMuscleGroup, WorkoutSession, WorkoutSessionExercise, WorkoutSet } from '@aneuhold/core-ts-db-lib';
|
|
2
|
+
import type { UUID } from 'crypto';
|
|
3
|
+
/**
|
|
4
|
+
* Base options for getting documents.
|
|
5
|
+
*/
|
|
6
|
+
interface GetOptionsBase<T> {
|
|
7
|
+
/**
|
|
8
|
+
* Get all documents of this type if true.
|
|
9
|
+
*/
|
|
10
|
+
all?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Filter documents by matching partial properties.
|
|
13
|
+
* This allows filtering by any document field.
|
|
14
|
+
*/
|
|
15
|
+
objectFilter?: Partial<T>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Options for interacting with the workout app via the primary endpoint.
|
|
19
|
+
*/
|
|
20
|
+
export interface ProjectWorkoutPrimaryEndpointOptions {
|
|
21
|
+
get?: {
|
|
22
|
+
/**
|
|
23
|
+
* Get mesocycles with optional filters.
|
|
24
|
+
*/
|
|
25
|
+
mesocycles?: GetOptionsBase<WorkoutMesocycle> & {
|
|
26
|
+
/**
|
|
27
|
+
* Get only the active (uncompleted) mesocycle.
|
|
28
|
+
*/
|
|
29
|
+
active?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Get only completed mesocycles.
|
|
32
|
+
*/
|
|
33
|
+
completed?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Filter by specific cycle types.
|
|
36
|
+
*/
|
|
37
|
+
cycleTypes?: CycleType[];
|
|
38
|
+
/**
|
|
39
|
+
* Get mesocycles completed after this date.
|
|
40
|
+
*/
|
|
41
|
+
completedAfter?: Date;
|
|
42
|
+
/**
|
|
43
|
+
* Get mesocycles completed before this date.
|
|
44
|
+
*/
|
|
45
|
+
completedBefore?: Date;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Get microcycles with optional filters.
|
|
49
|
+
*/
|
|
50
|
+
microcycles?: GetOptionsBase<WorkoutMicrocycle> & {
|
|
51
|
+
/**
|
|
52
|
+
* Get microcycles starting on or after this date.
|
|
53
|
+
*/
|
|
54
|
+
startDateFrom?: Date;
|
|
55
|
+
/**
|
|
56
|
+
* Get microcycles starting on or before this date.
|
|
57
|
+
*/
|
|
58
|
+
startDateTo?: Date;
|
|
59
|
+
/**
|
|
60
|
+
* Get microcycles ending on or after this date.
|
|
61
|
+
*/
|
|
62
|
+
endDateFrom?: Date;
|
|
63
|
+
/**
|
|
64
|
+
* Get microcycles ending on or before this date.
|
|
65
|
+
*/
|
|
66
|
+
endDateTo?: Date;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Get sessions with optional filters.
|
|
70
|
+
*/
|
|
71
|
+
sessions?: GetOptionsBase<WorkoutSession> & {
|
|
72
|
+
/**
|
|
73
|
+
* Get only completed sessions.
|
|
74
|
+
*/
|
|
75
|
+
completed?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Get only incomplete sessions.
|
|
78
|
+
*/
|
|
79
|
+
incomplete?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Get sessions starting on or after this date.
|
|
82
|
+
*/
|
|
83
|
+
startTimeFrom?: Date;
|
|
84
|
+
/**
|
|
85
|
+
* Get sessions starting on or before this date.
|
|
86
|
+
*/
|
|
87
|
+
startTimeTo?: Date;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Get session exercises with optional filters.
|
|
91
|
+
*/
|
|
92
|
+
sessionExercises?: GetOptionsBase<WorkoutSessionExercise> & {
|
|
93
|
+
/**
|
|
94
|
+
* Get only recovery exercises.
|
|
95
|
+
*/
|
|
96
|
+
recoveryOnly?: boolean;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Get sets with optional filters.
|
|
100
|
+
*/
|
|
101
|
+
sets?: GetOptionsBase<WorkoutSet>;
|
|
102
|
+
/**
|
|
103
|
+
* Get exercises with optional filters.
|
|
104
|
+
*/
|
|
105
|
+
exercises?: GetOptionsBase<WorkoutExercise> & {
|
|
106
|
+
/**
|
|
107
|
+
* Filter by exercises targeting specific muscle groups (primary or secondary).
|
|
108
|
+
*/
|
|
109
|
+
muscleGroupIds?: UUID[];
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Get exercise calibrations with optional filters.
|
|
113
|
+
*/
|
|
114
|
+
exerciseCalibrations?: GetOptionsBase<WorkoutExerciseCalibration> & {
|
|
115
|
+
/**
|
|
116
|
+
* Limit to the N most recent calibrations.
|
|
117
|
+
*/
|
|
118
|
+
mostRecent?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Get calibrations recorded after this date.
|
|
121
|
+
*/
|
|
122
|
+
recordedAfter?: Date;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Get muscle groups.
|
|
126
|
+
*/
|
|
127
|
+
muscleGroups?: GetOptionsBase<WorkoutMuscleGroup>;
|
|
128
|
+
/**
|
|
129
|
+
* Get equipment types.
|
|
130
|
+
*/
|
|
131
|
+
equipmentTypes?: GetOptionsBase<WorkoutEquipmentType>;
|
|
132
|
+
};
|
|
133
|
+
insert?: {
|
|
134
|
+
/**
|
|
135
|
+
* Mesocycles to be inserted.
|
|
136
|
+
*/
|
|
137
|
+
mesocycles?: WorkoutMesocycle[];
|
|
138
|
+
/**
|
|
139
|
+
* Microcycles to be inserted.
|
|
140
|
+
*/
|
|
141
|
+
microcycles?: WorkoutMicrocycle[];
|
|
142
|
+
/**
|
|
143
|
+
* Sessions to be inserted.
|
|
144
|
+
*/
|
|
145
|
+
sessions?: WorkoutSession[];
|
|
146
|
+
/**
|
|
147
|
+
* Session exercises to be inserted.
|
|
148
|
+
*/
|
|
149
|
+
sessionExercises?: WorkoutSessionExercise[];
|
|
150
|
+
/**
|
|
151
|
+
* Sets to be inserted.
|
|
152
|
+
*/
|
|
153
|
+
sets?: WorkoutSet[];
|
|
154
|
+
/**
|
|
155
|
+
* Exercises to be inserted.
|
|
156
|
+
*/
|
|
157
|
+
exercises?: WorkoutExercise[];
|
|
158
|
+
/**
|
|
159
|
+
* Exercise calibrations to be inserted.
|
|
160
|
+
*/
|
|
161
|
+
exerciseCalibrations?: WorkoutExerciseCalibration[];
|
|
162
|
+
/**
|
|
163
|
+
* Muscle groups to be inserted.
|
|
164
|
+
*/
|
|
165
|
+
muscleGroups?: WorkoutMuscleGroup[];
|
|
166
|
+
/**
|
|
167
|
+
* Equipment types to be inserted.
|
|
168
|
+
*/
|
|
169
|
+
equipmentTypes?: WorkoutEquipmentType[];
|
|
170
|
+
};
|
|
171
|
+
update?: {
|
|
172
|
+
/**
|
|
173
|
+
* Mesocycles to be updated.
|
|
174
|
+
*/
|
|
175
|
+
mesocycles?: WorkoutMesocycle[];
|
|
176
|
+
/**
|
|
177
|
+
* Microcycles to be updated.
|
|
178
|
+
*/
|
|
179
|
+
microcycles?: WorkoutMicrocycle[];
|
|
180
|
+
/**
|
|
181
|
+
* Sessions to be updated.
|
|
182
|
+
*/
|
|
183
|
+
sessions?: WorkoutSession[];
|
|
184
|
+
/**
|
|
185
|
+
* Session exercises to be updated.
|
|
186
|
+
*/
|
|
187
|
+
sessionExercises?: WorkoutSessionExercise[];
|
|
188
|
+
/**
|
|
189
|
+
* Sets to be updated.
|
|
190
|
+
*/
|
|
191
|
+
sets?: WorkoutSet[];
|
|
192
|
+
/**
|
|
193
|
+
* Exercises to be updated.
|
|
194
|
+
*/
|
|
195
|
+
exercises?: WorkoutExercise[];
|
|
196
|
+
/**
|
|
197
|
+
* Exercise calibrations to be updated.
|
|
198
|
+
*/
|
|
199
|
+
exerciseCalibrations?: WorkoutExerciseCalibration[];
|
|
200
|
+
/**
|
|
201
|
+
* Muscle groups to be updated.
|
|
202
|
+
*/
|
|
203
|
+
muscleGroups?: WorkoutMuscleGroup[];
|
|
204
|
+
/**
|
|
205
|
+
* Equipment types to be updated.
|
|
206
|
+
*/
|
|
207
|
+
equipmentTypes?: WorkoutEquipmentType[];
|
|
208
|
+
};
|
|
209
|
+
delete?: {
|
|
210
|
+
/**
|
|
211
|
+
* IDs of mesocycles to be deleted.
|
|
212
|
+
*/
|
|
213
|
+
mesocycles?: UUID[];
|
|
214
|
+
/**
|
|
215
|
+
* IDs of microcycles to be deleted.
|
|
216
|
+
*/
|
|
217
|
+
microcycles?: UUID[];
|
|
218
|
+
/**
|
|
219
|
+
* IDs of sessions to be deleted.
|
|
220
|
+
*/
|
|
221
|
+
sessions?: UUID[];
|
|
222
|
+
/**
|
|
223
|
+
* IDs of session exercises to be deleted.
|
|
224
|
+
*/
|
|
225
|
+
sessionExercises?: UUID[];
|
|
226
|
+
/**
|
|
227
|
+
* IDs of sets to be deleted.
|
|
228
|
+
*/
|
|
229
|
+
sets?: UUID[];
|
|
230
|
+
/**
|
|
231
|
+
* IDs of exercises to be deleted.
|
|
232
|
+
*/
|
|
233
|
+
exercises?: UUID[];
|
|
234
|
+
/**
|
|
235
|
+
* IDs of exercise calibrations to be deleted.
|
|
236
|
+
*/
|
|
237
|
+
exerciseCalibrations?: UUID[];
|
|
238
|
+
/**
|
|
239
|
+
* IDs of muscle groups to be deleted.
|
|
240
|
+
*/
|
|
241
|
+
muscleGroups?: UUID[];
|
|
242
|
+
/**
|
|
243
|
+
* IDs of equipment types to be deleted.
|
|
244
|
+
*/
|
|
245
|
+
equipmentTypes?: UUID[];
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Represents the input to the workout app primary endpoint.
|
|
250
|
+
*/
|
|
251
|
+
export interface ProjectWorkoutPrimaryInput {
|
|
252
|
+
apiKey: UUID;
|
|
253
|
+
options: ProjectWorkoutPrimaryEndpointOptions;
|
|
254
|
+
socketId?: string;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Represents the output of the workout app primary endpoint.
|
|
258
|
+
*/
|
|
259
|
+
export interface ProjectWorkoutPrimaryOutput {
|
|
260
|
+
mesocycles?: WorkoutMesocycle[];
|
|
261
|
+
microcycles?: WorkoutMicrocycle[];
|
|
262
|
+
sessions?: WorkoutSession[];
|
|
263
|
+
sessionExercises?: WorkoutSessionExercise[];
|
|
264
|
+
sets?: WorkoutSet[];
|
|
265
|
+
exercises?: WorkoutExercise[];
|
|
266
|
+
exerciseCalibrations?: WorkoutExerciseCalibration[];
|
|
267
|
+
muscleGroups?: WorkoutMuscleGroup[];
|
|
268
|
+
equipmentTypes?: WorkoutEquipmentType[];
|
|
269
|
+
}
|
|
270
|
+
export {};
|
|
271
|
+
//# sourceMappingURL=ProjectWorkout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectWorkout.d.ts","sourceRoot":"","sources":["../../../../src/types/project/workout/ProjectWorkout.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectWorkout.js","sourceRoot":"","sources":["../../../../src/types/project/workout/ProjectWorkout.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CycleType,
|
|
3
|
+
WorkoutEquipmentType,
|
|
4
|
+
WorkoutExercise,
|
|
5
|
+
WorkoutExerciseCalibration,
|
|
6
|
+
WorkoutMesocycle,
|
|
7
|
+
WorkoutMicrocycle,
|
|
8
|
+
WorkoutMuscleGroup,
|
|
9
|
+
WorkoutSession,
|
|
10
|
+
WorkoutSessionExercise,
|
|
11
|
+
WorkoutSet
|
|
12
|
+
} from '@aneuhold/core-ts-db-lib';
|
|
13
|
+
import type { UUID } from 'crypto';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Base options for getting documents.
|
|
17
|
+
*/
|
|
18
|
+
interface GetOptionsBase<T> {
|
|
19
|
+
/**
|
|
20
|
+
* Get all documents of this type if true.
|
|
21
|
+
*/
|
|
22
|
+
all?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Filter documents by matching partial properties.
|
|
25
|
+
* This allows filtering by any document field.
|
|
26
|
+
*/
|
|
27
|
+
objectFilter?: Partial<T>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Options for interacting with the workout app via the primary endpoint.
|
|
32
|
+
*/
|
|
33
|
+
export interface ProjectWorkoutPrimaryEndpointOptions {
|
|
34
|
+
get?: {
|
|
35
|
+
/**
|
|
36
|
+
* Get mesocycles with optional filters.
|
|
37
|
+
*/
|
|
38
|
+
mesocycles?: GetOptionsBase<WorkoutMesocycle> & {
|
|
39
|
+
/**
|
|
40
|
+
* Get only the active (uncompleted) mesocycle.
|
|
41
|
+
*/
|
|
42
|
+
active?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Get only completed mesocycles.
|
|
45
|
+
*/
|
|
46
|
+
completed?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Filter by specific cycle types.
|
|
49
|
+
*/
|
|
50
|
+
cycleTypes?: CycleType[];
|
|
51
|
+
/**
|
|
52
|
+
* Get mesocycles completed after this date.
|
|
53
|
+
*/
|
|
54
|
+
completedAfter?: Date;
|
|
55
|
+
/**
|
|
56
|
+
* Get mesocycles completed before this date.
|
|
57
|
+
*/
|
|
58
|
+
completedBefore?: Date;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Get microcycles with optional filters.
|
|
62
|
+
*/
|
|
63
|
+
microcycles?: GetOptionsBase<WorkoutMicrocycle> & {
|
|
64
|
+
/**
|
|
65
|
+
* Get microcycles starting on or after this date.
|
|
66
|
+
*/
|
|
67
|
+
startDateFrom?: Date;
|
|
68
|
+
/**
|
|
69
|
+
* Get microcycles starting on or before this date.
|
|
70
|
+
*/
|
|
71
|
+
startDateTo?: Date;
|
|
72
|
+
/**
|
|
73
|
+
* Get microcycles ending on or after this date.
|
|
74
|
+
*/
|
|
75
|
+
endDateFrom?: Date;
|
|
76
|
+
/**
|
|
77
|
+
* Get microcycles ending on or before this date.
|
|
78
|
+
*/
|
|
79
|
+
endDateTo?: Date;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Get sessions with optional filters.
|
|
83
|
+
*/
|
|
84
|
+
sessions?: GetOptionsBase<WorkoutSession> & {
|
|
85
|
+
/**
|
|
86
|
+
* Get only completed sessions.
|
|
87
|
+
*/
|
|
88
|
+
completed?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Get only incomplete sessions.
|
|
91
|
+
*/
|
|
92
|
+
incomplete?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Get sessions starting on or after this date.
|
|
95
|
+
*/
|
|
96
|
+
startTimeFrom?: Date;
|
|
97
|
+
/**
|
|
98
|
+
* Get sessions starting on or before this date.
|
|
99
|
+
*/
|
|
100
|
+
startTimeTo?: Date;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Get session exercises with optional filters.
|
|
104
|
+
*/
|
|
105
|
+
sessionExercises?: GetOptionsBase<WorkoutSessionExercise> & {
|
|
106
|
+
/**
|
|
107
|
+
* Get only recovery exercises.
|
|
108
|
+
*/
|
|
109
|
+
recoveryOnly?: boolean;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Get sets with optional filters.
|
|
113
|
+
*/
|
|
114
|
+
sets?: GetOptionsBase<WorkoutSet>;
|
|
115
|
+
/**
|
|
116
|
+
* Get exercises with optional filters.
|
|
117
|
+
*/
|
|
118
|
+
exercises?: GetOptionsBase<WorkoutExercise> & {
|
|
119
|
+
/**
|
|
120
|
+
* Filter by exercises targeting specific muscle groups (primary or secondary).
|
|
121
|
+
*/
|
|
122
|
+
muscleGroupIds?: UUID[];
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Get exercise calibrations with optional filters.
|
|
126
|
+
*/
|
|
127
|
+
exerciseCalibrations?: GetOptionsBase<WorkoutExerciseCalibration> & {
|
|
128
|
+
/**
|
|
129
|
+
* Limit to the N most recent calibrations.
|
|
130
|
+
*/
|
|
131
|
+
mostRecent?: number;
|
|
132
|
+
/**
|
|
133
|
+
* Get calibrations recorded after this date.
|
|
134
|
+
*/
|
|
135
|
+
recordedAfter?: Date;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Get muscle groups.
|
|
139
|
+
*/
|
|
140
|
+
muscleGroups?: GetOptionsBase<WorkoutMuscleGroup>;
|
|
141
|
+
/**
|
|
142
|
+
* Get equipment types.
|
|
143
|
+
*/
|
|
144
|
+
equipmentTypes?: GetOptionsBase<WorkoutEquipmentType>;
|
|
145
|
+
};
|
|
146
|
+
insert?: {
|
|
147
|
+
/**
|
|
148
|
+
* Mesocycles to be inserted.
|
|
149
|
+
*/
|
|
150
|
+
mesocycles?: WorkoutMesocycle[];
|
|
151
|
+
/**
|
|
152
|
+
* Microcycles to be inserted.
|
|
153
|
+
*/
|
|
154
|
+
microcycles?: WorkoutMicrocycle[];
|
|
155
|
+
/**
|
|
156
|
+
* Sessions to be inserted.
|
|
157
|
+
*/
|
|
158
|
+
sessions?: WorkoutSession[];
|
|
159
|
+
/**
|
|
160
|
+
* Session exercises to be inserted.
|
|
161
|
+
*/
|
|
162
|
+
sessionExercises?: WorkoutSessionExercise[];
|
|
163
|
+
/**
|
|
164
|
+
* Sets to be inserted.
|
|
165
|
+
*/
|
|
166
|
+
sets?: WorkoutSet[];
|
|
167
|
+
/**
|
|
168
|
+
* Exercises to be inserted.
|
|
169
|
+
*/
|
|
170
|
+
exercises?: WorkoutExercise[];
|
|
171
|
+
/**
|
|
172
|
+
* Exercise calibrations to be inserted.
|
|
173
|
+
*/
|
|
174
|
+
exerciseCalibrations?: WorkoutExerciseCalibration[];
|
|
175
|
+
/**
|
|
176
|
+
* Muscle groups to be inserted.
|
|
177
|
+
*/
|
|
178
|
+
muscleGroups?: WorkoutMuscleGroup[];
|
|
179
|
+
/**
|
|
180
|
+
* Equipment types to be inserted.
|
|
181
|
+
*/
|
|
182
|
+
equipmentTypes?: WorkoutEquipmentType[];
|
|
183
|
+
};
|
|
184
|
+
update?: {
|
|
185
|
+
/**
|
|
186
|
+
* Mesocycles to be updated.
|
|
187
|
+
*/
|
|
188
|
+
mesocycles?: WorkoutMesocycle[];
|
|
189
|
+
/**
|
|
190
|
+
* Microcycles to be updated.
|
|
191
|
+
*/
|
|
192
|
+
microcycles?: WorkoutMicrocycle[];
|
|
193
|
+
/**
|
|
194
|
+
* Sessions to be updated.
|
|
195
|
+
*/
|
|
196
|
+
sessions?: WorkoutSession[];
|
|
197
|
+
/**
|
|
198
|
+
* Session exercises to be updated.
|
|
199
|
+
*/
|
|
200
|
+
sessionExercises?: WorkoutSessionExercise[];
|
|
201
|
+
/**
|
|
202
|
+
* Sets to be updated.
|
|
203
|
+
*/
|
|
204
|
+
sets?: WorkoutSet[];
|
|
205
|
+
/**
|
|
206
|
+
* Exercises to be updated.
|
|
207
|
+
*/
|
|
208
|
+
exercises?: WorkoutExercise[];
|
|
209
|
+
/**
|
|
210
|
+
* Exercise calibrations to be updated.
|
|
211
|
+
*/
|
|
212
|
+
exerciseCalibrations?: WorkoutExerciseCalibration[];
|
|
213
|
+
/**
|
|
214
|
+
* Muscle groups to be updated.
|
|
215
|
+
*/
|
|
216
|
+
muscleGroups?: WorkoutMuscleGroup[];
|
|
217
|
+
/**
|
|
218
|
+
* Equipment types to be updated.
|
|
219
|
+
*/
|
|
220
|
+
equipmentTypes?: WorkoutEquipmentType[];
|
|
221
|
+
};
|
|
222
|
+
delete?: {
|
|
223
|
+
/**
|
|
224
|
+
* IDs of mesocycles to be deleted.
|
|
225
|
+
*/
|
|
226
|
+
mesocycles?: UUID[];
|
|
227
|
+
/**
|
|
228
|
+
* IDs of microcycles to be deleted.
|
|
229
|
+
*/
|
|
230
|
+
microcycles?: UUID[];
|
|
231
|
+
/**
|
|
232
|
+
* IDs of sessions to be deleted.
|
|
233
|
+
*/
|
|
234
|
+
sessions?: UUID[];
|
|
235
|
+
/**
|
|
236
|
+
* IDs of session exercises to be deleted.
|
|
237
|
+
*/
|
|
238
|
+
sessionExercises?: UUID[];
|
|
239
|
+
/**
|
|
240
|
+
* IDs of sets to be deleted.
|
|
241
|
+
*/
|
|
242
|
+
sets?: UUID[];
|
|
243
|
+
/**
|
|
244
|
+
* IDs of exercises to be deleted.
|
|
245
|
+
*/
|
|
246
|
+
exercises?: UUID[];
|
|
247
|
+
/**
|
|
248
|
+
* IDs of exercise calibrations to be deleted.
|
|
249
|
+
*/
|
|
250
|
+
exerciseCalibrations?: UUID[];
|
|
251
|
+
/**
|
|
252
|
+
* IDs of muscle groups to be deleted.
|
|
253
|
+
*/
|
|
254
|
+
muscleGroups?: UUID[];
|
|
255
|
+
/**
|
|
256
|
+
* IDs of equipment types to be deleted.
|
|
257
|
+
*/
|
|
258
|
+
equipmentTypes?: UUID[];
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Represents the input to the workout app primary endpoint.
|
|
264
|
+
*/
|
|
265
|
+
export interface ProjectWorkoutPrimaryInput {
|
|
266
|
+
apiKey: UUID;
|
|
267
|
+
options: ProjectWorkoutPrimaryEndpointOptions;
|
|
268
|
+
socketId?: string;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Represents the output of the workout app primary endpoint.
|
|
273
|
+
*/
|
|
274
|
+
export interface ProjectWorkoutPrimaryOutput {
|
|
275
|
+
mesocycles?: WorkoutMesocycle[];
|
|
276
|
+
microcycles?: WorkoutMicrocycle[];
|
|
277
|
+
sessions?: WorkoutSession[];
|
|
278
|
+
sessionExercises?: WorkoutSessionExercise[];
|
|
279
|
+
sets?: WorkoutSet[];
|
|
280
|
+
exercises?: WorkoutExercise[];
|
|
281
|
+
exerciseCalibrations?: WorkoutExerciseCalibration[];
|
|
282
|
+
muscleGroups?: WorkoutMuscleGroup[];
|
|
283
|
+
equipmentTypes?: WorkoutEquipmentType[];
|
|
284
|
+
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@aneuhold/core-ts-api-lib",
|
|
3
3
|
"author": "Anton G. Neuhold Jr.",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.12",
|
|
6
6
|
"description": "A library for interacting with the backend and defining the backend API for personal projects.",
|
|
7
7
|
"packageManager": "pnpm@10.25.0",
|
|
8
8
|
"type": "module",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"TypeScript"
|
|
73
73
|
],
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@aneuhold/core-ts-db-lib": "^4.1.
|
|
75
|
+
"@aneuhold/core-ts-db-lib": "^4.1.1",
|
|
76
76
|
"@aneuhold/core-ts-lib": "^2.3.17",
|
|
77
77
|
"bson": "^7.0.0"
|
|
78
78
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardConfig.d.ts","sourceRoot":"","sources":["../../src/types/DashboardConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,2BAA2B,EAAE,MAAM,CAAC;IACpC;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,4BAA4B,EAAE,MAAM,CAAC;QACrC,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardConfig.js","sourceRoot":"","sources":["../../src/types/DashboardConfig.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectDashboard.d.ts","sourceRoot":"","sources":["../../src/types/ProjectDashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,OAAO,EACR,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE;QACJ;;WAEG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB;;WAEG;QACH,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB;;WAEG;QACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B;;WAEG;QACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;KAClC,CAAC;IACF,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;QACxB;;WAEG;QACH,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;QAC3C;;WAEG;QACH,sBAAsB,CAAC,EAAE,qBAAqB,EAAE,CAAC;KAClD,CAAC;IACF,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,UAAU,CAAC,EAAE,mBAAmB,CAAC;QACjC;;WAEG;QACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;QACxB;;WAEG;QACH,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;QAC3C;;WAEG;QACH,sBAAsB,CAAC,EAAE,qBAAqB,EAAE,CAAC;KAClD,CAAC;IACF,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;KACzB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,uBAAuB,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC3C,sBAAsB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAClD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectDashboard.js","sourceRoot":"","sources":["../../src/types/ProjectDashboard.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|