onehook-api-client 1.0.24 → 1.0.26

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.
@@ -1,6 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PresenceState = exports.NotificationKind = exports.MessageStatus = exports.MessageContentType = exports.KeyRecoveryStatus = void 0;
3
+ exports.PresenceState = exports.NotificationKind = exports.MessageStatus = exports.MessageContentType = exports.KeyRecoveryStatus = exports.CallStatus = exports.CallMedia = exports.CallEventKind = exports.CallEndReason = void 0;
4
+ var CallEndReason;
5
+ (function (CallEndReason) {
6
+ CallEndReason["AnsweredElsewhere"] = "ANSWERED_ELSEWHERE";
7
+ CallEndReason["Busy"] = "BUSY";
8
+ CallEndReason["Cancelled"] = "CANCELLED";
9
+ CallEndReason["Declined"] = "DECLINED";
10
+ CallEndReason["Dropped"] = "DROPPED";
11
+ CallEndReason["Failed"] = "FAILED";
12
+ CallEndReason["Hangup"] = "HANGUP";
13
+ CallEndReason["MaxDuration"] = "MAX_DURATION";
14
+ CallEndReason["Missed"] = "MISSED";
15
+ CallEndReason["Unmatched"] = "UNMATCHED";
16
+ })(CallEndReason || (exports.CallEndReason = CallEndReason = {}));
17
+ var CallEventKind;
18
+ (function (CallEventKind) {
19
+ CallEventKind["Accepted"] = "ACCEPTED";
20
+ CallEventKind["AnsweredElsewhere"] = "ANSWERED_ELSEWHERE";
21
+ CallEventKind["Connected"] = "CONNECTED";
22
+ CallEventKind["Ended"] = "ENDED";
23
+ CallEventKind["Incoming"] = "INCOMING";
24
+ CallEventKind["Signal"] = "SIGNAL";
25
+ })(CallEventKind || (exports.CallEventKind = CallEventKind = {}));
26
+ var CallMedia;
27
+ (function (CallMedia) {
28
+ CallMedia["Audio"] = "AUDIO";
29
+ CallMedia["Video"] = "VIDEO";
30
+ })(CallMedia || (exports.CallMedia = CallMedia = {}));
31
+ var CallStatus;
32
+ (function (CallStatus) {
33
+ CallStatus["Accepted"] = "ACCEPTED";
34
+ CallStatus["Connected"] = "CONNECTED";
35
+ CallStatus["Ended"] = "ENDED";
36
+ CallStatus["Ringing"] = "RINGING";
37
+ })(CallStatus || (exports.CallStatus = CallStatus = {}));
4
38
  var KeyRecoveryStatus;
