@antiphony/shared 0.1.0 → 0.3.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 (54) hide show
  1. package/dist/cjs/api-codecs.cjs +26 -650
  2. package/dist/cjs/api-codecs.d.cts +15 -233
  3. package/dist/cjs/index.cjs +29 -761
  4. package/dist/cjs/index.d.cts +4 -4
  5. package/dist/cjs/nsid.cjs +3 -10
  6. package/dist/cjs/nsid.d.cts +1 -9
  7. package/dist/cjs/types/api.cjs +11 -571
  8. package/dist/cjs/types/api.d.cts +13 -265
  9. package/dist/cjs/types/audio.cjs +26 -547
  10. package/dist/cjs/types/audio.d.cts +93 -52
  11. package/dist/cjs/types/records.cjs +3 -328
  12. package/dist/cjs/types/records.d.cts +7 -729
  13. package/dist/cjs/types/views.cjs +8 -649
  14. package/dist/cjs/types/views.d.cts +43 -9123
  15. package/dist/esm/api-codecs.d.ts +46 -264
  16. package/dist/esm/api-codecs.js +5 -5
  17. package/dist/esm/{chunk-ORMEWXMH.js → chunk-5JBD5THX.js} +1 -16
  18. package/dist/esm/{chunk-XDBKR6LW.js → chunk-6LROFBKK.js} +3 -10
  19. package/dist/esm/{chunk-F2CANZZ7.js → chunk-BNNLHRH7.js} +1 -1
  20. package/dist/esm/{chunk-BUNMR4ZO.js → chunk-F7IHVM34.js} +20 -3
  21. package/dist/esm/chunk-FDM5FDN4.js +46 -0
  22. package/dist/esm/chunk-IHIBHQBJ.js +78 -0
  23. package/dist/esm/chunk-R6SBR3IG.js +97 -0
  24. package/dist/esm/chunk-Y6HNNRVD.js +12 -0
  25. package/dist/esm/errors/index.js +1 -1
  26. package/dist/esm/index.d.ts +4 -4
  27. package/dist/esm/index.js +8 -8
  28. package/dist/esm/nsid.d.ts +1 -9
  29. package/dist/esm/nsid.js +2 -2
  30. package/dist/esm/observability/index.js +2 -2
  31. package/dist/esm/observability/report-error.js +2 -2
  32. package/dist/esm/types/api.d.ts +15 -267
  33. package/dist/esm/types/api.js +4 -5
  34. package/dist/esm/types/audio.d.ts +170 -129
  35. package/dist/esm/types/audio.js +4 -4
  36. package/dist/esm/types/blob.js +1 -1
  37. package/dist/esm/types/records.d.ts +10 -732
  38. package/dist/esm/types/records.js +2 -3
  39. package/dist/esm/types/views.d.ts +51 -9131
  40. package/dist/esm/types/views.js +3 -4
  41. package/dist/esm/utils/index.js +1 -1
  42. package/package.json +1 -1
  43. package/dist/cjs/types/channels.cjs +0 -170
  44. package/dist/cjs/types/channels.d.cts +0 -262
  45. package/dist/cjs/types/storage.cjs +0 -414
  46. package/dist/cjs/types/storage.d.cts +0 -197
  47. package/dist/esm/chunk-3WZJXJNU.js +0 -378
  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/types/channels.d.ts +0 -262
  52. package/dist/esm/types/channels.js +0 -162
  53. package/dist/esm/types/storage.d.ts +0 -197
  54. package/dist/esm/types/storage.js +0 -26
@@ -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. */
@@ -104,7 +103,6 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
104
103
  selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
