onehook-api-client 1.0.23 → 1.0.25

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.NotificationKind = exports.MessageStatus = 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";
@@ -8,6 +42,15 @@ var KeyRecoveryStatus;
8
42
  KeyRecoveryStatus["Displaying"] = "DISPLAYING";
9
43
  KeyRecoveryStatus["Pending"] = "PENDING";
10
44
  })(KeyRecoveryStatus || (exports.KeyRecoveryStatus = KeyRecoveryStatus = {}));
45
+ var MessageContentType;
46
+ (function (MessageContentType) {
47
+ MessageContentType["File"] = "FILE";
48
+ MessageContentType["Gif"] = "GIF";
49
+ MessageContentType["Image"] = "IMAGE";
50
+ MessageContentType["Sticker"] = "STICKER";
51
+ MessageContentType["Text"] = "TEXT";
52
+ MessageContentType["Voice"] = "VOICE";
53
+ })(MessageContentType || (exports.MessageContentType = MessageContentType = {}));
11
54
  var MessageStatus;
12
55
  (function (MessageStatus) {
13
56
  MessageStatus["Delivered"] = "DELIVERED";
@@ -19,6 +62,12 @@ var MessageStatus;
19
62
  var NotificationKind;
20
63
  (function (NotificationKind) {
21
64
  NotificationKind["ConversationCooling"] = "CONVERSATION_COOLING";
65
+ NotificationKind["MissedCall"] = "MISSED_CALL";
22
66
  NotificationKind["MutualMatch"] = "MUTUAL_MATCH";
23
67
  NotificationKind["ProfileLiked"] = "PROFILE_LIKED";
24
68
  })(NotificationKind || (exports.NotificationKind = NotificationKind = {}));
69
+ var PresenceState;
70
+ (function (PresenceState) {
71
+ PresenceState["Offline"] = "OFFLINE";
72
+ PresenceState["Online"] = "ONLINE";
73
+ })(PresenceState || (exports.PresenceState = PresenceState = {}));
@@ -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
  }));
@@ -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 = "47d859d40ce38e04";
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,16 @@ 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",
251
263
  CHAT_MEDIA_OPEN: "chat.media_open",
252
264
  CHAT_AUDIO_PLAY: "chat.audio_play",
253
265
  CHAT_FILE_OPEN: "chat.file_open",
@@ -458,8 +470,18 @@ exports.UI_ELEMENTS = {
458
470
  "chat.wallpaper_open": { screen: "CHAT", kind: "menu_item", actions: ["tap", "dismiss"], values: null, platforms: ["web"] },
459
471
  "chat.add_hook_open": { screen: "CHAT", kind: "button", actions: ["tap", "dismiss"], values: null, platforms: ["web", "ios"] },
460
472
  "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"] },
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", "android"] },
484
+ "call.screen_share_respond": { screen: "CALL", kind: "dialog_button", actions: ["tap", "dismiss"], values: ["accept", "decline"], platforms: ["web", "android"] },
463
485
  "chat.media_open": { screen: "CHAT", kind: "gesture", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
464
486
  "chat.audio_play": { screen: "CHAT", kind: "toggle", actions: ["toggle"], values: ["play", "pause"], platforms: ["web", "ios", "android"] },
465
487
  "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";
@@ -5,6 +39,15 @@ export var KeyRecoveryStatus;
5
39
  KeyRecoveryStatus["Displaying"] = "DISPLAYING";
6
40
  KeyRecoveryStatus["Pending"] = "PENDING";
7
41
  })(KeyRecoveryStatus || (KeyRecoveryStatus = {}));
42
+ export var MessageContentType;
43
+ (function (MessageContentType) {
44
+ MessageContentType["File"] = "FILE";
45
+ MessageContentType["Gif"] = "GIF";
46
+ MessageContentType["Image"] = "IMAGE";
47
+ MessageContentType["Sticker"] = "STICKER";
48
+ MessageContentType["Text"] = "TEXT";
49
+ MessageContentType["Voice"] = "VOICE";
50
+ })(MessageContentType || (MessageContentType = {}));
8
51
  export var MessageStatus;
