@vibes.diy/api-types 14.3.142 → 14.3.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app.d.ts CHANGED
@@ -628,37 +628,18 @@ export declare const resGetApplicationChat: import("arktype/internal/variants/ob
628
628
  seq: number;
629
629
  blockNr: number;
630
630
  timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
631
- type: "block.stats";
632
- stats: {
633
- toplevel: {
634
- lines: number;
635
- bytes: number;
636
- cnt?: number | undefined;
637
- };
638
- code: {
639
- lines: number;
640
- bytes: number;
641
- cnt?: number | undefined;
642
- };
643
- image: {
644
- lines: number;
645
- bytes: number;
646
- cnt?: number | undefined;
647
- };
648
- total: {
649
- lines: number;
650
- bytes: number;
651
- cnt?: number | undefined;
652
- };
653
- };
654
- usage: {
655
- prompt_tokens: number;
656
- completion_tokens: number;
657
- total_tokens: number;
658
- model?: string | undefined;
659
- role?: "agent" | "codegen" | "frontendDraft" | "img" | "mercury" | "research" | "runtime" | "shell" | undefined;
660
- reasoningEffort?: string | undefined;
661
- };
631
+ type: "block.toplevel.begin";
632
+ sectionId: string;
633
+ } | {
634
+ blockId: string;
635
+ streamId: string;
636
+ seq: number;
637
+ blockNr: number;
638
+ timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
639
+ lineNr: number;
640
+ line: string;
641
+ type: "block.toplevel.line";
642
+ sectionId: string;
662
643
  } | {
663
644
  blockId: string;
664
645
  streamId: string;
@@ -670,14 +651,8 @@ export declare const resGetApplicationChat: import("arktype/internal/variants/ob
670
651
  bytes: number;
671
652
  cnt?: number | undefined;
672
653
  };
673
- type: "block.image";
654
+ type: "block.toplevel.end";
674
655
  sectionId: string;
675
- url?: string | undefined;
676
- uploadId?: string | undefined;
677
- cid?: string | undefined;
678
- mimeType?: string | undefined;
679
- size?: number | undefined;
680
- docWritten?: boolean | undefined;
681
656
  } | {
682
657
  blockId: string;
683
658
  streamId: string;
@@ -735,31 +710,56 @@ export declare const resGetApplicationChat: import("arktype/internal/variants/ob
735
710
  seq: number;
736
711
  blockNr: number;
737
712
  timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
738
- type: "block.toplevel.begin";
739
- sectionId: string;
740
- } | {
741
- blockId: string;
742
- streamId: string;
743
- seq: number;
744
- blockNr: number;
745
- timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
746
- lineNr: number;
747
- line: string;
748
- type: "block.toplevel.line";
713
+ stats: {
714
+ lines: number;
715
+ bytes: number;
716
+ cnt?: number | undefined;
717
+ };
718
+ type: "block.image";
749
719
  sectionId: string;
720
+ url?: string | undefined;
721
+ uploadId?: string | undefined;
722
+ cid?: string | undefined;
723
+ mimeType?: string | undefined;
724
+ size?: number | undefined;
725
+ docWritten?: boolean | undefined;
750
726
  } | {
751
727
  blockId: string;
752
728
  streamId: string;
753
729
  seq: number;
754
730
  blockNr: number;
755
731
  timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
732
+ type: "block.stats";
756
733
  stats: {
757
- lines: number;
758
- bytes: number;
759
- cnt?: number | undefined;
734
+ toplevel: {
735
+ lines: number;
736
+ bytes: number;
737
+ cnt?: number | undefined;
738
+ };
739
+ code: {
740
+ lines: number;
741
+ bytes: number;
742
+ cnt?: number | undefined;
743
+ };
744
+ image: {
745
+ lines: number;
746
+ bytes: number;
747
+ cnt?: number | undefined;
748
+ };
749
+ total: {
750
+ lines: number;
751
+ bytes: number;
752
+ cnt?: number | undefined;
753
+ };
754
+ };
755
+ usage: {
756
+ prompt_tokens: number;
757
+ completion_tokens: number;
758
+ total_tokens: number;
759
+ model?: string | undefined;
760
+ role?: "agent" | "codegen" | "frontendDraft" | "img" | "mercury" | "research" | "runtime" | "shell" | undefined;
761
+ reasoningEffort?: string | undefined;
760
762
  };
761
- type: "block.toplevel.end";
762
- sectionId: string;
763
763
  } | {
764
764
  streamId: string;
765
765
  chatId: string;
@@ -1134,6 +1134,7 @@ export declare const resGetApplicationChat: import("arktype/internal/variants/ob
1134
1134
  font?: string | undefined;
1135
1135
  archetype?: string | undefined;
1136
1136
  msFromTurnStart: number;
1137
+ alt?: number | undefined;
1137
1138
  } | {
1138
1139
  streamId: string;
1139
1140
  chatId: string;
package/cf-env.d.ts CHANGED
@@ -61,6 +61,7 @@ export interface CFEnv {
61
61
  EGRESS_OPTIMISTIC_READ?: string;
62
62
  SAVE_IMPORT_SYNTH?: string;
63
63
  VIBES_DO_PROBES?: string;
64
+ FIRST_LOOK_ROTATE?: string;
64
65
  BACKEND_INTERNAL_SECRET?: string;
65
66
  EMAIL_UNSUBSCRIBE_SECRET?: string;
66
67
  VIBES_ROOT_SWR?: string;
package/chat.d.ts CHANGED
@@ -2938,6 +2938,7 @@ export declare const PromptAndBlockMsgs: import("arktype/internal/variants/objec
2938
2938
  font?: string | undefined;
2939
2939
  archetype?: string | undefined;
2940
2940
  msFromTurnStart: number;
2941
+ alt?: number | undefined;
2941
2942
  } | {
2942
2943
  streamId: string;
2943
2944
  chatId: string;
@@ -3651,6 +3652,7 @@ export declare const sectionEvent: import("arktype/internal/variants/object.ts")
3651
3652
  font?: string | undefined;
3652
3653
  archetype?: string | undefined;
3653
3654
  msFromTurnStart: number;
3655
+ alt?: number | undefined;
3654
3656
  } | {
3655
3657
  streamId: string;
3656
3658
  chatId: string;
@@ -4385,6 +4387,7 @@ export declare const resChatResponseSection: import("arktype/internal/variants/o
4385
4387
  font?: string | undefined;
4386
4388
  archetype?: string | undefined;
4387
4389
  msFromTurnStart: number;
4390
+ alt?: number | undefined;
4388
4391
  } | {
4389
4392
  streamId: string;
4390
4393
  chatId: string;
@@ -5122,6 +5125,7 @@ export declare const resChatResponseTurn: import("arktype/internal/variants/obje
5122
5125
  font?: string | undefined;
5123
5126
  archetype?: string | undefined;
5124
5127
  msFromTurnStart: number;
5128
+ alt?: number | undefined;
5125
5129
  } | {
5126
5130
  streamId: string;
5127
5131
  chatId: string;
@@ -5871,6 +5875,7 @@ export declare const resGetChatResponse: import("arktype/internal/variants/objec
5871
5875
  font?: string | undefined;
5872
5876
  archetype?: string | undefined;
5873
5877
  msFromTurnStart: number;
5878
+ alt?: number | undefined;
5874
5879
  } | {
5875
5880
  streamId: string;
5876
5881
  chatId: string;
package/invite.d.ts CHANGED
@@ -925,115 +925,6 @@ export declare const ActiveSeedControl: import("arktype/internal/variants/object
925
925
  export type ActiveSeedControl = typeof ActiveSeedControl.infer;
926
926
  export declare function isActiveSeedControl(obj: unknown): obj is ActiveSeedControl;
927
927
  export declare const ActiveEntry: import("arktype/internal/variants/object.ts").ObjectType<{
928
- type: "active.style";
929
- palette?: {
930
- hues: [number, ({
931
- mode: "derived";
932
- } | {
933
- mode: "pinned";
934
- h: number;
935
- } | undefined)?, ({
936
- mode: "derived";
937
- } | {
938
- mode: "pinned";
939
- h: number;
940
- } | undefined)?];
941
- character: {
942
- chroma: number;
943
- contrast: number;
944
- neutralTint: number;
945
- surfaceLift: number;
946
- fillLevel: number;
947
- scheme: "analogous" | "complementary" | "split-complementary" | "triadic";
948
- paper?: number | undefined;
949
- fillLift?: number | undefined;
950
- };
951
- pouf?: {
952
- lead: number;
953
- up?: number | undefined;
954
- down?: number | undefined;
955
- gap?: number | undefined;
956
- locked?: "home" | undefined;
957
- } | undefined;
958
- } | undefined;
959
- font?: string | undefined;
960
- ornament?: {
961
- pad: {
962
- x: number;
963
- y: number;
964
- };
965
- pins?: {
966
- spacing?: string | undefined;
967
- "font-size-base"?: string | undefined;
968
- radius?: string | undefined;
969
- "radius-sm"?: string | undefined;
970
- "radius-lg"?: string | undefined;
971
- "border-width"?: string | undefined;
972
- shadow?: string | undefined;
973
- "shadow-sm"?: string | undefined;
974
- "shadow-lg"?: string | undefined;
975
- "letter-spacing"?: string | undefined;
976
- "letter-spacing-wide"?: string | undefined;
977
- "font-weight"?: string | undefined;
978
- "text-transform"?: string | undefined;
979
- } | undefined;
980
- } | undefined;
981
- stylePinned?: boolean | undefined;
982
- } | {
983
- type: "draft.style";
984
- palette?: {
985
- hues: [number, ({
986
- mode: "derived";
987
- } | {
988
- mode: "pinned";
989
- h: number;
990
- } | undefined)?, ({
991
- mode: "derived";
992
- } | {
993
- mode: "pinned";
994
- h: number;
995
- } | undefined)?];
996
- character: {
997
- chroma: number;
998
- contrast: number;
999
- neutralTint: number;
1000
- surfaceLift: number;
1001
- fillLevel: number;
1002
- scheme: "analogous" | "complementary" | "split-complementary" | "triadic";
1003
- paper?: number | undefined;
1004
- fillLift?: number | undefined;
1005
- };
1006
- pouf?: {
1007
- lead: number;
1008
- up?: number | undefined;
1009
- down?: number | undefined;
1010
- gap?: number | undefined;
1011
- locked?: "home" | undefined;
1012
- } | undefined;
1013
- } | undefined;
1014
- font?: string | undefined;
1015
- ornament?: {
1016
- pad: {
1017
- x: number;
1018
- y: number;
1019
- };
1020
- pins?: {
1021
- spacing?: string | undefined;
1022
- "font-size-base"?: string | undefined;
1023
- radius?: string | undefined;
1024
- "radius-sm"?: string | undefined;
1025
- "radius-lg"?: string | undefined;
1026
- "border-width"?: string | undefined;
1027
- shadow?: string | undefined;
1028
- "shadow-sm"?: string | undefined;
1029
- "shadow-lg"?: string | undefined;
1030
- "letter-spacing"?: string | undefined;
1031
- "letter-spacing-wide"?: string | undefined;
1032
- "font-weight"?: string | undefined;
1033
- "text-transform"?: string | undefined;
1034
- } | undefined;
1035
- } | undefined;
1036
- } | {
1037
928
  type: "active.db-acl";
1038
929
  dbName: string;
1039
930
  acl: {
@@ -1341,6 +1232,115 @@ export declare const ActiveEntry: import("arktype/internal/variants/object.ts").
1341
1232
  type: "active.seed-control";
1342
1233
  dontRun?: boolean | undefined;
1343
1234
  suppressed?: string[] | undefined;
1235
+ } | {
1236
+ type: "active.style";
1237
+ palette?: {
1238
+ hues: [number, ({
1239
+ mode: "derived";
1240
+ } | {
1241
+ mode: "pinned";
1242
+ h: number;
1243
+ } | undefined)?, ({
1244
+ mode: "derived";
1245
+ } | {
1246
+ mode: "pinned";
1247
+ h: number;
1248
+ } | undefined)?];
1249
+ character: {
1250
+ chroma: number;
1251
+ contrast: number;
1252
+ neutralTint: number;
1253
+ surfaceLift: number;
1254
+ fillLevel: number;
1255
+ scheme: "analogous" | "complementary" | "split-complementary" | "triadic";
1256
+ paper?: number | undefined;
1257
+ fillLift?: number | undefined;
1258
+ };
1259
+ pouf?: {
1260
+ lead: number;
1261
+ up?: number | undefined;
1262
+ down?: number | undefined;
1263
+ gap?: number | undefined;
1264
+ locked?: "home" | undefined;
1265
+ } | undefined;
1266
+ } | undefined;
1267
+ font?: string | undefined;
1268
+ ornament?: {
1269
+ pad: {
1270
+ x: number;
1271
+ y: number;
1272
+ };
1273
+ pins?: {
1274
+ spacing?: string | undefined;
1275
+ "font-size-base"?: string | undefined;
1276
+ radius?: string | undefined;
1277
+ "radius-sm"?: string | undefined;
1278
+ "radius-lg"?: string | undefined;
1279
+ "border-width"?: string | undefined;
1280
+ shadow?: string | undefined;
1281
+ "shadow-sm"?: string | undefined;
1282
+ "shadow-lg"?: string | undefined;
1283
+ "letter-spacing"?: string | undefined;
1284
+ "letter-spacing-wide"?: string | undefined;
1285
+ "font-weight"?: string | undefined;
1286
+ "text-transform"?: string | undefined;
1287
+ } | undefined;
1288
+ } | undefined;
1289
+ stylePinned?: boolean | undefined;
1290
+ } | {
1291
+ type: "draft.style";
1292
+ palette?: {
1293
+ hues: [number, ({
1294
+ mode: "derived";
1295
+ } | {
1296
+ mode: "pinned";
1297
+ h: number;
1298
+ } | undefined)?, ({
1299
+ mode: "derived";
1300
+ } | {
1301
+ mode: "pinned";
1302
+ h: number;
1303
+ } | undefined)?];
1304
+ character: {
1305
+ chroma: number;
1306
+ contrast: number;
1307
+ neutralTint: number;
1308
+ surfaceLift: number;
1309
+ fillLevel: number;
1310
+ scheme: "analogous" | "complementary" | "split-complementary" | "triadic";
1311
+ paper?: number | undefined;
1312
+ fillLift?: number | undefined;
1313
+ };
1314
+ pouf?: {
1315
+ lead: number;
1316
+ up?: number | undefined;
1317
+ down?: number | undefined;
1318
+ gap?: number | undefined;
1319
+ locked?: "home" | undefined;
1320
+ } | undefined;
1321
+ } | undefined;
1322
+ font?: string | undefined;
1323
+ ornament?: {
1324
+ pad: {
1325
+ x: number;
1326
+ y: number;
1327
+ };
1328
+ pins?: {
1329
+ spacing?: string | undefined;
1330
+ "font-size-base"?: string | undefined;
1331
+ radius?: string | undefined;
1332
+ "radius-sm"?: string | undefined;
1333
+ "radius-lg"?: string | undefined;
1334
+ "border-width"?: string | undefined;
1335
+ shadow?: string | undefined;
1336
+ "shadow-sm"?: string | undefined;
1337
+ "shadow-lg"?: string | undefined;
1338
+ "letter-spacing"?: string | undefined;
1339
+ "letter-spacing-wide"?: string | undefined;
1340
+ "font-weight"?: string | undefined;
1341
+ "text-transform"?: string | undefined;
1342
+ } | undefined;
1343
+ } | undefined;
1344
1344
  } | {
1345
1345
  type: "active.cached-suggestion";
1346
1346
  key: string;
@@ -98,9 +98,150 @@ export declare const evtOwnerDigest: import("arktype/internal/variants/object.ts
98
98
  }, {}>;
99
99
  export type EvtOwnerDigest = typeof evtOwnerDigest.infer;
100
100
  export declare function isEvtOwnerDigest(obj: unknown): obj is EvtOwnerDigest;
101
- export declare const INSTANT_EMAIL_NOTIFICATION_TYPES: readonly ["app-message", "comment-posted", "access-requested", "member-joined", "vibe-remixed"];
102
- export type InstantEmailNotificationType = (typeof INSTANT_EMAIL_NOTIFICATION_TYPES)[number];
101
+ export type NotificationOvalColor = "green" | "red" | "yellow" | "blue" | "neutral";
102
+ export interface NotificationKindChannels {
103
+ readonly instantEmail: boolean;
104
+ readonly digest: number | false;
105
+ readonly push: boolean;
106
+ readonly oval: NotificationOvalColor;
107
+ readonly vibeScoped: boolean;
108
+ }
109
+ export declare const NOTIFICATION_KINDS: {
110
+ readonly "build-complete": {
111
+ readonly instantEmail: false;
112
+ readonly digest: false;
113
+ readonly push: true;
114
+ readonly oval: "green";
115
+ readonly vibeScoped: true;
116
+ };
117
+ readonly "build-failed": {
118
+ readonly instantEmail: false;
119
+ readonly digest: false;
120
+ readonly push: true;
121
+ readonly oval: "red";
122
+ readonly vibeScoped: true;
123
+ };
124
+ readonly "vibe-published": {
125
+ readonly instantEmail: false;
126
+ readonly digest: false;
127
+ readonly push: false;
128
+ readonly oval: "green";
129
+ readonly vibeScoped: true;
130
+ };
131
+ readonly "comment-posted": {
132
+ readonly instantEmail: true;
133
+ readonly digest: 2;
134
+ readonly push: false;
135
+ readonly oval: "blue";
136
+ readonly vibeScoped: true;
137
+ };
138
+ readonly "request-approved": {
139
+ readonly instantEmail: false;
140
+ readonly digest: false;
141
+ readonly push: false;
142
+ readonly oval: "green";
143
+ readonly vibeScoped: true;
144
+ };
145
+ readonly "request-revoked": {
146
+ readonly instantEmail: false;
147
+ readonly digest: false;
148
+ readonly push: false;
149
+ readonly oval: "red";
150
+ readonly vibeScoped: true;
151
+ };
152
+ readonly "vibe-remixed": {
153
+ readonly instantEmail: true;
154
+ readonly digest: 3;
155
+ readonly push: false;
156
+ readonly oval: "blue";
157
+ readonly vibeScoped: true;
158
+ };
159
+ readonly "dm-received": {
160
+ readonly instantEmail: false;
161
+ readonly digest: false;
162
+ readonly push: false;
163
+ readonly oval: "blue";
164
+ readonly vibeScoped: false;
165
+ };
166
+ readonly "member-joined": {
167
+ readonly instantEmail: true;
168
+ readonly digest: 1;
169
+ readonly push: false;
170
+ readonly oval: "green";
171
+ readonly vibeScoped: true;
172
+ };
173
+ readonly "access-requested": {
174
+ readonly instantEmail: true;
175
+ readonly digest: false;
176
+ readonly push: false;
177
+ readonly oval: "green";
178
+ readonly vibeScoped: true;
179
+ };
180
+ readonly "follow-request": {
181
+ readonly instantEmail: false;
182
+ readonly digest: false;
183
+ readonly push: true;
184
+ readonly oval: "yellow";
185
+ readonly vibeScoped: false;
186
+ };
187
+ readonly "follower-added": {
188
+ readonly instantEmail: false;
189
+ readonly digest: 4;
190
+ readonly push: false;
191
+ readonly oval: "green";
192
+ readonly vibeScoped: false;
193
+ };
194
+ readonly "follow-approved": {
195
+ readonly instantEmail: false;
196
+ readonly digest: false;
197
+ readonly push: false;
198
+ readonly oval: "green";
199
+ readonly vibeScoped: false;
200
+ };
201
+ readonly "app-message": {
202
+ readonly instantEmail: true;
203
+ readonly digest: false;
204
+ readonly push: true;
205
+ readonly oval: "blue";
206
+ readonly vibeScoped: true;
207
+ };
208
+ readonly "connection-expiring": {
209
+ readonly instantEmail: false;
210
+ readonly digest: false;
211
+ readonly push: true;
212
+ readonly oval: "neutral";
213
+ readonly vibeScoped: false;
214
+ };
215
+ readonly "asset-blocked": {
216
+ readonly instantEmail: false;
217
+ readonly digest: false;
218
+ readonly push: false;
219
+ readonly oval: "red";
220
+ readonly vibeScoped: true;
221
+ };
222
+ readonly "asset-check-failed": {
223
+ readonly instantEmail: false;
224
+ readonly digest: false;
225
+ readonly push: false;
226
+ readonly oval: "red";
227
+ readonly vibeScoped: true;
228
+ };
229
+ };
230
+ type NotificationKinds = typeof NOTIFICATION_KINDS;
231
+ type KindsWhere<C extends keyof NotificationKindChannels, V> = {
232
+ [K in NotificationType]: NotificationKinds[K][C] extends V ? K : never;
233
+ }[NotificationType];
234
+ export declare const NOTIFICATION_TYPES: readonly NotificationType[];
235
+ export type InstantEmailNotificationType = KindsWhere<"instantEmail", true>;
236
+ export declare const INSTANT_EMAIL_NOTIFICATION_TYPES: readonly InstantEmailNotificationType[];
103
237
  export declare function isInstantEmailNotificationType(t: string): t is InstantEmailNotificationType;
238
+ export type DigestNotificationType = KindsWhere<"digest", number>;
239
+ export declare const DIGEST_NOTIFICATION_TYPES: readonly DigestNotificationType[];
240
+ export type PushNotificationType = KindsWhere<"push", true>;
241
+ export declare const PUSH_NOTIFICATION_TYPES: ReadonlySet<PushNotificationType>;
242
+ export type VibeScopedNotificationType = KindsWhere<"vibeScoped", true>;
243
+ export declare const VIBE_SCOPED_NOTIFICATION_TYPES: ReadonlySet<VibeScopedNotificationType>;
244
+ export declare function notificationOvalColorName(notificationType: string | undefined): NotificationOvalColor;
104
245
  export declare const NOTIFICATION_TYPE_PREF_KEY: {
105
246
  readonly "build-complete": "buildComplete";
106
247
  readonly "build-failed": "buildFailed";
@@ -195,3 +336,4 @@ export interface BuildNotificationCopy {
195
336
  readonly body: string;
196
337
  }
197
338
  export declare function buildNotificationCopy(input: BuildNotificationCopyInput): BuildNotificationCopy;
339
+ export {};
package/notifications.js CHANGED
@@ -138,16 +138,45 @@ export const evtOwnerDigest = lazyType(() => type({
138
138
  export function isEvtOwnerDigest(obj) {
139
139
  return !(evtOwnerDigest(obj) instanceof type.errors);
140
140
  }
141
- export const INSTANT_EMAIL_NOTIFICATION_TYPES = [
142
- "app-message",
143
- "comment-posted",
144
- "access-requested",
145
- "member-joined",
146
- "vibe-remixed",
147
- ];
141
+ export const NOTIFICATION_KINDS = {
142
+ "build-complete": { instantEmail: false, digest: false, push: true, oval: "green", vibeScoped: true },
143
+ "build-failed": { instantEmail: false, digest: false, push: true, oval: "red", vibeScoped: true },
144
+ "vibe-published": { instantEmail: false, digest: false, push: false, oval: "green", vibeScoped: true },
145
+ "comment-posted": { instantEmail: true, digest: 2, push: false, oval: "blue", vibeScoped: true },
146
+ "request-approved": { instantEmail: false, digest: false, push: false, oval: "green", vibeScoped: true },
147
+ "request-revoked": { instantEmail: false, digest: false, push: false, oval: "red", vibeScoped: true },
148
+ "vibe-remixed": { instantEmail: true, digest: 3, push: false, oval: "blue", vibeScoped: true },
149
+ "dm-received": { instantEmail: false, digest: false, push: false, oval: "blue", vibeScoped: false },
150
+ "member-joined": { instantEmail: true, digest: 1, push: false, oval: "green", vibeScoped: true },
151
+ "access-requested": { instantEmail: true, digest: false, push: false, oval: "green", vibeScoped: true },
152
+ "follow-request": { instantEmail: false, digest: false, push: true, oval: "yellow", vibeScoped: false },
153
+ "follower-added": { instantEmail: false, digest: 4, push: false, oval: "green", vibeScoped: false },
154
+ "follow-approved": { instantEmail: false, digest: false, push: false, oval: "green", vibeScoped: false },
155
+ "app-message": { instantEmail: true, digest: false, push: true, oval: "blue", vibeScoped: true },
156
+ "connection-expiring": { instantEmail: false, digest: false, push: true, oval: "neutral", vibeScoped: false },
157
+ "asset-blocked": { instantEmail: false, digest: false, push: false, oval: "red", vibeScoped: true },
158
+ "asset-check-failed": { instantEmail: false, digest: false, push: false, oval: "red", vibeScoped: true },
159
+ };
160
+ export const NOTIFICATION_TYPES = Object.keys(NOTIFICATION_KINDS);
161
+ function kindsWhere(pick) {
162
+ return NOTIFICATION_TYPES.filter((t) => pick(NOTIFICATION_KINDS[t]));
163
+ }
164
+ export const INSTANT_EMAIL_NOTIFICATION_TYPES = kindsWhere((row) => row.instantEmail);
148
165
  export function isInstantEmailNotificationType(t) {
149
166
  return INSTANT_EMAIL_NOTIFICATION_TYPES.includes(t);
150
167
  }
168
+ export const DIGEST_NOTIFICATION_TYPES = [
169
+ ...kindsWhere((row) => row.digest !== false),
170
+ ].sort((a, b) => NOTIFICATION_KINDS[a].digest - NOTIFICATION_KINDS[b].digest);
171
+ export const PUSH_NOTIFICATION_TYPES = new Set(kindsWhere((row) => row.push));
172
+ export const VIBE_SCOPED_NOTIFICATION_TYPES = new Set(kindsWhere((row) => row.vibeScoped));
173
+ export function notificationOvalColorName(notificationType) {
174
+ if (notificationType === undefined)
175
+ return "neutral";
176
+ if (Object.prototype.hasOwnProperty.call(NOTIFICATION_KINDS, notificationType) === false)
177
+ return "neutral";
178
+ return NOTIFICATION_KINDS[notificationType].oval;
179
+ }
151
180
  export const NOTIFICATION_TYPE_PREF_KEY = {
152
181
  "build-complete": "buildComplete",
153
182
  "build-failed": "buildFailed",