@mentra/sdk 2.1.30-beta.1 → 2.1.31-beta.1
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/app/server/index.d.ts +2 -1
- package/dist/app/server/index.d.ts.map +1 -1
- package/dist/app/session/device-state.d.ts +83 -0
- package/dist/app/session/device-state.d.ts.map +1 -0
- package/dist/app/session/index.d.ts +21 -7
- package/dist/app/session/index.d.ts.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +205 -9
- package/dist/index.js.map +12 -10
- package/dist/types/capabilities.d.ts +3 -90
- package/dist/types/capabilities.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/message-types.d.ts +3 -1
- package/dist/types/message-types.d.ts.map +1 -1
- package/dist/types/messages/app-to-cloud.d.ts +15 -1
- package/dist/types/messages/app-to-cloud.d.ts.map +1 -1
- package/dist/types/messages/cloud-to-app.d.ts +14 -1
- package/dist/types/messages/cloud-to-app.d.ts.map +1 -1
- package/dist/utils/Observable.d.ts +92 -0
- package/dist/utils/Observable.d.ts.map +1 -0
- package/node_modules/@mentra/types/README.md +134 -0
- package/node_modules/@mentra/types/dist/applet.d.ts +39 -0
- package/node_modules/@mentra/types/dist/applet.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/applet.js +5 -0
- package/node_modules/@mentra/types/dist/capabilities/even-realities-g1.d.ts +12 -0
- package/node_modules/@mentra/types/dist/capabilities/even-realities-g1.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/even-realities-g1.js +54 -0
- package/node_modules/@mentra/types/dist/capabilities/mentra-live.d.ts +12 -0
- package/node_modules/@mentra/types/dist/capabilities/mentra-live.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/mentra-live.js +94 -0
- package/node_modules/@mentra/types/dist/capabilities/simulated-glasses.d.ts +13 -0
- package/node_modules/@mentra/types/dist/capabilities/simulated-glasses.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/simulated-glasses.js +67 -0
- package/node_modules/@mentra/types/dist/capabilities/vuzix-z100.d.ts +12 -0
- package/node_modules/@mentra/types/dist/capabilities/vuzix-z100.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/vuzix-z100.js +51 -0
- package/node_modules/@mentra/types/dist/cli.d.ts +130 -0
- package/node_modules/@mentra/types/dist/cli.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/cli.js +7 -0
- package/node_modules/@mentra/types/dist/device.d.ts +32 -0
- package/node_modules/@mentra/types/dist/device.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/device.js +6 -0
- package/node_modules/@mentra/types/dist/enums.d.ts +34 -0
- package/node_modules/@mentra/types/dist/enums.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/enums.js +39 -0
- package/node_modules/@mentra/types/dist/hardware.d.ts +141 -0
- package/node_modules/@mentra/types/dist/hardware.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/hardware.js +33 -0
- package/node_modules/@mentra/types/dist/index.d.ts +18 -0
- package/node_modules/@mentra/types/dist/index.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/index.js +25 -0
- package/node_modules/@mentra/types/package.json +31 -0
- package/package.json +6 -3
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Even Realities G1 Hardware Capabilities
|
|
4
|
+
*
|
|
5
|
+
* Capability profile for the Even Realities G1 smart glasses model.
|
|
6
|
+
* Defines the hardware and software features available on this device.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.evenRealitiesG1 = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Even Realities G1 capability profile
|
|
12
|
+
*/
|
|
13
|
+
exports.evenRealitiesG1 = {
|
|
14
|
+
modelName: "Even Realities G1",
|
|
15
|
+
// Camera capabilities - G1 does not have a camera
|
|
16
|
+
hasCamera: false,
|
|
17
|
+
camera: null,
|
|
18
|
+
// Display capabilities - G1 has a green monochrome display
|
|
19
|
+
hasDisplay: true,
|
|
20
|
+
display: {
|
|
21
|
+
count: 2,
|
|
22
|
+
isColor: false,
|
|
23
|
+
color: "green",
|
|
24
|
+
canDisplayBitmap: true,
|
|
25
|
+
resolution: { width: 640, height: 200 },
|
|
26
|
+
fieldOfView: { horizontal: 25 },
|
|
27
|
+
maxTextLines: 5,
|
|
28
|
+
adjustBrightness: true,
|
|
29
|
+
},
|
|
30
|
+
// Microphone capabilities - G1 has one microphone without VAD
|
|
31
|
+
hasMicrophone: true,
|
|
32
|
+
microphone: {
|
|
33
|
+
count: 1,
|
|
34
|
+
hasVAD: false,
|
|
35
|
+
},
|
|
36
|
+
// Speaker capabilities - G1 does not have a speaker
|
|
37
|
+
hasSpeaker: false,
|
|
38
|
+
speaker: null,
|
|
39
|
+
// IMU capabilities - G1 has IMU for head-up/down detection but raw data not exposed to apps
|
|
40
|
+
hasIMU: true,
|
|
41
|
+
imu: null,
|
|
42
|
+
// Button capabilities - G1 does not have buttons
|
|
43
|
+
hasButton: false,
|
|
44
|
+
button: null,
|
|
45
|
+
// Light capabilities - G1 does not have lights
|
|
46
|
+
hasLight: false,
|
|
47
|
+
light: null,
|
|
48
|
+
// Power capabilities - G1 does not have external battery
|
|
49
|
+
power: {
|
|
50
|
+
hasExternalBattery: false,
|
|
51
|
+
},
|
|
52
|
+
// WiFi capabilities - G1 does not support WiFi
|
|
53
|
+
hasWifi: false,
|
|
54
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Mentra Live Hardware Capabilities
|
|
3
|
+
*
|
|
4
|
+
* Capability profile for the Mentra Live smart glasses model.
|
|
5
|
+
* Defines the hardware and software features available on this device.
|
|
6
|
+
*/
|
|
7
|
+
import type { Capabilities } from "../hardware";
|
|
8
|
+
/**
|
|
9
|
+
* Mentra Live capability profile
|
|
10
|
+
*/
|
|
11
|
+
export declare const mentraLive: Capabilities;
|
|
12
|
+
//# sourceMappingURL=mentra-live.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentra-live.d.ts","sourceRoot":"","sources":["../../src/capabilities/mentra-live.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YA0FxB,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Mentra Live Hardware Capabilities
|
|
4
|
+
*
|
|
5
|
+
* Capability profile for the Mentra Live smart glasses model.
|
|
6
|
+
* Defines the hardware and software features available on this device.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.mentraLive = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Mentra Live capability profile
|
|
12
|
+
*/
|
|
13
|
+
exports.mentraLive = {
|
|
14
|
+
modelName: "Mentra Live",
|
|
15
|
+
// Camera capabilities - Mentra Live has camera with streaming
|
|
16
|
+
hasCamera: true,
|
|
17
|
+
camera: {
|
|
18
|
+
resolution: { width: 1920, height: 1080 },
|
|
19
|
+
hasHDR: false,
|
|
20
|
+
hasFocus: true,
|
|
21
|
+
video: {
|
|
22
|
+
canRecord: true,
|
|
23
|
+
canStream: true,
|
|
24
|
+
supportedStreamTypes: ["rtmp"],
|
|
25
|
+
supportedResolutions: [
|
|
26
|
+
{ width: 1920, height: 1080 },
|
|
27
|
+
{ width: 1280, height: 720 },
|
|
28
|
+
{ width: 640, height: 480 },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
// Display capabilities - Mentra Live does not have a display
|
|
33
|
+
hasDisplay: false,
|
|
34
|
+
display: null,
|
|
35
|
+
// Microphone capabilities - Mentra Live has one microphone with VAD
|
|
36
|
+
hasMicrophone: true,
|
|
37
|
+
microphone: {
|
|
38
|
+
count: 1,
|
|
39
|
+
hasVAD: true,
|
|
40
|
+
},
|
|
41
|
+
// Speaker capabilities - Mentra Live has one standard speaker
|
|
42
|
+
hasSpeaker: true,
|
|
43
|
+
speaker: {
|
|
44
|
+
count: 1,
|
|
45
|
+
isPrivate: false,
|
|
46
|
+
},
|
|
47
|
+
// IMU capabilities - Mentra Live has 6-axis IMU
|
|
48
|
+
hasIMU: true,
|
|
49
|
+
imu: {
|
|
50
|
+
axisCount: 6,
|
|
51
|
+
hasAccelerometer: true,
|
|
52
|
+
hasCompass: false,
|
|
53
|
+
hasGyroscope: true,
|
|
54
|
+
},
|
|
55
|
+
// Button capabilities - Mentra Live has one physical button
|
|
56
|
+
hasButton: true,
|
|
57
|
+
button: {
|
|
58
|
+
count: 1,
|
|
59
|
+
buttons: [
|
|
60
|
+
{
|
|
61
|
+
type: "press",
|
|
62
|
+
events: ["press", "double_press", "long_press"],
|
|
63
|
+
isCapacitive: false,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
// Light capabilities - Mentra Live has two lights: privacy light + RGB LED
|
|
68
|
+
hasLight: true,
|
|
69
|
+
light: {
|
|
70
|
+
count: 2,
|
|
71
|
+
lights: [
|
|
72
|
+
{
|
|
73
|
+
id: "privacy",
|
|
74
|
+
purpose: "privacy",
|
|
75
|
+
isFullColor: false,
|
|
76
|
+
color: "white",
|
|
77
|
+
position: "front_facing",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "user_feedback",
|
|
81
|
+
purpose: "user_feedback",
|
|
82
|
+
isFullColor: true,
|
|
83
|
+
color: "rgb",
|
|
84
|
+
position: "user_facing",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
// Power capabilities - Mentra Live does not have external battery
|
|
89
|
+
power: {
|
|
90
|
+
hasExternalBattery: false,
|
|
91
|
+
},
|
|
92
|
+
// WiFi capabilities - Mentra Live supports WiFi
|
|
93
|
+
hasWifi: true,
|
|
94
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Simulated Glasses Hardware Capabilities
|
|
3
|
+
*
|
|
4
|
+
* Capability profile for the Simulated Glasses model.
|
|
5
|
+
* Defines the hardware and software features available on this device.
|
|
6
|
+
* This profile matches the Vuzix Z100 capabilities for testing purposes.
|
|
7
|
+
*/
|
|
8
|
+
import type { Capabilities } from "../hardware";
|
|
9
|
+
/**
|
|
10
|
+
* Simulated Glasses capability profile
|
|
11
|
+
*/
|
|
12
|
+
export declare const simulatedGlasses: Capabilities;
|
|
13
|
+
//# sourceMappingURL=simulated-glasses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulated-glasses.d.ts","sourceRoot":"","sources":["../../src/capabilities/simulated-glasses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,YA8D9B,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Simulated Glasses Hardware Capabilities
|
|
4
|
+
*
|
|
5
|
+
* Capability profile for the Simulated Glasses model.
|
|
6
|
+
* Defines the hardware and software features available on this device.
|
|
7
|
+
* This profile matches the Vuzix Z100 capabilities for testing purposes.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.simulatedGlasses = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* Simulated Glasses capability profile
|
|
13
|
+
*/
|
|
14
|
+
exports.simulatedGlasses = {
|
|
15
|
+
modelName: "Simulated Glasses",
|
|
16
|
+
// Camera capabilities - does not have a camera
|
|
17
|
+
hasCamera: false,
|
|
18
|
+
camera: null,
|
|
19
|
+
// Display capabilities - has a green monochrome display
|
|
20
|
+
hasDisplay: true,
|
|
21
|
+
display: {
|
|
22
|
+
count: 1,
|
|
23
|
+
isColor: false,
|
|
24
|
+
color: "green",
|
|
25
|
+
canDisplayBitmap: false,
|
|
26
|
+
resolution: { width: 640, height: 480 },
|
|
27
|
+
fieldOfView: { horizontal: 30 },
|
|
28
|
+
maxTextLines: 7,
|
|
29
|
+
adjustBrightness: true,
|
|
30
|
+
},
|
|
31
|
+
// Microphone capabilities - has a microphone (phone mic)
|
|
32
|
+
hasMicrophone: true,
|
|
33
|
+
microphone: {
|
|
34
|
+
count: 1,
|
|
35
|
+
hasVAD: false,
|
|
36
|
+
},
|
|
37
|
+
// Speaker capabilities - has a speaker (phone speaker)
|
|
38
|
+
hasSpeaker: true,
|
|
39
|
+
speaker: {
|
|
40
|
+
count: 1,
|
|
41
|
+
isPrivate: false,
|
|
42
|
+
},
|
|
43
|
+
// IMU capabilities - does not have an IMU
|
|
44
|
+
hasIMU: false,
|
|
45
|
+
imu: null,
|
|
46
|
+
// Button capabilities - Has one simulated button
|
|
47
|
+
hasButton: true,
|
|
48
|
+
button: {
|
|
49
|
+
count: 1,
|
|
50
|
+
buttons: [
|
|
51
|
+
{
|
|
52
|
+
type: "press",
|
|
53
|
+
events: ["press"],
|
|
54
|
+
isCapacitive: false,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
// Light capabilities - does not have lights
|
|
59
|
+
hasLight: false,
|
|
60
|
+
light: null,
|
|
61
|
+
// Power capabilities - does not have external battery
|
|
62
|
+
power: {
|
|
63
|
+
hasExternalBattery: false,
|
|
64
|
+
},
|
|
65
|
+
// WiFi capabilities - does not support WiFi
|
|
66
|
+
hasWifi: false,
|
|
67
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Vuzix Z100 Hardware Capabilities
|
|
3
|
+
*
|
|
4
|
+
* Capability profile for the Vuzix Z100 smart glasses model.
|
|
5
|
+
* Defines the hardware and software features available on this device.
|
|
6
|
+
*/
|
|
7
|
+
import type { Capabilities } from "../hardware";
|
|
8
|
+
/**
|
|
9
|
+
* Vuzix Z100 capability profile
|
|
10
|
+
*/
|
|
11
|
+
export declare const vuzixZ100: Capabilities;
|
|
12
|
+
//# sourceMappingURL=vuzix-z100.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vuzix-z100.d.ts","sourceRoot":"","sources":["../../src/capabilities/vuzix-z100.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,YA+CvB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Vuzix Z100 Hardware Capabilities
|
|
4
|
+
*
|
|
5
|
+
* Capability profile for the Vuzix Z100 smart glasses model.
|
|
6
|
+
* Defines the hardware and software features available on this device.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.vuzixZ100 = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Vuzix Z100 capability profile
|
|
12
|
+
*/
|
|
13
|
+
exports.vuzixZ100 = {
|
|
14
|
+
modelName: "Vuzix Z100",
|
|
15
|
+
// Camera capabilities - does not have a camera
|
|
16
|
+
hasCamera: false,
|
|
17
|
+
camera: null,
|
|
18
|
+
// Display capabilities - has a green monochrome display
|
|
19
|
+
hasDisplay: true,
|
|
20
|
+
display: {
|
|
21
|
+
count: 1,
|
|
22
|
+
isColor: false,
|
|
23
|
+
color: "green",
|
|
24
|
+
canDisplayBitmap: false,
|
|
25
|
+
resolution: { width: 640, height: 480 },
|
|
26
|
+
fieldOfView: { horizontal: 30 },
|
|
27
|
+
maxTextLines: 7,
|
|
28
|
+
adjustBrightness: true,
|
|
29
|
+
},
|
|
30
|
+
// Microphone capabilities - does not have a microphone
|
|
31
|
+
hasMicrophone: false,
|
|
32
|
+
microphone: null,
|
|
33
|
+
// Speaker capabilities - does not have a speaker
|
|
34
|
+
hasSpeaker: false,
|
|
35
|
+
speaker: null,
|
|
36
|
+
// IMU capabilities - does not have an IMU
|
|
37
|
+
hasIMU: false,
|
|
38
|
+
imu: null,
|
|
39
|
+
// Button capabilities - does not have buttons
|
|
40
|
+
hasButton: false,
|
|
41
|
+
button: null,
|
|
42
|
+
// Light capabilities - does not have lights
|
|
43
|
+
hasLight: false,
|
|
44
|
+
light: null,
|
|
45
|
+
// Power capabilities - does not have external battery
|
|
46
|
+
power: {
|
|
47
|
+
hasExternalBattery: false,
|
|
48
|
+
},
|
|
49
|
+
// WiFi capabilities - does not support WiFi
|
|
50
|
+
hasWifi: false,
|
|
51
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI API Key Management Types
|
|
3
|
+
*
|
|
4
|
+
* Shared between cloud backend and CLI tool.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* CLI API Key stored in database
|
|
8
|
+
*/
|
|
9
|
+
export interface CLIApiKey {
|
|
10
|
+
/** Unique key identifier (UUID v4) */
|
|
11
|
+
keyId: string;
|
|
12
|
+
/** User ID who owns this key (ObjectId as string) */
|
|
13
|
+
userId: string;
|
|
14
|
+
/** User email (denormalized for backward compatibility) */
|
|
15
|
+
email: string;
|
|
16
|
+
/** User-friendly name for the key */
|
|
17
|
+
name: string;
|
|
18
|
+
/** SHA-256 hash of the JWT token (for revocation checks) */
|
|
19
|
+
hashedToken: string;
|
|
20
|
+
/** When the key was created */
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
/** When the key was last updated */
|
|
23
|
+
updatedAt: Date;
|
|
24
|
+
/** Last time this key was used (optional tracking) */
|
|
25
|
+
lastUsedAt?: Date;
|
|
26
|
+
/** Optional expiration date */
|
|
27
|
+
expiresAt?: Date;
|
|
28
|
+
/** Whether key is active (false = revoked) */
|
|
29
|
+
isActive: boolean;
|
|
30
|
+
/** Optional metadata */
|
|
31
|
+
metadata?: {
|
|
32
|
+
createdFrom?: string;
|
|
33
|
+
userAgent?: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Request to generate a new CLI API key
|
|
38
|
+
*/
|
|
39
|
+
export interface GenerateCLIKeyRequest {
|
|
40
|
+
/** User-friendly name for the key */
|
|
41
|
+
name: string;
|
|
42
|
+
/** Optional expiration in days (default: never) */
|
|
43
|
+
expiresInDays?: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Response when generating a CLI API key
|
|
47
|
+
* Token is shown ONCE and never retrievable
|
|
48
|
+
*/
|
|
49
|
+
export interface GenerateCLIKeyResponse {
|
|
50
|
+
/** The CLI API key ID */
|
|
51
|
+
keyId: string;
|
|
52
|
+
/** User-friendly name */
|
|
53
|
+
name: string;
|
|
54
|
+
/** JWT token (ONLY shown once!) */
|
|
55
|
+
token: string;
|
|
56
|
+
/** When it was created */
|
|
57
|
+
createdAt: string;
|
|
58
|
+
/** Optional expiration date */
|
|
59
|
+
expiresAt?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* CLI API Key list item (token not included)
|
|
63
|
+
*/
|
|
64
|
+
export interface CLIApiKeyListItem {
|
|
65
|
+
/** Key identifier */
|
|
66
|
+
keyId: string;
|
|
67
|
+
/** User-friendly name */
|
|
68
|
+
name: string;
|
|
69
|
+
/** Creation timestamp */
|
|
70
|
+
createdAt: string;
|
|
71
|
+
/** Last usage timestamp (if tracked) */
|
|
72
|
+
lastUsedAt?: string;
|
|
73
|
+
/** Expiration timestamp */
|
|
74
|
+
expiresAt?: string;
|
|
75
|
+
/** Whether key is active */
|
|
76
|
+
isActive: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Request to update a CLI API key
|
|
80
|
+
*/
|
|
81
|
+
export interface UpdateCLIKeyRequest {
|
|
82
|
+
/** New name for the key */
|
|
83
|
+
name: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* JWT payload for CLI API keys
|
|
87
|
+
*/
|
|
88
|
+
export interface CLITokenPayload {
|
|
89
|
+
/** User email */
|
|
90
|
+
email: string;
|
|
91
|
+
/** Token type discriminator */
|
|
92
|
+
type: "cli";
|
|
93
|
+
/** Key ID for revocation lookups */
|
|
94
|
+
keyId: string;
|
|
95
|
+
/** User-friendly key name */
|
|
96
|
+
name: string;
|
|
97
|
+
/** Issued at (Unix timestamp) */
|
|
98
|
+
iat: number;
|
|
99
|
+
/** Optional expiration (Unix timestamp) */
|
|
100
|
+
exp?: number;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* CLI credentials stored locally on user's machine
|
|
104
|
+
*/
|
|
105
|
+
export interface CLICredentials {
|
|
106
|
+
/** JWT token */
|
|
107
|
+
token: string;
|
|
108
|
+
/** User email (extracted from token) */
|
|
109
|
+
email: string;
|
|
110
|
+
/** Key name (extracted from token) */
|
|
111
|
+
keyName: string;
|
|
112
|
+
/** Key ID (extracted from token) */
|
|
113
|
+
keyId: string;
|
|
114
|
+
/** When credentials were stored */
|
|
115
|
+
storedAt: string;
|
|
116
|
+
/** Optional expiration timestamp */
|
|
117
|
+
expiresAt?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Cloud environment configuration
|
|
121
|
+
*/
|
|
122
|
+
export interface Cloud {
|
|
123
|
+
/** Display name */
|
|
124
|
+
name: string;
|
|
125
|
+
/** API URL */
|
|
126
|
+
url: string;
|
|
127
|
+
/** Whether this is a built-in cloud */
|
|
128
|
+
builtin?: boolean;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":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GlassesInfo {
|
|
6
|
+
connected: boolean;
|
|
7
|
+
modelName: string | null;
|
|
8
|
+
androidVersion?: string;
|
|
9
|
+
fwVersion?: string;
|
|
10
|
+
buildNumber?: string;
|
|
11
|
+
otaVersionUrl?: string;
|
|
12
|
+
appVersion?: string;
|
|
13
|
+
bluetoothName?: string;
|
|
14
|
+
serialNumber?: string;
|
|
15
|
+
style?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
wifiConnected?: boolean;
|
|
18
|
+
wifiSsid?: string;
|
|
19
|
+
wifiLocalIp?: string;
|
|
20
|
+
batteryLevel?: number;
|
|
21
|
+
charging?: boolean;
|
|
22
|
+
caseBatteryLevel?: number;
|
|
23
|
+
caseCharging?: boolean;
|
|
24
|
+
caseOpen?: boolean;
|
|
25
|
+
caseRemoved?: boolean;
|
|
26
|
+
hotspotEnabled?: boolean;
|
|
27
|
+
hotspotSsid?: string;
|
|
28
|
+
hotspotPassword?: string;
|
|
29
|
+
hotspotGatewayIp?: string;
|
|
30
|
+
timestamp?: string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=device.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IAE1B,SAAS,EAAE,OAAO,CAAA;IAGlB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IAGd,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IAGpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IAGrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAGzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mentra/types - Shared enums for MentraOS
|
|
3
|
+
* These are runtime values (not pure types)
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Hardware component types that apps can require
|
|
7
|
+
*/
|
|
8
|
+
export declare enum HardwareType {
|
|
9
|
+
CAMERA = "CAMERA",
|
|
10
|
+
DISPLAY = "DISPLAY",
|
|
11
|
+
MICROPHONE = "MICROPHONE",
|
|
12
|
+
SPEAKER = "SPEAKER",
|
|
13
|
+
IMU = "IMU",
|
|
14
|
+
BUTTON = "BUTTON",
|
|
15
|
+
LIGHT = "LIGHT",
|
|
16
|
+
WIFI = "WIFI"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Levels of hardware requirements
|
|
20
|
+
*/
|
|
21
|
+
export declare enum HardwareRequirementLevel {
|
|
22
|
+
REQUIRED = "REQUIRED",// App cannot function without this hardware
|
|
23
|
+
OPTIONAL = "OPTIONAL"
|
|
24
|
+
}
|
|
25
|
+
export declare enum DeviceTypes {
|
|
26
|
+
SIMULATED = "Simulated Glasses",
|
|
27
|
+
G1 = "Even Realities G1",
|
|
28
|
+
LIVE = "Mentra Live",
|
|
29
|
+
MACH1 = "Mentra Mach1",
|
|
30
|
+
Z100 = "Vuzix Z100",
|
|
31
|
+
NEX = "Mentra Nex",
|
|
32
|
+
FRAME = "Brilliant Frame"
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED;;GAEG;AACH,oBAAY,wBAAwB;IAClC,QAAQ,aAAa,CAAE,4CAA4C;IACnE,QAAQ,aAAa;CACtB;AAED,oBAAY,WAAW;IACrB,SAAS,sBAAsB;IAC/B,EAAE,sBAAsB;IACxB,IAAI,gBAAgB;IACpB,KAAK,iBAAiB;IACtB,IAAI,eAAe;IACnB,GAAG,eAAe;IAClB,KAAK,oBAAoB;CAC1B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @mentra/types - Shared enums for MentraOS
|
|
4
|
+
* These are runtime values (not pure types)
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DeviceTypes = exports.HardwareRequirementLevel = exports.HardwareType = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* Hardware component types that apps can require
|
|
10
|
+
*/
|
|
11
|
+
var HardwareType;
|
|
12
|
+
(function (HardwareType) {
|
|
13
|
+
HardwareType["CAMERA"] = "CAMERA";
|
|
14
|
+
HardwareType["DISPLAY"] = "DISPLAY";
|
|
15
|
+
HardwareType["MICROPHONE"] = "MICROPHONE";
|
|
16
|
+
HardwareType["SPEAKER"] = "SPEAKER";
|
|
17
|
+
HardwareType["IMU"] = "IMU";
|
|
18
|
+
HardwareType["BUTTON"] = "BUTTON";
|
|
19
|
+
HardwareType["LIGHT"] = "LIGHT";
|
|
20
|
+
HardwareType["WIFI"] = "WIFI";
|
|
21
|
+
})(HardwareType || (exports.HardwareType = HardwareType = {}));
|
|
22
|
+
/**
|
|
23
|
+
* Levels of hardware requirements
|
|
24
|
+
*/
|
|
25
|
+
var HardwareRequirementLevel;
|
|
26
|
+
(function (HardwareRequirementLevel) {
|
|
27
|
+
HardwareRequirementLevel["REQUIRED"] = "REQUIRED";
|
|
28
|
+
HardwareRequirementLevel["OPTIONAL"] = "OPTIONAL";
|
|
29
|
+
})(HardwareRequirementLevel || (exports.HardwareRequirementLevel = HardwareRequirementLevel = {}));
|
|
30
|
+
var DeviceTypes;
|
|
31
|
+
(function (DeviceTypes) {
|
|
32
|
+
DeviceTypes["SIMULATED"] = "Simulated Glasses";
|
|
33
|
+
DeviceTypes["G1"] = "Even Realities G1";
|
|
34
|
+
DeviceTypes["LIVE"] = "Mentra Live";
|
|
35
|
+
DeviceTypes["MACH1"] = "Mentra Mach1";
|
|
36
|
+
DeviceTypes["Z100"] = "Vuzix Z100";
|
|
37
|
+
DeviceTypes["NEX"] = "Mentra Nex";
|
|
38
|
+
DeviceTypes["FRAME"] = "Brilliant Frame";
|
|
39
|
+
})(DeviceTypes || (exports.DeviceTypes = DeviceTypes = {}));
|