9
52
  (function (MessageStatus) {
10
53
  MessageStatus["Delivered"] = "DELIVERED";
@@ -16,6 +59,12 @@ export var MessageStatus;
16
59
  export var NotificationKind;
17
60
  (function (NotificationKind) {
18
61
  NotificationKind["ConversationCooling"] = "CONVERSATION_COOLING";
62
+ NotificationKind["MissedCall"] = "MISSED_CALL";
19
63
  NotificationKind["MutualMatch"] = "MUTUAL_MATCH";
20
64
  NotificationKind["ProfileLiked"] = "PROFILE_LIKED";
21
65
  })(NotificationKind || (NotificationKind = {}));
66
+ export var PresenceState;
67
+ (function (PresenceState) {
68
+ PresenceState["Offline"] = "OFFLINE";
69
+ PresenceState["Online"] = "ONLINE";
70
+ })(PresenceState || (PresenceState = {}));
@@ -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
  }));
@@ -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 = "47d859d40ce38e04";
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,16 @@ 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",
248
260
  CHAT_MEDIA_OPEN: "chat.media_open",
249
261
  CHAT_AUDIO_PLAY: "chat.audio_play",
250
262
  CHAT_FILE_OPEN: "chat.file_open",
@@ -455,8 +467,18 @@ export const UI_ELEMENTS = {
455
467
  "chat.wallpaper_open": { screen: "CHAT", kind: "menu_item", actions: ["tap", "dismiss"], values: null, platforms: ["web"] },
456
468
  "chat.add_hook_open": { screen: "CHAT", kind: "button", actions: ["tap", "dismiss"], values: null, platforms: ["web", "ios"] },
457
469
  "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"] },
470
+ "chat.call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
471
+ "chat.video_call": { screen: "CHAT", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
472
+ "chat.call_history_open": { screen: "CHAT", kind: "button", actions: ["tap", "dismiss"], values: null, platforms: ["ios"] },
473
+ "call.accept": { screen: "CALL", kind: "button", actions: ["tap"], values: ["audio", "video"], platforms: ["web", "ios", "android"] },
474
+ "call.decline": { screen: "CALL", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
475
+ "call.end": { screen: "CALL", kind: "button", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
476
+ "call.mute": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
477
+ "call.camera": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "ios", "android"] },
478
+ "call.camera_switch": { screen: "CALL", kind: "button", actions: ["tap"], values: null, platforms: ["ios"] },
479
+ "call.speaker": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["ios", "android"] },
480
+ "call.screen_share": { screen: "CALL", kind: "toggle", actions: ["toggle"], values: ["on", "off"], platforms: ["web", "android"] },
481
+ "call.screen_share_respond": { screen: "CALL", kind: "dialog_button", actions: ["tap", "dismiss"], values: ["accept", "decline"], platforms: ["web", "android"] },
460
482
  "chat.media_open": { screen: "CHAT", kind: "gesture", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
461
483
  "chat.audio_play": { screen: "CHAT", kind: "toggle", actions: ["toggle"], values: ["play", "pause"], platforms: ["web", "ios", "android"] },
462
484
  "chat.file_open": { screen: "CHAT", kind: "list_item", actions: ["tap"], values: null, platforms: ["web", "ios", "android"] },
@@ -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);
@@ -22,17 +22,137 @@ export type Scalars = {
22
22
  input: number;
23
23
  output: number;
24
24
  };
25
+ AWSJSON: {
26
+ input: unknown;
27
+ output: unknown;
28
+ };
25
29
  AWSTimestamp: {
26
30
  input: unknown;
27
31
  output: unknown;
28
32
  };
