@pithy-sh/support 0.1.2 → 0.1.3

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 (167) hide show
  1. package/dist/ai/classify.d.ts +90 -0
  2. package/dist/ai/classify.d.ts.map +1 -0
  3. package/dist/ai/classify.js +151 -0
  4. package/dist/attachment/store.d.ts +53 -0
  5. package/dist/attachment/store.d.ts.map +1 -0
  6. package/dist/attachment/store.js +67 -0
  7. package/dist/audit/actions.d.ts +68 -0
  8. package/dist/audit/actions.d.ts.map +1 -0
  9. package/dist/audit/actions.js +68 -0
  10. package/dist/capability.d.ts +93 -0
  11. package/dist/capability.d.ts.map +1 -0
  12. package/dist/capability.js +187 -0
  13. package/dist/client/projection.d.ts +56 -0
  14. package/dist/client/projection.d.ts.map +1 -0
  15. package/dist/client/projection.js +0 -0
  16. package/dist/config/config.d.ts +215 -0
  17. package/dist/config/config.d.ts.map +1 -0
  18. package/dist/config/config.js +169 -0
  19. package/dist/data/attachment.d.ts +30 -0
  20. package/dist/data/attachment.d.ts.map +1 -0
  21. package/dist/data/attachment.js +32 -0
  22. package/dist/data/billingScope.d.ts +30 -0
  23. package/dist/data/billingScope.d.ts.map +1 -0
  24. package/dist/data/billingScope.js +32 -0
  25. package/dist/data/categories.d.ts +54 -0
  26. package/dist/data/categories.d.ts.map +1 -0
  27. package/dist/data/categories.js +97 -0
  28. package/dist/data/classification.d.ts +34 -0
  29. package/dist/data/classification.d.ts.map +1 -0
  30. package/dist/data/classification.js +28 -0
  31. package/dist/data/enums.d.ts +82 -0
  32. package/dist/data/enums.d.ts.map +1 -0
  33. package/dist/data/enums.js +70 -0
  34. package/dist/data/flag.d.ts +25 -0
  35. package/dist/data/flag.d.ts.map +1 -0
  36. package/dist/data/flag.js +27 -0
  37. package/dist/data/message.d.ts +81 -0
  38. package/dist/data/message.d.ts.map +1 -0
  39. package/dist/data/message.js +84 -0
  40. package/dist/data/tables.d.ts +160 -0
  41. package/dist/data/tables.d.ts.map +1 -0
  42. package/dist/data/tables.js +44 -0
  43. package/dist/data/thread.d.ts +77 -0
  44. package/dist/data/thread.d.ts.map +1 -0
  45. package/dist/data/thread.js +65 -0
  46. package/dist/error/errors.d.ts +64 -0
  47. package/dist/error/errors.d.ts.map +1 -0
  48. package/dist/error/errors.js +82 -0
  49. package/dist/http/guards.d.ts +44 -0
  50. package/dist/http/guards.d.ts.map +1 -0
  51. package/dist/http/guards.js +53 -0
  52. package/dist/http/handlers.d.ts +89 -0
  53. package/dist/http/handlers.d.ts.map +1 -0
  54. package/dist/http/handlers.js +248 -0
  55. package/dist/http/resolve.d.ts +44 -0
  56. package/dist/http/resolve.d.ts.map +1 -0
  57. package/dist/http/resolve.js +72 -0
  58. package/dist/http/responses.d.ts +829 -0
  59. package/dist/http/responses.d.ts.map +1 -0
  60. package/dist/http/responses.js +303 -0
  61. package/dist/http/routes.d.ts +109 -0
  62. package/dist/http/routes.d.ts.map +1 -0
  63. package/dist/http/routes.js +62 -0
  64. package/dist/http/schemas.d.ts +121 -0
  65. package/dist/http/schemas.d.ts.map +1 -0
  66. package/dist/http/schemas.js +89 -0
  67. package/dist/http/scopes.d.ts +56 -0
  68. package/dist/http/scopes.d.ts.map +1 -0
  69. package/dist/http/scopes.js +107 -0
  70. package/dist/http/views.d.ts +36 -0
  71. package/dist/http/views.d.ts.map +1 -0
  72. package/dist/http/views.js +144 -0
  73. package/dist/inbound/authenticity.d.ts +81 -0
  74. package/dist/inbound/authenticity.d.ts.map +1 -0
  75. package/dist/inbound/authenticity.js +61 -0
  76. package/dist/inbound/guard.d.ts +74 -0
  77. package/dist/inbound/guard.d.ts.map +1 -0
  78. package/dist/inbound/guard.js +78 -0
  79. package/dist/inbound/handler.d.ts +28 -0
  80. package/dist/inbound/handler.d.ts.map +1 -0
  81. package/dist/inbound/handler.js +82 -0
  82. package/dist/inbound/ingest.d.ts +104 -0
  83. package/dist/inbound/ingest.d.ts.map +1 -0
  84. package/dist/inbound/ingest.js +326 -0
  85. package/dist/inbound/recipient.d.ts +16 -0
  86. package/dist/inbound/recipient.d.ts.map +1 -0
  87. package/dist/inbound/recipient.js +46 -0
  88. package/dist/index.d.ts +20 -0
  89. package/dist/index.d.ts.map +1 -0
  90. package/dist/index.js +14 -0
  91. package/dist/link/sender.d.ts +160 -0
  92. package/dist/link/sender.d.ts.map +1 -0
  93. package/dist/link/sender.js +200 -0
  94. package/dist/migrations/0001_threads.d.ts +26 -0
  95. package/dist/migrations/0001_threads.d.ts.map +1 -0
  96. package/dist/migrations/0001_threads.js +103 -0
  97. package/dist/mime/address.d.ts +22 -0
  98. package/dist/mime/address.d.ts.map +1 -0
  99. package/dist/mime/address.js +28 -0
  100. package/dist/mime/parse.d.ts +96 -0
  101. package/dist/mime/parse.d.ts.map +1 -0
  102. package/dist/mime/parse.js +146 -0
  103. package/dist/mime/sanitize.d.ts +25 -0
  104. package/dist/mime/sanitize.d.ts.map +1 -0
  105. package/dist/mime/sanitize.js +212 -0
  106. package/dist/mime/threading.d.ts +79 -0
  107. package/dist/mime/threading.d.ts.map +1 -0
  108. package/dist/mime/threading.js +111 -0
  109. package/dist/mime/truncate.d.ts +17 -0
  110. package/dist/mime/truncate.d.ts.map +1 -0
  111. package/dist/mime/truncate.js +47 -0
  112. package/dist/provision/provisionSupport.d.ts +158 -0
  113. package/dist/provision/provisionSupport.d.ts.map +1 -0
  114. package/dist/provision/provisionSupport.js +110 -0
  115. package/dist/provision/resolveSupportConfig.d.ts +45 -0
  116. package/dist/provision/resolveSupportConfig.d.ts.map +1 -0
  117. package/dist/provision/resolveSupportConfig.js +22 -0
  118. package/dist/reply/send.d.ts +123 -0
  119. package/dist/reply/send.d.ts.map +1 -0
  120. package/dist/reply/send.js +153 -0
  121. package/dist/reply/snippets.d.ts +79 -0
  122. package/dist/reply/snippets.d.ts.map +1 -0
  123. package/dist/reply/snippets.js +135 -0
  124. package/dist/secret/registry.d.ts +18 -0
  125. package/dist/secret/registry.d.ts.map +1 -0
  126. package/dist/secret/registry.js +21 -0
  127. package/dist/seeds/example.d.ts +3 -0
  128. package/dist/seeds/example.d.ts.map +1 -0
  129. package/dist/seeds/example.js +350 -0
  130. package/dist/store/paging.d.ts +18 -0
  131. package/dist/store/paging.d.ts.map +1 -0
  132. package/dist/store/paging.js +20 -0
  133. package/dist/store/search.d.ts +67 -0
  134. package/dist/store/search.d.ts.map +1 -0
  135. package/dist/store/search.js +160 -0
  136. package/dist/store/searchIndex.d.ts +53 -0
  137. package/dist/store/searchIndex.d.ts.map +1 -0
  138. package/dist/store/searchIndex.js +66 -0
  139. package/dist/store/threads.d.ts +147 -0
  140. package/dist/store/threads.d.ts.map +1 -0
  141. package/dist/store/threads.js +197 -0
  142. package/dist/submission/encoding.d.ts +21 -0
  143. package/dist/submission/encoding.d.ts.map +1 -0
  144. package/dist/submission/encoding.js +55 -0
  145. package/dist/submission/guard.d.ts +71 -0
  146. package/dist/submission/guard.d.ts.map +1 -0
  147. package/dist/submission/guard.js +46 -0
  148. package/dist/submission/submit.d.ts +152 -0
  149. package/dist/submission/submit.d.ts.map +1 -0
  150. package/dist/submission/submit.js +319 -0
  151. package/dist/version.generated.d.ts +5 -0
  152. package/dist/version.generated.d.ts.map +1 -0
  153. package/dist/version.generated.js +7 -0
  154. package/dist/workflows/classify.d.ts +63 -0
  155. package/dist/workflows/classify.d.ts.map +1 -0
  156. package/dist/workflows/classify.js +68 -0
  157. package/dist/workflows/retryPolicy.d.ts +39 -0
  158. package/dist/workflows/retryPolicy.d.ts.map +1 -0
  159. package/dist/workflows/retryPolicy.js +43 -0
  160. package/dist/workflows/specs.d.ts +43 -0
  161. package/dist/workflows/specs.d.ts.map +1 -0
  162. package/dist/workflows/specs.js +46 -0
  163. package/dist/workflows/worker.d.ts +48 -0
  164. package/dist/workflows/worker.d.ts.map +1 -0
  165. package/dist/workflows/worker.js +37 -0
  166. package/package.json +24 -15
  167. package/src/version.generated.ts +1 -1