105
104
  }, "strip", z.ZodTypeAny, {
106
105
  text: string;
107
- title?: string | undefined;
108
106
  reply?: {
109
107
  root: {
110
108
  uri: string;
@@ -115,6 +113,7 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
115
113
  cid: string;
116
114
  };
117
115
  } | undefined;
116
+ title?: string | undefined;
118
117
  embed?: {
119
118
  $type: "dev.antiphony.embed.audio";
120
119
  audio: {
@@ -130,7 +129,6 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
130
129
  langs?: string[] | undefined;
131
130
  selfLabels?: string[] | undefined;
132
131
  }, {
133
- title?: string | undefined;
134
132
  text?: string | undefined;
135
133
  reply?: {
136
134
  root: {
@@ -142,6 +140,7 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
142
140
  cid: string;
143
141
  };
144
142
  } | undefined;
143
+ title?: string | undefined;
145
144
  embed?: {
146
145
  $type: "dev.antiphony.embed.audio";
147
146
  audio: {
@@ -158,7 +157,6 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
158
157
  selfLabels?: string[] | undefined;
159
158
  }>, {
160
159
  text: string;
161
- title?: string | undefined;
162
160
  reply?: {
163
161
  root: {
164
162
  uri: string;
@@ -169,6 +167,7 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
169
167
  cid: string;
170
168
  };
171
169
  } | undefined;
170
+ title?: string | undefined;
172
171
  embed?: {
173
172
  $type: "dev.antiphony.embed.audio";
174
173
  audio: {
@@ -184,7 +183,6 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
184
183
  langs?: string[] | undefined;
185
184
  selfLabels?: string[] | undefined;
186
185
  }, {
187
- title?: string | undefined;
188
186
  text?: string | undefined;
189
187
  reply?: {
190
188
  root: {
@@ -196,6 +194,7 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
196
194
  cid: string;
197
195
  };
198
196
  } | undefined;
197
+ title?: string | undefined;
199
198
  embed?: {
200
199
  $type: "dev.antiphony.embed.audio";
201
200
  audio: {
@@ -212,7 +211,6 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
212
211
  selfLabels?: string[] | undefined;
213
212
  }>, {
214
213
  text: string;
215
- title?: string | undefined;
216
214
  reply?: {
217
215
  root: {
218
216
  uri: string;
@@ -223,6 +221,7 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
223
221
  cid: string;
224
222
  };
225
223
  } | undefined;
224
+ title?: string | undefined;
226
225
  embed?: {
227
226
  $type: "dev.antiphony.embed.audio";
228
227
  audio: {
@@ -238,7 +237,6 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
238
237
  langs?: string[] | undefined;
239
238
  selfLabels?: string[] | undefined;
240
239
  }, {
241
- title?: string | undefined;
242
240
  text?: string | undefined;
243
241
  reply?: {
244
242
  root: {
@@ -250,6 +248,7 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
250
248
  cid: string;
251
249
  };
252
250
  } | undefined;
251
+ title?: string | undefined;
253
252
  embed?: {
254
253
  $type: "dev.antiphony.embed.audio";
255
254
  audio: {
@@ -266,26 +265,10 @@ declare const CreateAudioPostRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObjec
266
265
  selfLabels?: string[] | undefined;
267
266
  }>;
268
267
  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
- }>;
268
+ /**
269
+ * Update-request codec for the authenticated actor's own profile
270
+ * (`PATCH /api/v1/users/me`). Partial-update of identity fields only.
271
+ */
289
272
  declare const UpdateProfileRequestSchema: z.ZodObject<{
290
273
  handle: z.ZodOptional<z.ZodString>;
291
274
  displayName: z.ZodOptional<z.ZodString>;
@@ -337,206 +320,5 @@ declare const UpdateProfileRequestSchema: z.ZodObject<{
337
320
  }[] | undefined;
338
321
  showBlueskyPublicly?: boolean | undefined;
339
322
  }>;
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>>;
440
- }, "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;
445
- }, {
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"]>;
534
- }, "strip", z.ZodTypeAny, {
535
- action: "markRead" | "archive" | "delete" | "restore";
536
- replyIds: string[];
537
- }, {
538
- action: "markRead" | "archive" | "delete" | "restore";
539
- replyIds: string[];
540
- }>;
541
323
 
542
- export { BadgeResetRequestSchema, BulkReplyActionRequestSchema, ConnectorConfigInputSchema, ConnectorConfigUpdateSchema, type CreateAudioPostRequest, CreateAudioPostRequestSchema, CreateOrgInviteRequestSchema, CreateOrgRequestSchema, CreatePromptRequestSchema, FcmTokenRequestSchema, PersonMergeRequestSchema, PersonNotesUpdateSchema, ScreeningRuleInputSchema, ScreeningRuleUpdateSchema, SwitchOrgRequestSchema, UpdateMemberRoleRequestSchema, UpdateOrgRequestSchema, UpdateProfileRequestSchema, UpdateReplyStatusRequestSchema };
324
+ export { type CreateAudioPostRequest, CreateAudioPostRequestSchema, UpdateProfileRequestSchema };