5
39
  (function (KeyRecoveryStatus) {
6
40
  KeyRecoveryStatus["Completed"] = "COMPLETED";
@@ -28,6 +62,7 @@ var MessageStatus;
28
62
  var NotificationKind;
29
63
  (function (NotificationKind) {
30
64
  NotificationKind["ConversationCooling"] = "CONVERSATION_COOLING";
65
+ NotificationKind["MissedCall"] = "MISSED_CALL";
31
66
  NotificationKind["MutualMatch"] = "MUTUAL_MATCH";
32
67
  NotificationKind["ProfileLiked"] = "PROFILE_LIKED";
33
68
  })(NotificationKind || (exports.NotificationKind = NotificationKind = {}));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionTier = exports.CredentialGap = exports.DeviceLimitError = exports.Platform = exports.LastSeenVisibility = exports.MediaKind = exports.ForbiddenError = exports.NotFoundError = exports.InternalServerError = exports.BadRequestError = void 0;
3
+ exports.SubscriptionTier = exports.CredentialGap = exports.PushTokenKind = exports.DeviceLimitError = exports.Platform = exports.LastSeenVisibility = exports.MediaKind = exports.ForbiddenError = exports.NotFoundError = exports.InternalServerError = exports.BadRequestError = void 0;
4
4
  const OneHookServiceException_1 = require("./OneHookServiceException");
5
5
  class BadRequestError extends OneHookServiceException_1.OneHookServiceException {
6
6
  name = "BadRequestError";
@@ -93,6 +93,10 @@ class DeviceLimitError extends OneHookServiceException_1.OneHookServiceException
93
93
  }
94
94
  }
95
95
  exports.DeviceLimitError = DeviceLimitError;
96
+ exports.PushTokenKind = {
97
+ ALERT: "ALERT",
98
+ VOIP: "VOIP",
99
+ };
96
100
  exports.CredentialGap = {
97
101
  NO_COGNITO_USERNAME_ON_PROFILE: "NO_COGNITO_USERNAME_ON_PROFILE",
98
102
  PHONE_NOT_VERIFIED: "PHONE_NOT_VERIFIED",
@@ -149,6 +149,7 @@ const se_RegisterPushTokenCommand = async (input, context) => {
149
149
  b.p('deviceId', () => input.deviceId, '{deviceId}', false);
150
150
  let body;
151
151
  body = JSON.stringify((0, smithy_client_1.take)(input, {
152
+ 'kind': [],
152
153
  'platform': [],
153
154
  'token': [],
154
155
  }));
@@ -179,6 +180,7 @@ const se_UpdateChatSettingsCommand = async (input, context) => {
179
180
  let body;
180
181
  body = JSON.stringify((0, smithy_client_1.take)(input, {
181
182
  'defaultDisappearingSeconds': [],
183
+ 'helpTranslateCaptions': [],
182
184
  'lastSeenVisibility': [],
183
185
  'messageNotifications': [],
184
186
  'reactionNotifications': [],
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isUiElementId = exports.TELEMETRY_EXEMPT_CATEGORIES = exports.uiElementsForPlatform = exports.UI_ELEMENTS = exports.UiElement = exports.HookedStateAction = exports.NotificationChannel = exports.NotificationType = exports.CardVariant = exports.SafetyAction = exports.LikeTargetType = exports.ProfileSection = exports.MediaType = exports.SwipeDirection = exports.UiElementKind = exports.UiAction = exports.TabScreen = exports.ViewableScreen = exports.Screen = exports.Platform = exports.SignalType = exports.TELEMETRY_CATALOG_HASH = exports.TELEMETRY_CATALOG_VERSION = void 0;
4
4
  exports.TELEMETRY_CATALOG_VERSION = "1.3.0";
5
- exports.TELEMETRY_CATALOG_HASH = "25955dd2f9856888";
5
+ exports.TELEMETRY_CATALOG_HASH = "52029d112aadcfd5";
6
6
  exports.SignalType = {
7
7
  SCREEN_VIEW: "screen_view",
8
8
  UI_INTERACTION: "ui_interaction",
@@ -39,6 +39,7 @@ exports.Screen = {
39
39
  LIKES_YOU: "LIKES_YOU",
40
40
  CHAT: "CHAT",
41
41
  CHAT_SETTINGS: "CHAT_SETTINGS",
42
+ CALL: "CALL",
42
43
  NOTIFICATIONS: "NOTIFICATIONS",
43
44
  PROFILE: "PROFILE",
44
45
  PROFILE_EDIT: "PROFILE_EDIT",
@@ -62,6 +63,7 @@ exports.ViewableScreen = {
62
63
  LIKES_YOU: "LIKES_YOU",
63
64
  CHAT: "CHAT",
64
65
  CHAT_SETTINGS: "CHAT_SETTINGS",
66
+ CALL: "CALL",
65
67
  NOTIFICATIONS: "NOTIFICATIONS",
66
68
  PROFILE: "PROFILE",
67
69
  PROFILE_EDIT: "PROFILE_EDIT",
@@ -248,6 +250,19 @@ exports.UiElement = {
248
250
  CHAT_PRIVACY_TOGGLE: "chat.privacy_toggle",
249
251
  CHAT_CALL: "chat.call",
250
252
  CHAT_VIDEO_CALL: "chat.video_call",
253
+ CHAT_CALL_HISTORY_OPEN: "chat.call_history_open",
254
+ CALL_ACCEPT: "call.accept",
255
+ CALL_DECLINE: "call.decline",
256
+ CALL_END: "call.end",
257
+ CALL_MUTE: "call.mute",
258
+ CALL_CAMERA: "call.camera",
259
+ CALL_CAMERA_SWITCH: "call.camera_switch",
260
+ CALL_SPEAKER: "call.speaker",
261
+ CALL_SCREEN_SHARE: "call.screen_share",
262
+ CALL_SCREEN_SHARE_RESPOND: "call.screen_share_respond",
263
+ CALL_CAPTIONS: "call.captions",
264
+ CALL_CAPTION_LANGUAGE_SELECT: "call.caption_language_select",
265
+ CHAT_SETTINGS_HELP_TRANSLATE_CAPTIONS: "chat_settings.help_translate_captions",
251
266
  CHAT_MEDIA_OPEN: "chat.media_open",
252
267
  CHAT_AUDIO_PLAY: "chat.audio_play",
253
268
  CHAT_FILE_OPEN: "chat.file_open",
@@ -458,8 +473,21 @@ exports.UI_ELEMENTS = {
458
473
  "chat.wallpaper_open": { screen: "CHAT", kind: "menu_item", actions: ["tap", "dismiss"], values: null, platforms: ["web"] },
459
474
  "chat.add_hook_open": { screen: "CHAT", kind: "button", actions: ["tap", "dismiss"], values: null, platforms: ["web", "ios"] },
460
475
  "chat.privacy_toggle": { screen: "CHAT", kind: "toggle", actions: ["toggle"], values: ["hidden", "visible"], platforms: [] },
461
- "chat.call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["ios"] },
462
- "chat.video_call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["ios"] },
476
+ "chat.call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
477
+ "chat.video_call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
478
+ "chat.call_history_open": { screen: "CHAT", kind: "button", actions: ["tap", "dismiss"], values: null, platforms: ["ios"] },
479
+ "call.accept": { screen: "CALL", kind: "button", actions: ["tap"], values: ["audio", "video"], platforms: ["web", "ios", "android"] },
480
+ "call.decline": { screen: "CALL", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
481
+ "call.end": { screen: "CALL", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
482
+ "call.mute": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
483
+ "call.camera": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
484
+ "call.camera_switch": { screen: "CALL", kind: "button", actions: ["tap"], values: null, platforms: ["ios"] },
485
+ "call.speaker": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["ios", "android"] },
486
+ "call.screen_share": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
487
+ "call.screen_share_respond": { screen: "CALL", kind: "dialog_button", actions: ["tap", "dismiss"], values: ["accept", "decline"], platforms: ["web", "ios", "android"] },
488
+ "call.captions": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
489
+ "call.caption_language_select": { screen: "CALL", kind: "menu_item", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
490
+ "chat_settings.help_translate_captions": { screen: "CHAT_SETTINGS", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
463
491
  "chat.media_open": { screen: "CHAT", kind: "gesture", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
464
492
  "chat.audio_play": { screen: "CHAT", kind: "toggle", actions: ["toggle"], values: ["play", "pause"], platforms: ["web", "ios", "android"] },
465
493
  "chat.file_open": { screen: "CHAT", kind: "list_item", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
@@ -1,3 +1,37 @@
1
+ export var CallEndReason;
2
+ (function (CallEndReason) {
3
+ CallEndReason["AnsweredElsewhere"] = "ANSWERED_ELSEWHERE";
4
+ CallEndReason["Busy"] = "BUSY";
5
+ CallEndReason["Cancelled"] = "CANCELLED";
6
+ CallEndReason["Declined"] = "DECLINED";
7
+ CallEndReason["Dropped"] = "DROPPED";
8
+ CallEndReason["Failed"] = "FAILED";
9
+ CallEndReason["Hangup"] = "HANGUP";
10
+ CallEndReason["MaxDuration"] = "MAX_DURATION";
11
+ CallEndReason["Missed"] = "MISSED";
12
+ CallEndReason["Unmatched"] = "UNMATCHED";
13
+ })(CallEndReason || (CallEndReason = {}));
14
+ export var CallEventKind;
15
+ (function (CallEventKind) {
16
+ CallEventKind["Accepted"] = "ACCEPTED";
17
+ CallEventKind["AnsweredElsewhere"] = "ANSWERED_ELSEWHERE";
18
+ CallEventKind["Connected"] = "CONNECTED";
19
+ CallEventKind["Ended"] = "ENDED";
20
+ CallEventKind["Incoming"] = "INCOMING";
21
+ CallEventKind["Signal"] = "SIGNAL";
22
+ })(CallEventKind || (CallEventKind = {}));
23
+ export var CallMedia;
24
+ (function (CallMedia) {
25
+ CallMedia["Audio"] = "AUDIO";
26
+ CallMedia["Video"] = "VIDEO";
27
+ })(CallMedia || (CallMedia = {}));
28
+ export var CallStatus;
29
+ (function (CallStatus) {
30
+ CallStatus["Accepted"] = "ACCEPTED";
31
+ CallStatus["Connected"] = "CONNECTED";
32
+ CallStatus["Ended"] = "ENDED";
33
+ CallStatus["Ringing"] = "RINGING";
34
+ })(CallStatus || (CallStatus = {}));
1
35
  export var KeyRecoveryStatus;
2
36
  (function (KeyRecoveryStatus) {
3
37
  KeyRecoveryStatus["Completed"] = "COMPLETED";
@@ -25,6 +59,7 @@ export var MessageStatus;
25
59
  export var NotificationKind;
26
60
  (function (NotificationKind) {
27
61
  NotificationKind["ConversationCooling"] = "CONVERSATION_COOLING";
62
+ NotificationKind["MissedCall"] = "MISSED_CALL";
28
63
  NotificationKind["MutualMatch"] = "MUTUAL_MATCH";
29
64
  NotificationKind["ProfileLiked"] = "PROFILE_LIKED";
30
65
  })(NotificationKind || (NotificationKind = {}));
@@ -85,6 +85,10 @@ export class DeviceLimitError extends __BaseException {
85
85
  this.error = opts.error;
86
86
  }
87
87
  }
88
+ export const PushTokenKind = {
89
+ ALERT: "ALERT",
90
+ VOIP: "VOIP",
91
+ };
88
92
  export const CredentialGap = {
89
93
  NO_COGNITO_USERNAME_ON_PROFILE: "NO_COGNITO_USERNAME_ON_PROFILE",
90
94
  PHONE_NOT_VERIFIED: "PHONE_NOT_VERIFIED",
@@ -135,6 +135,7 @@ export const se_RegisterPushTokenCommand = async (input, context) => {
135
135
  b.p('deviceId', () => input.deviceId, '{deviceId}', false);
136
136
  let body;
137
137
  body = JSON.stringify(take(input, {
138
+ 'kind': [],
138
139
  'platform': [],
139
140
  'token': [],
140
141
  }));
@@ -163,6 +164,7 @@ export const se_UpdateChatSettingsCommand = async (input, context) => {
163
164
  let body;
164
165
  body = JSON.stringify(take(input, {
165
166
  'defaultDisappearingSeconds': [],
167
+ 'helpTranslateCaptions': [],
166
168
  'lastSeenVisibility': [],
167
169
  'messageNotifications': [],
168
170
  'reactionNotifications': [],
@@ -1,5 +1,5 @@
1
1
  export const TELEMETRY_CATALOG_VERSION = "1.3.0";
2
- export const TELEMETRY_CATALOG_HASH = "25955dd2f9856888";
2
+ export const TELEMETRY_CATALOG_HASH = "52029d112aadcfd5";
3
3
  export const SignalType = {
4
4
  SCREEN_VIEW: "screen_view",
5
5
  UI_INTERACTION: "ui_interaction",
@@ -36,6 +36,7 @@ export const Screen = {
36
36
  LIKES_YOU: "LIKES_YOU",
37
37
  CHAT: "CHAT",
38
38
  CHAT_SETTINGS: "CHAT_SETTINGS",
39
+ CALL: "CALL",
39
40
  NOTIFICATIONS: "NOTIFICATIONS",
40
41
  PROFILE: "PROFILE",
41
42
  PROFILE_EDIT: "PROFILE_EDIT",
@@ -59,6 +60,7 @@ export const ViewableScreen = {
59
60
  LIKES_YOU: "LIKES_YOU",
60
61
  CHAT: "CHAT",
61
62
  CHAT_SETTINGS: "CHAT_SETTINGS",
63
+ CALL: "CALL",
62
64
  NOTIFICATIONS: "NOTIFICATIONS",
63
65
  PROFILE: "PROFILE",
64
66
  PROFILE_EDIT: "PROFILE_EDIT",
@@ -245,6 +247,19 @@ export const UiElement = {
245
247
  CHAT_PRIVACY_TOGGLE: "chat.privacy_toggle",
246
248
  CHAT_CALL: "chat.call",
247
249
  CHAT_VIDEO_CALL: "chat.video_call",
250
+ CHAT_CALL_HISTORY_OPEN: "chat.call_history_open",
251
+ CALL_ACCEPT: "call.accept",
252
+ CALL_DECLINE: "call.decline",
253
+ CALL_END: "call.end",
254
+ CALL_MUTE: "call.mute",
255
+ CALL_CAMERA: "call.camera",
256
+ CALL_CAMERA_SWITCH: "call.camera_switch",
257
+ CALL_SPEAKER: "call.speaker",
258
+ CALL_SCREEN_SHARE: "call.screen_share",
259
+ CALL_SCREEN_SHARE_RESPOND: "call.screen_share_respond",
260
+ CALL_CAPTIONS: "call.captions",
261
+ CALL_CAPTION_LANGUAGE_SELECT: "call.caption_language_select",
262
+ CHAT_SETTINGS_HELP_TRANSLATE_CAPTIONS: "chat_settings.help_translate_captions",
248
263
  CHAT_MEDIA_OPEN: "chat.media_open",
249
264
  CHAT_AUDIO_PLAY: "chat.audio_play",
250
265
  CHAT_FILE_OPEN: "chat.file_open",
@@ -455,8 +470,21 @@ export const UI_ELEMENTS = {
455
470
  "chat.wallpaper_open": { screen: "CHAT", kind: "menu_item", actions: ["tap", "dismiss"], values: null, platforms: ["web"] },
456
471
  "chat.add_hook_open": { screen: "CHAT", kind: "button", actions: ["tap", "dismiss"], values: null, platforms: ["web", "ios"] },
457
472
  "chat.privacy_toggle": { screen: "CHAT", kind: "toggle", actions: ["toggle"], values: ["hidden", "visible"], platforms: [] },
458
- "chat.call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["ios"] },
459
- "chat.video_call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["ios"] },
473
+ "chat.call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
474
+ "chat.video_call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
475
+ "chat.call_history_open": { screen: "CHAT", kind: "button", actions: ["tap", "dismiss"], values: null, platforms: ["ios"] },
476
+ "call.accept": { screen: "CALL", kind: "button", actions: ["tap"], values: ["audio", "video"], platforms: ["web", "ios", "android"] },
477
+ "call.decline": { screen: "CALL", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
478
+ "call.end": { screen: "CALL", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
479
+ "call.mute": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
480
+ "call.camera": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
481
+ "call.camera_switch": { screen: "CALL", kind: "button", actions: ["tap"], values: null, platforms: ["ios"] },
482
+ "call.speaker": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["ios", "android"] },
483
+ "call.screen_share": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
484
+ "call.screen_share_respond": { screen: "CALL", kind: "dialog_button", actions: ["tap", "dismiss"], values: ["accept", "decline"], platforms: ["web", "ios", "android"] },
485
+ "call.captions": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
486
+ "call.caption_language_select": { screen: "CALL", kind: "menu_item", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
487
+ "chat_settings.help_translate_captions": { screen: "CHAT_SETTINGS", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
460
488
  "chat.media_open": { screen: "CHAT", kind: "gesture", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
461
489
  "chat.audio_play": { screen: "CHAT", kind: "toggle", actions: ["toggle"], values: ["play", "pause"], platforms: ["web", "ios", "android"] },
462
490
  "chat.file_open": { screen: "CHAT", kind: "list_item", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
@@ -49,6 +49,7 @@ declare const GetChatSettingsCommand_base: {
49
49
  * // lastSeenVisibility: "EVERYONE" || "MATCHES" || "NOBODY",
50
50
  * // screenshotProtection: true || false,
51
51
  * // defaultDisappearingSeconds: Number("int"),
52
+ * // helpTranslateCaptions: true || false,
52
53
  * // },
53
54
  * // };
54
55
  *
@@ -48,6 +48,7 @@ declare const RegisterPushTokenCommand_base: {
48
48
  * deviceId: "STRING_VALUE", // required
49
49
  * token: "STRING_VALUE", // required
50
50
  * platform: "IOS" || "ANDROID" || "WEB", // required
51
+ * kind: "ALERT" || "VOIP",
51
52
  * };
52
53
  * const command = new RegisterPushTokenCommand(input);
53
54
  * const response = await client.send(command);
@@ -44,6 +44,7 @@ declare const UpdateChatSettingsCommand_base: {
44
44
  * lastSeenVisibility: "EVERYONE" || "MATCHES" || "NOBODY",
45
45
  * screenshotProtection: true || false,
46
46
  * defaultDisappearingSeconds: Number("int"),
47
+ * helpTranslateCaptions: true || false,
47
48
  * };
48
49
  * const command = new UpdateChatSettingsCommand(input);
49
50
  * const response = await client.send(command);
@@ -57,6 +58,7 @@ declare const UpdateChatSettingsCommand_base: {
57
58
  * // lastSeenVisibility: "EVERYONE" || "MATCHES" || "NOBODY",
58
59
  * // screenshotProtection: true || false,
59
60
  * // defaultDisappearingSeconds: Number("int"),
61
+ * // helpTranslateCaptions: true || false,
60
62
  * // },
61
63
  * // };
62
64
  *
@@ -31,12 +31,128 @@ export type Scalars = {
31
31
  output: unknown;
32
32
  };
33
33
  };
34
+ export type Call = {
35
+ __typename?: 'Call';
36
+ acceptedAt?: Maybe<Scalars['AWSTimestamp']['output']>;
37
+ /** Sealed answer. Returned only to the CALLER, only while the call is live. */
38
+ answerCiphertext?: Maybe<Scalars['String']['output']>;
39
+ answeredByDeviceId?: Maybe<Scalars['ID']['output']>;
40
+ callId: Scalars['ID']['output'];
41
+ calleeId: Scalars['ID']['output'];
42
+ /** The caller's device: the callee seals its answer (and ICE) to exactly this device. */
43
+ callerDeviceId?: Maybe<Scalars['ID']['output']>;
44
+ callerId: Scalars['ID']['output'];
45
+ connectedAt?: Maybe<Scalars['AWSTimestamp']['output']>;
46
+ createdAt: Scalars['AWSTimestamp']['output'];
47
+ /** Connected duration in milliseconds (0 if it never connected). */
48
+ durationMs: Scalars['Float']['output'];
49
+ endReason?: Maybe<CallEndReason>;
50
+ endedAt?: Maybe<Scalars['AWSTimestamp']['output']>;
51
+ matchId: Scalars['ID']['output'];
52
+ media: CallMedia;
53
+ /** Sealed offer. Returned only to the CALLEE, only while RINGING (a device woken by push reads it here). */
54
+ offerCiphertext?: Maybe<Scalars['String']['output']>;
55
+ status: CallStatus;
56
+ };
57
+ /** Whether the caller may start a call in a match right now (drives the locked call button). */
58
+ export type CallEligibility = {
59
+ __typename?: 'CallEligibility';
60
+ allowed: Scalars['Boolean']['output'];
61
+ /** User-facing copy for the reason. */
62
+ message?: Maybe<Scalars['String']['output']>;
63
+ /** Machine-readable reason when not allowed: MESSAGE_FIRST (both must have sent a message). */
64
+ reason?: Maybe<Scalars['String']['output']>;
65
+ };
66
+ export declare enum CallEndReason {
67
+ /** Sent to the callee's OTHER devices when one device answered. */
68
+ AnsweredElsewhere = "ANSWERED_ELSEWHERE",
69
+ /** The callee was already on another call. Returned by startCall only; never stored. */
70
+ Busy = "BUSY",
71
+ /** The caller hung up before it was answered. */
72
+ Cancelled = "CANCELLED",
73
+ /** The callee rejected the call. */
74
+ Declined = "DECLINED",
75
+ /** Connected, then both sides went silent (crash or network loss). */
76
+ Dropped = "DROPPED",
77
+ /** Answered, but media never came up. */
78
+ Failed = "FAILED",
79
+ /** A participant hung up a connected call. */
80
+ Hangup = "HANGUP",
81
+ /** The call reached the maximum duration. */
82
+ MaxDuration = "MAX_DURATION",
83
+ /** Nobody answered in time. */
84
+ Missed = "MISSED",
85
+ /** The match ended, the account was deleted, or a participant blocked the other. */
86
+ Unmatched = "UNMATCHED"
87
+ }
88
+ /**
89
+ * Real-time call event, delivered per USER (a device woken by push does not know the callId yet).
90
+ * Timestamps are epoch milliseconds.
91
+ */
92
+ export type CallEvent = {
93
+ __typename?: 'CallEvent';
94
+ at: Scalars['Float']['output'];
95
+ callId: Scalars['ID']['output'];
96
+ /** E2EE payload (SIGNAL, ACCEPTED). Never readable by the backend. */
97
+ ciphertext?: Maybe<Scalars['String']['output']>;
98
+ endReason?: Maybe<CallEndReason>;
99
+ fromDeviceId?: Maybe<Scalars['ID']['output']>;
100
+ kind: CallEventKind;
101
+ matchId: Scalars['ID']['output'];
102
+ media?: Maybe<CallMedia>;
103
+ /** SIGNAL only: the device the payload is sealed for. Other devices of the recipient ignore it. */
104
+ toDeviceId?: Maybe<Scalars['ID']['output']>;
105
+ /** Delivery address. onCallEvent authorizes it == the caller's own subject. */
106
+ userId: Scalars['ID']['output'];
107
+ };
108
+ export declare enum CallEventKind {
109
+ /** The callee answered; `ciphertext` carries the sealed answer (caller only). */
110
+ Accepted = "ACCEPTED",
111
+ /** Another of the recipient's devices answered; stop ringing here. */
112
+ AnsweredElsewhere = "ANSWERED_ELSEWHERE",
113
+ /** Media is up. */
114
+ Connected = "CONNECTED",
115
+ /** The call ended; see `endReason`. */
116
+ Ended = "ENDED",
117
+ /** A call is ringing for the recipient. */
118
+ Incoming = "INCOMING",
119
+ /** A sealed SDP / ICE batch addressed to `toDeviceId`. */
120
+ Signal = "SIGNAL"
121
+ }
122
+ export declare enum CallMedia {
123
+ Audio = "AUDIO",
124
+ Video = "VIDEO"
125
+ }
126
+ export declare enum CallStatus {
127
+ /** A callee device answered; media is being established. */
128
+ Accepted = "ACCEPTED",
129
+ /** Media is up (first heartbeat received). */
130
+ Connected = "CONNECTED",
131
+ /** Terminal. See endReason. */
132
+ Ended = "ENDED",
133
+ /** The callee's devices are ringing. */
134
+ Ringing = "RINGING"
135
+ }
34
136
  export type DeletedMessage = {
35
137
  __typename?: 'DeletedMessage';
36
138
  matchId: Scalars['ID']['output'];
37
139
  messageId: Scalars['ID']['output'];
38
140
  timestamp: Scalars['AWSTimestamp']['output'];
39
141
  };
142
+ export type IceServer = {
143
+ __typename?: 'IceServer';
144
+ credential?: Maybe<Scalars['String']['output']>;
145
+ urls: Array<Scalars['String']['output']>;
146
+ username?: Maybe<Scalars['String']['output']>;
147
+ };
148
+ /** Short-lived TURN configuration. Refresh before `ttlSeconds` elapses (ICE restart on long calls). */
149
+ export type IceServerConfig = {
150
+ __typename?: 'IceServerConfig';
151
+ iceServers: Array<IceServer>;
152
+ /** Server-controlled; "relay" so peers never learn each other's IP address. */
153
+ iceTransportPolicy: Scalars['String']['output'];
154
+ ttlSeconds: Scalars['Int']['output'];
155
+ };
40
156
  export type KeyRecoverySession = {
41
157
  __typename?: 'KeyRecoverySession';
42
158
  challenge: Scalars['String']['output'];
@@ -105,22 +221,44 @@ export declare enum MessageStatus {
105
221
  }
106
222
  export type Mutation = {
107
223
  __typename?: 'Mutation';
224
+ acceptCall?: Maybe<Call>;
225
+ declineCall?: Maybe<Call>;
108
226
  deleteMessage?: Maybe<DeletedMessage>;
227
+ endCall?: Maybe<Call>;
228
+ heartbeatCall?: Maybe<Call>;
109
229
  markAsDelivered?: Maybe<MessageReceipt>;
110
230
  markAsRead?: Maybe<MessageReceipt>;
111
231
  notifyScreenshot?: Maybe<ScreenshotEvent>;
232
+ publishCallEvent?: Maybe<CallEvent>;
112
233
  publishNotification?: Maybe<Notification>;
113
234
  reactToMessage?: Maybe<MessageReaction>;
235
+ relayCallSignal?: Maybe<CallEvent>;
114
236
  requestKeyRecovery?: Maybe<KeyRecoverySession>;
115
237
  sendMessage?: Maybe<Message>;
116
238
  sendTypingIndicator?: Maybe<TypingIndicator>;
239
+ startCall?: Maybe<Call>;
117
240
  updateKeyRecovery?: Maybe<KeyRecoverySession>;
118
241
  updatePresence?: Maybe<PresenceUpdate>;
119
242
  };
243
+ export type MutationAcceptCallArgs = {
244
+ answerCiphertext: Scalars['String']['input'];
245
+ callId: Scalars['ID']['input'];
246
+ deviceId: Scalars['ID']['input'];
247
+ };
248
+ export type MutationDeclineCallArgs = {
249
+ callId: Scalars['ID']['input'];
250
+ };
120
251
  export type MutationDeleteMessageArgs = {
121
252
  matchId: Scalars['ID']['input'];
122
253
  timestamp: Scalars['AWSTimestamp']['input'];
123
254
  };
255
+ export type MutationEndCallArgs = {
256
+ callId: Scalars['ID']['input'];
257
+ reason: CallEndReason;
258
+ };
259
+ export type MutationHeartbeatCallArgs = {
260
+ callId: Scalars['ID']['input'];
261
+ };
124
262
  export type MutationMarkAsDeliveredArgs = {
125
263
  matchId: Scalars['ID']['input'];
126
264
  messageId: Scalars['ID']['input'];
@@ -137,6 +275,16 @@ export type MutationNotifyScreenshotArgs = {
137
275
  matchId: Scalars['ID']['input'];
138
276
  userId: Scalars['String']['input'];
139
277
  };
278
+ export type MutationPublishCallEventArgs = {
279
+ callId: Scalars['ID']['input'];
280
+ ciphertext?: InputMaybe<Scalars['String']['input']>;
281
+ endReason?: InputMaybe<CallEndReason>;
282
+ fromDeviceId?: InputMaybe<Scalars['ID']['input']>;
283
+ kind: CallEventKind;
284
+ matchId: Scalars['ID']['input'];
285
+ media?: InputMaybe<CallMedia>;
286
+ userId: Scalars['ID']['input'];
287
+ };
140
288
  export type MutationPublishNotificationArgs = {
141
289
  body: Scalars['String']['input'];
142
290
  id?: InputMaybe<Scalars['ID']['input']>;
@@ -152,6 +300,14 @@ export type MutationReactToMessageArgs = {
152
300
  timestamp: Scalars['AWSTimestamp']['input'];
153
301
  userId: Scalars['String']['input'];
154
302
  };
303
+ export type MutationRelayCallSignalArgs = {
304
+ callId: Scalars['ID']['input'];
305
+ ciphertext: Scalars['String']['input'];
306
+ fromDeviceId: Scalars['ID']['input'];
307
+ matchId: Scalars['ID']['input'];
308
+ toDeviceId: Scalars['ID']['input'];
309
+ toUserId: Scalars['ID']['input'];
310
+ };
155
311
  export type MutationRequestKeyRecoveryArgs = {
156
312
  challenge: Scalars['String']['input'];
157
313
  sourceDeviceId: Scalars['ID']['input'];
@@ -172,6 +328,12 @@ export type MutationSendTypingIndicatorArgs = {
172
328
  matchId: Scalars['ID']['input'];
173
329
  userId: Scalars['String']['input'];
174
330
  };
331
+ export type MutationStartCallArgs = {
332
+ fromDeviceId: Scalars['ID']['input'];
333
+ matchId: Scalars['ID']['input'];
334
+ media: CallMedia;
335
+ offerCiphertext: Scalars['String']['input'];
336
+ };
175
337
  export type MutationUpdateKeyRecoveryArgs = {
176
338
  sessionId: Scalars['ID']['input'];
177
339
  sourceDeviceId: Scalars['ID']['input'];
@@ -200,6 +362,8 @@ export type Notification = {
200
362
  export declare enum NotificationKind {
201
363
  /** An established conversation went quiet and the user owes a reply (re-engagement nudge). */
202
364
  ConversationCooling = "CONVERSATION_COOLING",
365
+ /** A call to this user was not answered (or they were already on another call). */
366
+ MissedCall = "MISSED_CALL",
203
367
  /** Both people liked each other and State created the hook. */
204
368
  MutualMatch = "MUTUAL_MATCH",
205
369
  /** Someone liked this user. Does NOT reveal whether the like was reciprocated. */
@@ -218,10 +382,30 @@ export type PresenceUpdate = {
218
382
  };
219
383
  export type Query = {
220
384
  __typename?: 'Query';
385
+ getActiveCall?: Maybe<Call>;
386
+ getCall?: Maybe<Call>;
387
+ getCallEligibility?: Maybe<CallEligibility>;
388
+ getCallHistory?: Maybe<Array<Maybe<Call>>>;
389
+ getIceServers?: Maybe<IceServerConfig>;
221
390
  getKeyRecoveryRequests?: Maybe<Array<Maybe<KeyRecoverySession>>>;
222
391
  getKeyRecoverySession?: Maybe<KeyRecoverySession>;
223
392
  getMessages?: Maybe<Array<Maybe<Message>>>;
224
393
  };
394
+ export type QueryGetCallArgs = {
395
+ callId: Scalars['ID']['input'];
396
+ };
397
+ export type QueryGetCallEligibilityArgs = {
398
+ matchId: Scalars['ID']['input'];
399
+ };
400
+ export type QueryGetCallHistoryArgs = {
401
+ before?: InputMaybe<Scalars['AWSTimestamp']['input']>;
402
+ limit?: InputMaybe<Scalars['Int']['input']>;
403
+ matchId: Scalars['ID']['input'];
404
+ };
405
+ export type QueryGetIceServersArgs = {
406
+ deviceId: Scalars['ID']['input'];
407
+ matchId: Scalars['ID']['input'];
408
+ };
225
409
  export type QueryGetKeyRecoveryRequestsArgs = {
226
410
  sourceDeviceId: Scalars['ID']['input'];
227
411
  };
@@ -241,6 +425,7 @@ export type ScreenshotEvent = {
241
425
  };
242
426
  export type Subscription = {
243
427
  __typename?: 'Subscription';
428
+ onCallEvent?: Maybe<CallEvent>;
244
429
  onKeyRecoveryRequested?: Maybe<KeyRecoverySession>;
245
430
  onKeyRecoveryUpdated?: Maybe<KeyRecoverySession>;
246
431
  onMessageDeleted?: Maybe<DeletedMessage>;
@@ -252,6 +437,9 @@ export type Subscription = {
252
437
  onScreenshotTaken?: Maybe<ScreenshotEvent>;
253
438
  onTypingIndicator?: Maybe<TypingIndicator>;
254
439
  };
440
+ export type SubscriptionOnCallEventArgs = {
441
+ userId: Scalars['ID']['input'];
442
+ };
255
443
  export type SubscriptionOnKeyRecoveryRequestedArgs = {
256
444
  sourceDeviceId: Scalars['ID']['input'];
257
445
  userId: Scalars['ID']['input'];
@@ -308,6 +308,12 @@ export interface ChatSettings {
308
308
  * @public
309
309
  */
310
310
  defaultDisappearingSeconds?: number | undefined;
311
+ /**
312
+ * "Help translate my captions": this user's device may translate its own call captions for a partner
313
+ * whose device cannot translate the language pair. Default off (battery and model downloads).
314
+ * @public
315
+ */
316
+ helpTranslateCaptions?: boolean | undefined;
311
317
  }
312
318
  /**
313
319
  * @public
@@ -494,6 +500,18 @@ export interface RegisterDeviceResponse {
494
500
  */
495
501
  ownsAccountHistoryKey: boolean | undefined;
496
502
  }
503
+ /**
504
+ * @public
505
+ * @enum
506
+ */
507
+ export declare const PushTokenKind: {
508
+ readonly ALERT: "ALERT";
509
+ readonly VOIP: "VOIP";
510
+ };
511
+ /**
512
+ * @public
513
+ */
514
+ export type PushTokenKind = typeof PushTokenKind[keyof typeof PushTokenKind];
497
515
  /**
498
516
  * @public
499
517
  */
@@ -514,6 +532,13 @@ export interface RegisterPushTokenRequest {
514
532
  * @public
515
533
  */
516
534
  platform: Platform | undefined;
535
+ /**
536
+ * `ALERT` (default): an ordinary APNs/FCM token for notifications. `VOIP`: an iOS PushKit token,
537
+ * used ONLY to ring incoming calls and stored separately (`VOIP#<deviceId>`), because iOS kills an
538
+ * app that receives a VoIP push it does not report to CallKit. `VOIP` requires `platform: IOS`.
539
+ * @public
540
+ */
541
+ kind?: PushTokenKind | undefined;
517
542
  }
518
543
  /**
519
544
  * @public
@@ -569,6 +594,7 @@ export interface UpdateChatSettingsRequest {
569
594
  lastSeenVisibility?: LastSeenVisibility | undefined;
570
595
  screenshotProtection?: boolean | undefined;
571
596
  defaultDisappearingSeconds?: number | undefined;
597
+ helpTranslateCaptions?: boolean | undefined;
572
598
  }
573
599
  /**
574
600
  * @public
@@ -1,5 +1,5 @@
1
1
  export declare const TELEMETRY_CATALOG_VERSION = "1.3.0";
2
- export declare const TELEMETRY_CATALOG_HASH = "25955dd2f9856888";
2
+ export declare const TELEMETRY_CATALOG_HASH = "52029d112aadcfd5";
3
3
  /** Every signal type the ingest accepts. */
4
4
  export declare const SignalType: {
5
5
  readonly SCREEN_VIEW: "screen_view";
@@ -41,6 +41,7 @@ export declare const Screen: {
41
41
  readonly LIKES_YOU: "LIKES_YOU";
42
42
  readonly CHAT: "CHAT";
43
43
  readonly CHAT_SETTINGS: "CHAT_SETTINGS";
44
+ readonly CALL: "CALL";
44
45
  readonly NOTIFICATIONS: "NOTIFICATIONS";
45
46
  readonly PROFILE: "PROFILE";
46
47
  readonly PROFILE_EDIT: "PROFILE_EDIT";
@@ -66,6 +67,7 @@ export declare const ViewableScreen: {
66
67
  readonly LIKES_YOU: "LIKES_YOU";
67
68
  readonly CHAT: "CHAT";
68
69
  readonly CHAT_SETTINGS: "CHAT_SETTINGS";
70
+ readonly CALL: "CALL";
69
71
  readonly NOTIFICATIONS: "NOTIFICATIONS";
70
72
  readonly PROFILE: "PROFILE";
71
73
  readonly PROFILE_EDIT: "PROFILE_EDIT";
@@ -278,6 +280,19 @@ export declare const UiElement: {
278
280
  readonly CHAT_PRIVACY_TOGGLE: "chat.privacy_toggle";
279
281
  readonly CHAT_CALL: "chat.call";
280
282
  readonly CHAT_VIDEO_CALL: "chat.video_call";
283
+ readonly CHAT_CALL_HISTORY_OPEN: "chat.call_history_open";
284
+ readonly CALL_ACCEPT: "call.accept";
285
+ readonly CALL_DECLINE: "call.decline";
286
+ readonly CALL_END: "call.end";
287
+ readonly CALL_MUTE: "call.mute";
288
+ readonly CALL_CAMERA: "call.camera";
289
+ readonly CALL_CAMERA_SWITCH: "call.camera_switch";
290
+ readonly CALL_SPEAKER: "call.speaker";
291
+ readonly CALL_SCREEN_SHARE: "call.screen_share";
292
+ readonly CALL_SCREEN_SHARE_RESPOND: "call.screen_share_respond";
293
+ readonly CALL_CAPTIONS: "call.captions";
294
+ readonly CALL_CAPTION_LANGUAGE_SELECT: "call.caption_language_select";
295
+ readonly CHAT_SETTINGS_HELP_TRANSLATE_CAPTIONS: "chat_settings.help_translate_captions";
281
296
  readonly CHAT_MEDIA_OPEN: "chat.media_open";
282
297
  readonly CHAT_AUDIO_PLAY: "chat.audio_play";
283
298
  readonly CHAT_FILE_OPEN: "chat.file_open";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onehook-api-client",
3
3
  "description": "OneHook API Client",
4
- "version": "1.0.24",
4
+ "version": "1.0.26",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -1,8 +1,8 @@
1
1
  // GENERATED FILE - DO NOT EDIT.
2
- // telemetry-integrity: sha256 4f5804c5220e5b73c5247dd08315e116f6cff47f4dc442db7ebb70c513b6f341
2
+ // telemetry-integrity: sha256 6d0faa787d71a97191f79c16baab74a5338190e36ce761594168784da8072af2
3
3
  // Source of truth: OneHookBackend/packages/telemetry/src/catalog.ts
4
4
  // Regenerate: (OneHookBackend) npm run telemetry:generate && npm run telemetry:sync
5
- // Catalog version 1.3.0, hash 25955dd2f9856888.
5
+ // Catalog version 1.3.0, hash 52029d112aadcfd5.
6
6
  //
7
7
  // HARD RULE: every user interaction MUST emit ui_interaction with an id from THIS file, and
8
8
  // ids are controlled by the backend. Read TELEMETRY_CONTRACT.txt (printed by every build).
@@ -13,7 +13,7 @@ package club.onehook.telemetry
13
13
 
14
14
  object TelemetryCatalog {
15
15
  const val VERSION = "1.3.0"
16
- const val HASH = "25955dd2f9856888"
16
+ const val HASH = "52029d112aadcfd5"
17
17
  /** The only allowed `telemetry-exempt: <category>: <reason>` categories (see the catalog). */
18
18
  val EXEMPT_CATEGORIES: List<String> = listOf("duplicate", "backdrop", "gesture", "continuous", "disabled")
19
19
  }
@@ -67,6 +67,7 @@ enum class TelemetryScreen(val wire: String, val viewable: Boolean) {
67
67
  LIKES_YOU("LIKES_YOU", true),
68
68
  CHAT("CHAT", true),
69
69
  CHAT_SETTINGS("CHAT_SETTINGS", true),
70
+ CALL("CALL", true),
70
71
  NOTIFICATIONS("NOTIFICATIONS", true),
71
72
  PROFILE("PROFILE", true),
72
73
  PROFILE_EDIT("PROFILE_EDIT", true),
@@ -330,8 +331,21 @@ enum class UiElement(
330
331
  CHAT_WALLPAPER_OPEN("chat.wallpaper_open", TelemetryScreen.CHAT, UiElementKind.MENU_ITEM, listOf(UiAction.TAP, UiAction.DISMISS), null, listOf(TelemetryPlatform.WEB)),
331
332
  CHAT_ADD_HOOK_OPEN("chat.add_hook_open", TelemetryScreen.CHAT, UiElementKind.BUTTON, listOf(UiAction.TAP, UiAction.DISMISS), null, listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS)),
332
333
  CHAT_PRIVACY_TOGGLE("chat.privacy_toggle", TelemetryScreen.CHAT, UiElementKind.TOGGLE, listOf(UiAction.TOGGLE), listOf("hidden", "visible"), listOf()),
333
- CHAT_CALL("chat.call", TelemetryScreen.CHAT, UiElementKind.BUTTON, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.IOS)),
334
- CHAT_VIDEO_CALL("chat.video_call", TelemetryScreen.CHAT, UiElementKind.BUTTON, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.IOS)),
334
+ CHAT_CALL("chat.call", TelemetryScreen.CHAT, UiElementKind.BUTTON, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
335
+ CHAT_VIDEO_CALL("chat.video_call", TelemetryScreen.CHAT, UiElementKind.BUTTON, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
336
+ CHAT_CALL_HISTORY_OPEN("chat.call_history_open", TelemetryScreen.CHAT, UiElementKind.BUTTON, listOf(UiAction.TAP, UiAction.DISMISS), null, listOf(TelemetryPlatform.IOS)),
337
+ CALL_ACCEPT("call.accept", TelemetryScreen.CALL, UiElementKind.BUTTON, listOf(UiAction.TAP), listOf("audio", "video"), listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
338
+ CALL_DECLINE("call.decline", TelemetryScreen.CALL, UiElementKind.BUTTON, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
339
+ CALL_END("call.end", TelemetryScreen.CALL, UiElementKind.BUTTON, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
340
+ CALL_MUTE("call.mute", TelemetryScreen.CALL, UiElementKind.TOGGLE, listOf(UiAction.TOGGLE), listOf("on", "off"), listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
341
+ CALL_CAMERA("call.camera", TelemetryScreen.CALL, UiElementKind.TOGGLE, listOf(UiAction.TOGGLE), listOf("on", "off"), listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
342
+ CALL_CAMERA_SWITCH("call.camera_switch", TelemetryScreen.CALL, UiElementKind.BUTTON, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.IOS)),
343
+ CALL_SPEAKER("call.speaker", TelemetryScreen.CALL, UiElementKind.TOGGLE, listOf(UiAction.TOGGLE), listOf("on", "off"), listOf(TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
344
+ CALL_SCREEN_SHARE("call.screen_share", TelemetryScreen.CALL, UiElementKind.TOGGLE, listOf(UiAction.TOGGLE), listOf("on", "off"), listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
345
+ CALL_SCREEN_SHARE_RESPOND("call.screen_share_respond", TelemetryScreen.CALL, UiElementKind.DIALOG_BUTTON, listOf(UiAction.TAP, UiAction.DISMISS), listOf("accept", "decline"), listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
346
+ CALL_CAPTIONS("call.captions", TelemetryScreen.CALL, UiElementKind.TOGGLE, listOf(UiAction.TOGGLE), listOf("on", "off"), listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
347
+ CALL_CAPTION_LANGUAGE_SELECT("call.caption_language_select", TelemetryScreen.CALL, UiElementKind.MENU_ITEM, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
348
+ CHAT_SETTINGS_HELP_TRANSLATE_CAPTIONS("chat_settings.help_translate_captions", TelemetryScreen.CHAT_SETTINGS, UiElementKind.TOGGLE, listOf(UiAction.TOGGLE), listOf("on", "off"), listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
335
349
  CHAT_MEDIA_OPEN("chat.media_open", TelemetryScreen.CHAT, UiElementKind.GESTURE, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
336
350
  CHAT_AUDIO_PLAY("chat.audio_play", TelemetryScreen.CHAT, UiElementKind.TOGGLE, listOf(UiAction.TOGGLE), listOf("play", "pause"), listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
337
351
  CHAT_FILE_OPEN("chat.file_open", TelemetryScreen.CHAT, UiElementKind.LIST_ITEM, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
@@ -1,8 +1,8 @@
1
1
  // GENERATED FILE - DO NOT EDIT.
2
- // telemetry-integrity: sha256 1282a87efde04e20ffb3445d70f03b20afda30c3167e2971ecbbf27eaf4128c6
2
+ // telemetry-integrity: sha256 e9f336f3402e1b9628fd2259412a5dae385c8d736a84f32adae388bcca9c3a68
3
3
  // Source of truth: OneHookBackend/packages/telemetry/src/catalog.ts
4
4
  // Regenerate: (OneHookBackend) npm run telemetry:generate && npm run telemetry:sync
5
- // Catalog version 1.3.0, hash 25955dd2f9856888.
5
+ // Catalog version 1.3.0, hash 52029d112aadcfd5.
6
6
  //
7
7
  // HARD RULE: every user interaction MUST emit ui_interaction with an id from THIS file, and
8
8
  // ids are controlled by the backend. Read TELEMETRY_CONTRACT.txt (printed by every build).
@@ -11,7 +11,7 @@ import Foundation
11
11
 
12
12
  public enum TelemetryCatalog {
13
13
  public static let version = "1.3.0"
14
- public static let hash = "25955dd2f9856888"
14
+ public static let hash = "52029d112aadcfd5"
15
15
  /// The only allowed `telemetry-exempt: <category>: <reason>` categories (see the catalog).
16
16
  public static let exemptCategories: [String] = ["duplicate", "backdrop", "gesture", "continuous", "disabled"]
17
17
  }
@@ -57,6 +57,7 @@ public enum TelemetryScreen: String, CaseIterable, Codable, Sendable {
57
57
  case likesYou = "LIKES_YOU"
58
58
  case chat = "CHAT"
59
59
  case chatSettings = "CHAT_SETTINGS"
60
+ case call = "CALL"
60
61
  case notifications = "NOTIFICATIONS"
61
62
  case profile = "PROFILE"
62
63
  case profileEdit = "PROFILE_EDIT"
@@ -282,6 +283,19 @@ public enum UiElement: String, CaseIterable, Codable, Sendable {
282
283
  case chatPrivacyToggle = "chat.privacy_toggle"
283
284
  case chatCall = "chat.call"
284
285
  case chatVideoCall = "chat.video_call"
286
+ case chatCallHistoryOpen = "chat.call_history_open"
287
+ case callAccept = "call.accept"
288
+ case callDecline = "call.decline"
289
+ case callEnd = "call.end"
290
+ case callMute = "call.mute"
291
+ case callCamera = "call.camera"
292
+ case callCameraSwitch = "call.camera_switch"
293
+ case callSpeaker = "call.speaker"
294
+ case callScreenShare = "call.screen_share"
295
+ case callScreenShareRespond = "call.screen_share_respond"
296
+ case callCaptions = "call.captions"
297
+ case callCaptionLanguageSelect = "call.caption_language_select"
298
+ case chatSettingsHelpTranslateCaptions = "chat_settings.help_translate_captions"
285
299
  case chatMediaOpen = "chat.media_open"
286
300
  case chatAudioPlay = "chat.audio_play"
287
301
  case chatFileOpen = "chat.file_open"
@@ -493,8 +507,21 @@ public enum UiElement: String, CaseIterable, Codable, Sendable {
493
507
  case .chatWallpaperOpen: return UiElementSpec(screen: .chat, kind: .menuItem, actions: [.tap, .dismiss], allowedValues: nil, platforms: [.web])
494
508
  case .chatAddHookOpen: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap, .dismiss], allowedValues: nil, platforms: [.web, .ios])
495
509
  case .chatPrivacyToggle: return UiElementSpec(screen: .chat, kind: .toggle, actions: [.toggle], allowedValues: ["hidden", "visible"], platforms: [])
496
- case .chatCall: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.ios])
497
- case .chatVideoCall: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.ios])
510
+ case .chatCall: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
511
+ case .chatVideoCall: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
512
+ case .chatCallHistoryOpen: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap, .dismiss], allowedValues: nil, platforms: [.ios])
513
+ case .callAccept: return UiElementSpec(screen: .call, kind: .button, actions: [.tap], allowedValues: ["audio", "video"], platforms: [.web, .ios, .android])
514
+ case .callDecline: return UiElementSpec(screen: .call, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
515
+ case .callEnd: return UiElementSpec(screen: .call, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
516
+ case .callMute: return UiElementSpec(screen: .call, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.web, .ios, .android])
517
+ case .callCamera: return UiElementSpec(screen: .call, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.web, .ios, .android])
518
+ case .callCameraSwitch: return UiElementSpec(screen: .call, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.ios])
519
+ case .callSpeaker: return UiElementSpec(screen: .call, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.ios, .android])
520
+ case .callScreenShare: return UiElementSpec(screen: .call, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.web, .ios, .android])
521
+ case .callScreenShareRespond: return UiElementSpec(screen: .call, kind: .dialogButton, actions: [.tap, .dismiss], allowedValues: ["accept", "decline"], platforms: [.web, .ios, .android])
522
+ case .callCaptions: return UiElementSpec(screen: .call, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.web, .ios, .android])
523
+ case .callCaptionLanguageSelect: return UiElementSpec(screen: .call, kind: .menuItem, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
524
+ case .chatSettingsHelpTranslateCaptions: return UiElementSpec(screen: .chatSettings, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.web, .ios, .android])
498
525
  case .chatMediaOpen: return UiElementSpec(screen: .chat, kind: .gesture, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
499
526
  case .chatAudioPlay: return UiElementSpec(screen: .chat, kind: .toggle, actions: [.toggle], allowedValues: ["play", "pause"], platforms: [.web, .ios, .android])
500
527
  case .chatFileOpen: return UiElementSpec(screen: .chat, kind: .listItem, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
@@ -41,6 +41,10 @@
41
41
  "viewable": true,
42
42
  "description": "Per-user chat privacy settings."
43
43
  },
44
+ "CALL": {
45
+ "viewable": true,
46
+ "description": "1:1 voice/video call (incoming, outgoing and in-call)."
47
+ },
44
48
  "NOTIFICATIONS": {
45
49
  "viewable": true,
46
50
  "description": "In-app notification center."
@@ -118,6 +122,7 @@
118
122
  "LIKES_YOU",
119
123
  "CHAT",
120
124
  "CHAT_SETTINGS",
125
+ "CALL",
121
126
  "NOTIFICATIONS",
122
127
  "PROFILE",
123
128
  "PROFILE_EDIT",
@@ -149,6 +154,7 @@
149
154
  "LIKES_YOU",
150
155
  "CHAT",
151
156
  "CHAT_SETTINGS",
157
+ "CALL",
152
158
  "NOTIFICATIONS",
153
159
  "PROFILE",
154
160
  "PROFILE_EDIT",
@@ -1782,7 +1788,9 @@
1782
1788
  ],
1783
1789
  "values": null,
1784
1790
  "platforms": [
1785
- "ios"
1791
+ "web",
1792
+ "ios",
1793
+ "android"
1786
1794
  ],
1787
1795
  "deprecated": null
1788
1796
  },
@@ -1794,11 +1802,229 @@
1794
1802
  "tap"
1795
1803
  ],
1796
1804
  "values": null,
1805
+ "platforms": [
1806
+ "web",
1807
+ "ios",
1808
+ "android"
1809
+ ],
1810
+ "deprecated": null
1811
+ },
1812
+ "chat.call_history_open": {
1813
+ "screen": "CHAT",
1814
+ "kind": "button",
1815
+ "description": "Open the call-history list for this conversation.",
1816
+ "actions": [
1817
+ "tap",
1818
+ "dismiss"
1819
+ ],
1820
+ "values": null,
1821
+ "platforms": [
1822
+ "ios"
1823
+ ],
1824
+ "deprecated": null
1825
+ },
1826
+ "call.accept": {
1827
+ "screen": "CALL",
1828
+ "kind": "button",
1829
+ "description": "Answer an incoming call. value = how it was answered.",
1830
+ "actions": [
1831
+ "tap"
1832
+ ],
1833
+ "values": [
1834
+ "audio",
1835
+ "video"
1836
+ ],
1837
+ "platforms": [
1838
+ "web",
1839
+ "ios",
1840
+ "android"
1841
+ ],
1842
+ "deprecated": null
1843
+ },
1844
+ "call.decline": {
1845
+ "screen": "CALL",
1846
+ "kind": "button",
1847
+ "description": "Decline an incoming call.",
1848
+ "actions": [
1849
+ "tap"
1850
+ ],
1851
+ "values": null,
1852
+ "platforms": [
1853
+ "web",
1854
+ "ios",
1855
+ "android"
1856
+ ],
1857
+ "deprecated": null
1858
+ },
1859
+ "call.end": {
1860
+ "screen": "CALL",
1861
+ "kind": "button",
1862
+ "description": "Hang up, or cancel an outgoing call.",
1863
+ "actions": [
1864
+ "tap"
1865
+ ],
1866
+ "values": null,
1867
+ "platforms": [
1868
+ "web",
1869
+ "ios",
1870
+ "android"
1871
+ ],
1872
+ "deprecated": null
1873
+ },
1874
+ "call.mute": {
1875
+ "screen": "CALL",
1876
+ "kind": "toggle",
1877
+ "description": "Mute / unmute the microphone. value = new state.",
1878
+ "actions": [
1879
+ "toggle"
1880
+ ],
1881
+ "values": [
1882
+ "on",
1883
+ "off"
1884
+ ],
1885
+ "platforms": [
1886
+ "web",
1887
+ "ios",
1888
+ "android"
1889
+ ],
1890
+ "deprecated": null
1891
+ },
1892
+ "call.camera": {
1893
+ "screen": "CALL",
1894
+ "kind": "toggle",
1895
+ "description": "Turn the camera on / off. value = new state.",
1896
+ "actions": [
1897
+ "toggle"
1898
+ ],
1899
+ "values": [
1900
+ "on",
1901
+ "off"
1902
+ ],
1903
+ "platforms": [
1904
+ "web",
1905
+ "ios",
1906
+ "android"
1907
+ ],
1908
+ "deprecated": null
1909
+ },
1910
+ "call.camera_switch": {
1911
+ "screen": "CALL",
1912
+ "kind": "button",
1913
+ "description": "Switch between front and back camera.",
1914
+ "actions": [
1915
+ "tap"
1916
+ ],
1917
+ "values": null,
1797
1918
  "platforms": [
1798
1919
  "ios"
1799
1920
  ],
1800
1921
  "deprecated": null
1801
1922
  },
1923
+ "call.speaker": {
1924
+ "screen": "CALL",
1925
+ "kind": "toggle",
1926
+ "description": "Route audio to the loudspeaker. value = new state.",
1927
+ "actions": [
1928
+ "toggle"
1929
+ ],
1930
+ "values": [
1931
+ "on",
1932
+ "off"
1933
+ ],
1934
+ "platforms": [
1935
+ "ios",
1936
+ "android"
1937
+ ],
1938
+ "deprecated": null
1939
+ },
1940
+ "call.screen_share": {
1941
+ "screen": "CALL",
1942
+ "kind": "toggle",
1943
+ "description": "Start / stop sharing your screen. value = new state.",
1944
+ "actions": [
1945
+ "toggle"
1946
+ ],
1947
+ "values": [
1948
+ "on",
1949
+ "off"
1950
+ ],
1951
+ "platforms": [
1952
+ "web",
1953
+ "ios",
1954
+ "android"
1955
+ ],
1956
+ "deprecated": null
1957
+ },
1958
+ "call.screen_share_respond": {
1959
+ "screen": "CALL",
1960
+ "kind": "dialog_button",
1961
+ "description": "Respond to the other person's request to share their screen.",
1962
+ "actions": [
1963
+ "tap",
1964
+ "dismiss"
1965
+ ],
1966
+ "values": [
1967
+ "accept",
1968
+ "decline"
1969
+ ],
1970
+ "platforms": [
1971
+ "web",
1972
+ "ios",
1973
+ "android"
1974
+ ],
1975
+ "deprecated": null
1976
+ },
1977
+ "call.captions": {
1978
+ "screen": "CALL",
1979
+ "kind": "toggle",
1980
+ "description": "Turn live captions of your own speech on / off. value = new state.",
1981
+ "actions": [
1982
+ "toggle"
1983
+ ],
1984
+ "values": [
1985
+ "on",
1986
+ "off"
1987
+ ],
1988
+ "platforms": [
1989
+ "web",
1990
+ "ios",
1991
+ "android"
1992
+ ],
1993
+ "deprecated": null
1994
+ },
1995
+ "call.caption_language_select": {
1996
+ "screen": "CALL",
1997
+ "kind": "menu_item",
1998
+ "description": "Pick the language your captions are translated into (or \"original\").",
1999
+ "actions": [
2000
+ "tap"
2001
+ ],
2002
+ "values": null,
2003
+ "platforms": [
2004
+ "web",
2005
+ "ios",
2006
+ "android"
2007
+ ],
2008
+ "deprecated": null
2009
+ },
2010
+ "chat_settings.help_translate_captions": {
2011
+ "screen": "CHAT_SETTINGS",
2012
+ "kind": "toggle",
2013
+ "description": "Help translate my captions for call partners whose device cannot. value = new state.",
2014
+ "actions": [
2015
+ "toggle"
2016
+ ],
2017
+ "values": [
2018
+ "on",
2019
+ "off"
2020
+ ],
2021
+ "platforms": [
2022
+ "web",
2023
+ "ios",
2024
+ "android"
2025
+ ],
2026
+ "deprecated": null
2027
+ },
1802
2028
  "chat.media_open": {
1803
2029
  "screen": "CHAT",
1804
2030
  "kind": "gesture",
@@ -3483,7 +3709,9 @@
3483
3709
  },
3484
3710
  "platformGaps": {
3485
3711
  "web": {
3486
- "chat.call": "Not built on Web: no in-app voice calling.",
3712
+ "call.camera_switch": "Web has no camera-switch control: the in-call UI uses the browser-selected camera and offers no front/back toggle.",
3713
+ "call.speaker": "Web has no speaker routing: the browser owns audio output.",
3714
+ "chat.call_history_open": "Web has no call-history-open control: finished calls render inline in the conversation timeline, not behind a separate list.",
3487
3715
  "chat.capture_option": "No in-app camera capture on Web; attachments use the OS file picker.",
3488
3716
  "chat.intro_dismiss": "Not built on Web: there is no in-chat intro tour / stories invitation.",
3489
3717
  "chat.intro_get_started": "Not built on Web: there is no in-chat intro tour / stories invitation.",
@@ -3494,7 +3722,6 @@
3494
3722
  "chat.profile_close": "Web toggles the peer profile panel with a single control (chat.profile_open); there is no separate close button.",
3495
3723
  "chat.unmatch": "Web ends a connection through Report & block (chat.report_block); the shipped chat has no neutral unmatch control (the standalone MatchesView unmatch UI is not mounted).",
3496
3724
  "chat.unmatch_confirm": "No neutral unmatch flow in the shipped Web chat; ending a connection goes through Report & block (chat.block_confirm).",
3497
- "chat.video_call": "Not built on Web: no in-app video calling.",
3498
3725
  "chat.voice_record_stop": "Web combines stop and send into one control (chat.voice_send); there is no separate stop.",
3499
3726
  "chat_settings.clear_cache": "No clear-cache control in the Web chat settings sheet; the browser manages its own storage.",
3500
3727
  "chat_settings.export_chat": "Not built on Web: no chat-export control in the settings sheet.",
@@ -3595,8 +3822,9 @@
3595
3822
  "shared.error_recover": "iOS surfaces load errors per-screen via the OHStateView retry control (discover.retry / likes_you.retry / profile.retry); there is no global crash/error screen offering retry|home choices."
3596
3823
  },
3597
3824
  "android": {
3825
+ "call.camera_switch": "Not built on Android: the in-call screen has no front/back camera-switch control.",
3598
3826
  "chat.add_hook_open": "Not built on Android: no add-another-connection entry inside chat.",
3599
- "chat.call": "Not built on Android: no in-app voice calling.",
3827
+ "chat.call_history_open": "Not built on Android: call history is merged inline into the conversation transcript as system rows, with no separate open-call-history-list control.",
3600
3828
  "chat.conversation_sort": "Not built on Android: the conversation list has no sort control.",
3601
3829
  "chat.conversation_sort_open": "Not built on Android: the conversation list has no sort control/menu to open.",
3602
3830
  "chat.conversation_switcher_open": "Not built on Android: conversations are cycled with a next button, with no switcher/picker.",
@@ -3608,7 +3836,6 @@
3608
3836
  "chat.mr_onehook_scope_select": "Not built on Android: Mr OneHook auto-scopes to the open match, with no scope picker.",
3609
3837
  "chat.sensitive_reveal_confirm": "Not built on Android: peer media is blanket-blurred with single-tap reveal (tracked as chat.media_open); there is no reveal confirmation dialog.",
3610
3838
  "chat.settings_open": "Not built on Android: no per-conversation chat settings screen.",
3611
- "chat.video_call": "Not built on Android: no in-app video calling.",
3612
3839
  "chat.voice_send": "Not built on Android: a recorded voice note is sent automatically on stop, with no separate send button.",
3613
3840
  "chat.wallpaper_open": "Not built on Android: no change-chat-wallpaper option.",
3614
3841
  "chat_settings.clear_cache": "Not built on Android: no per-user chat settings screen, so no clear-media-cache control.",
@@ -4133,5 +4360,5 @@
4133
4360
  }
4134
4361
  }
4135
4362
  },
4136
- "hash": "25955dd2f9856888"
4363
+ "hash": "52029d112aadcfd5"
4137
4364
  }