@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,4 +1,3 @@
1
- export { EnrichedReplierSchema, HandleResolutionSchema, OrgInviteViewSchema, OrgProfileDataSchema, OrganizationMemberViewSchema, OrganizationViewSchema, ProfileViewAdminSchema, ProfileViewBasicSchema, ProfileViewDetailedSchema, ProfileViewSchema, ProfileViewSelfSchema, PromptRepliersSchema, PromptViewPublicSchema, PromptViewSchema, PromptWithRepliesSchema, ReplierSchema, ReplyViewPublicSchema, ReplyViewSchema, RssSummarySchema, UserProfileDataSchema, toProfileViewBasic, toPromptViewPublic, toReplyViewPublic } from '../chunk-EA4OONDV.js';
2
- import '../chunk-3WZJXJNU.js';
3
- import '../chunk-5EHV73BA.js';
4
- import '../chunk-ORMEWXMH.js';
1
+ export { ProfileViewAdminSchema, ProfileViewBasicSchema, ProfileViewDetailedSchema, ProfileViewSchema, ProfileViewSelfSchema, toProfileViewBasic } from '../chunk-R6SBR3IG.js';
2
+ import '../chunk-IHIBHQBJ.js';
3
+ import '../chunk-5JBD5THX.js';
@@ -1,2 +1,2 @@
1
1
  export { isFirestoreTimestamp } from '../chunk-24KIXQZK.js';
