@antiphony/shared 0.1.0 → 0.4.0

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.
Files changed (59) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/api-codecs.cjs +90 -787
  3. package/dist/cjs/api-codecs.d.cts +117 -290
  4. package/dist/cjs/index.cjs +102 -947
  5. package/dist/cjs/index.d.cts +89 -7
  6. package/dist/cjs/nsid.cjs +8 -18
  7. package/dist/cjs/nsid.d.cts +8 -17
  8. package/dist/cjs/types/audio.cjs +77 -662
  9. package/dist/cjs/types/audio.d.cts +285 -203
  10. package/dist/cjs/types/blob.cjs +5 -9
  11. package/dist/cjs/types/blob.d.cts +21 -21
  12. package/dist/cjs/types/records.cjs +0 -370
  13. package/dist/cjs/types/records.d.cts +1 -825
  14. package/dist/esm/api-codecs.d.ts +117 -290
  15. package/dist/esm/api-codecs.js +5 -6
  16. package/dist/esm/{chunk-ORMEWXMH.js → chunk-5JBD5THX.js} +1 -16
  17. package/dist/esm/{chunk-F2CANZZ7.js → chunk-BNNLHRH7.js} +1 -1
  18. package/dist/esm/chunk-D655OH2I.js +35 -0
  19. package/dist/esm/chunk-RUUHUNZ6.js +37 -0
  20. package/dist/esm/chunk-SBYNIQRZ.js +23 -0
  21. package/dist/esm/chunk-SMK4OZNU.js +17 -0
  22. package/dist/esm/{chunk-BUNMR4ZO.js → chunk-WL2GSPGC.js} +81 -12
  23. package/dist/esm/errors/index.js +1 -1
  24. package/dist/esm/index.d.ts +89 -7
  25. package/dist/esm/index.js +7 -9
  26. package/dist/esm/nsid.d.ts +8 -17
  27. package/dist/esm/nsid.js +2 -2
  28. package/dist/esm/observability/index.js +2 -2
  29. package/dist/esm/observability/report-error.js +2 -2
  30. package/dist/esm/types/audio.d.ts +285 -203
  31. package/dist/esm/types/audio.js +4 -5
  32. package/dist/esm/types/blob.d.ts +21 -21
  33. package/dist/esm/types/blob.js +2 -2
  34. package/dist/esm/types/records.d.ts +1 -825
  35. package/dist/esm/types/records.js +2 -3
  36. package/dist/esm/utils/index.js +1 -1
  37. package/package.json +90 -26
  38. package/dist/cjs/types/api.cjs +0 -726
  39. package/dist/cjs/types/api.d.cts +0 -494
  40. package/dist/cjs/types/channels.cjs +0 -170
  41. package/dist/cjs/types/channels.d.cts +0 -262
  42. package/dist/cjs/types/storage.cjs +0 -414
  43. package/dist/cjs/types/storage.d.cts +0 -197
  44. package/dist/cjs/types/views.cjs +0 -820
  45. package/dist/cjs/types/views.d.cts +0 -9806
  46. package/dist/esm/chunk-3WZJXJNU.js +0 -378
  47. package/dist/esm/chunk-5EHV73BA.js +0 -20
  48. package/dist/esm/chunk-7V44CPRR.js +0 -132
  49. package/dist/esm/chunk-EA4OONDV.js +0 -380
  50. package/dist/esm/chunk-TIZRJORN.js +0 -24
  51. package/dist/esm/chunk-XDBKR6LW.js +0 -32
  52. package/dist/esm/types/api.d.ts +0 -494
  53. package/dist/esm/types/api.js +0 -5
  54. package/dist/esm/types/channels.d.ts +0 -262
  55. package/dist/esm/types/channels.js +0 -162
  56. package/dist/esm/types/storage.d.ts +0 -197
  57. package/dist/esm/types/storage.js +0 -26
  58. package/dist/esm/types/views.d.ts +0 -9806
  59. package/dist/esm/types/views.js +0 -4
