@hexclave/shared 1.0.20 → 1.0.22

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 (32) hide show
  1. package/dist/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
  2. package/dist/ai/unified-prompts/skill-site-prompt.js +4 -1
  3. package/dist/ai/unified-prompts/skill-site-prompt.js.map +1 -1
  4. package/dist/config/schema.d.ts +6 -6
  5. package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
  6. package/dist/esm/ai/unified-prompts/skill-site-prompt.js +4 -1
  7. package/dist/esm/ai/unified-prompts/skill-site-prompt.js.map +1 -1
  8. package/dist/esm/config/schema.d.ts +6 -6
  9. package/dist/esm/interface/admin-interface.d.ts +1 -0
  10. package/dist/esm/interface/admin-interface.d.ts.map +1 -1
  11. package/dist/esm/interface/admin-interface.js +2 -1
  12. package/dist/esm/interface/admin-interface.js.map +1 -1
  13. package/dist/esm/interface/client-interface.js +1 -1
  14. package/dist/esm/interface/conversations.d.ts +11 -11
  15. package/dist/esm/interface/crud/email-outbox.d.ts +22 -22
  16. package/dist/esm/interface/crud/email-outbox.js +1 -1
  17. package/dist/esm/interface/crud/email-outbox.js.map +1 -1
  18. package/dist/esm/interface/server-interface.js +1 -1
  19. package/dist/interface/admin-interface.d.ts +1 -0
  20. package/dist/interface/admin-interface.d.ts.map +1 -1
  21. package/dist/interface/admin-interface.js +2 -1
  22. package/dist/interface/admin-interface.js.map +1 -1
  23. package/dist/interface/client-interface.js +1 -1
  24. package/dist/interface/conversations.d.ts +11 -11
  25. package/dist/interface/crud/email-outbox.d.ts +22 -22
  26. package/dist/interface/crud/email-outbox.js +1 -1
  27. package/dist/interface/crud/email-outbox.js.map +1 -1
  28. package/dist/interface/server-interface.js +1 -1
  29. package/package.json +1 -1
  30. package/src/ai/unified-prompts/skill-site-prompt.ts +4 -1
  31. package/src/interface/admin-interface.ts +2 -1
  32. package/src/interface/crud/email-outbox.ts +1 -1
@@ -165,6 +165,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
165
165
  created_at_millis: number;
166
166
  html: string | null;
167
167
  text: string | null;
168
+ notification_category_id: string | null;
168
169
  updated_at_millis: number;
169
170
  tsx_source: string;
170
171
  theme_id: string | null;
@@ -203,7 +204,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
203
204
  rendered_at_millis: number;
204
205
  is_transactional: boolean;
205
206
  is_high_priority: boolean;
