@mentra/sdk 1.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -0
- package/dist/constants/index.d.ts +14 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +16 -0
- package/dist/examples/rtmp-streaming-example.d.ts +2 -0
- package/dist/examples/rtmp-streaming-example.d.ts.map +1 -0
- package/dist/examples/rtmp-streaming-example.js +102 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/logging/logger.d.ts +3 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +79 -0
- package/dist/tpa/index.d.ts +6 -0
- package/dist/tpa/index.d.ts.map +1 -0
- package/dist/tpa/index.js +24 -0
- package/dist/tpa/server/index.d.ts +193 -0
- package/dist/tpa/server/index.d.ts.map +1 -0
- package/dist/tpa/server/index.js +436 -0
- package/dist/tpa/session/api-client.d.ts +49 -0
- package/dist/tpa/session/api-client.d.ts.map +1 -0
- package/dist/tpa/session/api-client.js +101 -0
- package/dist/tpa/session/dashboard.d.ts +52 -0
- package/dist/tpa/session/dashboard.d.ts.map +1 -0
- package/dist/tpa/session/dashboard.js +149 -0
- package/dist/tpa/session/events.d.ts +178 -0
- package/dist/tpa/session/events.d.ts.map +1 -0
- package/dist/tpa/session/events.js +294 -0
- package/dist/tpa/session/index.d.ts +391 -0
- package/dist/tpa/session/index.d.ts.map +1 -0
- package/dist/tpa/session/index.js +1452 -0
- package/dist/tpa/session/layouts.d.ts +150 -0
- package/dist/tpa/session/layouts.d.ts.map +1 -0
- package/dist/tpa/session/layouts.js +282 -0
- package/dist/tpa/session/modules/streaming.d.ts +100 -0
- package/dist/tpa/session/modules/streaming.d.ts.map +1 -0
- package/dist/tpa/session/modules/streaming.js +270 -0
- package/dist/tpa/session/settings.d.ts +202 -0
- package/dist/tpa/session/settings.d.ts.map +1 -0
- package/dist/tpa/session/settings.js +361 -0
- package/dist/tpa/token/index.d.ts +7 -0
- package/dist/tpa/token/index.d.ts.map +1 -0
- package/dist/tpa/token/index.js +22 -0
- package/dist/tpa/token/utils.d.ts +69 -0
- package/dist/tpa/token/utils.d.ts.map +1 -0
- package/dist/tpa/token/utils.js +144 -0
- package/dist/tpa/webview/index.d.ts +47 -0
- package/dist/tpa/webview/index.d.ts.map +1 -0
- package/dist/tpa/webview/index.js +344 -0
- package/dist/types/dashboard/index.d.ts +128 -0
- package/dist/types/dashboard/index.d.ts.map +1 -0
- package/dist/types/dashboard/index.js +12 -0
- package/dist/types/enums.d.ts +57 -0
- package/dist/types/enums.d.ts.map +1 -0
- package/dist/types/enums.js +72 -0
- package/dist/types/index.d.ts +38 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +87 -0
- package/dist/types/layouts.d.ts +51 -0
- package/dist/types/layouts.d.ts.map +1 -0
- package/dist/types/layouts.js +3 -0
- package/dist/types/message-types.d.ts +109 -0
- package/dist/types/message-types.d.ts.map +1 -0
- package/dist/types/message-types.js +189 -0
- package/dist/types/messages/base.d.ts +12 -0
- package/dist/types/messages/base.d.ts.map +1 -0
- package/dist/types/messages/base.js +3 -0
- package/dist/types/messages/cloud-to-glasses.d.ts +126 -0
- package/dist/types/messages/cloud-to-glasses.d.ts.map +1 -0
- package/dist/types/messages/cloud-to-glasses.js +60 -0
- package/dist/types/messages/cloud-to-tpa.d.ts +228 -0
- package/dist/types/messages/cloud-to-tpa.d.ts.map +1 -0
- package/dist/types/messages/cloud-to-tpa.js +61 -0
- package/dist/types/messages/glasses-to-cloud.d.ts +219 -0
- package/dist/types/messages/glasses-to-cloud.d.ts.map +1 -0
- package/dist/types/messages/glasses-to-cloud.js +88 -0
- package/dist/types/messages/tpa-to-cloud.d.ts +146 -0
- package/dist/types/messages/tpa-to-cloud.d.ts.map +1 -0
- package/dist/types/messages/tpa-to-cloud.js +67 -0
- package/dist/types/models.d.ts +165 -0
- package/dist/types/models.d.ts.map +1 -0
- package/dist/types/models.js +84 -0
- package/dist/types/rtmp-stream.d.ts +68 -0
- package/dist/types/rtmp-stream.d.ts.map +1 -0
- package/dist/types/rtmp-stream.js +3 -0
- package/dist/types/streams.d.ts +138 -0
- package/dist/types/streams.d.ts.map +1 -0
- package/dist/types/streams.js +251 -0
- package/dist/types/token.d.ts +41 -0
- package/dist/types/token.d.ts.map +1 -0
- package/dist/types/token.js +7 -0
- package/dist/types/user-session.d.ts +73 -0
- package/dist/types/user-session.d.ts.map +1 -0
- package/dist/types/user-session.js +17 -0
- package/dist/types/webhooks.d.ts +107 -0
- package/dist/types/webhooks.d.ts.map +1 -0
- package/dist/types/webhooks.js +55 -0
- package/dist/utils/resource-tracker.d.ts +94 -0
- package/dist/utils/resource-tracker.d.ts.map +1 -0
- package/dist/utils/resource-tracker.js +153 -0
- package/package.json +50 -0
@@ -0,0 +1,146 @@
|
|
1
|
+
import { BaseMessage } from './base';
|
2
|
+
import { TpaToCloudMessageType } from '../message-types';
|
3
|
+
import { ExtendedStreamType } from '../streams';
|
4
|
+
import { DisplayRequest } from '../layouts';
|
5
|
+
import { DashboardContentUpdate, DashboardModeChange, DashboardSystemUpdate } from '../dashboard';
|
6
|
+
import { VideoConfig, AudioConfig, StreamConfig } from '../rtmp-stream';
|
7
|
+
/**
|
8
|
+
* Connection initialization from TPA
|
9
|
+
*/
|
10
|
+
export interface TpaConnectionInit extends BaseMessage {
|
11
|
+
type: TpaToCloudMessageType.CONNECTION_INIT;
|
12
|
+
packageName: string;
|
13
|
+
sessionId: string;
|
14
|
+
apiKey: string;
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Subscription update from TPA
|
18
|
+
*/
|
19
|
+
export interface TpaSubscriptionUpdate extends BaseMessage {
|
20
|
+
type: TpaToCloudMessageType.SUBSCRIPTION_UPDATE;
|
21
|
+
packageName: string;
|
22
|
+
subscriptions: ExtendedStreamType[];
|
23
|
+
}
|
24
|
+
/**
|
25
|
+
* Photo request from TPA
|
26
|
+
*/
|
27
|
+
export interface PhotoRequest extends BaseMessage {
|
28
|
+
type: TpaToCloudMessageType.PHOTO_REQUEST;
|
29
|
+
packageName: string;
|
30
|
+
saveToGallery?: boolean;
|
31
|
+
}
|
32
|
+
/**
|
33
|
+
* RTMP stream request from TPA
|
34
|
+
*/
|
35
|
+
export interface RtmpStreamRequest extends BaseMessage {
|
36
|
+
type: TpaToCloudMessageType.RTMP_STREAM_REQUEST;
|
37
|
+
packageName: string;
|
38
|
+
rtmpUrl: string;
|
39
|
+
video?: VideoConfig;
|
40
|
+
audio?: AudioConfig;
|
41
|
+
stream?: StreamConfig;
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* RTMP stream stop request from TPA
|
45
|
+
*/
|
46
|
+
export interface RtmpStreamStopRequest extends BaseMessage {
|
47
|
+
type: TpaToCloudMessageType.RTMP_STREAM_STOP;
|
48
|
+
packageName: string;
|
49
|
+
streamId?: string;
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Union type for all messages from TPAs to cloud
|
53
|
+
*/
|
54
|
+
export type TpaToCloudMessage = TpaConnectionInit | TpaSubscriptionUpdate | DisplayRequest | PhotoRequest | RtmpStreamRequest | RtmpStreamStopRequest | DashboardContentUpdate | DashboardModeChange | DashboardSystemUpdate | TpaBroadcastMessage | TpaDirectMessage | TpaUserDiscovery | TpaRoomJoin | TpaRoomLeave;
|
55
|
+
/**
|
56
|
+
* Type guard to check if a message is a TPA connection init
|
57
|
+
*/
|
58
|
+
export declare function isTpaConnectionInit(message: TpaToCloudMessage): message is TpaConnectionInit;
|
59
|
+
/**
|
60
|
+
* Type guard to check if a message is a TPA subscription update
|
61
|
+
*/
|
62
|
+
export declare function isTpaSubscriptionUpdate(message: TpaToCloudMessage): message is TpaSubscriptionUpdate;
|
63
|
+
/**
|
64
|
+
* Type guard to check if a message is a TPA display request
|
65
|
+
*/
|
66
|
+
export declare function isDisplayRequest(message: TpaToCloudMessage): message is DisplayRequest;
|
67
|
+
/**
|
68
|
+
* Type guard to check if a message is a TPA photo request
|
69
|
+
*/
|
70
|
+
export declare function isPhotoRequest(message: TpaToCloudMessage): message is PhotoRequest;
|
71
|
+
/**
|
72
|
+
* Type guard to check if a message is a dashboard content update
|
73
|
+
*/
|
74
|
+
export declare function isDashboardContentUpdate(message: TpaToCloudMessage): message is DashboardContentUpdate;
|
75
|
+
/**
|
76
|
+
* Type guard to check if a message is a dashboard mode change
|
77
|
+
*/
|
78
|
+
export declare function isDashboardModeChange(message: TpaToCloudMessage): message is DashboardModeChange;
|
79
|
+
/**
|
80
|
+
* Type guard to check if a message is a dashboard system update
|
81
|
+
*/
|
82
|
+
export declare function isDashboardSystemUpdate(message: TpaToCloudMessage): message is DashboardSystemUpdate;
|
83
|
+
/**
|
84
|
+
* Broadcast message to all users with the same TPA active
|
85
|
+
*/
|
86
|
+
export interface TpaBroadcastMessage extends BaseMessage {
|
87
|
+
type: TpaToCloudMessageType.TPA_BROADCAST_MESSAGE;
|
88
|
+
packageName: string;
|
89
|
+
sessionId: string;
|
90
|
+
payload: any;
|
91
|
+
messageId: string;
|
92
|
+
senderUserId: string;
|
93
|
+
}
|
94
|
+
/**
|
95
|
+
* Direct message to a specific user with the same TPA active
|
96
|
+
*/
|
97
|
+
export interface TpaDirectMessage extends BaseMessage {
|
98
|
+
type: TpaToCloudMessageType.TPA_DIRECT_MESSAGE;
|
99
|
+
packageName: string;
|
100
|
+
sessionId: string;
|
101
|
+
targetUserId: string;
|
102
|
+
payload: any;
|
103
|
+
messageId: string;
|
104
|
+
senderUserId: string;
|
105
|
+
}
|
106
|
+
/**
|
107
|
+
* Request to discover other users with the same TPA active
|
108
|
+
*/
|
109
|
+
export interface TpaUserDiscovery extends BaseMessage {
|
110
|
+
type: TpaToCloudMessageType.TPA_USER_DISCOVERY;
|
111
|
+
packageName: string;
|
112
|
+
sessionId: string;
|
113
|
+
includeUserProfiles?: boolean;
|
114
|
+
}
|
115
|
+
/**
|
116
|
+
* Join a communication room for group messaging
|
117
|
+
*/
|
118
|
+
export interface TpaRoomJoin extends BaseMessage {
|
119
|
+
type: TpaToCloudMessageType.TPA_ROOM_JOIN;
|
120
|
+
packageName: string;
|
121
|
+
sessionId: string;
|
122
|
+
roomId: string;
|
123
|
+
roomConfig?: {
|
124
|
+
maxUsers?: number;
|
125
|
+
isPrivate?: boolean;
|
126
|
+
metadata?: any;
|
127
|
+
};
|
128
|
+
}
|
129
|
+
/**
|
130
|
+
* Leave a communication room
|
131
|
+
*/
|
132
|
+
export interface TpaRoomLeave extends BaseMessage {
|
133
|
+
type: TpaToCloudMessageType.TPA_ROOM_LEAVE;
|
134
|
+
packageName: string;
|
135
|
+
sessionId: string;
|
136
|
+
roomId: string;
|
137
|
+
}
|
138
|
+
/**
|
139
|
+
* Type guard to check if a message is an RTMP stream request
|
140
|
+
*/
|
141
|
+
export declare function isRtmpStreamRequest(message: TpaToCloudMessage): message is RtmpStreamRequest;
|
142
|
+
/**
|
143
|
+
* Type guard to check if a message is an RTMP stream stop request
|
144
|
+
*/
|
145
|
+
export declare function isRtmpStreamStopRequest(message: TpaToCloudMessage): message is RtmpStreamStopRequest;
|
146
|
+
//# sourceMappingURL=tpa-to-cloud.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tpa-to-cloud.d.ts","sourceRoot":"","sources":["../../../src/types/messages/tpa-to-cloud.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAc,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAExE;;GAEG;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CAAC,kBAAkB,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,IAAI,EAAE,qBAAqB,CAAC,aAAa,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE;QACX,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,GAAG,CAAC;KAChB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,IAAI,EAAE,qBAAqB,CAAC,cAAc,CAAC;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,IAAI,iBAAiB,CAE5F;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,IAAI,qBAAqB,CAEpG"}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
"use strict";
|
2
|
+
// src/messages/tpa-to-cloud.ts
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.isTpaConnectionInit = isTpaConnectionInit;
|
5
|
+
exports.isTpaSubscriptionUpdate = isTpaSubscriptionUpdate;
|
6
|
+
exports.isDisplayRequest = isDisplayRequest;
|
7
|
+
exports.isPhotoRequest = isPhotoRequest;
|
8
|
+
exports.isDashboardContentUpdate = isDashboardContentUpdate;
|
9
|
+
exports.isDashboardModeChange = isDashboardModeChange;
|
10
|
+
exports.isDashboardSystemUpdate = isDashboardSystemUpdate;
|
11
|
+
exports.isRtmpStreamRequest = isRtmpStreamRequest;
|
12
|
+
exports.isRtmpStreamStopRequest = isRtmpStreamStopRequest;
|
13
|
+
const message_types_1 = require("../message-types");
|
14
|
+
/**
|
15
|
+
* Type guard to check if a message is a TPA connection init
|
16
|
+
*/
|
17
|
+
function isTpaConnectionInit(message) {
|
18
|
+
return message.type === message_types_1.TpaToCloudMessageType.CONNECTION_INIT;
|
19
|
+
}
|
20
|
+
/**
|
21
|
+
* Type guard to check if a message is a TPA subscription update
|
22
|
+
*/
|
23
|
+
function isTpaSubscriptionUpdate(message) {
|
24
|
+
return message.type === message_types_1.TpaToCloudMessageType.SUBSCRIPTION_UPDATE;
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Type guard to check if a message is a TPA display request
|
28
|
+
*/
|
29
|
+
function isDisplayRequest(message) {
|
30
|
+
return message.type === message_types_1.TpaToCloudMessageType.DISPLAY_REQUEST;
|
31
|
+
}
|
32
|
+
/**
|
33
|
+
* Type guard to check if a message is a TPA photo request
|
34
|
+
*/
|
35
|
+
function isPhotoRequest(message) {
|
36
|
+
return message.type === message_types_1.TpaToCloudMessageType.PHOTO_REQUEST;
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* Type guard to check if a message is a dashboard content update
|
40
|
+
*/
|
41
|
+
function isDashboardContentUpdate(message) {
|
42
|
+
return message.type === message_types_1.TpaToCloudMessageType.DASHBOARD_CONTENT_UPDATE;
|
43
|
+
}
|
44
|
+
/**
|
45
|
+
* Type guard to check if a message is a dashboard mode change
|
46
|
+
*/
|
47
|
+
function isDashboardModeChange(message) {
|
48
|
+
return message.type === message_types_1.TpaToCloudMessageType.DASHBOARD_MODE_CHANGE;
|
49
|
+
}
|
50
|
+
/**
|
51
|
+
* Type guard to check if a message is a dashboard system update
|
52
|
+
*/
|
53
|
+
function isDashboardSystemUpdate(message) {
|
54
|
+
return message.type === message_types_1.TpaToCloudMessageType.DASHBOARD_SYSTEM_UPDATE;
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* Type guard to check if a message is an RTMP stream request
|
58
|
+
*/
|
59
|
+
function isRtmpStreamRequest(message) {
|
60
|
+
return message.type === message_types_1.TpaToCloudMessageType.RTMP_STREAM_REQUEST;
|
61
|
+
}
|
62
|
+
/**
|
63
|
+
* Type guard to check if a message is an RTMP stream stop request
|
64
|
+
*/
|
65
|
+
function isRtmpStreamStopRequest(message) {
|
66
|
+
return message.type === message_types_1.TpaToCloudMessageType.RTMP_STREAM_STOP;
|
67
|
+
}
|
@@ -0,0 +1,165 @@
|
|
1
|
+
import { AppSettingType, TpaType } from './enums';
|
2
|
+
export interface ToolParameterSchema {
|
3
|
+
type: 'string' | 'number' | 'boolean';
|
4
|
+
description: string;
|
5
|
+
enum?: string[];
|
6
|
+
required?: boolean;
|
7
|
+
}
|
8
|
+
export interface ToolSchema {
|
9
|
+
id: string;
|
10
|
+
description: string;
|
11
|
+
activationPhrases?: string[];
|
12
|
+
parameters?: Record<string, ToolParameterSchema>;
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Developer profile information
|
16
|
+
*/
|
17
|
+
export interface DeveloperProfile {
|
18
|
+
company?: string;
|
19
|
+
website?: string;
|
20
|
+
contactEmail?: string;
|
21
|
+
description?: string;
|
22
|
+
logo?: string;
|
23
|
+
}
|
24
|
+
export declare enum PermissionType {
|
25
|
+
MICROPHONE = "MICROPHONE",
|
26
|
+
LOCATION = "LOCATION",
|
27
|
+
CALENDAR = "CALENDAR",
|
28
|
+
NOTIFICATIONS = "NOTIFICATIONS",
|
29
|
+
READ_NOTIFICATIONS = "READ_NOTIFICATIONS",
|
30
|
+
POST_NOTIFICATIONS = "POST_NOTIFICATIONS",
|
31
|
+
ALL = "ALL"
|
32
|
+
}
|
33
|
+
export declare const LEGACY_PERMISSION_MAP: Map<PermissionType, PermissionType[]>;
|
34
|
+
export interface Permission {
|
35
|
+
type: PermissionType;
|
36
|
+
description?: string;
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* Base interface for applications
|
40
|
+
*/
|
41
|
+
export interface AppI {
|
42
|
+
packageName: string;
|
43
|
+
name: string;
|
44
|
+
publicUrl: string;
|
45
|
+
isSystemApp?: boolean;
|
46
|
+
uninstallable?: boolean;
|
47
|
+
webviewURL?: string;
|
48
|
+
logoURL: string;
|
49
|
+
tpaType: TpaType;
|
50
|
+
appStoreId?: string;
|
51
|
+
/**
|
52
|
+
* @deprecated Use organizationId instead. Will be removed after migration.
|
53
|
+
*/
|
54
|
+
developerId?: string;
|
55
|
+
organizationId?: any;
|
56
|
+
hashedEndpointSecret?: string;
|
57
|
+
hashedApiKey?: string;
|
58
|
+
permissions?: Permission[];
|
59
|
+
description?: string;
|
60
|
+
version?: string;
|
61
|
+
settings?: AppSettings;
|
62
|
+
tools?: ToolSchema[];
|
63
|
+
isPublic?: boolean;
|
64
|
+
appStoreStatus?: 'DEVELOPMENT' | 'SUBMITTED' | 'REJECTED' | 'PUBLISHED';
|
65
|
+
}
|
66
|
+
/**
|
67
|
+
* Base interface for all app settings
|
68
|
+
*/
|
69
|
+
export interface BaseAppSetting {
|
70
|
+
key: string;
|
71
|
+
label: string;
|
72
|
+
value?: any;
|
73
|
+
defaultValue?: any;
|
74
|
+
}
|
75
|
+
/**
|
76
|
+
* Setting types for applications
|
77
|
+
*/
|
78
|
+
export type AppSetting = (BaseAppSetting & {
|
79
|
+
type: AppSettingType.TOGGLE;
|
80
|
+
defaultValue: boolean;
|
81
|
+
value?: boolean;
|
82
|
+
}) | (BaseAppSetting & {
|
83
|
+
type: AppSettingType.TEXT;
|
84
|
+
defaultValue?: string;
|
85
|
+
value?: string;
|
86
|
+
}) | (BaseAppSetting & {
|
87
|
+
type: AppSettingType.TEXT_NO_SAVE_BUTTON;
|
88
|
+
defaultValue?: string;
|
89
|
+
value?: string;
|
90
|
+
maxLines?: number;
|
91
|
+
}) | (BaseAppSetting & {
|
92
|
+
type: AppSettingType.SELECT;
|
93
|
+
options: {
|
94
|
+
label: string;
|
95
|
+
value: any;
|
96
|
+
}[];
|
97
|
+
defaultValue?: any;
|
98
|
+
value?: any;
|
99
|
+
}) | (BaseAppSetting & {
|
100
|
+
type: AppSettingType.SELECT_WITH_SEARCH;
|
101
|
+
options: {
|
102
|
+
label: string;
|
103
|
+
value: any;
|
104
|
+
}[];
|
105
|
+
defaultValue?: any;
|
106
|
+
value?: any;
|
107
|
+
}) | (BaseAppSetting & {
|
108
|
+
type: AppSettingType.MULTISELECT;
|
109
|
+
options: {
|
110
|
+
label: string;
|
111
|
+
value: any;
|
112
|
+
}[];
|
113
|
+
defaultValue?: any[];
|
114
|
+
value?: any[];
|
115
|
+
}) | (BaseAppSetting & {
|
116
|
+
type: AppSettingType.SLIDER;
|
117
|
+
min: number;
|
118
|
+
max: number;
|
119
|
+
defaultValue: number;
|
120
|
+
value?: number;
|
121
|
+
}) | (BaseAppSetting & {
|
122
|
+
type: AppSettingType.GROUP;
|
123
|
+
title: string;
|
124
|
+
}) | (BaseAppSetting & {
|
125
|
+
type: AppSettingType.TITLE_VALUE;
|
126
|
+
label: string;
|
127
|
+
value: any;
|
128
|
+
key?: never;
|
129
|
+
});
|
130
|
+
export type AppSettings = AppSetting[];
|
131
|
+
/**
|
132
|
+
* TPA configuration file structure
|
133
|
+
* Represents the schema in tpa_config.json
|
134
|
+
*/
|
135
|
+
export interface TpaConfig {
|
136
|
+
name: string;
|
137
|
+
description: string;
|
138
|
+
version: string;
|
139
|
+
settings: AppSetting[];
|
140
|
+
tools: ToolSchema[];
|
141
|
+
}
|
142
|
+
/**
|
143
|
+
* Validate a TPA configuration object
|
144
|
+
* @param config Object to validate
|
145
|
+
* @returns True if the config is valid
|
146
|
+
*/
|
147
|
+
export declare function validateTpaConfig(config: any): config is TpaConfig;
|
148
|
+
/**
|
149
|
+
* Transcript segment for speech processing
|
150
|
+
*/
|
151
|
+
export interface TranscriptSegment {
|
152
|
+
speakerId?: string;
|
153
|
+
resultId: string;
|
154
|
+
text: string;
|
155
|
+
timestamp: Date;
|
156
|
+
isFinal: boolean;
|
157
|
+
}
|
158
|
+
/**
|
159
|
+
* Complete transcript
|
160
|
+
*/
|
161
|
+
export interface TranscriptI {
|
162
|
+
segments: TranscriptSegment[];
|
163
|
+
languageSegments?: Map<string, TranscriptSegment[]>;
|
164
|
+
}
|
165
|
+
//# sourceMappingURL=models.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/types/models.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAsB,OAAO,EAAE,MAAM,SAAS,CAAC;AAItE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAGD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD,oBAAY,cAAc;IACxB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IAGrB,aAAa,kBAAkB;IAG/B,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IAEzC,GAAG,QAAQ;CACZ;AAGD,eAAO,MAAM,qBAAqB,uCAEhC,CAAC;AAGH,MAAM,WAAW,UA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E,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,GACF,CAAC,cAAc,GAAG;IAChB,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,GACF,CAAC,cAAc,GAAG;IAChB,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;IACX,GAAG,CAAC,EAAE,KAAK,CAAC;CACb,CAAC,CAAC;AAEP,MAAM,MAAM,WAAW,GAAG,UAAU,EAAE,CAAC;AAEvC;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,SAAS,CAmElE;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;CACrD"}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
"use strict";
|
2
|
+
// @mentra/sdk
|
3
|
+
// packages/sdk/types/src/models.ts - Core models
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
+
exports.LEGACY_PERMISSION_MAP = exports.PermissionType = void 0;
|
6
|
+
exports.validateTpaConfig = validateTpaConfig;
|
7
|
+
const enums_1 = require("./enums");
|
8
|
+
// Define PermissionType enum with legacy support
|
9
|
+
var PermissionType;
|
10
|
+
(function (PermissionType) {
|
11
|
+
PermissionType["MICROPHONE"] = "MICROPHONE";
|
12
|
+
PermissionType["LOCATION"] = "LOCATION";
|
13
|
+
PermissionType["CALENDAR"] = "CALENDAR";
|
14
|
+
// Legacy notification permission (backward compatibility)
|
15
|
+
PermissionType["NOTIFICATIONS"] = "NOTIFICATIONS";
|
16
|
+
// New granular notification permissions
|
17
|
+
PermissionType["READ_NOTIFICATIONS"] = "READ_NOTIFICATIONS";
|
18
|
+
PermissionType["POST_NOTIFICATIONS"] = "POST_NOTIFICATIONS";
|
19
|
+
PermissionType["ALL"] = "ALL";
|
20
|
+
})(PermissionType || (exports.PermissionType = PermissionType = {}));
|
21
|
+
// Legacy permission mapping for backward compatibility
|
22
|
+
exports.LEGACY_PERMISSION_MAP = new Map([
|
23
|
+
[PermissionType.NOTIFICATIONS, [PermissionType.READ_NOTIFICATIONS]]
|
24
|
+
]);
|
25
|
+
/**
|
26
|
+
* Validate a TPA configuration object
|
27
|
+
* @param config Object to validate
|
28
|
+
* @returns True if the config is valid
|
29
|
+
*/
|
30
|
+
function validateTpaConfig(config) {
|
31
|
+
if (!config || typeof config !== 'object')
|
32
|
+
return false;
|
33
|
+
// Check required string properties
|
34
|
+
if (typeof config.name !== 'string' ||
|
35
|
+
typeof config.description !== 'string' ||
|
36
|
+
typeof config.version !== 'string') {
|
37
|
+
return false;
|
38
|
+
}
|
39
|
+
// Check settings array
|
40
|
+
if (!Array.isArray(config.settings))
|
41
|
+
return false;
|
42
|
+
// Validate each setting
|
43
|
+
return config.settings.every((setting) => {
|
44
|
+
// Group settings just need a title
|
45
|
+
if (setting.type === 'group') {
|
46
|
+
return typeof setting.title === 'string';
|
47
|
+
}
|
48
|
+
// TITLE_VALUE settings just need label and value
|
49
|
+
if (setting.type === 'titleValue') {
|
50
|
+
return typeof setting.label === 'string' && 'value' in setting;
|
51
|
+
}
|
52
|
+
// Regular settings need key and label
|
53
|
+
if (typeof setting.key !== 'string' || typeof setting.label !== 'string') {
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
// Type-specific validation
|
57
|
+
switch (setting.type) {
|
58
|
+
case enums_1.AppSettingType.TOGGLE:
|
59
|
+
return typeof setting.defaultValue === 'boolean';
|
60
|
+
case enums_1.AppSettingType.TEXT:
|
61
|
+
case enums_1.AppSettingType.TEXT_NO_SAVE_BUTTON:
|
62
|
+
return setting.defaultValue === undefined || typeof setting.defaultValue === 'string';
|
63
|
+
case enums_1.AppSettingType.SELECT:
|
64
|
+
case enums_1.AppSettingType.SELECT_WITH_SEARCH:
|
65
|
+
return Array.isArray(setting.options) &&
|
66
|
+
setting.options.every((opt) => typeof opt.label === 'string' && 'value' in opt);
|
67
|
+
case enums_1.AppSettingType.MULTISELECT:
|
68
|
+
return Array.isArray(setting.options) &&
|
69
|
+
setting.options.every((opt) => typeof opt.label === 'string' && 'value' in opt) &&
|
70
|
+
(setting.defaultValue === undefined || Array.isArray(setting.defaultValue));
|
71
|
+
case enums_1.AppSettingType.SLIDER:
|
72
|
+
return typeof setting.defaultValue === 'number' &&
|
73
|
+
typeof setting.min === 'number' &&
|
74
|
+
typeof setting.max === 'number' &&
|
75
|
+
setting.min <= setting.max;
|
76
|
+
case enums_1.AppSettingType.GROUP:
|
77
|
+
return typeof setting.title === 'string';
|
78
|
+
case enums_1.AppSettingType.TITLE_VALUE:
|
79
|
+
return typeof setting.label === 'string' && 'value' in setting;
|
80
|
+
default:
|
81
|
+
return false;
|
82
|
+
}
|
83
|
+
});
|
84
|
+
}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { RtmpStreamStatus } from "./messages/glasses-to-cloud";
|
2
|
+
/**
|
3
|
+
* RTMP Streaming Types
|
4
|
+
*
|
5
|
+
* This file contains the interfaces and types for RTMP streaming functionality.
|
6
|
+
*
|
7
|
+
* RTMP status updates are received through the standard stream subscription mechanism:
|
8
|
+
*
|
9
|
+
* ```typescript
|
10
|
+
* // Subscribe to status updates
|
11
|
+
* session.subscribe(StreamType.RTMP_STATUS);
|
12
|
+
*
|
13
|
+
* // Listen for updates
|
14
|
+
* session.on(StreamType.RTMP_STATUS, (status) => {
|
15
|
+
* console.log('RTMP Status:', status);
|
16
|
+
* });
|
17
|
+
* ```
|
18
|
+
*
|
19
|
+
* Alternatively, use the StreamingModule's convenience methods:
|
20
|
+
*
|
21
|
+
* ```typescript
|
22
|
+
* // This does both subscription and event listening in one call
|
23
|
+
* const cleanup = session.streaming.onStatus((status) => {
|
24
|
+
* console.log('RTMP Status:', status);
|
25
|
+
* });
|
26
|
+
*
|
27
|
+
* // When done:
|
28
|
+
* cleanup();
|
29
|
+
* ```
|
30
|
+
*/
|
31
|
+
/**
|
32
|
+
* Video configuration options for RTMP streaming
|
33
|
+
*/
|
34
|
+
export interface VideoConfig {
|
35
|
+
/** Optional width in pixels (e.g., 1280) */
|
36
|
+
width?: number;
|
37
|
+
/** Optional height in pixels (e.g., 720) */
|
38
|
+
height?: number;
|
39
|
+
/** Optional bitrate in bits per second (e.g., 2000000 for 2 Mbps) */
|
40
|
+
bitrate?: number;
|
41
|
+
/** Optional frame rate in frames per second (e.g., 30) */
|
42
|
+
frameRate?: number;
|
43
|
+
}
|
44
|
+
/**
|
45
|
+
* Audio configuration options for RTMP streaming
|
46
|
+
*/
|
47
|
+
export interface AudioConfig {
|
48
|
+
/** Optional audio bitrate in bits per second (e.g., 128000 for 128 kbps) */
|
49
|
+
bitrate?: number;
|
50
|
+
/** Optional audio sample rate in Hz (e.g., 44100) */
|
51
|
+
sampleRate?: number;
|
52
|
+
/** Optional flag to enable echo cancellation */
|
53
|
+
echoCancellation?: boolean;
|
54
|
+
/** Optional flag to enable noise suppression */
|
55
|
+
noiseSuppression?: boolean;
|
56
|
+
}
|
57
|
+
/**
|
58
|
+
* Stream configuration options for RTMP streaming
|
59
|
+
*/
|
60
|
+
export interface StreamConfig {
|
61
|
+
/** Optional maximum duration in seconds (e.g., 1800 for 30 minutes) */
|
62
|
+
durationLimit?: number;
|
63
|
+
}
|
64
|
+
/**
|
65
|
+
* Type for stream status event handler
|
66
|
+
*/
|
67
|
+
export type StreamStatusHandler = (status: RtmpStreamStatus) => void;
|
68
|
+
//# sourceMappingURL=rtmp-stream.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rtmp-stream.d.ts","sourceRoot":"","sources":["../../src/types/rtmp-stream.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC"}
|