@@ -1,11 +1,10 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  /**
4
- * Create-request codec for the new Antiphony `dev.antiphony.audio.post` model
5
- * (Stream 1, additive does not replace `CreatePromptRequestSchema`). The
6
- * audio is uploaded first (signed-URL flow); the request references it as the
7
- * embed. `reply` presence makes the new post a reply; absence makes it a
8
- * prompt. `originAppId`/`authorId`/`kind` are stamped server-side, not sent.
4
+ * Create-request codec for the canonical Antiphony `dev.antiphony.audio.post`
5
+ * model. The audio is uploaded first (signed-URL flow); the request references
6
+ * it as the embed. `reply` presence makes the new post a reply; absence makes
7
+ * it a prompt. `originAppId`/`authorId`/`kind` are stamped server-side, not sent.
9
8
  */
10
9
  declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
11
10
  /** User-authored text; may be empty for pure-audio posts. */
@@ -17,17 +16,27 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
17
16
  $type: z.ZodLiteral<"dev.antiphony.embed.audio">;
18
17
  audio: z.ZodObject<{
19
18
  $type: z.ZodLiteral<"blob">;
20
- ref: z.ZodString;
19
+ ref: z.ZodObject<{
20
+ $link: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ $link: string;
23
+ }, {
24
+ $link: string;
25
+ }>;
21
26
  mimeType: z.ZodString;
22
27
  size: z.ZodNumber;
23
28
  }, "strip", z.ZodTypeAny, {
24
29
  $type: "blob";
25
- ref: string;
30
+ ref: {
31
+ $link: string;
32
+ };
26
33
  mimeType: string;
27
34
  size: number;
28
35
  }, {
29
36
  $type: "blob";
30
- ref: string;
37
+ ref: {
38
+ $link: string;
39
+ };
31
40
  mimeType: string;
32
41
  size: number;
33
42
  }>;
@@ -38,7 +47,9 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
38
47
  $type: "dev.antiphony.embed.audio";
39
48
  audio: {
40
49
  $type: "blob";
41
- ref: string;
50
+ ref: {
51
+ $link: string;
52
+ };
42
53
  mimeType: string;
43
54
  size: number;
44
55
  };
@@ -49,7 +60,9 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
49
60
  $type: "dev.antiphony.embed.audio";
50
61
  audio: {
51
62
  $type: "blob";
52
- ref: string;
63
+ ref: {
64
+ $link: string;
65
+ };
53
66
  mimeType: string;
54
67
  size: number;
55
68
  };
@@ -102,9 +115,28 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
102
115
  langs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
103
116
  /** Author self-label values (content warnings). */
104
117
  selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