29
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
+ }
30
136
  export type DeletedMessage = {
31
137
  __typename?: 'DeletedMessage';
32
138
  matchId: Scalars['ID']['output'];
33
139
  messageId: Scalars['ID']['output'];
34
140
  timestamp: Scalars['AWSTimestamp']['output'];
35
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
+ };
36
156
  export type KeyRecoverySession = {
37
157
  __typename?: 'KeyRecoverySession';
38
158
  challenge: Scalars['String']['output'];
@@ -58,14 +178,34 @@ export declare enum KeyRecoveryStatus {
58
178
  export type Message = {
59
179
  __typename?: 'Message';
60
180
  ciphertext: Scalars['String']['output'];
181
+ contentType?: Maybe<MessageContentType>;
61
182
  deliveredAt?: Maybe<Scalars['AWSTimestamp']['output']>;
62
183
  matchId: Scalars['ID']['output'];
63
184
  messageId: Scalars['ID']['output'];
185
+ reactions?: Maybe<Scalars['AWSJSON']['output']>;
64
186
  readAt?: Maybe<Scalars['AWSTimestamp']['output']>;
187
+ replyToMessageId?: Maybe<Scalars['ID']['output']>;
188
+ replyToTimestamp?: Maybe<Scalars['AWSTimestamp']['output']>;
65
189
  senderId: Scalars['String']['output'];
66
190
  status: MessageStatus;
67
191
  timestamp: Scalars['AWSTimestamp']['output'];
68
192
  };
193
+ export declare enum MessageContentType {
194
+ File = "FILE",
195
+ Gif = "GIF",
196
+ Image = "IMAGE",
197
+ Sticker = "STICKER",
198
+ Text = "TEXT",
199
+ Voice = "VOICE"
200
+ }
201
+ export type MessageReaction = {
202
+ __typename?: 'MessageReaction';
203
+ matchId: Scalars['ID']['output'];
204
+ messageId: Scalars['ID']['output'];
205
+ reaction?: Maybe<Scalars['String']['output']>;
206
+ timestamp: Scalars['AWSTimestamp']['output'];
207
+ userId: Scalars['String']['output'];
208
+ };
69
209
  export type MessageReceipt = {
70
210
  __typename?: 'MessageReceipt';
71
211
  messageId: Scalars['ID']['output'];
@@ -81,18 +221,44 @@ export declare enum MessageStatus {
81
221
  }
82
222
  export type Mutation = {
83
223
  __typename?: 'Mutation';
224
+ acceptCall?: Maybe<Call>;
225
+ declineCall?: Maybe<Call>;
84
226
  deleteMessage?: Maybe<DeletedMessage>;
227
+ endCall?: Maybe<Call>;
228
+ heartbeatCall?: Maybe<Call>;
85
229
  markAsDelivered?: Maybe<MessageReceipt>;
86
230
  markAsRead?: Maybe<MessageReceipt>;
231
+ notifyScreenshot?: Maybe<ScreenshotEvent>;
232
+ publishCallEvent?: Maybe<CallEvent>;
87
233
  publishNotification?: Maybe<Notification>;
234
+ reactToMessage?: Maybe<MessageReaction>;
235
+ relayCallSignal?: Maybe<CallEvent>;
88
236
  requestKeyRecovery?: Maybe<KeyRecoverySession>;
89
237
  sendMessage?: Maybe<Message>;
238
+ sendTypingIndicator?: Maybe<TypingIndicator>;
239
+ startCall?: Maybe<Call>;
90
240
  updateKeyRecovery?: Maybe<KeyRecoverySession>;
241
+ updatePresence?: Maybe<PresenceUpdate>;
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'];
91
250
  };
92
251
  export type MutationDeleteMessageArgs = {
93
252
  matchId: Scalars['ID']['input'];
94
253
  timestamp: Scalars['AWSTimestamp']['input'];
95
254
  };
255
+ export type MutationEndCallArgs = {
256
+ callId: Scalars['ID']['input'];
257
+ reason: CallEndReason;
258
+ };
259
+ export type MutationHeartbeatCallArgs = {
260
+ callId: Scalars['ID']['input'];
261
+ };
96
262
  export type MutationMarkAsDeliveredArgs = {
97
263
  matchId: Scalars['ID']['input'];
98
264
  messageId: Scalars['ID']['input'];
@@ -105,6 +271,20 @@ export type MutationMarkAsReadArgs = {
105
271
  timestamp: Scalars['AWSTimestamp']['input'];
106
272
  userId: Scalars['String']['input'];
107
273
  };
274
+ export type MutationNotifyScreenshotArgs = {
275
+ matchId: Scalars['ID']['input'];
276
+ userId: Scalars['String']['input'];
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
+ };
108
288
  export type MutationPublishNotificationArgs = {
109
289
  body: Scalars['String']['input'];
110
290
  id?: InputMaybe<Scalars['ID']['input']>;
@@ -113,6 +293,21 @@ export type MutationPublishNotificationArgs = {
113
293
  title: Scalars['String']['input'];
114
294
  userId: Scalars['ID']['input'];
115
295
  };
296
+ export type MutationReactToMessageArgs = {
297
+ matchId: Scalars['ID']['input'];
298
+ messageId: Scalars['ID']['input'];
299
+ reaction?: InputMaybe<Scalars['String']['input']>;
300
+ timestamp: Scalars['AWSTimestamp']['input'];
301
+ userId: Scalars['String']['input'];
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
+ };
116
311
  export type MutationRequestKeyRecoveryArgs = {
117
312
  challenge: Scalars['String']['input'];
118
313
  sourceDeviceId: Scalars['ID']['input'];
@@ -121,15 +316,35 @@ export type MutationRequestKeyRecoveryArgs = {
121
316
  };
122
317
  export type MutationSendMessageArgs = {
123
318
  ciphertext: Scalars['String']['input'];
319
+ contentType?: InputMaybe<MessageContentType>;
320
+ expireSeconds?: InputMaybe<Scalars['Int']['input']>;
124
321
  matchId: Scalars['ID']['input'];
322
+ replyToMessageId?: InputMaybe<Scalars['ID']['input']>;
323
+ replyToTimestamp?: InputMaybe<Scalars['AWSTimestamp']['input']>;
125
324
  senderId: Scalars['String']['input'];
126
325
  };
326
+ export type MutationSendTypingIndicatorArgs = {
327
+ isTyping: Scalars['Boolean']['input'];
328
+ matchId: Scalars['ID']['input'];
329
+ userId: Scalars['String']['input'];
330
+ };
331
+ export type MutationStartCallArgs = {
332
+ fromDeviceId: Scalars['ID']['input'];
333
+ matchId: Scalars['ID']['input'];
334
+ media: CallMedia;
335
+ offerCiphertext: Scalars['String']['input'];
336
+ };
127
337
  export type MutationUpdateKeyRecoveryArgs = {
128
338
  sessionId: Scalars['ID']['input'];
129
339
  sourceDeviceId: Scalars['ID']['input'];
130
340
  status: KeyRecoveryStatus;
131
341
  targetDeviceId: Scalars['ID']['input'];
132
342
  };
343
+ export type MutationUpdatePresenceArgs = {
344
+ matchId: Scalars['ID']['input'];
345
+ state: PresenceState;
346
+ userId: Scalars['String']['input'];
347
+ };
133
348
  export type Notification = {
134
349
  __typename?: 'Notification';
135
350
  /** Server-authored copy. Never message content (the backend cannot read it). */
@@ -147,17 +362,50 @@ export type Notification = {
147
362
  export declare enum NotificationKind {
148
363
  /** An established conversation went quiet and the user owes a reply (re-engagement nudge). */
149
364
  ConversationCooling = "CONVERSATION_COOLING",
365
+ /** A call to this user was not answered (or they were already on another call). */
366
+ MissedCall = "MISSED_CALL",
150
367
  /** Both people liked each other and State created the hook. */
151
368
  MutualMatch = "MUTUAL_MATCH",
152
369
  /** Someone liked this user. Does NOT reveal whether the like was reciprocated. */
153
370
  ProfileLiked = "PROFILE_LIKED"
154
371
  }
372
+ export declare enum PresenceState {
373
+ Offline = "OFFLINE",
374
+ Online = "ONLINE"
375
+ }
376
+ export type PresenceUpdate = {
377
+ __typename?: 'PresenceUpdate';
378
+ lastActiveAt: Scalars['AWSTimestamp']['output'];
379
+ matchId: Scalars['ID']['output'];
380
+ state: PresenceState;
381
+ userId: Scalars['String']['output'];
382
+ };
155
383
  export type Query = {
156
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>;
157
390
  getKeyRecoveryRequests?: Maybe<Array<Maybe<KeyRecoverySession>>>;
158
391
  getKeyRecoverySession?: Maybe<KeyRecoverySession>;
159
392
  getMessages?: Maybe<Array<Maybe<Message>>>;
160
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
+ };
161
409
  export type QueryGetKeyRecoveryRequestsArgs = {
162
410
  sourceDeviceId: Scalars['ID']['input'];
163
411
  };
@@ -169,14 +417,28 @@ export type QueryGetMessagesArgs = {
169
417
  after?: InputMaybe<Scalars['AWSTimestamp']['input']>;
170
418
  matchId: Scalars['ID']['input'];
171
419
  };
420
+ export type ScreenshotEvent = {
421
+ __typename?: 'ScreenshotEvent';
422
+ matchId: Scalars['ID']['output'];
423
+ timestamp: Scalars['AWSTimestamp']['output'];
424
+ userId: Scalars['String']['output'];
425
+ };
172
426
  export type Subscription = {
173
427
  __typename?: 'Subscription';
428
+ onCallEvent?: Maybe<CallEvent>;
174
429
  onKeyRecoveryRequested?: Maybe<KeyRecoverySession>;
175
430
  onKeyRecoveryUpdated?: Maybe<KeyRecoverySession>;
176
431
  onMessageDeleted?: Maybe<DeletedMessage>;
432
+ onMessageReaction?: Maybe<MessageReaction>;
177
433
  onMessageStatusUpdate?: Maybe<MessageReceipt>;
178
434
  onNewMessage?: Maybe<Message>;
179
435
  onNotification?: Maybe<Notification>;
436
+ onPresenceUpdate?: Maybe<PresenceUpdate>;
437
+ onScreenshotTaken?: Maybe<ScreenshotEvent>;
438
+ onTypingIndicator?: Maybe<TypingIndicator>;
439
+ };
440
+ export type SubscriptionOnCallEventArgs = {
441
+ userId: Scalars['ID']['input'];
180
442
  };
181
443
  export type SubscriptionOnKeyRecoveryRequestedArgs = {
182
444
  sourceDeviceId: Scalars['ID']['input'];
@@ -189,6 +451,9 @@ export type SubscriptionOnKeyRecoveryUpdatedArgs = {
189
451
  export type SubscriptionOnMessageDeletedArgs = {
190
452
  matchId: Scalars['ID']['input'];
191
453
  };
454
+ export type SubscriptionOnMessageReactionArgs = {
455
+ matchId: Scalars['ID']['input'];
456
+ };
192
457
  export type SubscriptionOnMessageStatusUpdateArgs = {
193
458
  matchId: Scalars['ID']['input'];
194
459
  };
@@ -198,3 +463,19 @@ export type SubscriptionOnNewMessageArgs = {
198
463
  export type SubscriptionOnNotificationArgs = {
199
464
  userId: Scalars['ID']['input'];
200
465
  };
466
+ export type SubscriptionOnPresenceUpdateArgs = {
467
+ matchId: Scalars['ID']['input'];
468
+ };
469
+ export type SubscriptionOnScreenshotTakenArgs = {
470
+ matchId: Scalars['ID']['input'];
471
+ };
472
+ export type SubscriptionOnTypingIndicatorArgs = {
473
+ matchId: Scalars['ID']['input'];
474
+ };
475
+ export type TypingIndicator = {
476
+ __typename?: 'TypingIndicator';
477
+ isTyping: Scalars['Boolean']['output'];
478
+ matchId: Scalars['ID']['output'];
479
+ timestamp: Scalars['AWSTimestamp']['output'];
480
+ userId: Scalars['String']['output'];
481
+ };
@@ -494,6 +494,18 @@ export interface RegisterDeviceResponse {
494
494
  */
495
495
  ownsAccountHistoryKey: boolean | undefined;
496
496
  }
497
+ /**
498
+ * @public
499
+ * @enum
500
+ */
501
+ export declare const PushTokenKind: {
502
+ readonly ALERT: "ALERT";
503
+ readonly VOIP: "VOIP";
504
+ };
505
+ /**
506
+ * @public
507
+ */
508
+ export type PushTokenKind = typeof PushTokenKind[keyof typeof PushTokenKind];
497
509
  /**
498
510
  * @public
499
511
  */
@@ -514,6 +526,13 @@ export interface RegisterPushTokenRequest {
514
526
  * @public
515
527
  */
516
528
  platform: Platform | undefined;
529
+ /**
530
+ * `ALERT` (default): an ordinary APNs/FCM token for notifications. `VOIP`: an iOS PushKit token,
531
+ * used ONLY to ring incoming calls and stored separately (`VOIP#<deviceId>`), because iOS kills an
532
+ * app that receives a VoIP push it does not report to CallKit. `VOIP` requires `platform: IOS`.
533
+ * @public
534
+ */
535
+ kind?: PushTokenKind | undefined;
517
536
  }
518
537
  /**
519
538
  * @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 = "47d859d40ce38e04";
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,16 @@ 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";
281
293
  readonly CHAT_MEDIA_OPEN: "chat.media_open";
282
294
  readonly CHAT_AUDIO_PLAY: "chat.audio_play";
283
295
  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.23",
4
+ "version": "1.0.25",
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 0d559e383b1ff24b9304a97577d805ea5c1d9b7d8ded8aa7ace664f0c3a25e86
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 47d859d40ce38e04.
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 = "47d859d40ce38e04"
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,18 @@ 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.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.ANDROID)),
335
346
  CHAT_MEDIA_OPEN("chat.media_open", TelemetryScreen.CHAT, UiElementKind.GESTURE, listOf(UiAction.TAP), null, listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
336
347
  CHAT_AUDIO_PLAY("chat.audio_play", TelemetryScreen.CHAT, UiElementKind.TOGGLE, listOf(UiAction.TOGGLE), listOf("play", "pause"), listOf(TelemetryPlatform.WEB, TelemetryPlatform.IOS, TelemetryPlatform.ANDROID)),
337
348
  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 0dc9e6db2083f5384054fd3557fb379b96b2dbed4de4a4873cc32f27f1a1c483
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 47d859d40ce38e04.
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 = "47d859d40ce38e04"
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,16 @@ 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"
285
296
  case chatMediaOpen = "chat.media_open"
286
297
  case chatAudioPlay = "chat.audio_play"
287
298
  case chatFileOpen = "chat.file_open"
@@ -493,8 +504,18 @@ public enum UiElement: String, CaseIterable, Codable, Sendable {
493
504
  case .chatWallpaperOpen: return UiElementSpec(screen: .chat, kind: .menuItem, actions: [.tap, .dismiss], allowedValues: nil, platforms: [.web])
494
505
  case .chatAddHookOpen: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap, .dismiss], allowedValues: nil, platforms: [.web, .ios])
495
506
  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])
507
+ case .chatCall: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
508
+ case .chatVideoCall: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
509
+ case .chatCallHistoryOpen: return UiElementSpec(screen: .chat, kind: .button, actions: [.tap, .dismiss], allowedValues: nil, platforms: [.ios])
510
+ case .callAccept: return UiElementSpec(screen: .call, kind: .button, actions: [.tap], allowedValues: ["audio", "video"], platforms: [.web, .ios, .android])
511
+ case .callDecline: return UiElementSpec(screen: .call, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
512
+ case .callEnd: return UiElementSpec(screen: .call, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
513
+ case .callMute: return UiElementSpec(screen: .call, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.web, .ios, .android])
514
+ case .callCamera: return UiElementSpec(screen: .call, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.web, .ios, .android])
515
+ case .callCameraSwitch: return UiElementSpec(screen: .call, kind: .button, actions: [.tap], allowedValues: nil, platforms: [.ios])
516
+ case .callSpeaker: return UiElementSpec(screen: .call, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.ios, .android])
517
+ case .callScreenShare: return UiElementSpec(screen: .call, kind: .toggle, actions: [.toggle], allowedValues: ["on", "off"], platforms: [.web, .android])
518
+ case .callScreenShareRespond: return UiElementSpec(screen: .call, kind: .dialogButton, actions: [.tap, .dismiss], allowedValues: ["accept", "decline"], platforms: [.web, .android])
498
519
  case .chatMediaOpen: return UiElementSpec(screen: .chat, kind: .gesture, actions: [.tap], allowedValues: nil, platforms: [.web, .ios, .android])
499
520
  case .chatAudioPlay: return UiElementSpec(screen: .chat, kind: .toggle, actions: [.toggle], allowedValues: ["play", "pause"], platforms: [.web, .ios, .android])
500
521
  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,176 @@
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,
1797
1821
  "platforms": [
1798
1822
  "ios"
1799
1823
  ],
1800
1824
  "deprecated": null
1801
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,
1918
+ "platforms": [
1919
+ "ios"
1920
+ ],
1921
+ "deprecated": null
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
+ "android"
1954
+ ],
1955
+ "deprecated": null
1956
+ },
1957
+ "call.screen_share_respond": {
1958
+ "screen": "CALL",
1959
+ "kind": "dialog_button",
1960
+ "description": "Respond to the other person's request to share their screen.",
1961
+ "actions": [
1962
+ "tap",
1963
+ "dismiss"
1964
+ ],
1965
+ "values": [
1966
+ "accept",
1967
+ "decline"
1968
+ ],
1969
+ "platforms": [
1970
+ "web",
1971
+ "android"
1972
+ ],
1973
+ "deprecated": null
1974
+ },
1802
1975
  "chat.media_open": {
1803
1976
  "screen": "CHAT",
1804
1977
  "kind": "gesture",
@@ -3483,7 +3656,9 @@
3483
3656
  },
3484
3657
  "platformGaps": {
3485
3658
  "web": {
3486
- "chat.call": "Not built on Web: no in-app voice calling.",
3659
+ "call.camera_switch": "Web has no camera-switch control: the in-call UI uses the browser-selected camera and offers no front/back toggle.",
3660
+ "call.speaker": "Web has no speaker routing: the browser owns audio output.",
3661
+ "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
3662
  "chat.capture_option": "No in-app camera capture on Web; attachments use the OS file picker.",
3488
3663
  "chat.intro_dismiss": "Not built on Web: there is no in-chat intro tour / stories invitation.",
3489
3664
  "chat.intro_get_started": "Not built on Web: there is no in-chat intro tour / stories invitation.",
@@ -3494,7 +3669,6 @@
3494
3669
  "chat.profile_close": "Web toggles the peer profile panel with a single control (chat.profile_open); there is no separate close button.",
3495
3670
  "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
3671
  "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
3672
  "chat.voice_record_stop": "Web combines stop and send into one control (chat.voice_send); there is no separate stop.",
3499
3673
  "chat_settings.clear_cache": "No clear-cache control in the Web chat settings sheet; the browser manages its own storage.",
3500
3674
  "chat_settings.export_chat": "Not built on Web: no chat-export control in the settings sheet.",
@@ -3550,6 +3724,8 @@
3550
3724
  "settings.verify_code_submit": "Web verifies a new email inline via settings.email_manage; there is no separate verify-code control, and phone updates are not offered (settings.phone_update is gapped)."
3551
3725
  },
3552
3726
  "ios": {
3727
+ "call.screen_share": "iOS 1:1 calls have no in-call screen-sharing control; the call UI exposes only mute / camera / flip / speaker / end (screen-share is unbuilt — see the TODO(screen-share) markers in Core/Calls).",
3728
+ "call.screen_share_respond": "iOS has no screen-sharing feature, so there is no incoming screen-share request dialog to accept or decline.",
3553
3729
  "chat.capture_option": "iOS captures via the system UIImagePickerController camera; photo vs video is chosen in the system camera UI, not an app control.",
3554
3730
  "chat.history_reset_confirm": "iOS message-history recovery has no last-resort reset flow; recovery is via a source device + QR (chat.history_recover / chat.history_recover_method / chat.history_recover_step), so there is no reset to confirm.",
3555
3731
  "chat.mr_onehook_close": "No explicit leave-Mr-OneHook control on iOS; the user switches away via the conversation switcher (chat.conversation_switch).",
@@ -3595,8 +3771,9 @@
3595
3771
  "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
3772
  },
3597
3773
  "android": {
3774
+ "call.camera_switch": "Not built on Android: the in-call screen has no front/back camera-switch control.",
3598
3775
  "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.",
3776
+ "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
3777
  "chat.conversation_sort": "Not built on Android: the conversation list has no sort control.",
3601
3778
  "chat.conversation_sort_open": "Not built on Android: the conversation list has no sort control/menu to open.",
3602
3779
  "chat.conversation_switcher_open": "Not built on Android: conversations are cycled with a next button, with no switcher/picker.",
@@ -3608,7 +3785,6 @@
3608
3785
  "chat.mr_onehook_scope_select": "Not built on Android: Mr OneHook auto-scopes to the open match, with no scope picker.",
3609
3786
  "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
3787
  "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
3788
  "chat.voice_send": "Not built on Android: a recorded voice note is sent automatically on stop, with no separate send button.",
3613
3789
  "chat.wallpaper_open": "Not built on Android: no change-chat-wallpaper option.",
3614
3790
  "chat_settings.clear_cache": "Not built on Android: no per-user chat settings screen, so no clear-media-cache control.",
@@ -4133,5 +4309,5 @@
4133
4309
  }
4134
4310
  }
4135
4311
  },
4136
- "hash": "25955dd2f9856888"
4312
+ "hash": "47d859d40ce38e04"
4137
4313
  }