2
- import '../chunk-ORMEWXMH.js';
2
+ import '../chunk-5JBD5THX.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antiphony/shared",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Shared types, Zod schemas, and codecs for Antiphony — open audio call-and-response infrastructure and AT Protocol lexicons.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.antiphony.dev",
@@ -1,170 +0,0 @@
1
- 'use strict';
2
-
3
- var zod = require('zod');
4
-
5
- // types/channels.ts
6
- var ChannelTypeSchema = zod.z.enum([
7
- // inbound
8
- "web-capture",
9
- "phone",
10
- "bluesky-replies",
11
- // outbound
12
- "bluesky-publishing",
13
- "phone-voicemail",
14
- "rss",
15
- "embed",
16
- "sms-invites"
17
- ]);
18
- var ChannelDirectionSchema = zod.z.enum(["inbound", "outbound", "bidirectional"]);
19
- var ChannelStateSchema = zod.z.enum([
20
- "active",
21
- "pending",
22
- "disabled",
23
- "unconfigured",
24
- "error",
25
- "coming-soon"
26
- ]);
27
- var ChannelViewSchema = zod.z.object({
28
- type: ChannelTypeSchema,
29
- direction: ChannelDirectionSchema,
30
- /** Human label, e.g. "Phone", "Bluesky publishing". */
31
- label: zod.z.string(),
32
- /** One-line explanation rendered under the label. */
33
- description: zod.z.string(),
34
- /** Generic lifecycle state the UI renders as a status pill. */
35
- state: ChannelStateSchema,
36
- /** Channel-specific human detail (e.g. a verification failure reason). */
37
- statusDetail: zod.z.string().nullable().optional(),
38
- /** Whether the channel is currently switched on for this user. */
39
- enabled: zod.z.boolean(),
40
- /** Always-on surfaces (web capture, RSS, embed) — no real disable. */
41
- alwaysOn: zod.z.boolean(),
42
- /** Whether there's a per-channel config screen to open. */
43
- configurable: zod.z.boolean(),
44
- /** Requires a paid tier to use (see `docs/feature-gates.md`). */
45
- gated: zod.z.boolean(),
46
- /**
47
- * A prerequisite that must be satisfied elsewhere before this channel works,
48
- * e.g. `'bluesky-identity'` for Bluesky publishing. Null when self-contained.
49
- */
50
- dependsOn: zod.z.string().nullable().optional()
51
- });
52
- var ChannelsResponseSchema = zod.z.object({
53
- inbound: zod.z.array(ChannelViewSchema),
54
- outbound: zod.z.array(ChannelViewSchema)
55
- });
56
- var CHANNEL_DESCRIPTORS = [
57
- // ── Inbound ──────────────────────────────────────────────────────────
58
- {
59
- type: "web-capture",
60
- direction: "inbound",
61
- label: "Web capture",
62
- description: "Replies left on your public prompt page and embedded widgets.",
63
- alwaysOn: true,
64
- configurable: false,
65
- gated: false,
66
- dependsOn: null,
67
- comingSoon: false
68
- },
69
- {
70
- type: "phone",
71
- direction: "inbound",
72
- // Inbound voice. Call forwarding and the SIP address are two ingress
73
- // addresses of this one channel, not separate channels — both deliver a
74
- // voice reply to the same inbox over the same telephony substrate.
75
- label: "Phone",
76
- description: "Forward calls \u2014 or point a VoIP softphone (SIP) \u2014 at your Vox Pop inbox.",
77
- alwaysOn: false,
78
- configurable: true,
79
- gated: false,
80
- dependsOn: null,
81
- comingSoon: false
82
- },
83
- {
84
- type: "bluesky-replies",
85
- direction: "inbound",
86
- label: "Bluesky replies",
87
- description: "Pull replies and mentions from Bluesky into your inbox.",
88
- alwaysOn: false,
89
- configurable: false,
90
- gated: false,
91
- dependsOn: "bluesky-identity",
92
- comingSoon: true
93
- },
94
- // ── Outbound ─────────────────────────────────────────────────────────
95
- {
96
- type: "bluesky-publishing",
97
- direction: "outbound",
98
- label: "Bluesky publishing",
99
- description: "Publish your prompts to Bluesky.",
100
- alwaysOn: false,
101
- configurable: true,
102
- gated: false,
103
- dependsOn: "bluesky-identity",
104
- comingSoon: false
105
- },
106
- {
107
- type: "phone-voicemail",
108
- direction: "outbound",
109
- // The outbound face of telephony: when a caller reaches the line, the
110
- // IVR plays the creator's inbox prompt as the voicemail greeting and
111
- // offers their live prompts as keypad options (apps/telephony
112
- // IvrService). That is the creator's prompt distributed by phone — a
113
- // genuine outbound surface, not a coming-soon placeholder. Config (the
114
- // greeting = the inbox prompt) is managed via prompts, so no inline
115
- // Configure screen yet → configurable:false for now.
116
- label: "Phone voicemail",
117
- description: "Callers hear your prompt as the voicemail greeting, then leave a reply.",
118
- alwaysOn: false,
119
- configurable: false,
120
- gated: false,
121
- dependsOn: null,
122
- comingSoon: false
123
- },
124
- {
125
- type: "rss",
126
- direction: "outbound",
127
- label: "RSS feed",
128
- description: "A podcast-ready feed of your prompts and replies.",
129
- alwaysOn: true,
130
- configurable: false,
131
- gated: false,
132
- dependsOn: null,
133
- comingSoon: false
134
- },
135
- {
136
- type: "embed",
137
- direction: "outbound",
138
- label: "Embed widget",
139
- description: "Drop a capture widget onto your own site.",
140
- alwaysOn: true,
141
- configurable: false,
142
- gated: false,
143
- dependsOn: null,
144
- comingSoon: false
145
- },
146
- {
147
- type: "sms-invites",
148
- direction: "outbound",
149
- label: "SMS invites",
150
- description: "Text a prompt link to your audience.",
151
- alwaysOn: false,
152
- configurable: true,
153
- gated: true,
154
- dependsOn: null,
155
- comingSoon: true
156
- }
157
- ];
158
- function getChannelDescriptor(type) {
159
- const d = CHANNEL_DESCRIPTORS.find((c) => c.type === type);
160
- if (!d) throw new Error(`No channel descriptor for type: ${type}`);
161
- return d;
162
- }
163
-
164
- exports.CHANNEL_DESCRIPTORS = CHANNEL_DESCRIPTORS;
165
- exports.ChannelDirectionSchema = ChannelDirectionSchema;
166
- exports.ChannelStateSchema = ChannelStateSchema;
167
- exports.ChannelTypeSchema = ChannelTypeSchema;
168
- exports.ChannelViewSchema = ChannelViewSchema;
169
- exports.ChannelsResponseSchema = ChannelsResponseSchema;
170
- exports.getChannelDescriptor = getChannelDescriptor;
@@ -1,262 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * Channels — the user-facing inbound/outbound surface over the connector
5
- * control-plane. See `specs/channels.md`.
6
- *
7
- * Phase 1 is a **read-model only**: `GET /api/v1/users/me/channels` projects the
8
- * scattered per-user channel state (the `telephony` connector envelope, the SIP
9
- * enrichment doc, the profile's linked Bluesky identity, plus the always-on web
10
- * / RSS / embed surfaces) into one uniform list. No storage migration — this
11
- * file defines the projection's shape and the static descriptor registry that
12
- * both the API (overlaying per-user state) and the settings UI (rendering rows)
13
- * agree on.
14
- */
15
- /**
16
- * The known channels. Distinct from `ConnectorTypeSchema` (the storage-layer
17
- * connector allowlist, currently just `telephony`): a channel is the *product*
18
- * concept, which may map onto a connector, an always-on surface, or a
19
- * not-yet-built capability.
20
- */
21
- declare const ChannelTypeSchema: z.ZodEnum<["web-capture", "phone", "bluesky-replies", "bluesky-publishing", "phone-voicemail", "rss", "embed", "sms-invites"]>;
22
- type ChannelType = z.infer<typeof ChannelTypeSchema>;
23
- declare const ChannelDirectionSchema: z.ZodEnum<["inbound", "outbound", "bidirectional"]>;
24
- type ChannelDirection = z.infer<typeof ChannelDirectionSchema>;
25
- /**
26
- * Generic, render-without-channel-knowledge lifecycle. The first five mirror
27
- * `ConnectorStatus.state`; `coming-soon` marks a registered-but-unbuilt channel
28
- * so the UI can show it greyed without a special case.
29
- */
30
- declare const ChannelStateSchema: z.ZodEnum<["active", "pending", "disabled", "unconfigured", "error", "coming-soon"]>;
31
- type ChannelState = z.infer<typeof ChannelStateSchema>;
32
- declare const ChannelViewSchema: z.ZodObject<{
33
- type: z.ZodEnum<["web-capture", "phone", "bluesky-replies", "bluesky-publishing", "phone-voicemail", "rss", "embed", "sms-invites"]>;
34
- direction: z.ZodEnum<["inbound", "outbound", "bidirectional"]>;
35
- /** Human label, e.g. "Phone", "Bluesky publishing". */
36
- label: z.ZodString;
37
- /** One-line explanation rendered under the label. */
38
- description: z.ZodString;
39
- /** Generic lifecycle state the UI renders as a status pill. */
40
- state: z.ZodEnum<["active", "pending", "disabled", "unconfigured", "error", "coming-soon"]>;
41
- /** Channel-specific human detail (e.g. a verification failure reason). */
42
- statusDetail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
- /** Whether the channel is currently switched on for this user. */
44
- enabled: z.ZodBoolean;
45
- /** Always-on surfaces (web capture, RSS, embed) — no real disable. */
46
- alwaysOn: z.ZodBoolean;
47
- /** Whether there's a per-channel config screen to open. */
48
- configurable: z.ZodBoolean;
49
- /** Requires a paid tier to use (see `docs/feature-gates.md`). */
50
- gated: z.ZodBoolean;
51
- /**
52
- * A prerequisite that must be satisfied elsewhere before this channel works,
53
- * e.g. `'bluesky-identity'` for Bluesky publishing. Null when self-contained.
54
- */
55
- dependsOn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
- }, "strip", z.ZodTypeAny, {
57
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
58
- direction: "inbound" | "outbound" | "bidirectional";
59
- label: string;
60
- description: string;
61
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
62
- enabled: boolean;
63
- alwaysOn: boolean;
64
- configurable: boolean;
65
- gated: boolean;
66
- statusDetail?: string | null | undefined;
67
- dependsOn?: string | null | undefined;
68
- }, {
69
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
70
- direction: "inbound" | "outbound" | "bidirectional";
71
- label: string;
72
- description: string;
73
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
74
- enabled: boolean;
75
- alwaysOn: boolean;
76
- configurable: boolean;
77
- gated: boolean;
78
- statusDetail?: string | null | undefined;
79
- dependsOn?: string | null | undefined;
80
- }>;
81
- type ChannelView = z.infer<typeof ChannelViewSchema>;
82
- /** The `GET /users/me/channels` response payload (inside the standard envelope). */
83
- declare const ChannelsResponseSchema: z.ZodObject<{
84
- inbound: z.ZodArray<z.ZodObject<{
85
- type: z.ZodEnum<["web-capture", "phone", "bluesky-replies", "bluesky-publishing", "phone-voicemail", "rss", "embed", "sms-invites"]>;
86
- direction: z.ZodEnum<["inbound", "outbound", "bidirectional"]>;
87
- /** Human label, e.g. "Phone", "Bluesky publishing". */
88
- label: z.ZodString;
89
- /** One-line explanation rendered under the label. */
90
- description: z.ZodString;
91
- /** Generic lifecycle state the UI renders as a status pill. */
92
- state: z.ZodEnum<["active", "pending", "disabled", "unconfigured", "error", "coming-soon"]>;
93
- /** Channel-specific human detail (e.g. a verification failure reason). */
94
- statusDetail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
- /** Whether the channel is currently switched on for this user. */
96
- enabled: z.ZodBoolean;
97
- /** Always-on surfaces (web capture, RSS, embed) — no real disable. */
98
- alwaysOn: z.ZodBoolean;
99
- /** Whether there's a per-channel config screen to open. */
100
- configurable: z.ZodBoolean;
101
- /** Requires a paid tier to use (see `docs/feature-gates.md`). */
102
- gated: z.ZodBoolean;
103
- /**
104
- * A prerequisite that must be satisfied elsewhere before this channel works,
105
- * e.g. `'bluesky-identity'` for Bluesky publishing. Null when self-contained.
106
- */
107
- dependsOn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
- }, "strip", z.ZodTypeAny, {
109
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
110
- direction: "inbound" | "outbound" | "bidirectional";
111
- label: string;
112
- description: string;
113
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
114
- enabled: boolean;
115
- alwaysOn: boolean;
116
- configurable: boolean;
117
- gated: boolean;
118
- statusDetail?: string | null | undefined;
119
- dependsOn?: string | null | undefined;
120
- }, {
121
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
122
- direction: "inbound" | "outbound" | "bidirectional";
123
- label: string;
124
- description: string;
125
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
126
- enabled: boolean;
127
- alwaysOn: boolean;
128
- configurable: boolean;
129
- gated: boolean;
130
- statusDetail?: string | null | undefined;
131
- dependsOn?: string | null | undefined;
132
- }>, "many">;
133
- outbound: z.ZodArray<z.ZodObject<{
134
- type: z.ZodEnum<["web-capture", "phone", "bluesky-replies", "bluesky-publishing", "phone-voicemail", "rss", "embed", "sms-invites"]>;
135
- direction: z.ZodEnum<["inbound", "outbound", "bidirectional"]>;
136
- /** Human label, e.g. "Phone", "Bluesky publishing". */
137
- label: z.ZodString;
138
- /** One-line explanation rendered under the label. */
139
- description: z.ZodString;
140
- /** Generic lifecycle state the UI renders as a status pill. */
141
- state: z.ZodEnum<["active", "pending", "disabled", "unconfigured", "error", "coming-soon"]>;
142
- /** Channel-specific human detail (e.g. a verification failure reason). */
143
- statusDetail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
- /** Whether the channel is currently switched on for this user. */
145
- enabled: z.ZodBoolean;
146
- /** Always-on surfaces (web capture, RSS, embed) — no real disable. */
147
- alwaysOn: z.ZodBoolean;
148
- /** Whether there's a per-channel config screen to open. */
149
- configurable: z.ZodBoolean;
150
- /** Requires a paid tier to use (see `docs/feature-gates.md`). */
151
- gated: z.ZodBoolean;
152
- /**
153
- * A prerequisite that must be satisfied elsewhere before this channel works,
154
- * e.g. `'bluesky-identity'` for Bluesky publishing. Null when self-contained.
155
- */
156
- dependsOn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
157
- }, "strip", z.ZodTypeAny, {
158
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
159
- direction: "inbound" | "outbound" | "bidirectional";
160
- label: string;
161
- description: string;
162
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
163
- enabled: boolean;
164
- alwaysOn: boolean;
165
- configurable: boolean;
166
- gated: boolean;
167
- statusDetail?: string | null | undefined;
168
- dependsOn?: string | null | undefined;
169
- }, {
170
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
171
- direction: "inbound" | "outbound" | "bidirectional";
172
- label: string;
173
- description: string;
174
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
175
- enabled: boolean;
176
- alwaysOn: boolean;
177
- configurable: boolean;
178
- gated: boolean;
179
- statusDetail?: string | null | undefined;
180
- dependsOn?: string | null | undefined;
181
- }>, "many">;
182
- }, "strip", z.ZodTypeAny, {
183
- inbound: {
184
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
185
- direction: "inbound" | "outbound" | "bidirectional";
186
- label: string;
187
- description: string;
188
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
189
- enabled: boolean;
190
- alwaysOn: boolean;
191
- configurable: boolean;
192
- gated: boolean;
193
- statusDetail?: string | null | undefined;
194
- dependsOn?: string | null | undefined;
195
- }[];
196
- outbound: {
197
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
198
- direction: "inbound" | "outbound" | "bidirectional";
199
- label: string;
200
- description: string;
201
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
202
- enabled: boolean;
203
- alwaysOn: boolean;
204
- configurable: boolean;
205
- gated: boolean;
206
- statusDetail?: string | null | undefined;
207
- dependsOn?: string | null | undefined;
208
- }[];
209
- }, {
210
- inbound: {
211
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
212
- direction: "inbound" | "outbound" | "bidirectional";
213
- label: string;
214
- description: string;
215
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
216
- enabled: boolean;
217
- alwaysOn: boolean;
218
- configurable: boolean;
219
- gated: boolean;
220
- statusDetail?: string | null | undefined;
221
- dependsOn?: string | null | undefined;
222
- }[];
223
- outbound: {
224
- type: "web-capture" | "phone" | "bluesky-replies" | "bluesky-publishing" | "phone-voicemail" | "rss" | "embed" | "sms-invites";
225
- direction: "inbound" | "outbound" | "bidirectional";
226
- label: string;
227
- description: string;
228
- state: "active" | "pending" | "disabled" | "unconfigured" | "error" | "coming-soon";
229
- enabled: boolean;
230
- alwaysOn: boolean;
231
- configurable: boolean;
232
- gated: boolean;
233
- statusDetail?: string | null | undefined;
234
- dependsOn?: string | null | undefined;
235
- }[];
236
- }>;
237
- type ChannelsResponse = z.infer<typeof ChannelsResponseSchema>;
238
- interface ChannelDescriptor {
239
- type: ChannelType;
240
- direction: ChannelDirection;
241
- label: string;
242
- description: string;
243
- /** No stored config; presence-only status row. */
244
- alwaysOn: boolean;
245
- /** Has a config screen (Phase 1 surfaces the flag; screens come later). */
246
- configurable: boolean;
247
- /** Paid-tier gated. */
248
- gated: boolean;
249
- /** Cross-channel prerequisite (rendered as a "needs …" hint). */
250
- dependsOn: string | null;
251
- /** Registered but not built yet — forces `state: 'coming-soon'`. */
252
- comingSoon: boolean;
253
- }
254
- /**
255
- * The single source of truth for which channels exist and how they present.
256
- * Order within each direction is the display order in the settings UI.
257
- */
258
- declare const CHANNEL_DESCRIPTORS: readonly ChannelDescriptor[];
259
- /** Lookup a descriptor by type. */
260
- declare function getChannelDescriptor(type: ChannelType): ChannelDescriptor;
261
-
262
- export { CHANNEL_DESCRIPTORS, type ChannelDescriptor, type ChannelDirection, ChannelDirectionSchema, type ChannelState, ChannelStateSchema, type ChannelType, ChannelTypeSchema, type ChannelView, ChannelViewSchema, type ChannelsResponse, ChannelsResponseSchema, getChannelDescriptor };