@@ -0,0 +1,829 @@
1
+ import { z } from "zod";
2
+ /** One conversation, as the inbox and the reading pane show it. */
3
+ export declare const SupportThreadView: z.ZodObject<{
4
+ id: z.ZodString;
5
+ channel: z.ZodEnum<{
6
+ app: "app";
7
+ email: "email";
8
+ }>;
9
+ inboxAddress: z.ZodNullable<z.ZodString>;
10
+ subject: z.ZodString;
11
+ fromAddress: z.ZodString;
12
+ fromName: z.ZodNullable<z.ZodString>;
13
+ senderAuthenticated: z.ZodBoolean;
14
+ userId: z.ZodNullable<z.ZodString>;
15
+ accountLinkSource: z.ZodNullable<z.ZodEnum<{
16
+ email_address: "email_address";
17
+ session: "session";
18
+ }>>;
19
+ declaredCategory: z.ZodNullable<z.ZodString>;
20
+ category: z.ZodString;
21
+ priority: z.ZodEnum<{
22
+ low: "low";
23
+ normal: "normal";
24
+ urgent: "urgent";
25
+ }>;
26
+ sentiment: z.ZodEnum<{
27
+ angry: "angry";
28
+ frustrated: "frustrated";
29
+ neutral: "neutral";
30
+ positive: "positive";
31
+ }>;
32
+ confidence: z.ZodNullable<z.ZodNumber>;
33
+ model: z.ZodNullable<z.ZodString>;
34
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
35
+ archived: z.ZodBoolean;
36
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
37
+ archivedBy: z.ZodNullable<z.ZodString>;
38
+ messageCount: z.ZodNumber;
39
+ firstMessageAt: z.ZodISODateTime;
40
+ lastMessageAt: z.ZodISODateTime;
41
+ createdAt: z.ZodISODateTime;
42
+ updatedAt: z.ZodISODateTime;
43
+ }, z.core.$strip>;
44
+ export type SupportThreadView = z.output<typeof SupportThreadView>;
45
+ /**
46
+ * A thread in the inbox listing — the thread plus this viewer's own private state.
47
+ *
48
+ * Re-described after `.extend()`: extending builds a new schema, and a description does not follow it.
49
+ */
50
+ export declare const SupportListedThreadView: z.ZodObject<{
51
+ id: z.ZodString;
52
+ channel: z.ZodEnum<{
53
+ app: "app";
54
+ email: "email";
55
+ }>;
56
+ inboxAddress: z.ZodNullable<z.ZodString>;
57
+ subject: z.ZodString;
58
+ fromAddress: z.ZodString;
59
+ fromName: z.ZodNullable<z.ZodString>;
60
+ senderAuthenticated: z.ZodBoolean;
61
+ userId: z.ZodNullable<z.ZodString>;
62
+ accountLinkSource: z.ZodNullable<z.ZodEnum<{
63
+ email_address: "email_address";
64
+ session: "session";
65
+ }>>;
66
+ declaredCategory: z.ZodNullable<z.ZodString>;
67
+ category: z.ZodString;
68
+ priority: z.ZodEnum<{
69
+ low: "low";
70
+ normal: "normal";
71
+ urgent: "urgent";
72
+ }>;
73
+ sentiment: z.ZodEnum<{
74
+ angry: "angry";
75
+ frustrated: "frustrated";
76
+ neutral: "neutral";
77
+ positive: "positive";
78
+ }>;
79
+ confidence: z.ZodNullable<z.ZodNumber>;
80
+ model: z.ZodNullable<z.ZodString>;
81
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
82
+ archived: z.ZodBoolean;
83
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
84
+ archivedBy: z.ZodNullable<z.ZodString>;
85
+ messageCount: z.ZodNumber;
86
+ firstMessageAt: z.ZodISODateTime;
87
+ lastMessageAt: z.ZodISODateTime;
88
+ createdAt: z.ZodISODateTime;
89
+ updatedAt: z.ZodISODateTime;
90
+ read: z.ZodBoolean;
91
+ snoozedUntil: z.ZodNullable<z.ZodISODateTime>;
92
+ }, z.core.$strip>;
93
+ export type SupportListedThreadView = z.output<typeof SupportListedThreadView>;
94
+ /** One message in a conversation. */
95
+ export declare const SupportMessageView: z.ZodObject<{
96
+ id: z.ZodString;
97
+ direction: z.ZodEnum<{
98
+ inbound: "inbound";
99
+ outbound: "outbound";
100
+ }>;
101
+ channel: z.ZodEnum<{
102
+ app: "app";
103
+ email: "email";
104
+ }>;
105
+ context: z.ZodNullable<z.ZodObject<{
106
+ screen: z.ZodOptional<z.ZodString>;
107
+ appVersion: z.ZodOptional<z.ZodString>;
108
+ platform: z.ZodOptional<z.ZodString>;
109
+ environment: z.ZodOptional<z.ZodString>;
110
+ locale: z.ZodOptional<z.ZodString>;
111
+ }, z.core.$strict>>;
112
+ fromAddress: z.ZodNullable<z.ZodString>;
113
+ fromName: z.ZodNullable<z.ZodString>;
114
+ toAddress: z.ZodNullable<z.ZodString>;
115
+ subject: z.ZodString;
116
+ textBody: z.ZodString;
117
+ htmlBody: z.ZodNullable<z.ZodString>;
118
+ emailJobId: z.ZodNullable<z.ZodString>;
119
+ receivedAt: z.ZodISODateTime;
120
+ }, z.core.$strip>;
121
+ export type SupportMessageView = z.output<typeof SupportMessageView>;
122
+ /** One attachment — metadata plus a short-lived URL, never the storage key. */
123
+ export declare const SupportAttachmentView: z.ZodObject<{
124
+ id: z.ZodString;
125
+ filename: z.ZodString;
126
+ contentType: z.ZodString;
127
+ size: z.ZodNumber;
128
+ sha256: z.ZodString;
129
+ inline: z.ZodBoolean;
130
+ url: z.ZodNullable<z.ZodString>;
131
+ }, z.core.$strip>;
132
+ export type SupportAttachmentView = z.output<typeof SupportAttachmentView>;
133
+ /** One of the sender's purchases, flattened to what a support console renders. */
134
+ export declare const SenderPurchaseView: z.ZodObject<{
135
+ id: z.ZodString;
136
+ rail: z.ZodString;
137
+ productId: z.ZodString;
138
+ status: z.ZodString;
139
+ environment: z.ZodString;
140
+ purchasedAt: z.ZodISODateTime;
141
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
142
+ revokedAt: z.ZodNullable<z.ZodISODateTime>;
143
+ }, z.core.$strip>;
144
+ export type SenderPurchaseView = z.output<typeof SenderPurchaseView>;
145
+ /** One of the sender's entitlements, lapsed ones included and marked inactive. */
146
+ export declare const SenderEntitlementView: z.ZodObject<{
147
+ key: z.ZodString;
148
+ active: z.ZodBoolean;
149
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
150
+ source: z.ZodNullable<z.ZodString>;
151
+ }, z.core.$strip>;
152
+ export type SenderEntitlementView = z.output<typeof SenderEntitlementView>;
153
+ /**
154
+ * Which billing subject the purchase and entitlement lists cover — always `user`, and said out loud.
155
+ *
156
+ * `@pithy-sh/payments` keys a purchase on a **subject pair**, a user or an organization. Support starts
157
+ * from a `From:` header and resolves a *person*; at thread-read time it holds no Hono `Context`, so it
158
+ * cannot ask the adopter's subject seam which organization this caller is acting for. It therefore reads
159
+ * `user`-subject rows and nothing else.
160
+ *
161
+ * **A field rather than a footnote, because empty already means too many things.** The purchase and
162
+ * entitlement lookups are guarded dynamic imports whose `catch` returns `[]`, so an empty panel is
163
+ * indistinguishable between "bought nothing", "`@pithy-sh/payments` is not installed" and "billed to an
164
+ * organization this seam cannot see" — and an operator looking at a customer with a live subscription
165
+ * reads it as the first. That is the actual hazard, and it is a wrong refund decision away from costing
166
+ * something. Declaring the scope on the wire lets a console say *why* the panel is thin.
167
+ *
168
+ * **A closed literal, not a string.** Widening it is then a compile error at every consumer, which is
169
+ * correct: the day support can resolve an organization, every panel has to decide what to render.
170
+ */
171
+ export declare const SenderBillingScope: z.ZodLiteral<"user">;
172
+ export type SenderBillingScope = z.output<typeof SenderBillingScope>;
173
+ /**
174
+ * What the app already knows about the sender. Derived at read time, so it is always current.
175
+ *
176
+ * **Everything but `authenticated` and `billingScope` is empty when the sender is unproven.** The whole
177
+ * value of the panel is that an operator trusts it, so it must not be populated from an address anybody
178
+ * could have written — that is what turns a spoofed message into support-driven account takeover. The
179
+ * scope is declared either way: it describes what this seam *can* see, not what it found.
180
+ */
181
+ export declare const SenderContextView: z.ZodObject<{
182
+ authenticated: z.ZodBoolean;
183
+ userId: z.ZodNullable<z.ZodString>;
184
+ name: z.ZodOptional<z.ZodString>;
185
+ emailVerified: z.ZodOptional<z.ZodBoolean>;
186
+ billingScope: z.ZodLiteral<"user">;
187
+ purchases: z.ZodArray<z.ZodObject<{
188
+ id: z.ZodString;
189
+ rail: z.ZodString;
190
+ productId: z.ZodString;
191
+ status: z.ZodString;
192
+ environment: z.ZodString;
193
+ purchasedAt: z.ZodISODateTime;
194
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
195
+ revokedAt: z.ZodNullable<z.ZodISODateTime>;
196
+ }, z.core.$strip>>;
197
+ entitlements: z.ZodArray<z.ZodObject<{
198
+ key: z.ZodString;
199
+ active: z.ZodBoolean;
200
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
201
+ source: z.ZodNullable<z.ZodString>;
202
+ }, z.core.$strip>>;
203
+ }, z.core.$strip>;
204
+ export type SenderContextView = z.output<typeof SenderContextView>;
205
+ /** One canned reply, ordered for this thread's category. */
206
+ export declare const SupportReplyView: z.ZodObject<{
207
+ key: z.ZodString;
208
+ label: z.ZodString;
209
+ category: z.ZodOptional<z.ZodString>;
210
+ body: z.ZodString;
211
+ }, z.core.$strip>;
212
+ export type SupportReplyView = z.output<typeof SupportReplyView>;
213
+ /** `GET {base}/threads`. */
214
+ export declare const SupportThreadsResponse: z.ZodObject<{
215
+ threads: z.ZodArray<z.ZodObject<{
216
+ id: z.ZodString;
217
+ channel: z.ZodEnum<{
218
+ app: "app";
219
+ email: "email";
220
+ }>;
221
+ inboxAddress: z.ZodNullable<z.ZodString>;
222
+ subject: z.ZodString;
223
+ fromAddress: z.ZodString;
224
+ fromName: z.ZodNullable<z.ZodString>;
225
+ senderAuthenticated: z.ZodBoolean;
226
+ userId: z.ZodNullable<z.ZodString>;
227
+ accountLinkSource: z.ZodNullable<z.ZodEnum<{
228
+ email_address: "email_address";
229
+ session: "session";
230
+ }>>;
231
+ declaredCategory: z.ZodNullable<z.ZodString>;
232
+ category: z.ZodString;
233
+ priority: z.ZodEnum<{
234
+ low: "low";
235
+ normal: "normal";
236
+ urgent: "urgent";
237
+ }>;
238
+ sentiment: z.ZodEnum<{
239
+ angry: "angry";
240
+ frustrated: "frustrated";
241
+ neutral: "neutral";
242
+ positive: "positive";
243
+ }>;
244
+ confidence: z.ZodNullable<z.ZodNumber>;
245
+ model: z.ZodNullable<z.ZodString>;
246
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
247
+ archived: z.ZodBoolean;
248
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
249
+ archivedBy: z.ZodNullable<z.ZodString>;
250
+ messageCount: z.ZodNumber;
251
+ firstMessageAt: z.ZodISODateTime;
252
+ lastMessageAt: z.ZodISODateTime;
253
+ createdAt: z.ZodISODateTime;
254
+ updatedAt: z.ZodISODateTime;
255
+ read: z.ZodBoolean;
256
+ snoozedUntil: z.ZodNullable<z.ZodISODateTime>;
257
+ }, z.core.$strip>>;
258
+ nextCursor: z.ZodNullable<z.ZodString>;
259
+ }, z.core.$strip>;
260
+ export type SupportThreadsResponse = z.output<typeof SupportThreadsResponse>;
261
+ /** `GET {base}/threads/:id`. */
262
+ export declare const SupportThreadResponse: z.ZodObject<{
263
+ thread: z.ZodObject<{
264
+ id: z.ZodString;
265
+ channel: z.ZodEnum<{
266
+ app: "app";
267
+ email: "email";
268
+ }>;
269
+ inboxAddress: z.ZodNullable<z.ZodString>;
270
+ subject: z.ZodString;
271
+ fromAddress: z.ZodString;
272
+ fromName: z.ZodNullable<z.ZodString>;
273
+ senderAuthenticated: z.ZodBoolean;
274
+ userId: z.ZodNullable<z.ZodString>;
275
+ accountLinkSource: z.ZodNullable<z.ZodEnum<{
276
+ email_address: "email_address";
277
+ session: "session";
278
+ }>>;
279
+ declaredCategory: z.ZodNullable<z.ZodString>;
280
+ category: z.ZodString;
281
+ priority: z.ZodEnum<{
282
+ low: "low";
283
+ normal: "normal";
284
+ urgent: "urgent";
285
+ }>;
286
+ sentiment: z.ZodEnum<{
287
+ angry: "angry";
288
+ frustrated: "frustrated";
289
+ neutral: "neutral";
290
+ positive: "positive";
291
+ }>;
292
+ confidence: z.ZodNullable<z.ZodNumber>;
293
+ model: z.ZodNullable<z.ZodString>;
294
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
295
+ archived: z.ZodBoolean;
296
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
297
+ archivedBy: z.ZodNullable<z.ZodString>;
298
+ messageCount: z.ZodNumber;
299
+ firstMessageAt: z.ZodISODateTime;
300
+ lastMessageAt: z.ZodISODateTime;
301
+ createdAt: z.ZodISODateTime;
302
+ updatedAt: z.ZodISODateTime;
303
+ }, z.core.$strip>;
304
+ messages: z.ZodArray<z.ZodObject<{
305
+ id: z.ZodString;
306
+ direction: z.ZodEnum<{
307
+ inbound: "inbound";
308
+ outbound: "outbound";
309
+ }>;
310
+ channel: z.ZodEnum<{
311
+ app: "app";
312
+ email: "email";
313
+ }>;
314
+ context: z.ZodNullable<z.ZodObject<{
315
+ screen: z.ZodOptional<z.ZodString>;
316
+ appVersion: z.ZodOptional<z.ZodString>;
317
+ platform: z.ZodOptional<z.ZodString>;
318
+ environment: z.ZodOptional<z.ZodString>;
319
+ locale: z.ZodOptional<z.ZodString>;
320
+ }, z.core.$strict>>;
321
+ fromAddress: z.ZodNullable<z.ZodString>;
322
+ fromName: z.ZodNullable<z.ZodString>;
323
+ toAddress: z.ZodNullable<z.ZodString>;
324
+ subject: z.ZodString;
325
+ textBody: z.ZodString;
326
+ htmlBody: z.ZodNullable<z.ZodString>;
327
+ emailJobId: z.ZodNullable<z.ZodString>;
328
+ receivedAt: z.ZodISODateTime;
329
+ }, z.core.$strip>>;
330
+ attachments: z.ZodArray<z.ZodObject<{
331
+ id: z.ZodString;
332
+ filename: z.ZodString;
333
+ contentType: z.ZodString;
334
+ size: z.ZodNumber;
335
+ sha256: z.ZodString;
336
+ inline: z.ZodBoolean;
337
+ url: z.ZodNullable<z.ZodString>;
338
+ }, z.core.$strip>>;
339
+ sender: z.ZodObject<{
340
+ authenticated: z.ZodBoolean;
341
+ userId: z.ZodNullable<z.ZodString>;
342
+ name: z.ZodOptional<z.ZodString>;
343
+ emailVerified: z.ZodOptional<z.ZodBoolean>;
344
+ billingScope: z.ZodLiteral<"user">;
345
+ purchases: z.ZodArray<z.ZodObject<{
346
+ id: z.ZodString;
347
+ rail: z.ZodString;
348
+ productId: z.ZodString;
349
+ status: z.ZodString;
350
+ environment: z.ZodString;
351
+ purchasedAt: z.ZodISODateTime;
352
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
353
+ revokedAt: z.ZodNullable<z.ZodISODateTime>;
354
+ }, z.core.$strip>>;
355
+ entitlements: z.ZodArray<z.ZodObject<{
356
+ key: z.ZodString;
357
+ active: z.ZodBoolean;
358
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
359
+ source: z.ZodNullable<z.ZodString>;
360
+ }, z.core.$strip>>;
361
+ }, z.core.$strip>;
362
+ replies: z.ZodArray<z.ZodObject<{
363
+ key: z.ZodString;
364
+ label: z.ZodString;
365
+ category: z.ZodOptional<z.ZodString>;
366
+ body: z.ZodString;
367
+ }, z.core.$strip>>;
368
+ }, z.core.$strip>;
369
+ export type SupportThreadResponse = z.output<typeof SupportThreadResponse>;
370
+ /**
371
+ * `POST {base}/threads/:id/archive`.
372
+ *
373
+ * The thread itself rather than an envelope around it: archiving is a write whose entire result is the
374
+ * new state of the row, and a pane re-renders from it.
375
+ */
376
+ export declare const SupportArchiveResponse: z.ZodObject<{
377
+ id: z.ZodString;
378
+ channel: z.ZodEnum<{
379
+ app: "app";
380
+ email: "email";
381
+ }>;
382
+ inboxAddress: z.ZodNullable<z.ZodString>;
383
+ subject: z.ZodString;
384
+ fromAddress: z.ZodString;
385
+ fromName: z.ZodNullable<z.ZodString>;
386
+ senderAuthenticated: z.ZodBoolean;
387
+ userId: z.ZodNullable<z.ZodString>;
388
+ accountLinkSource: z.ZodNullable<z.ZodEnum<{
389
+ email_address: "email_address";
390
+ session: "session";
391
+ }>>;
392
+ declaredCategory: z.ZodNullable<z.ZodString>;
393
+ category: z.ZodString;
394
+ priority: z.ZodEnum<{
395
+ low: "low";
396
+ normal: "normal";
397
+ urgent: "urgent";
398
+ }>;
399
+ sentiment: z.ZodEnum<{
400
+ angry: "angry";
401
+ frustrated: "frustrated";
402
+ neutral: "neutral";
403
+ positive: "positive";
404
+ }>;
405
+ confidence: z.ZodNullable<z.ZodNumber>;
406
+ model: z.ZodNullable<z.ZodString>;
407
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
408
+ archived: z.ZodBoolean;
409
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
410
+ archivedBy: z.ZodNullable<z.ZodString>;
411
+ messageCount: z.ZodNumber;
412
+ firstMessageAt: z.ZodISODateTime;
413
+ lastMessageAt: z.ZodISODateTime;
414
+ createdAt: z.ZodISODateTime;
415
+ updatedAt: z.ZodISODateTime;
416
+ }, z.core.$strip>;
417
+ export type SupportArchiveResponse = z.output<typeof SupportArchiveResponse>;
418
+ /**
419
+ * `POST {base}/threads/:id/reply`.
420
+ *
421
+ * **A union on `channel`, not an object with an optional `jobId`.** A reply either left by mail or was
422
+ * stored for the submitter to read in the app, and those are different promises about when somebody
423
+ * sees the answer. An optional field is exactly what lets a console render "sent" over both of them,
424
+ * so the two arms are structurally different and a client has to branch to read either one.
425
+ */
426
+ export declare const SupportReplySentResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
427
+ channel: z.ZodLiteral<"email">;
428
+ messageId: z.ZodString;
429
+ jobId: z.ZodString;
430
+ }, z.core.$strip>, z.ZodObject<{
431
+ channel: z.ZodLiteral<"app">;
432
+ messageId: z.ZodString;
433
+ }, z.core.$strip>], "channel">;
434
+ export type SupportReplySentResponse = z.output<typeof SupportReplySentResponse>;
435
+ /** `POST {base}/threads/:id/reclassify`. */
436
+ export declare const SupportReclassifiedResponse: z.ZodObject<{
437
+ messageId: z.ZodString;
438
+ }, z.core.$strip>;
439
+ export type SupportReclassifiedResponse = z.output<typeof SupportReclassifiedResponse>;
440
+ /**
441
+ * `POST {base}/threads/:id/flags`.
442
+ *
443
+ * `ok` and nothing else. A private read flag is not audited and carries no state a client did not
444
+ * just send, so echoing the thread back would only invite somebody to render it.
445
+ */
446
+ export declare const SupportFlagsResponse: z.ZodObject<{
447
+ ok: z.ZodLiteral<true>;
448
+ }, z.core.$strip>;
449
+ export type SupportFlagsResponse = z.output<typeof SupportFlagsResponse>;
450
+ /**
451
+ * ## The reader's contracts, beside the producers above
452
+ *
453
+ * Everything above this line is stated for a Worker checking its own projection, and it is strict on
454
+ * purpose: `SupportChannel` and `SupportAccountLinkSource` are what `inbound/` branches on and what D1
455
+ * holds, and a tolerated-unknown member there would license this capability to *store* a channel it
456
+ * cannot handle. Nothing below changes any of that. The enums are untouched, and so is every schema
457
+ * above.
458
+ *
459
+ * Below is the same projection for the other consumer: a management client reading a Worker **it does
460
+ * not control**. That client is crossing a trust boundary — a fork, a bug, a half-finished deploy, or a
461
+ * hostile Worker each put a member here that no enum of ours declares — and under the strict schema one
462
+ * such token costs it the entire response. It cost `pithy-sh/dashboard#15` exactly that: one
463
+ * unrecognized `channel` and the support pane rendered zero of twenty-five conversations. The client
464
+ * then had to widen our shape locally, which is the hand-held mirror `#113` exists to forbid.
465
+ *
466
+ * So the tolerance is published rather than reimplemented, by the one pattern
467
+ * `@pithy-sh/core/src/projection/asRead` states for the whole kit: same objects, every enum read as a
468
+ * string, every other field the identical schema instance.
469
+ *
470
+ * **What a client does with a widened value is ask the enum.** `SupportChannel.safeParse(value).success`
471
+ * answers *does this capability declare it*, and a value it does not declare is **marked, never mapped**
472
+ * — rendering an unknown provenance as the nearest one you know is a lie about evidence on the screen
473
+ * where somebody decides whether to act on a stranger's request.
474
+ *
475
+ * **Only the management surface.** The submitter's own views stay strict: an app reading its own
476
+ * Worker's `/feedback` is not reading a stranger, and `SupportReplySentResponse` is a union discriminated
477
+ * on a literal the client itself sent, where tolerating an unknown arm would mean tolerating a response
478
+ * with no shape at all.
479
+ */
480
+ /** {@link SupportThreadView}, as a client that does not control the Worker must read it. */
481
+ export declare const SupportThreadViewAsRead: z.ZodObject<{
482
+ id: z.ZodString;
483
+ channel: z.ZodString;
484
+ inboxAddress: z.ZodNullable<z.ZodString>;
485
+ subject: z.ZodString;
486
+ fromAddress: z.ZodString;
487
+ fromName: z.ZodNullable<z.ZodString>;
488
+ senderAuthenticated: z.ZodBoolean;
489
+ userId: z.ZodNullable<z.ZodString>;
490
+ accountLinkSource: z.ZodNullable<z.ZodString>;
491
+ declaredCategory: z.ZodNullable<z.ZodString>;
492
+ category: z.ZodString;
493
+ priority: z.ZodString;
494
+ sentiment: z.ZodString;
495
+ confidence: z.ZodNullable<z.ZodNumber>;
496
+ model: z.ZodNullable<z.ZodString>;
497
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
498
+ archived: z.ZodBoolean;
499
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
500
+ archivedBy: z.ZodNullable<z.ZodString>;
501
+ messageCount: z.ZodNumber;
502
+ firstMessageAt: z.ZodISODateTime;
503
+ lastMessageAt: z.ZodISODateTime;
504
+ createdAt: z.ZodISODateTime;
505
+ updatedAt: z.ZodISODateTime;
506
+ }, z.core.$strip>;
507
+ export type SupportThreadViewAsRead = z.output<typeof SupportThreadViewAsRead>;
508
+ /** {@link SupportListedThreadView}, as a client that does not control the Worker must read it. */
509
+ export declare const SupportListedThreadViewAsRead: z.ZodObject<{
510
+ id: z.ZodString;
511
+ channel: z.ZodString;
512
+ inboxAddress: z.ZodNullable<z.ZodString>;
513
+ subject: z.ZodString;
514
+ fromAddress: z.ZodString;
515
+ fromName: z.ZodNullable<z.ZodString>;
516
+ senderAuthenticated: z.ZodBoolean;
517
+ userId: z.ZodNullable<z.ZodString>;
518
+ accountLinkSource: z.ZodNullable<z.ZodString>;
519
+ declaredCategory: z.ZodNullable<z.ZodString>;
520
+ category: z.ZodString;
521
+ priority: z.ZodString;
522
+ sentiment: z.ZodString;
523
+ confidence: z.ZodNullable<z.ZodNumber>;
524
+ model: z.ZodNullable<z.ZodString>;
525
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
526
+ archived: z.ZodBoolean;
527
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
528
+ archivedBy: z.ZodNullable<z.ZodString>;
529
+ messageCount: z.ZodNumber;
530
+ firstMessageAt: z.ZodISODateTime;
531
+ lastMessageAt: z.ZodISODateTime;
532
+ createdAt: z.ZodISODateTime;
533
+ updatedAt: z.ZodISODateTime;
534
+ read: z.ZodBoolean;
535
+ snoozedUntil: z.ZodNullable<z.ZodISODateTime>;
536
+ }, z.core.$strip>;
537
+ export type SupportListedThreadViewAsRead = z.output<typeof SupportListedThreadViewAsRead>;
538
+ /** {@link SupportMessageView}, as a client that does not control the Worker must read it. */
539
+ export declare const SupportMessageViewAsRead: z.ZodObject<{
540
+ id: z.ZodString;
541
+ direction: z.ZodString;
542
+ channel: z.ZodString;
543
+ context: z.ZodNullable<z.ZodObject<{
544
+ screen: z.ZodOptional<z.ZodString>;
545
+ appVersion: z.ZodOptional<z.ZodString>;
546
+ platform: z.ZodOptional<z.ZodString>;
547
+ environment: z.ZodOptional<z.ZodString>;
548
+ locale: z.ZodOptional<z.ZodString>;
549
+ }, z.core.$strip>>;
550
+ fromAddress: z.ZodNullable<z.ZodString>;
551
+ fromName: z.ZodNullable<z.ZodString>;
552
+ toAddress: z.ZodNullable<z.ZodString>;
553
+ subject: z.ZodString;
554
+ textBody: z.ZodString;
555
+ htmlBody: z.ZodNullable<z.ZodString>;
556
+ emailJobId: z.ZodNullable<z.ZodString>;
557
+ receivedAt: z.ZodISODateTime;
558
+ }, z.core.$strip>;
559
+ export type SupportMessageViewAsRead = z.output<typeof SupportMessageViewAsRead>;
560
+ /** `GET {base}/threads`, as a client that does not control the Worker must read it. */
561
+ export declare const SupportThreadsResponseAsRead: z.ZodObject<{
562
+ threads: z.ZodArray<z.ZodObject<{
563
+ id: z.ZodString;
564
+ channel: z.ZodString;
565
+ inboxAddress: z.ZodNullable<z.ZodString>;
566
+ subject: z.ZodString;
567
+ fromAddress: z.ZodString;
568
+ fromName: z.ZodNullable<z.ZodString>;
569
+ senderAuthenticated: z.ZodBoolean;
570
+ userId: z.ZodNullable<z.ZodString>;
571
+ accountLinkSource: z.ZodNullable<z.ZodString>;
572
+ declaredCategory: z.ZodNullable<z.ZodString>;
573
+ category: z.ZodString;
574
+ priority: z.ZodString;
575
+ sentiment: z.ZodString;
576
+ confidence: z.ZodNullable<z.ZodNumber>;
577
+ model: z.ZodNullable<z.ZodString>;
578
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
579
+ archived: z.ZodBoolean;
580
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
581
+ archivedBy: z.ZodNullable<z.ZodString>;
582
+ messageCount: z.ZodNumber;
583
+ firstMessageAt: z.ZodISODateTime;
584
+ lastMessageAt: z.ZodISODateTime;
585
+ createdAt: z.ZodISODateTime;
586
+ updatedAt: z.ZodISODateTime;
587
+ read: z.ZodBoolean;
588
+ snoozedUntil: z.ZodNullable<z.ZodISODateTime>;
589
+ }, z.core.$strip>>;
590
+ nextCursor: z.ZodNullable<z.ZodString>;
591
+ }, z.core.$strip>;
592
+ export type SupportThreadsResponseAsRead = z.output<typeof SupportThreadsResponseAsRead>;
593
+ /** `GET {base}/threads/:id`, as a client that does not control the Worker must read it. */
594
+ export declare const SupportThreadResponseAsRead: z.ZodObject<{
595
+ thread: z.ZodObject<{
596
+ id: z.ZodString;
597
+ channel: z.ZodString;
598
+ inboxAddress: z.ZodNullable<z.ZodString>;
599
+ subject: z.ZodString;
600
+ fromAddress: z.ZodString;
601
+ fromName: z.ZodNullable<z.ZodString>;
602
+ senderAuthenticated: z.ZodBoolean;
603
+ userId: z.ZodNullable<z.ZodString>;
604
+ accountLinkSource: z.ZodNullable<z.ZodString>;
605
+ declaredCategory: z.ZodNullable<z.ZodString>;
606
+ category: z.ZodString;
607
+ priority: z.ZodString;
608
+ sentiment: z.ZodString;
609
+ confidence: z.ZodNullable<z.ZodNumber>;
610
+ model: z.ZodNullable<z.ZodString>;
611
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
612
+ archived: z.ZodBoolean;
613
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
614
+ archivedBy: z.ZodNullable<z.ZodString>;
615
+ messageCount: z.ZodNumber;
616
+ firstMessageAt: z.ZodISODateTime;
617
+ lastMessageAt: z.ZodISODateTime;
618
+ createdAt: z.ZodISODateTime;
619
+ updatedAt: z.ZodISODateTime;
620
+ }, z.core.$strip>;
621
+ messages: z.ZodArray<z.ZodObject<{
622
+ id: z.ZodString;
623
+ direction: z.ZodString;
624
+ channel: z.ZodString;
625
+ context: z.ZodNullable<z.ZodObject<{
626
+ screen: z.ZodOptional<z.ZodString>;
627
+ appVersion: z.ZodOptional<z.ZodString>;
628
+ platform: z.ZodOptional<z.ZodString>;
629
+ environment: z.ZodOptional<z.ZodString>;
630
+ locale: z.ZodOptional<z.ZodString>;
631
+ }, z.core.$strip>>;
632
+ fromAddress: z.ZodNullable<z.ZodString>;
633
+ fromName: z.ZodNullable<z.ZodString>;
634
+ toAddress: z.ZodNullable<z.ZodString>;
635
+ subject: z.ZodString;
636
+ textBody: z.ZodString;
637
+ htmlBody: z.ZodNullable<z.ZodString>;
638
+ emailJobId: z.ZodNullable<z.ZodString>;
639
+ receivedAt: z.ZodISODateTime;
640
+ }, z.core.$strip>>;
641
+ attachments: z.ZodArray<z.ZodObject<{
642
+ id: z.ZodString;
643
+ filename: z.ZodString;
644
+ contentType: z.ZodString;
645
+ size: z.ZodNumber;
646
+ sha256: z.ZodString;
647
+ inline: z.ZodBoolean;
648
+ url: z.ZodNullable<z.ZodString>;
649
+ }, z.core.$strip>>;
650
+ sender: z.ZodObject<{
651
+ authenticated: z.ZodBoolean;
652
+ userId: z.ZodNullable<z.ZodString>;
653
+ name: z.ZodOptional<z.ZodString>;
654
+ emailVerified: z.ZodOptional<z.ZodBoolean>;
655
+ billingScope: z.ZodLiteral<"user">;
656
+ purchases: z.ZodArray<z.ZodObject<{
657
+ id: z.ZodString;
658
+ rail: z.ZodString;
659
+ productId: z.ZodString;
660
+ status: z.ZodString;
661
+ environment: z.ZodString;
662
+ purchasedAt: z.ZodISODateTime;
663
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
664
+ revokedAt: z.ZodNullable<z.ZodISODateTime>;
665
+ }, z.core.$strip>>;
666
+ entitlements: z.ZodArray<z.ZodObject<{
667
+ key: z.ZodString;
668
+ active: z.ZodBoolean;
669
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
670
+ source: z.ZodNullable<z.ZodString>;
671
+ }, z.core.$strip>>;
672
+ }, z.core.$strip>;
673
+ replies: z.ZodArray<z.ZodObject<{
674
+ key: z.ZodString;
675
+ label: z.ZodString;
676
+ category: z.ZodOptional<z.ZodString>;
677
+ body: z.ZodString;
678
+ }, z.core.$strip>>;
679
+ }, z.core.$strip>;
680
+ export type SupportThreadResponseAsRead = z.output<typeof SupportThreadResponseAsRead>;
681
+ /** `POST {base}/threads/:id/archive`, as a client that does not control the Worker must read it. */
682
+ export declare const SupportArchiveResponseAsRead: z.ZodObject<{
683
+ id: z.ZodString;
684
+ channel: z.ZodString;
685
+ inboxAddress: z.ZodNullable<z.ZodString>;
686
+ subject: z.ZodString;
687
+ fromAddress: z.ZodString;
688
+ fromName: z.ZodNullable<z.ZodString>;
689
+ senderAuthenticated: z.ZodBoolean;
690
+ userId: z.ZodNullable<z.ZodString>;
691
+ accountLinkSource: z.ZodNullable<z.ZodString>;
692
+ declaredCategory: z.ZodNullable<z.ZodString>;
693
+ category: z.ZodString;
694
+ priority: z.ZodString;
695
+ sentiment: z.ZodString;
696
+ confidence: z.ZodNullable<z.ZodNumber>;
697
+ model: z.ZodNullable<z.ZodString>;
698
+ classifiedAt: z.ZodNullable<z.ZodISODateTime>;
699
+ archived: z.ZodBoolean;
700
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
701
+ archivedBy: z.ZodNullable<z.ZodString>;
702
+ messageCount: z.ZodNumber;
703
+ firstMessageAt: z.ZodISODateTime;
704
+ lastMessageAt: z.ZodISODateTime;
705
+ createdAt: z.ZodISODateTime;
706
+ updatedAt: z.ZodISODateTime;
707
+ }, z.core.$strip>;
708
+ export type SupportArchiveResponseAsRead = z.output<typeof SupportArchiveResponseAsRead>;
709
+ /**
710
+ * ## The submitter's own view, and what it deliberately omits
711
+ *
712
+ * Everything above this line is written for a **management client**: an operator triaging an inbox,
713
+ * who needs the classification to sort by and the sender's purchase history to act on. Everything
714
+ * below is written for the **person who wrote the message**, and it is a different object rather than
715
+ * the same one with fields nulled — because a projection that starts from the operator's shape leaks
716
+ * the first time somebody adds a column and forgets which of the two callers is reading.
717
+ *
718
+ * A submitter is shown their own words, the answers to them, and whether the thread is done. They are
719
+ * never shown the classification (a machine's judgment about them, and a filter on it is the inbox's
720
+ * business), the priority or sentiment (the same, and `angry` rendered back to the person it describes
721
+ * is its own kind of disaster), the per-viewer flags (private to an operator), the account link or its
722
+ * provenance (they know who they are), or anything at all about another account.
723
+ */
724
+ /** One of the submitter's own conversations. */
725
+ export declare const SupportMyThreadView: z.ZodObject<{
726
+ id: z.ZodString;
727
+ subject: z.ZodString;
728
+ resolved: z.ZodBoolean;
729
+ messageCount: z.ZodNumber;
730
+ lastMessageAt: z.ZodISODateTime;
731
+ createdAt: z.ZodISODateTime;
732
+ }, z.core.$strip>;
733
+ export type SupportMyThreadView = z.output<typeof SupportMyThreadView>;
734
+ /** One message in the submitter's own conversation. */
735
+ export declare const SupportMyMessageView: z.ZodObject<{
736
+ id: z.ZodString;
737
+ direction: z.ZodEnum<{
738
+ inbound: "inbound";
739
+ outbound: "outbound";
740
+ }>;
741
+ body: z.ZodString;
742
+ context: z.ZodNullable<z.ZodObject<{
743
+ screen: z.ZodOptional<z.ZodString>;
744
+ appVersion: z.ZodOptional<z.ZodString>;
745
+ platform: z.ZodOptional<z.ZodString>;
746
+ environment: z.ZodOptional<z.ZodString>;
747
+ locale: z.ZodOptional<z.ZodString>;
748
+ }, z.core.$strict>>;
749
+ attachments: z.ZodArray<z.ZodObject<{
750
+ id: z.ZodString;
751
+ filename: z.ZodString;
752
+ contentType: z.ZodString;
753
+ size: z.ZodNumber;
754
+ sha256: z.ZodString;
755
+ inline: z.ZodBoolean;
756
+ url: z.ZodNullable<z.ZodString>;
757
+ }, z.core.$strip>>;
758
+ sentAt: z.ZodISODateTime;
759
+ }, z.core.$strip>;
760
+ export type SupportMyMessageView = z.output<typeof SupportMyMessageView>;
761
+ /** `POST {base}/feedback`. */
762
+ export declare const SupportSubmissionResponse: z.ZodObject<{
763
+ threadId: z.ZodString;
764
+ messageId: z.ZodString;
765
+ opened: z.ZodBoolean;
766
+ attachments: z.ZodNumber;
767
+ }, z.core.$strip>;
768
+ export type SupportSubmissionResponse = z.output<typeof SupportSubmissionResponse>;
769
+ /** `GET {base}/feedback`. */
770
+ export declare const SupportMyThreadsResponse: z.ZodObject<{
771
+ threads: z.ZodArray<z.ZodObject<{
772
+ id: z.ZodString;
773
+ subject: z.ZodString;
774
+ resolved: z.ZodBoolean;
775
+ messageCount: z.ZodNumber;
776
+ lastMessageAt: z.ZodISODateTime;
777
+ createdAt: z.ZodISODateTime;
778
+ }, z.core.$strip>>;
779
+ nextCursor: z.ZodNullable<z.ZodString>;
780
+ }, z.core.$strip>;
781
+ export type SupportMyThreadsResponse = z.output<typeof SupportMyThreadsResponse>;
782
+ /** `GET {base}/feedback/:id`. */
783
+ export declare const SupportMyThreadResponse: z.ZodObject<{
784
+ thread: z.ZodObject<{
785
+ id: z.ZodString;
786
+ subject: z.ZodString;
787
+ resolved: z.ZodBoolean;
788
+ messageCount: z.ZodNumber;
789
+ lastMessageAt: z.ZodISODateTime;
790
+ createdAt: z.ZodISODateTime;
791
+ }, z.core.$strip>;
792
+ messages: z.ZodArray<z.ZodObject<{
793
+ id: z.ZodString;
794
+ direction: z.ZodEnum<{
795
+ inbound: "inbound";
796
+ outbound: "outbound";
797
+ }>;
798
+ body: z.ZodString;
799
+ context: z.ZodNullable<z.ZodObject<{
800
+ screen: z.ZodOptional<z.ZodString>;
801
+ appVersion: z.ZodOptional<z.ZodString>;
802
+ platform: z.ZodOptional<z.ZodString>;
803
+ environment: z.ZodOptional<z.ZodString>;
804
+ locale: z.ZodOptional<z.ZodString>;
805
+ }, z.core.$strict>>;
806
+ attachments: z.ZodArray<z.ZodObject<{
807
+ id: z.ZodString;
808
+ filename: z.ZodString;
809
+ contentType: z.ZodString;
810
+ size: z.ZodNumber;
811
+ sha256: z.ZodString;
812
+ inline: z.ZodBoolean;
813
+ url: z.ZodNullable<z.ZodString>;
814
+ }, z.core.$strip>>;
815
+ sentAt: z.ZodISODateTime;
816
+ }, z.core.$strip>>;
817
+ }, z.core.$strip>;
818
+ export type SupportMyThreadResponse = z.output<typeof SupportMyThreadResponse>;
819
+ /** `GET {base}/replies`. */
820
+ export declare const SupportRepliesResponse: z.ZodObject<{
821
+ replies: z.ZodArray<z.ZodObject<{
822
+ key: z.ZodString;
823
+ label: z.ZodString;
824
+ category: z.ZodOptional<z.ZodString>;
825
+ body: z.ZodString;
826
+ }, z.core.$strip>>;
827
+ }, z.core.$strip>;
828
+ export type SupportRepliesResponse = z.output<typeof SupportRepliesResponse>;
829
+ //# sourceMappingURL=responses.d.ts.map