206
- notification_category_id: string | null;
207
207
  } | {
208
208
  status: "queued";
209
209
  id: string;
@@ -211,6 +211,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
211
211
  created_at_millis: number;
212
212
  html: string | null;
213
213
  text: string | null;
214
+ notification_category_id: string | null;
214
215
  updated_at_millis: number;
215
216
  tsx_source: string;
216
217
  theme_id: string | null;
@@ -249,7 +250,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
249
250
  rendered_at_millis: number;
250
251
  is_transactional: boolean;
251
252
  is_high_priority: boolean;
252
- notification_category_id: string | null;
253
253
  } | {
254
254
  status: "sending";
255
255
  id: string;
@@ -257,6 +257,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
257
257
  created_at_millis: number;
258
258
  html: string | null;
259
259
  text: string | null;
260
+ notification_category_id: string | null;
260
261
  updated_at_millis: number;
261
262
  tsx_source: string;
262
263
  theme_id: string | null;
@@ -295,7 +296,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
295
296
  rendered_at_millis: number;
296
297
  is_transactional: boolean;
297
298
  is_high_priority: boolean;
298
- notification_category_id: string | null;
299
299
  started_sending_at_millis: number;
300
300
  } | {
301
301
  status: "server-error";
@@ -304,6 +304,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
304
304
  created_at_millis: number;
305
305
  html: string | null;
306
306
  text: string | null;
307
+ notification_category_id: string | null;
307
308
  updated_at_millis: number;
308
309
  tsx_source: string;
309
310
  theme_id: string | null;
@@ -342,7 +343,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
342
343
  rendered_at_millis: number;
343
344
  is_transactional: boolean;
344
345
  is_high_priority: boolean;
345
- notification_category_id: string | null;
346
346
  started_sending_at_millis: number;
347
347
  error_at_millis: number;
348
348
  server_error: string;
@@ -350,11 +350,11 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
350
350
  subject?: string | undefined;
351
351
  html?: string | null | undefined;
352
352
  text?: string | null | undefined;
353
+ notification_category_id?: string | null | undefined;
353
354
  started_rendering_at_millis?: number | undefined;
354
355
  rendered_at_millis?: number | undefined;
355
356
  is_transactional?: boolean | undefined;
356
357
  is_high_priority?: boolean | undefined;
357
- notification_category_id?: string | null | undefined;
358
358
  started_sending_at_millis?: number | undefined;
359
359
  status: "skipped";
360
360
  id: string;
@@ -403,6 +403,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
403
403
  created_at_millis: number;
404
404
  html: string | null;
405
405
  text: string | null;
406
+ notification_category_id: string | null;
406
407
  updated_at_millis: number;
407
408
  tsx_source: string;
408
409
  theme_id: string | null;
@@ -441,7 +442,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
441
442
  rendered_at_millis: number;
442
443
  is_transactional: boolean;
443
444
  is_high_priority: boolean;
444
- notification_category_id: string | null;
445
445
  started_sending_at_millis: number;
446
446
  bounced_at_millis: number;
447
447
  } | {
@@ -451,6 +451,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
451
451
  created_at_millis: number;
452
452
  html: string | null;
453
453
  text: string | null;
454
+ notification_category_id: string | null;
454
455
  updated_at_millis: number;
455
456
  tsx_source: string;
456
457
  theme_id: string | null;
@@ -489,7 +490,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
489
490
  rendered_at_millis: number;
490
491
  is_transactional: boolean;
491
492
  is_high_priority: boolean;
492
- notification_category_id: string | null;
493
493
  started_sending_at_millis: number;
494
494
  delivery_delayed_at_millis: number;
495
495
  } | {
@@ -499,6 +499,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
499
499
  created_at_millis: number;
500
500
  html: string | null;
501
501
  text: string | null;
502
+ notification_category_id: string | null;
502
503
  updated_at_millis: number;
503
504
  tsx_source: string;
504
505
  theme_id: string | null;
@@ -537,7 +538,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
537
538
  rendered_at_millis: number;
538
539
  is_transactional: boolean;
539
540
  is_high_priority: boolean;
540
- notification_category_id: string | null;
541
541
  started_sending_at_millis: number;
542
542
  delivered_at_millis: number;
543
543
  can_have_delivery_info: boolean;
@@ -548,6 +548,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
548
548
  created_at_millis: number;
549
549
  html: string | null;
550
550
  text: string | null;
551
+ notification_category_id: string | null;
551
552
  updated_at_millis: number;
552
553
  tsx_source: string;
553
554
  theme_id: string | null;
@@ -586,7 +587,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
586
587
  rendered_at_millis: number;
587
588
  is_transactional: boolean;
588
589
  is_high_priority: boolean;
589
- notification_category_id: string | null;
590
590
  started_sending_at_millis: number;
591
591
  delivered_at_millis: number;
592
592
  can_have_delivery_info: boolean;
@@ -598,6 +598,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
598
598
  created_at_millis: number;
599
599
  html: string | null;
600
600
  text: string | null;
601
+ notification_category_id: string | null;
601
602
  updated_at_millis: number;
602
603
  tsx_source: string;
603
604
  theme_id: string | null;
@@ -636,7 +637,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
636
637
  rendered_at_millis: number;
637
638
  is_transactional: boolean;
638
639
  is_high_priority: boolean;
639
- notification_category_id: string | null;
640
640
  started_sending_at_millis: number;
641
641
  delivered_at_millis: number;
642
642
  can_have_delivery_info: boolean;
@@ -648,6 +648,7 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
648
648
  created_at_millis: number;
649
649
  html: string | null;
650
650
  text: string | null;
651
+ notification_category_id: string | null;
651
652
  updated_at_millis: number;
652
653
  tsx_source: string;
653
654
  theme_id: string | null;
@@ -686,7 +687,6 @@ declare const emailOutboxReadSchema: yup$1.MixedSchema<{
686
687
  rendered_at_millis: number;
687
688
  is_transactional: boolean;
688
689
  is_high_priority: boolean;
689
- notification_category_id: string | null;
690
690
  started_sending_at_millis: number;
691
691
  delivered_at_millis: number;
692
692
  can_have_delivery_info: boolean;
@@ -885,6 +885,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
885
885
  created_at_millis: number;
886
886
  html: string | null;
887
887
  text: string | null;
888
+ notification_category_id: string | null;
888
889
  updated_at_millis: number;
889
890
  tsx_source: string;
890
891
  theme_id: string | null;
@@ -923,7 +924,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
923
924
  rendered_at_millis: number;
924
925
  is_transactional: boolean;
925
926
  is_high_priority: boolean;
926
- notification_category_id: string | null;
927
927
  } | {
928
928
  status: "queued";
929
929
  id: string;
@@ -931,6 +931,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
931
931
  created_at_millis: number;
932
932
  html: string | null;
933
933
  text: string | null;
934
+ notification_category_id: string | null;
934
935
  updated_at_millis: number;
935
936
  tsx_source: string;
936
937
  theme_id: string | null;
@@ -969,7 +970,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
969
970
  rendered_at_millis: number;
970
971
  is_transactional: boolean;
971
972
  is_high_priority: boolean;
972
- notification_category_id: string | null;
973
973
  } | {
974
974
  status: "sending";
975
975
  id: string;
@@ -977,6 +977,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
977
977
  created_at_millis: number;
978
978
  html: string | null;
979
979
  text: string | null;
980
+ notification_category_id: string | null;
980
981
  updated_at_millis: number;
981
982
  tsx_source: string;
982
983
  theme_id: string | null;
@@ -1015,7 +1016,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1015
1016
  rendered_at_millis: number;
1016
1017
  is_transactional: boolean;
1017
1018
  is_high_priority: boolean;
1018
- notification_category_id: string | null;
1019
1019
  started_sending_at_millis: number;
1020
1020
  } | {
1021
1021
  status: "server-error";
@@ -1024,6 +1024,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1024
1024
  created_at_millis: number;
1025
1025
  html: string | null;
1026
1026
  text: string | null;
1027
+ notification_category_id: string | null;
1027
1028
  updated_at_millis: number;
1028
1029
  tsx_source: string;
1029
1030
  theme_id: string | null;
@@ -1062,7 +1063,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1062
1063
  rendered_at_millis: number;
1063
1064
  is_transactional: boolean;
1064
1065
  is_high_priority: boolean;
1065
- notification_category_id: string | null;
1066
1066
  started_sending_at_millis: number;
1067
1067
  error_at_millis: number;
1068
1068
  server_error: string;
@@ -1070,11 +1070,11 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1070
1070
  subject?: string | undefined;
1071
1071
  html?: string | null | undefined;
1072
1072
  text?: string | null | undefined;
1073
+ notification_category_id?: string | null | undefined;
1073
1074
  started_rendering_at_millis?: number | undefined;
1074
1075
  rendered_at_millis?: number | undefined;
1075
1076
  is_transactional?: boolean | undefined;
1076
1077
  is_high_priority?: boolean | undefined;
1077
- notification_category_id?: string | null | undefined;
1078
1078
  started_sending_at_millis?: number | undefined;
1079
1079
  status: "skipped";
1080
1080
  id: string;
@@ -1123,6 +1123,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1123
1123
  created_at_millis: number;
1124
1124
  html: string | null;
1125
1125
  text: string | null;
1126
+ notification_category_id: string | null;
1126
1127
  updated_at_millis: number;
1127
1128
  tsx_source: string;
1128
1129
  theme_id: string | null;
@@ -1161,7 +1162,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1161
1162
  rendered_at_millis: number;
1162
1163
  is_transactional: boolean;
1163
1164
  is_high_priority: boolean;
1164
- notification_category_id: string | null;
1165
1165
  started_sending_at_millis: number;
1166
1166
  bounced_at_millis: number;
1167
1167
  } | {
@@ -1171,6 +1171,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1171
1171
  created_at_millis: number;
1172
1172
  html: string | null;
1173
1173
  text: string | null;
1174
+ notification_category_id: string | null;
1174
1175
  updated_at_millis: number;
1175
1176
  tsx_source: string;
1176
1177
  theme_id: string | null;
@@ -1209,7 +1210,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1209
1210
  rendered_at_millis: number;
1210
1211
  is_transactional: boolean;
1211
1212
  is_high_priority: boolean;
1212
- notification_category_id: string | null;
1213
1213
  started_sending_at_millis: number;
1214
1214
  delivery_delayed_at_millis: number;
1215
1215
  } | {
@@ -1219,6 +1219,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1219
1219
  created_at_millis: number;
1220
1220
  html: string | null;
1221
1221
  text: string | null;
1222
+ notification_category_id: string | null;
1222
1223
  updated_at_millis: number;
1223
1224
  tsx_source: string;
1224
1225
  theme_id: string | null;
@@ -1257,7 +1258,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1257
1258
  rendered_at_millis: number;
1258
1259
  is_transactional: boolean;
1259
1260
  is_high_priority: boolean;
1260
- notification_category_id: string | null;
1261
1261
  started_sending_at_millis: number;
1262
1262
  delivered_at_millis: number;
1263
1263
  can_have_delivery_info: boolean;
@@ -1268,6 +1268,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1268
1268
  created_at_millis: number;
1269
1269
  html: string | null;
1270
1270
  text: string | null;
1271
+ notification_category_id: string | null;
1271
1272
  updated_at_millis: number;
1272
1273
  tsx_source: string;
1273
1274
  theme_id: string | null;
@@ -1306,7 +1307,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1306
1307
  rendered_at_millis: number;
1307
1308
  is_transactional: boolean;
1308
1309
  is_high_priority: boolean;
1309
- notification_category_id: string | null;
1310
1310
  started_sending_at_millis: number;
1311
1311
  delivered_at_millis: number;
1312
1312
  can_have_delivery_info: boolean;
@@ -1318,6 +1318,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1318
1318
  created_at_millis: number;
1319
1319
  html: string | null;
1320
1320
  text: string | null;
1321
+ notification_category_id: string | null;
1321
1322
  updated_at_millis: number;
1322
1323
  tsx_source: string;
1323
1324
  theme_id: string | null;
@@ -1356,7 +1357,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1356
1357
  rendered_at_millis: number;
1357
1358
  is_transactional: boolean;
1358
1359
  is_high_priority: boolean;
1359
- notification_category_id: string | null;
1360
1360
  started_sending_at_millis: number;
1361
1361
  delivered_at_millis: number;
1362
1362
  can_have_delivery_info: boolean;
@@ -1368,6 +1368,7 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1368
1368
  created_at_millis: number;
1369
1369
  html: string | null;
1370
1370
  text: string | null;
1371
+ notification_category_id: string | null;
1371
1372
  updated_at_millis: number;
1372
1373
  tsx_source: string;
1373
1374
  theme_id: string | null;
@@ -1406,7 +1407,6 @@ declare const emailOutboxCrud: CrudSchemaFromOptions<{
1406
1407
  rendered_at_millis: number;
1407
1408
  is_transactional: boolean;
1408
1409
  is_high_priority: boolean;
1409
- notification_category_id: string | null;
1410
1410
  started_sending_at_millis: number;
1411
1411
  delivered_at_millis: number;
1412
1412
  can_have_delivery_info: boolean;
@@ -183,7 +183,7 @@ const emailOutboxCrud = (0, ______crud_js.createCrud)({
183
183
  serverList: {
184
184
  tags: ["Emails"],
185
185
  summary: "List email outbox",
186
- description: "Lists all emails in the outbox with optional filtering by status or simple_status."
186
+ description: "Lists all emails in the outbox with optional filtering by status, simple_status, or user_id."
187
187
  }
188
188
  }
189
189
  });
@@ -1 +1 @@
1
- {"version":3,"file":"email-outbox.js","names":["fieldSchema"],"sources":["../../../src/interface/crud/email-outbox.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as fieldSchema from \"../../schema-fields\";\n\n\n// Recipient types\nconst recipientUserPrimaryEmailSchema = fieldSchema.yupObject({\n type: fieldSchema.yupString().oneOf([\"user-primary-email\"]).defined(),\n user_id: fieldSchema.yupString().defined(),\n}).defined();\n\nconst recipientUserCustomEmailsSchema = fieldSchema.yupObject({\n type: fieldSchema.yupString().oneOf([\"user-custom-emails\"]).defined(),\n user_id: fieldSchema.yupString().defined(),\n emails: fieldSchema.yupArray(fieldSchema.yupString().defined()).defined(),\n}).defined();\n\nconst recipientCustomEmailsSchema = fieldSchema.yupObject({\n type: fieldSchema.yupString().oneOf([\"custom-emails\"]).defined(),\n emails: fieldSchema.yupArray(fieldSchema.yupString().defined()).defined(),\n}).defined();\n\nconst recipientSchema = fieldSchema.yupUnion(\n recipientUserPrimaryEmailSchema,\n recipientUserCustomEmailsSchema,\n recipientCustomEmailsSchema\n);\n\n\n// =============================== BASE FIELDS ===============================\n\n// Base fields present on all emails\nconst emailOutboxBaseSchema = fieldSchema.yupObject({\n id: fieldSchema.yupString().defined(),\n created_at_millis: fieldSchema.yupNumber().defined(),\n updated_at_millis: fieldSchema.yupNumber().defined(),\n tsx_source: fieldSchema.yupString().defined(),\n theme_id: fieldSchema.yupString().nullable().defined(),\n to: recipientSchema.defined(),\n variables: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).defined(),\n skip_deliverability_check: fieldSchema.yupBoolean().defined(),\n scheduled_at_millis: fieldSchema.yupNumber().defined(),\n\n\n // Source tracking for grouping emails by template/draft\n created_with: fieldSchema.yupString().oneOf([\"draft\", \"programmatic-call\"]).defined(),\n email_draft_id: fieldSchema.yupString().nullable().defined(),\n email_programmatic_call_template_id: fieldSchema.yupString().nullable().defined(),\n\n // Retry-related fields (for debugging/testing deferred retry logic)\n send_retries: fieldSchema.yupNumber().defined(),\n next_send_retry_at_millis: fieldSchema.yupNumber().nullable().defined(),\n // Array of errors from each failed send attempt, each with internal/external messages\n send_attempt_errors: fieldSchema.yupArray(fieldSchema.yupObject({\n attempt_number: fieldSchema.yupNumber().defined(),\n timestamp: fieldSchema.yupString().defined(),\n external_message: fieldSchema.yupString().defined(),\n external_details: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).defined(),\n internal_message: fieldSchema.yupString().defined(),\n internal_details: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).defined(),\n }).defined()).nullable().defined(),\n\n status: fieldSchema.yupString().defined(),\n simple_status: fieldSchema.yupString().defined(),\n\n // These fields are overridden because we use concat to build the final schema for each state\n is_paused: fieldSchema.yupBoolean().oneOf([false]).defined(),\n has_rendered: fieldSchema.yupBoolean().oneOf([false]).defined(),\n has_delivered: fieldSchema.yupBoolean().oneOf([false]).defined(),\n}).defined();\n\n// Rendered output fields\nconst renderedFieldsSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n started_rendering_at_millis: fieldSchema.yupNumber().defined(),\n rendered_at_millis: fieldSchema.yupNumber().defined(),\n subject: fieldSchema.yupString().defined(),\n html: fieldSchema.yupString().nullable().defined(),\n text: fieldSchema.yupString().nullable().defined(),\n is_transactional: fieldSchema.yupBoolean().defined(),\n is_high_priority: fieldSchema.yupBoolean().defined(),\n notification_category_id: fieldSchema.yupString().nullable().defined(),\n has_rendered: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst startedSendingFieldsSchema = renderedFieldsSchema.concat(fieldSchema.yupObject({\n started_sending_at_millis: fieldSchema.yupNumber().defined(),\n}).defined());\n\n// Finished delivering tracking fields\nconst finishedDeliveringFieldsSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n delivered_at_millis: fieldSchema.yupNumber().defined(),\n has_delivered: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\n\n// =============================== STATUS-SPECIFIC SCHEMAS ===============================\n\nconst pausedStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"paused\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n is_paused: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst preparingStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"preparing\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n}).defined());\n\nconst renderingStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"rendering\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n started_rendering_at_millis: fieldSchema.yupNumber().defined(),\n}).defined());\n\nconst renderErrorStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"render-error\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"error\"]).defined(),\n started_rendering_at_millis: fieldSchema.yupNumber().defined(),\n rendered_at_millis: fieldSchema.yupNumber().defined(),\n render_error: fieldSchema.yupString().defined(),\n}).defined());\n\nconst scheduledStatusSchema = renderedFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"scheduled\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n has_rendered: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst queuedStatusSchema = renderedFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"queued\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n has_rendered: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst sendingStatusSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"sending\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n}).defined());\n\nconst serverErrorStatusSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"server-error\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"error\"]).defined(),\n error_at_millis: fieldSchema.yupNumber().defined(),\n server_error: fieldSchema.yupString().defined(),\n}).defined());\n\n// SKIPPED can happen at any time in the lifecycle (like PAUSED)\n// An email can be skipped before rendering (has_rendered: false) or after rendering (has_rendered: true)\n// e.g., user deleted after the email was rendered but before it was sent\nconst skippedStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"skipped\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n skipped_at_millis: fieldSchema.yupNumber().defined(),\n skipped_reason: fieldSchema.yupString().defined(),\n skipped_details: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).defined(),\n // Override has_rendered to allow both true and false since email can be skipped at any time\n has_rendered: fieldSchema.yupBoolean().defined(),\n // These fields may or may not be present depending on when the email was skipped\n started_rendering_at_millis: fieldSchema.yupNumber().optional(),\n rendered_at_millis: fieldSchema.yupNumber().optional(),\n subject: fieldSchema.yupString().optional(),\n html: fieldSchema.yupString().nullable().optional(),\n text: fieldSchema.yupString().nullable().optional(),\n is_transactional: fieldSchema.yupBoolean().optional(),\n is_high_priority: fieldSchema.yupBoolean().optional(),\n notification_category_id: fieldSchema.yupString().nullable().optional(),\n started_sending_at_millis: fieldSchema.yupNumber().optional(),\n}).defined());\n\nconst bouncedStatusSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"bounced\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"error\"]).defined(),\n bounced_at_millis: fieldSchema.yupNumber().defined(),\n}).defined());\n\nconst deliveryDelayedStatusSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"delivery-delayed\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n delivery_delayed_at_millis: fieldSchema.yupNumber().defined(),\n}).defined());\n\nconst sentStatusSchema = finishedDeliveringFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"sent\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n // Whether this email's provider supports delivery tracking (opens, clicks, etc.)\n can_have_delivery_info: fieldSchema.yupBoolean().defined(),\n}).defined());\n\nconst openedStatusSchema = finishedDeliveringFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"opened\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n opened_at_millis: fieldSchema.yupNumber().defined(),\n can_have_delivery_info: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst clickedStatusSchema = finishedDeliveringFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"clicked\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n clicked_at_millis: fieldSchema.yupNumber().defined(),\n can_have_delivery_info: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst markedAsSpamStatusSchema = finishedDeliveringFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"marked-as-spam\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n marked_as_spam_at_millis: fieldSchema.yupNumber().defined(),\n can_have_delivery_info: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\n// Combined read schema using union\nexport const emailOutboxReadSchema = fieldSchema.yupUnion(\n pausedStatusSchema,\n preparingStatusSchema,\n renderingStatusSchema,\n renderErrorStatusSchema,\n scheduledStatusSchema,\n queuedStatusSchema,\n sendingStatusSchema,\n serverErrorStatusSchema,\n skippedStatusSchema,\n bouncedStatusSchema,\n deliveryDelayedStatusSchema,\n sentStatusSchema,\n openedStatusSchema,\n clickedStatusSchema,\n markedAsSpamStatusSchema\n);\n\n// Update schema for PATCH endpoint\nexport const emailOutboxUpdateSchema = fieldSchema.yupObject({\n tsx_source: fieldSchema.yupString().optional(),\n theme_id: fieldSchema.yupString().nullable().optional(),\n to: recipientSchema.optional(),\n variables: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).optional(),\n skip_deliverability_check: fieldSchema.yupBoolean().optional(),\n scheduled_at_millis: fieldSchema.yupNumber().optional(),\n is_paused: fieldSchema.yupBoolean().optional(),\n cancel: fieldSchema.yupBoolean().oneOf([true]).optional(),\n}).defined();\n\nexport const emailOutboxCrud = createCrud({\n serverReadSchema: emailOutboxReadSchema,\n serverUpdateSchema: emailOutboxUpdateSchema,\n docs: {\n serverRead: {\n tags: [\"Emails\"],\n summary: \"Get email outbox entry\",\n description: \"Gets a single email from the outbox by ID.\",\n },\n serverUpdate: {\n tags: [\"Emails\"],\n summary: \"Update email outbox entry\",\n description: \"Updates an email in the outbox. Can be used to edit email content, pause/resume, or cancel emails. Only emails in editable states (`paused`, `preparing`, `rendering`, `render-error`, `scheduled`, `queued`, `server-error`) can be modified.\",\n },\n serverList: {\n tags: [\"Emails\"],\n summary: \"List email outbox\",\n description: \"Lists all emails in the outbox with optional filtering by status or simple_status.\",\n },\n },\n});\n\nexport type EmailOutboxCrud = CrudTypeOf<typeof emailOutboxCrud>;\n\n"],"mappings":";;;;;;;AAKA,MAAM,kCAAkCA,uBAAY,UAAU;CAC5D,MAAMA,uBAAY,WAAW,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,SAAS;CACrE,SAASA,uBAAY,WAAW,CAAC,SAAS;CAC3C,CAAC,CAAC,SAAS;AAEZ,MAAM,kCAAkCA,uBAAY,UAAU;CAC5D,MAAMA,uBAAY,WAAW,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,SAAS;CACrE,SAASA,uBAAY,WAAW,CAAC,SAAS;CAC1C,QAAQA,uBAAY,SAASA,uBAAY,WAAW,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,CAAC,CAAC,SAAS;AAEZ,MAAM,8BAA8BA,uBAAY,UAAU;CACxD,MAAMA,uBAAY,WAAW,CAAC,MAAM,CAAC,gBAAgB,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,uBAAY,WAAW,CAAC,UAAU;CAC9C,UAAUA,uBAAY,WAAW,CAAC,UAAU,CAAC,UAAU;CACvD,IAAI,gBAAgB,UAAU;CAC9B,WAAWA,uBAAY,UAAUA,uBAAY,WAAW,EAAEA,uBAAY,WAAW,CAAC,UAAU;CAC5F,2BAA2BA,uBAAY,YAAY,CAAC,UAAU;CAC9D,qBAAqBA,uBAAY,WAAW,CAAC,UAAU;CACvD,WAAWA,uBAAY,YAAY,CAAC,UAAU;CAC9C,QAAQA,uBAAY,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU;CAC1D,CAAC,CAAC,SAAS;AAEZ,MAAa,gDAA6B;CACxC,kBAAkB;CAClB,oBAAoB;CACpB,MAAM;EACJ,YAAY;GACV,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,aAAa;GACd;EACD,cAAc;GACZ,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,aAAa;GACd;EACD,YAAY;GACV,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,aAAa;GACd;EACF;CACF,CAAC"}
1
+ {"version":3,"file":"email-outbox.js","names":["fieldSchema"],"sources":["../../../src/interface/crud/email-outbox.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as fieldSchema from \"../../schema-fields\";\n\n\n// Recipient types\nconst recipientUserPrimaryEmailSchema = fieldSchema.yupObject({\n type: fieldSchema.yupString().oneOf([\"user-primary-email\"]).defined(),\n user_id: fieldSchema.yupString().defined(),\n}).defined();\n\nconst recipientUserCustomEmailsSchema = fieldSchema.yupObject({\n type: fieldSchema.yupString().oneOf([\"user-custom-emails\"]).defined(),\n user_id: fieldSchema.yupString().defined(),\n emails: fieldSchema.yupArray(fieldSchema.yupString().defined()).defined(),\n}).defined();\n\nconst recipientCustomEmailsSchema = fieldSchema.yupObject({\n type: fieldSchema.yupString().oneOf([\"custom-emails\"]).defined(),\n emails: fieldSchema.yupArray(fieldSchema.yupString().defined()).defined(),\n}).defined();\n\nconst recipientSchema = fieldSchema.yupUnion(\n recipientUserPrimaryEmailSchema,\n recipientUserCustomEmailsSchema,\n recipientCustomEmailsSchema\n);\n\n\n// =============================== BASE FIELDS ===============================\n\n// Base fields present on all emails\nconst emailOutboxBaseSchema = fieldSchema.yupObject({\n id: fieldSchema.yupString().defined(),\n created_at_millis: fieldSchema.yupNumber().defined(),\n updated_at_millis: fieldSchema.yupNumber().defined(),\n tsx_source: fieldSchema.yupString().defined(),\n theme_id: fieldSchema.yupString().nullable().defined(),\n to: recipientSchema.defined(),\n variables: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).defined(),\n skip_deliverability_check: fieldSchema.yupBoolean().defined(),\n scheduled_at_millis: fieldSchema.yupNumber().defined(),\n\n\n // Source tracking for grouping emails by template/draft\n created_with: fieldSchema.yupString().oneOf([\"draft\", \"programmatic-call\"]).defined(),\n email_draft_id: fieldSchema.yupString().nullable().defined(),\n email_programmatic_call_template_id: fieldSchema.yupString().nullable().defined(),\n\n // Retry-related fields (for debugging/testing deferred retry logic)\n send_retries: fieldSchema.yupNumber().defined(),\n next_send_retry_at_millis: fieldSchema.yupNumber().nullable().defined(),\n // Array of errors from each failed send attempt, each with internal/external messages\n send_attempt_errors: fieldSchema.yupArray(fieldSchema.yupObject({\n attempt_number: fieldSchema.yupNumber().defined(),\n timestamp: fieldSchema.yupString().defined(),\n external_message: fieldSchema.yupString().defined(),\n external_details: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).defined(),\n internal_message: fieldSchema.yupString().defined(),\n internal_details: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).defined(),\n }).defined()).nullable().defined(),\n\n status: fieldSchema.yupString().defined(),\n simple_status: fieldSchema.yupString().defined(),\n\n // These fields are overridden because we use concat to build the final schema for each state\n is_paused: fieldSchema.yupBoolean().oneOf([false]).defined(),\n has_rendered: fieldSchema.yupBoolean().oneOf([false]).defined(),\n has_delivered: fieldSchema.yupBoolean().oneOf([false]).defined(),\n}).defined();\n\n// Rendered output fields\nconst renderedFieldsSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n started_rendering_at_millis: fieldSchema.yupNumber().defined(),\n rendered_at_millis: fieldSchema.yupNumber().defined(),\n subject: fieldSchema.yupString().defined(),\n html: fieldSchema.yupString().nullable().defined(),\n text: fieldSchema.yupString().nullable().defined(),\n is_transactional: fieldSchema.yupBoolean().defined(),\n is_high_priority: fieldSchema.yupBoolean().defined(),\n notification_category_id: fieldSchema.yupString().nullable().defined(),\n has_rendered: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst startedSendingFieldsSchema = renderedFieldsSchema.concat(fieldSchema.yupObject({\n started_sending_at_millis: fieldSchema.yupNumber().defined(),\n}).defined());\n\n// Finished delivering tracking fields\nconst finishedDeliveringFieldsSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n delivered_at_millis: fieldSchema.yupNumber().defined(),\n has_delivered: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\n\n// =============================== STATUS-SPECIFIC SCHEMAS ===============================\n\nconst pausedStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"paused\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n is_paused: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst preparingStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"preparing\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n}).defined());\n\nconst renderingStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"rendering\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n started_rendering_at_millis: fieldSchema.yupNumber().defined(),\n}).defined());\n\nconst renderErrorStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"render-error\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"error\"]).defined(),\n started_rendering_at_millis: fieldSchema.yupNumber().defined(),\n rendered_at_millis: fieldSchema.yupNumber().defined(),\n render_error: fieldSchema.yupString().defined(),\n}).defined());\n\nconst scheduledStatusSchema = renderedFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"scheduled\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n has_rendered: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst queuedStatusSchema = renderedFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"queued\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n has_rendered: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst sendingStatusSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"sending\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"in-progress\"]).defined(),\n}).defined());\n\nconst serverErrorStatusSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"server-error\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"error\"]).defined(),\n error_at_millis: fieldSchema.yupNumber().defined(),\n server_error: fieldSchema.yupString().defined(),\n}).defined());\n\n// SKIPPED can happen at any time in the lifecycle (like PAUSED)\n// An email can be skipped before rendering (has_rendered: false) or after rendering (has_rendered: true)\n// e.g., user deleted after the email was rendered but before it was sent\nconst skippedStatusSchema = emailOutboxBaseSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"skipped\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n skipped_at_millis: fieldSchema.yupNumber().defined(),\n skipped_reason: fieldSchema.yupString().defined(),\n skipped_details: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).defined(),\n // Override has_rendered to allow both true and false since email can be skipped at any time\n has_rendered: fieldSchema.yupBoolean().defined(),\n // These fields may or may not be present depending on when the email was skipped\n started_rendering_at_millis: fieldSchema.yupNumber().optional(),\n rendered_at_millis: fieldSchema.yupNumber().optional(),\n subject: fieldSchema.yupString().optional(),\n html: fieldSchema.yupString().nullable().optional(),\n text: fieldSchema.yupString().nullable().optional(),\n is_transactional: fieldSchema.yupBoolean().optional(),\n is_high_priority: fieldSchema.yupBoolean().optional(),\n notification_category_id: fieldSchema.yupString().nullable().optional(),\n started_sending_at_millis: fieldSchema.yupNumber().optional(),\n}).defined());\n\nconst bouncedStatusSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"bounced\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"error\"]).defined(),\n bounced_at_millis: fieldSchema.yupNumber().defined(),\n}).defined());\n\nconst deliveryDelayedStatusSchema = startedSendingFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"delivery-delayed\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n delivery_delayed_at_millis: fieldSchema.yupNumber().defined(),\n}).defined());\n\nconst sentStatusSchema = finishedDeliveringFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"sent\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n // Whether this email's provider supports delivery tracking (opens, clicks, etc.)\n can_have_delivery_info: fieldSchema.yupBoolean().defined(),\n}).defined());\n\nconst openedStatusSchema = finishedDeliveringFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"opened\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n opened_at_millis: fieldSchema.yupNumber().defined(),\n can_have_delivery_info: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst clickedStatusSchema = finishedDeliveringFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"clicked\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n clicked_at_millis: fieldSchema.yupNumber().defined(),\n can_have_delivery_info: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\nconst markedAsSpamStatusSchema = finishedDeliveringFieldsSchema.concat(fieldSchema.yupObject({\n status: fieldSchema.yupString().oneOf([\"marked-as-spam\"]).defined(),\n simple_status: fieldSchema.yupString().oneOf([\"ok\"]).defined(),\n marked_as_spam_at_millis: fieldSchema.yupNumber().defined(),\n can_have_delivery_info: fieldSchema.yupBoolean().oneOf([true]).defined(),\n}).defined());\n\n// Combined read schema using union\nexport const emailOutboxReadSchema = fieldSchema.yupUnion(\n pausedStatusSchema,\n preparingStatusSchema,\n renderingStatusSchema,\n renderErrorStatusSchema,\n scheduledStatusSchema,\n queuedStatusSchema,\n sendingStatusSchema,\n serverErrorStatusSchema,\n skippedStatusSchema,\n bouncedStatusSchema,\n deliveryDelayedStatusSchema,\n sentStatusSchema,\n openedStatusSchema,\n clickedStatusSchema,\n markedAsSpamStatusSchema\n);\n\n// Update schema for PATCH endpoint\nexport const emailOutboxUpdateSchema = fieldSchema.yupObject({\n tsx_source: fieldSchema.yupString().optional(),\n theme_id: fieldSchema.yupString().nullable().optional(),\n to: recipientSchema.optional(),\n variables: fieldSchema.yupRecord(fieldSchema.yupString(), fieldSchema.jsonSchema).optional(),\n skip_deliverability_check: fieldSchema.yupBoolean().optional(),\n scheduled_at_millis: fieldSchema.yupNumber().optional(),\n is_paused: fieldSchema.yupBoolean().optional(),\n cancel: fieldSchema.yupBoolean().oneOf([true]).optional(),\n}).defined();\n\nexport const emailOutboxCrud = createCrud({\n serverReadSchema: emailOutboxReadSchema,\n serverUpdateSchema: emailOutboxUpdateSchema,\n docs: {\n serverRead: {\n tags: [\"Emails\"],\n summary: \"Get email outbox entry\",\n description: \"Gets a single email from the outbox by ID.\",\n },\n serverUpdate: {\n tags: [\"Emails\"],\n summary: \"Update email outbox entry\",\n description: \"Updates an email in the outbox. Can be used to edit email content, pause/resume, or cancel emails. Only emails in editable states (`paused`, `preparing`, `rendering`, `render-error`, `scheduled`, `queued`, `server-error`) can be modified.\",\n },\n serverList: {\n tags: [\"Emails\"],\n summary: \"List email outbox\",\n description: \"Lists all emails in the outbox with optional filtering by status, simple_status, or user_id.\",\n },\n },\n});\n\nexport type EmailOutboxCrud = CrudTypeOf<typeof emailOutboxCrud>;\n\n"],"mappings":";;;;;;;AAKA,MAAM,kCAAkCA,uBAAY,UAAU;CAC5D,MAAMA,uBAAY,WAAW,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,SAAS;CACrE,SAASA,uBAAY,WAAW,CAAC,SAAS;CAC3C,CAAC,CAAC,SAAS;AAEZ,MAAM,kCAAkCA,uBAAY,UAAU;CAC5D,MAAMA,uBAAY,WAAW,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,SAAS;CACrE,SAASA,uBAAY,WAAW,CAAC,SAAS;CAC1C,QAAQA,uBAAY,SAASA,uBAAY,WAAW,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,CAAC,CAAC,SAAS;AAEZ,MAAM,8BAA8BA,uBAAY,UAAU;CACxD,MAAMA,uBAAY,WAAW,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS;CAChE,QAAQA,uBAAY,SAASA,uBAAY,WAAW,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,CAAC,CAAC,SAAS;AAEZ,MAAM,kBAAkBA,uBAAY,SAClC,iCACA,iCACA,4BACD;AAMD,MAAM,wBAAwBA,uBAAY,UAAU;CAClD,IAAIA,uBAAY,WAAW,CAAC,SAAS;CACrC,mBAAmBA,uBAAY,WAAW,CAAC,SAAS;CACpD,mBAAmBA,uBAAY,WAAW,CAAC,SAAS;CACpD,YAAYA,uBAAY,W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AC,KAAK,CAAC,CAAC,UAAU;CAC1D,CAAC,CAAC,SAAS;AAEZ,MAAa,gDAA6B;CACxC,kBAAkB;CAClB,oBAAoB;CACpB,MAAM;EACJ,YAAY;GACV,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,aAAa;GACd;EACD,cAAc;GACZ,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,aAAa;GACd;EACD,YAAY;GACV,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,aAAa;GACd;EACF;CACF,CAAC"}
@@ -3,8 +3,8 @@ const require_chunk = require('../chunk-BE-pF4vm.js');
3
3
  let ___utils_errors_js = require("../utils/errors.js");