118
+ /**
119
+ * Opt-in audio processing for this post's audio (transcribe / denoise).
120
+ * Both default off. Stages the deployment can't provide come back marked
121
+ * `skipped` on the view rather than failing the create. See
122
+ * `types/processing.ts`.
123
+ */
124
+ processing: z.ZodOptional<z.ZodObject<{
125
+ transcribe: z.ZodOptional<z.ZodBoolean>;
126
+ denoise: z.ZodOptional<z.ZodBoolean>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ transcribe?: boolean | undefined;
129
+ denoise?: boolean | undefined;
130
+ }, {
131
+ transcribe?: boolean | undefined;
132
+ denoise?: boolean | undefined;
133
+ }>>;
105
134
  }, "strip", z.ZodTypeAny, {
106
135
  text: string;
107
- title?: string | undefined;
136
+ processing?: {
137
+ transcribe?: boolean | undefined;
138
+ denoise?: boolean | undefined;
139
+ } | undefined;
108
140
  reply?: {
109
141
  root: {
110
142
  uri: string;
@@ -115,11 +147,14 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
115
147
  cid: string;
116
148
  };
117
149
  } | undefined;
150
+ title?: string | undefined;
118
151
  embed?: {
119
152
  $type: "dev.antiphony.embed.audio";
120
153
  audio: {
121
154
  $type: "blob";
122
- ref: string;
155
+ ref: {
156
+ $link: string;
157
+ };
123
158
  mimeType: string;
124
159
  size: number;
125
160
  };
@@ -130,8 +165,11 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
130
165
  langs?: string[] | undefined;
131
166
  selfLabels?: string[] | undefined;
132
167
  }, {
133
- title?: string | undefined;
134
168
  text?: string | undefined;
169
+ processing?: {
170
+ transcribe?: boolean | undefined;
171
+ denoise?: boolean | undefined;
172
+ } | undefined;
135
173
  reply?: {
136
174
  root: {
137
175
  uri: string;
@@ -142,11 +180,14 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
142
180
  cid: string;
143
181
  };
144
182
  } | undefined;
183
+ title?: string | undefined;
145
184
  embed?: {
146
185
  $type: "dev.antiphony.embed.audio";
147
186
  audio: {
148
187
  $type: "blob";
149
- ref: string;
188
+ ref: {
189
+ $link: string;
190
+ };
150
191
  mimeType: string;
151
192
  size: number;
152
193
  };
@@ -158,7 +199,10 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
158
199
  selfLabels?: string[] | undefined;
159
200
  }>, {
160
201
  text: string;
161
- title?: string | undefined;
202
+ processing?: {
203
+ transcribe?: boolean | undefined;
204
+ denoise?: boolean | undefined;
205
+ } | undefined;
162
206
  reply?: {
163
207
  root: {
164
208
  uri: string;
@@ -169,11 +213,14 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
169
213
  cid: string;
170
214
  };
171
215
  } | undefined;
216
+ title?: string | undefined;
172
217
  embed?: {
173
218
  $type: "dev.antiphony.embed.audio";
174
219
  audio: {
175
220
  $type: "blob";
176
- ref: string;
221
+ ref: {
222
+ $link: string;
223
+ };
177
224
  mimeType: string;
178
225
  size: number;
179
226
  };
@@ -184,8 +231,11 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
184
231
  langs?: string[] | undefined;
185
232
  selfLabels?: string[] | undefined;
186
233
  }, {
187
- title?: string | undefined;
188
234
  text?: string | undefined;
235
+ processing?: {
236
+ transcribe?: boolean | undefined;
237
+ denoise?: boolean | undefined;
238
+ } | undefined;
189
239
  reply?: {
190
240
  root: {
191
241
  uri: string;
@@ -196,11 +246,14 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
196
246
  cid: string;
197
247
  };
198
248
  } | undefined;
249
+ title?: string | undefined;
199
250
  embed?: {
200
251
  $type: "dev.antiphony.embed.audio";
201
252
  audio: {
202
253
  $type: "blob";
203
- ref: string;
254
+ ref: {
255
+ $link: string;
256
+ };
204
257
  mimeType: string;
205
258
  size: number;
206
259
  };
@@ -212,7 +265,10 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
212
265
  selfLabels?: string[] | undefined;
213
266
  }>, {
214
267
  text: string;
215
- title?: string | undefined;
268
+ processing?: {
269
+ transcribe?: boolean | undefined;
270
+ denoise?: boolean | undefined;
271
+ } | undefined;
216
272
  reply?: {
217
273
  root: {
218
274
  uri: string;
@@ -223,11 +279,14 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
223
279
  cid: string;
224
280
  };
225
281
  } | undefined;
282
+ title?: string | undefined;
226
283
  embed?: {
227
284
  $type: "dev.antiphony.embed.audio";
228
285
  audio: {
229
286
  $type: "blob";
230
- ref: string;
287
+ ref: {
288
+ $link: string;
289
+ };
231
290
  mimeType: string;
232
291
  size: number;
233
292
  };
@@ -238,8 +297,11 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
238
297
  langs?: string[] | undefined;
239
298
  selfLabels?: string[] | undefined;
240
299
  }, {
241
- title?: string | undefined;
242
300
  text?: string | undefined;
301
+ processing?: {
302
+ transcribe?: boolean | undefined;
303
+ denoise?: boolean | undefined;
304
+ } | undefined;
243
305
  reply?: {
244
306
  root: {
245
307
  uri: string;
@@ -250,11 +312,14 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
250
312
  cid: string;
251
313
  };
252
314
  } | undefined;
315
+ title?: string | undefined;
253
316
  embed?: {
254
317
  $type: "dev.antiphony.embed.audio";
255
318
  audio: {
256
319
  $type: "blob";
257
- ref: string;
320
+ ref: {
321
+ $link: string;
322
+ };
258
323
  mimeType: string;
259
324
  size: number;
260
325
  };
@@ -266,277 +331,39 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
266
331
  selfLabels?: string[] | undefined;
267
332
  }>;
268
333
  type CreateAudioPostRequest = z.infer<typeof CreateAudioPostRequestSchema>;
269
- declare const CreatePromptRequestSchema: z.ZodObject<{
270
- title: z.ZodString;
271
- description: z.ZodOptional<z.ZodString>;
272
- audioUrl: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
273
- setAsGreeting: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodEffects<z.ZodString, boolean, string>]>>;
274
- /** Explicit org context override (normally inferred from auth.currentOrg) */
275
- orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
276
- }, "strip", z.ZodTypeAny, {
277
- title: string;
278
- audioUrl: string;
279
- orgId?: string | null | undefined;
280
- description?: string | undefined;
281
- setAsGreeting?: boolean | undefined;
282
- }, {
283
- title: string;
284
- audioUrl: string;
285
- orgId?: string | null | undefined;
286
- description?: string | undefined;
287
- setAsGreeting?: string | boolean | undefined;
288
- }>;
289
- declare const UpdateProfileRequestSchema: z.ZodObject<{
290
- handle: z.ZodOptional<z.ZodString>;
291
- displayName: z.ZodOptional<z.ZodString>;
292
- bio: z.ZodOptional<z.ZodString>;
293
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
294
- usageIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
- /**
296
- * Personal website surfaced on the public profile. Accepts a URL, empty
297
- * string, or null from the client; normalizes empty string → null so the
298
- * value stored on `UserRecord` (which requires `.url() | null`) round-trips
299
- * cleanly through `UserRecordSchema.parse` on subsequent reads.
300
- */
301
- website: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">, z.ZodNull]>>, string | null | undefined, string | null | undefined>;
302
- /** Up to 5 public links (label + URL) shown under the bio. */
303
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
304
- label: z.ZodString;
305
- url: z.ZodString;
306
- }, "strip", z.ZodTypeAny, {
307
- label: string;
308
- url: string;
309
- }, {
310
- label: string;
311
- url: string;
312
- }>, "many">>;
313
- /** When true, surfaces the linked Bluesky identity on the public profile. */
314
- showBlueskyPublicly: z.ZodOptional<z.ZodBoolean>;
315
- }, "strip", z.ZodTypeAny, {
316
- handle?: string | undefined;
317
- usageIntent?: string | null | undefined;
318
- displayName?: string | undefined;
319
- bio?: string | undefined;
320
- avatarUrl?: string | null | undefined;
321
- website?: string | null | undefined;
322
- links?: {
323
- label: string;
324
- url: string;
325
- }[] | undefined;
326
- showBlueskyPublicly?: boolean | undefined;
327
- }, {
328
- handle?: string | undefined;
329
- usageIntent?: string | null | undefined;
330
- displayName?: string | undefined;
331
- bio?: string | undefined;
332
- avatarUrl?: string | null | undefined;
333
- website?: string | null | undefined;
334
- links?: {
335
- label: string;
336
- url: string;
337
- }[] | undefined;
338
- showBlueskyPublicly?: boolean | undefined;
339
- }>;
340
- declare const FcmTokenRequestSchema: z.ZodObject<{
341
- token: z.ZodString;
342
- }, "strip", z.ZodTypeAny, {
343
- token: string;
344
- }, {
345
- token: string;
346
- }>;
347
- declare const BadgeResetRequestSchema: z.ZodObject<{
348
- type: z.ZodEnum<["new_replier", "unread_reply"]>;
349
- }, "strip", z.ZodTypeAny, {
350
- type: "new_replier" | "unread_reply";
351
- }, {
352
- type: "new_replier" | "unread_reply";
353
- }>;
354
- declare const CreateOrgRequestSchema: z.ZodObject<{
355
- name: z.ZodString;
356
- slug: z.ZodString;
357
- avatarUrl: z.ZodOptional<z.ZodString>;
358
- rssFeedUrl: z.ZodOptional<z.ZodString>;
359
- websiteUrl: z.ZodOptional<z.ZodString>;
360
- description: z.ZodOptional<z.ZodString>;
361
- }, "strip", z.ZodTypeAny, {
362
- name: string;
363
- slug: string;
364
- avatarUrl?: string | undefined;
365
- description?: string | undefined;
366
- rssFeedUrl?: string | undefined;
367
- websiteUrl?: string | undefined;
368
- }, {
369
- name: string;
370
- slug: string;
371
- avatarUrl?: string | undefined;
372
- description?: string | undefined;
373
- rssFeedUrl?: string | undefined;
374
- websiteUrl?: string | undefined;
375
- }>;
376
- declare const UpdateOrgRequestSchema: z.ZodObject<{
377
- name: z.ZodOptional<z.ZodString>;
378
- slug: z.ZodOptional<z.ZodString>;
379
- description: z.ZodOptional<z.ZodString>;
380
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
381
- rssFeedUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
- websiteUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
383
- billingEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
384
- domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
385
- }, "strip", z.ZodTypeAny, {
386
- domain?: string | null | undefined;
387
- avatarUrl?: string | null | undefined;
388
- description?: string | undefined;
389
- name?: string | undefined;
390
- slug?: string | undefined;
391
- rssFeedUrl?: string | null | undefined;
392
- websiteUrl?: string | null | undefined;
393
- billingEmail?: string | null | undefined;
394
- }, {
395
- domain?: string | null | undefined;
396
- avatarUrl?: string | null | undefined;
397
- description?: string | undefined;
398
- name?: string | undefined;
399
- slug?: string | undefined;
400
- rssFeedUrl?: string | null | undefined;
401
- websiteUrl?: string | null | undefined;
402
- billingEmail?: string | null | undefined;
403
- }>;
404
- declare const CreateOrgInviteRequestSchema: z.ZodObject<{
405
- email: z.ZodString;
406
- role: z.ZodEnum<["admin", "member"]>;
407
- }, "strip", z.ZodTypeAny, {
408
- role: "admin" | "member";
409
- email: string;
410
- }, {
411
- role: "admin" | "member";
412
- email: string;
413
- }>;
414
- declare const UpdateMemberRoleRequestSchema: z.ZodObject<{
415
- role: z.ZodEnum<["admin", "member"]>;
416
- }, "strip", z.ZodTypeAny, {
417
- role: "admin" | "member";
418
- }, {
419
- role: "admin" | "member";
420
- }>;
421
- declare const SwitchOrgRequestSchema: z.ZodObject<{
422
- /** orgId to switch to, or null to switch to personal context */
423
- orgId: z.ZodNullable<z.ZodString>;
424
- }, "strip", z.ZodTypeAny, {
425
- orgId: string | null;
426
- }, {
427
- orgId: string | null;
428
- }>;
429
- declare const ConnectorConfigInputSchema: z.ZodObject<Omit<{
430
- connectorType: z.ZodEnum<["telephony"]>;
431
- ownerId: z.ZodString;
432
- settings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
433
- secretRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
434
- enabled: z.ZodDefault<z.ZodBoolean>;
435
- status: z.ZodDefault<z.ZodObject<{
436
- state: z.ZodDefault<z.ZodEnum<["unconfigured", "pending", "active", "error", "disabled"]>>;
437
- detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
438
- data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
439
- updatedAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
334
+ /**
335
+ * Patch-request codec for the canonical Antiphony `dev.antiphony.audio.post`
336
+ * model. **Processing opt-in is the ONLY thing a PATCH may change** — it
337
+ * re-triggers async audio enrichment (transcribe / denoise) on an existing
338
+ * post. No lexicon fields are editable here: those feed the record CID (its
339
+ * content address / identity), so a content edit would mint a different record.
340
+ * Processing state is storage-layer, so this changes no CID. See
341
+ * `types/processing.ts`.
342
+ */
343
+ declare const PatchAudioPostRequestSchema: z.ZodObject<{
344
+ /** Opt-in audio processing to (re)run for this post's audio. Required — a
345
+ * PATCH with no processing request is a no-op and rejected as invalid. */
346
+ processing: z.ZodObject<{
347
+ transcribe: z.ZodOptional<z.ZodBoolean>;
348
+ denoise: z.ZodOptional<z.ZodBoolean>;
440
349
  }, "strip", z.ZodTypeAny, {
441
- state: "active" | "pending" | "error" | "unconfigured" | "disabled";
442
- updatedAt?: Date | undefined;
443
- detail?: string | null | undefined;
444
- data?: Record<string, unknown> | null | undefined;
350
+ transcribe?: boolean | undefined;
351
+ denoise?: boolean | undefined;
445
352
  }, {
446
- updatedAt?: unknown;
447
- state?: "active" | "pending" | "error" | "unconfigured" | "disabled" | undefined;
448
- detail?: string | null | undefined;
449
- data?: Record<string, unknown> | null | undefined;
450
- }>>;
451
- createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
452
- updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
453
- }, "status" | "createdAt" | "updatedAt" | "connectorType" | "ownerId">, "strip", z.ZodTypeAny, {
454
- enabled: boolean;
455
- settings: Record<string, unknown>;
456
- secretRef?: string | null | undefined;
457
- }, {
458
- enabled?: boolean | undefined;
459
- settings?: Record<string, unknown> | undefined;
460
- secretRef?: string | null | undefined;
461
- }>;
462
- declare const ConnectorConfigUpdateSchema: z.ZodObject<{
463
- enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
464
- settings: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
465
- secretRef: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
466
- }, "strip", z.ZodTypeAny, {
467
- enabled?: boolean | undefined;
468
- settings?: Record<string, unknown> | undefined;
469
- secretRef?: string | null | undefined;
470
- }, {
471
- enabled?: boolean | undefined;
472
- settings?: Record<string, unknown> | undefined;
473
- secretRef?: string | null | undefined;
474
- }>;
475
- declare const PersonNotesUpdateSchema: z.ZodObject<{
476
- notes: z.ZodOptional<z.ZodString>;
477
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
478
- }, "strip", z.ZodTypeAny, {
479
- notes?: string | undefined;
480
- tags?: string[] | undefined;
481
- }, {
482
- notes?: string | undefined;
483
- tags?: string[] | undefined;
484
- }>;
485
- declare const PersonMergeRequestSchema: z.ZodObject<{
486
- alternateUid: z.ZodString;
487
- }, "strip", z.ZodTypeAny, {
488
- alternateUid: string;
489
- }, {
490
- alternateUid: string;
491
- }>;
492
- declare const ScreeningRuleInputSchema: z.ZodObject<{
493
- e164: z.ZodString;
494
- label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
495
- action: z.ZodEnum<["allow", "screen"]>;
496
- expiresAt: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>, string | number | null | undefined, string | number | null | undefined>;
497
- }, "strip", z.ZodTypeAny, {
498
- e164: string;
499
- action: "allow" | "screen";
500
- label?: string | null | undefined;
501
- expiresAt?: string | number | null | undefined;
502
- }, {
503
- e164: string;
504
- action: "allow" | "screen";
505
- label?: string | null | undefined;
506
- expiresAt?: string | number | null | undefined;
507
- }>;
508
- declare const ScreeningRuleUpdateSchema: z.ZodObject<{
509
- e164: z.ZodOptional<z.ZodString>;
510
- label: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
511
- action: z.ZodOptional<z.ZodEnum<["allow", "screen"]>>;
512
- expiresAt: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>, string | number | null | undefined, string | number | null | undefined>>;
513
- }, "strip", z.ZodTypeAny, {
514
- label?: string | null | undefined;
515
- e164?: string | undefined;
516
- action?: "allow" | "screen" | undefined;
517
- expiresAt?: string | number | null | undefined;
518
- }, {
519
- label?: string | null | undefined;
520
- e164?: string | undefined;
521
- action?: "allow" | "screen" | undefined;
522
- expiresAt?: string | number | null | undefined;
523
- }>;
524
- declare const UpdateReplyStatusRequestSchema: z.ZodObject<{
525
- status: z.ZodEnum<["live", "archived", "deleted"]>;
526
- }, "strip", z.ZodTypeAny, {
527
- status: "live" | "archived" | "deleted";
528
- }, {
529
- status: "live" | "archived" | "deleted";
530
- }>;
531
- declare const BulkReplyActionRequestSchema: z.ZodObject<{
532
- replyIds: z.ZodArray<z.ZodString, "many">;
533
- action: z.ZodEnum<["markRead", "archive", "delete", "restore"]>;
353
+ transcribe?: boolean | undefined;
354
+ denoise?: boolean | undefined;
355
+ }>;
534
356
  }, "strip", z.ZodTypeAny, {
535
- action: "markRead" | "archive" | "delete" | "restore";
536
- replyIds: string[];
357
+ processing: {
358
+ transcribe?: boolean | undefined;
359
+ denoise?: boolean | undefined;
360
+ };
537
361
  }, {
538
- action: "markRead" | "archive" | "delete" | "restore";
539
- replyIds: string[];
362
+ processing: {
363
+ transcribe?: boolean | undefined;
364
+ denoise?: boolean | undefined;
365
+ };
540
366
  }>;
367
+ type PatchAudioPostRequest = z.infer<typeof PatchAudioPostRequestSchema>;
541
368
 
542
- export { BadgeResetRequestSchema, BulkReplyActionRequestSchema, ConnectorConfigInputSchema, ConnectorConfigUpdateSchema, type CreateAudioPostRequest, CreateAudioPostRequestSchema, CreateOrgInviteRequestSchema, CreateOrgRequestSchema, CreatePromptRequestSchema, FcmTokenRequestSchema, PersonMergeRequestSchema, PersonNotesUpdateSchema, ScreeningRuleInputSchema, ScreeningRuleUpdateSchema, SwitchOrgRequestSchema, UpdateMemberRoleRequestSchema, UpdateOrgRequestSchema, UpdateProfileRequestSchema, UpdateReplyStatusRequestSchema };
369
+ export { type CreateAudioPostRequest, CreateAudioPostRequestSchema, type PatchAudioPostRequest, PatchAudioPostRequestSchema };
@@ -1,6 +1,5 @@
1
- export { BadgeResetRequestSchema, BulkReplyActionRequestSchema, ConnectorConfigInputSchema, ConnectorConfigUpdateSchema, CreateAudioPostRequestSchema, CreateOrgInviteRequestSchema, CreateOrgRequestSchema, CreatePromptRequestSchema, FcmTokenRequestSchema, PersonMergeRequestSchema, PersonNotesUpdateSchema, ScreeningRuleInputSchema, ScreeningRuleUpdateSchema, SwitchOrgRequestSchema, UpdateMemberRoleRequestSchema, UpdateOrgRequestSchema, UpdateProfileRequestSchema, UpdateReplyStatusRequestSchema } from './chunk-7V44CPRR.js';
2
- import './chunk-BUNMR4ZO.js';
3
- import './chunk-EA4OONDV.js';
4
- import './chunk-3WZJXJNU.js';
5
- import './chunk-5EHV73BA.js';
6
- import './chunk-ORMEWXMH.js';
1
+ export { CreateAudioPostRequestSchema, PatchAudioPostRequestSchema } from './chunk-RUUHUNZ6.js';
2
+ import './chunk-WL2GSPGC.js';
3
+ import './chunk-D655OH2I.js';
4
+ import './chunk-SMK4OZNU.js';
5
+ import './chunk-5JBD5THX.js';
@@ -1,6 +1,4 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
2
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
3
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
4
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -16,18 +14,5 @@ var __spreadValues = (a, b) => {
16
14
  }
17
15
  return a;
18
16
  };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
17
 
33
- export { __objRest, __spreadProps, __spreadValues };
18
+ export { __spreadValues };
@@ -1,4 +1,4 @@
1
- import { __spreadValues } from './chunk-ORMEWXMH.js';
1
+ import { __spreadValues } from './chunk-5JBD5THX.js';
2
2
 
3
3
  // observability/report-error.ts
4
4
  var REPORTED_ERROR_EVENT_TYPE = "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent";
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+
3
+ // types/records.ts
4
+ var FirestoreTimestampSchema = z.union([
5
+ z.custom((data) => {
6
+ return data && typeof data === "object" && (typeof data.toDate === "function" || "seconds" in data && "nanoseconds" in data);
7
+ }),
8
+ z.string(),
9
+ z.number(),
10
+ z.date()
11
+ ]).transform((data, ctx) => {
12
+ let date;
13
+ if (data instanceof Date) {
14
+ date = data;
15
+ } else if (typeof data === "string") {
16
+ date = new Date(data);
17
+ } else if (typeof data === "number") {
18
+ date = new Date(data);
19
+ } else if (typeof data.toDate === "function") {
20
+ date = data.toDate();
21
+ } else {
22
+ const timestamp = data;
23
+ date = new Date(timestamp.seconds * 1e3 + timestamp.nanoseconds / 1e6);
24
+ }
25
+ if (Number.isNaN(date.getTime())) {
26
+ ctx.addIssue({
27
+ code: z.ZodIssueCode.custom,
28
+ message: "FirestoreTimestamp coerced to Invalid Date"
29
+ });
30
+ return z.NEVER;
31
+ }
32
+ return date;
33
+ });
34
+
35
+ export { FirestoreTimestampSchema };
@@ -0,0 +1,37 @@
1
+ import { ProcessingRequestSchema, ReplyRefSchema, AudioEmbedSchema } from './chunk-WL2GSPGC.js';
2
+ import { z } from 'zod';
3
+
4
+ var CreateAudioPostRequestSchema = z.object({
5
+ /** User-authored text; may be empty for pure-audio posts. */
6
+ text: z.string().max(3e3).default(""),
7
+ /** Optional headline (prompt feature). */
8
+ title: z.string().max(3e3).optional(),
9
+ /** The uploaded audio attachment. */
10
+ embed: AudioEmbedSchema.optional(),
11
+ /** Present ⇒ this is a reply (StrongRef root + parent). */
12
+ reply: ReplyRefSchema.optional(),
13
+ /** BCP-47 language tags. */
14
+ langs: z.array(z.string()).max(3).optional(),
15
+ /** Author self-label values (content warnings). */
16
+ selfLabels: z.array(z.string()).optional(),
17
+ /**
18
+ * Opt-in audio processing for this post's audio (transcribe / denoise).
19
+ * Both default off. Stages the deployment can't provide come back marked
20
+ * `skipped` on the view rather than failing the create. See
21
+ * `types/processing.ts`.
22
+ */
23
+ processing: ProcessingRequestSchema.optional()
24
+ }).refine((d) => !(d.reply && d.title), {
25
+ message: "Replies cannot have a title",
26
+ path: ["title"]
27
+ }).refine((d) => d.text.trim().length > 0 || !!d.embed, {
28
+ message: "Post must have text or an audio embed",
29
+ path: ["text"]
30
+ });
31
+ var PatchAudioPostRequestSchema = z.object({
32
+ /** Opt-in audio processing to (re)run for this post's audio. Required — a
33
+ * PATCH with no processing request is a no-op and rejected as invalid. */
34
+ processing: ProcessingRequestSchema
35
+ });
36
+
37
+ export { CreateAudioPostRequestSchema, PatchAudioPostRequestSchema };