4
4
  let ___utils_objects_js = require("../utils/objects.js");
5
5
  let ___utils_results_js = require("../utils/results.js");
6
- let ___utils_urls_js = require("../utils/urls.js");
7
6
  let ___known_errors_js = require("../known-errors.js");
7
+ let ___utils_urls_js = require("../utils/urls.js");
8
8
  let ___sessions_js = require("../sessions.js");
9
9
  let __client_interface_js = require("./client-interface.js");
10
10
  let ___helpers_vault_client_side_js = require("../helpers/vault/client-side.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexclave/shared",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "repository": "https://github.com/hexclave/hexclave",
5
5
  "files": [
6
6
  "README.md",
@@ -19,7 +19,10 @@ export function buildSkillSitePrompt(docsIndexPromptValue = docsIndexPrompt) {
19
19
 
20
20
  ## Docs
21
21
 
22
- The full docs sidebar — generated from the live navigation. Fetch any of these directly:
22
+ The full docs sidebar — generated from the live navigation. Fetch any of these directly.
23
+
24
+ To retrieve docs as Markdown, use these endpoints:
25
+ - For a specific docs page, append \`.md\` to the canonical docs URL. For example, fetch \`https://docs.hexclave.com/guides/getting-started/setup.md\` for the Markdown version of \`https://docs.hexclave.com/guides/getting-started/setup\`.
23
26
 
24
27
  ${docsIndexPromptValue}
25
28
 
@@ -1091,10 +1091,11 @@ export class HexclaveAdminInterface extends HexclaveServerInterface {
1091
1091
  return await response.json();
1092
1092
  }
1093
1093
 
1094
- async listOutboxEmails(options?: { status?: string, simple_status?: string, limit?: number, cursor?: string }): Promise<EmailOutboxCrud["Server"]["List"]> {
1094
+ async listOutboxEmails(options?: { status?: string, simple_status?: string, user_id?: string, limit?: number, cursor?: string }): Promise<EmailOutboxCrud["Server"]["List"]> {
1095
1095
  const qs = new URLSearchParams();
1096
1096
  if (options?.status) qs.set('status', options.status);
1097
1097
  if (options?.simple_status) qs.set('simple_status', options.simple_status);
1098
+ if (options?.user_id) qs.set('user_id', options.user_id);
1098
1099
  if (options?.limit !== undefined) qs.set('limit', options.limit.toString());
1099
1100
  if (options?.cursor) qs.set('cursor', options.cursor);
1100
1101
  const response = await this.sendServerRequest(
@@ -254,7 +254,7 @@ export const emailOutboxCrud = createCrud({
254
254
  serverList: {
255
255
  tags: ["Emails"],
256
256
  summary: "List email outbox",
257
- description: "Lists all emails in the outbox with optional filtering by status or simple_status.",
257
+ description: "Lists all emails in the outbox with optional filtering by status, simple_status, or user_id.",
258
258
  },
259
259
  },
260
260
  });