placementt-core 1.400.1211 → 1.400.1213

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.
@@ -22,6 +22,8 @@ export declare const outreachCallables: {
22
22
  /** Existing contacts not in the pool: data updated, status left alone. */
23
23
  keptStatus: z.ZodNumber;
24
24
  noEmail: z.ZodNumber;
25
+ /** Rows skipped because the email was removed, left or bounced before. */
26
+ suppressed: z.ZodOptional<z.ZodNumber>;
25
27
  invalidEmail: z.ZodNumber;
26
28
  duplicateEmailInUpload: z.ZodNumber;
27
29
  skipped: z.ZodArray<z.ZodObject<{
@@ -54,6 +56,7 @@ export declare const outreachCallables: {
54
56
  invalidEmail: number;
55
57
  duplicateEmailInUpload: number;
56
58
  groups?: Record<string, number> | undefined;
59
+ suppressed?: number | undefined;
57
60
  brevoProcessId?: number | undefined;
58
61
  brevoError?: string | undefined;
59
62
  }, {
@@ -69,6 +72,7 @@ export declare const outreachCallables: {
69
72
  invalidEmail: number;
70
73
  duplicateEmailInUpload: number;
71
74
  groups?: Record<string, number> | undefined;
75
+ suppressed?: number | undefined;
72
76
  brevoProcessId?: number | undefined;
73
77
  brevoError?: string | undefined;
74
78
  }>;
@@ -76,7 +80,7 @@ export declare const outreachCallables: {
76
80
  "outreach-setStatus": {
77
81
  request: z.ZodObject<{
78
82
  urn: z.ZodNumber;
79
- status: z.ZodEnum<["pool", "lead", "deferred", "customer", "doNotContact"]>;
83
+ status: z.ZodEnum<["queued", "sequence", "pool", "lead", "deferred", "customer", "trustMember", "hubSchool", "doNotContact"]>;
80
84
  reason: z.ZodOptional<z.ZodString>;
81
85
  /** Required when status is deferred. */
82
86
  deferUntil: z.ZodOptional<z.ZodString>;
@@ -87,7 +91,7 @@ export declare const outreachCallables: {
87
91
  /** Also apply to every URN in `outreach.sharedEmailUrns`. */
88
92
  applyToSharedEmail: z.ZodOptional<z.ZodBoolean>;
89
93
  }, "strip", z.ZodTypeAny, {
90
- status: "pool" | "lead" | "deferred" | "customer" | "doNotContact";
94
+ status: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
91
95
  urn: number;
92
96
  reason?: string | undefined;
93
97
  oId?: string | undefined;
@@ -95,7 +99,7 @@ export declare const outreachCallables: {
95
99
  leadId?: string | undefined;
96
100
  applyToSharedEmail?: boolean | undefined;
97
101
  }, {
98
- status: "pool" | "lead" | "deferred" | "customer" | "doNotContact";
102
+ status: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
99
103
  urn: number;
100
104
  reason?: string | undefined;
101
105
  oId?: string | undefined;
@@ -105,16 +109,16 @@ export declare const outreachCallables: {
105
109
  }>;
106
110
  response: z.ZodObject<{
107
111
  urn: z.ZodNumber;
108
- status: z.ZodEnum<["pool", "lead", "deferred", "customer", "doNotContact"]>;
112
+ status: z.ZodEnum<["queued", "sequence", "pool", "lead", "deferred", "customer", "trustMember", "hubSchool", "doNotContact"]>;
109
113
  brevoSynced: z.ZodBoolean;
110
114
  affectedUrns: z.ZodArray<z.ZodNumber, "many">;
111
115
  }, "strip", z.ZodTypeAny, {
112
- status: "pool" | "lead" | "deferred" | "customer" | "doNotContact";
116
+ status: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
113
117
  urn: number;
114
118
  brevoSynced: boolean;
115
119
  affectedUrns: number[];
116
120
  }, {
117
- status: "pool" | "lead" | "deferred" | "customer" | "doNotContact";
121
+ status: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
118
122
  urn: number;
119
123
  brevoSynced: boolean;
120
124
  affectedUrns: number[];
@@ -190,6 +194,7 @@ export declare const outreachCallables: {
190
194
  generalNotes?: any[] | undefined;
191
195
  }>;
192
196
  }, "strip", z.ZodTypeAny, {
197
+ urn: number;
193
198
  lead: {
194
199
  email: string;
195
200
  organisation: string;
@@ -202,8 +207,8 @@ export declare const outreachCallables: {
202
207
  personalNotes?: any[] | undefined;
203
208
  generalNotes?: any[] | undefined;
204
209
  };
205
- urn: number;
206
210
  }, {
211
+ urn: number;
207
212
  lead: {
208
213
  email: string;
209
214
  organisation: string;
@@ -216,7 +221,6 @@ export declare const outreachCallables: {
216
221
  personalNotes?: any[] | undefined;
217
222
  generalNotes?: any[] | undefined;
218
223
  };
219
- urn: number;
220
224
  }>;
221
225
  response: z.ZodObject<{
222
226
  leadId: z.ZodString;
@@ -327,14 +331,19 @@ export declare const outreachCallables: {
327
331
  };
328
332
  "outreach-runSweep": {
329
333
  request: z.ZodObject<{
330
- step: z.ZodOptional<z.ZodEnum<["all", "deferrals", "campaigns", "domainMatch", "brevoAttributes", "reconcile"]>>;
334
+ step: z.ZodOptional<z.ZodEnum<["all", "deferrals", "statusRecompute", "sequenceFinish", "cadence", "campaigns", "domainMatch", "brevoAttributes", "reconcile"]>>;
331
335
  }, "strip", z.ZodTypeAny, {
332
- step?: "all" | "reconcile" | "deferrals" | "campaigns" | "domainMatch" | "brevoAttributes" | undefined;
336
+ step?: "all" | "reconcile" | "deferrals" | "statusRecompute" | "sequenceFinish" | "cadence" | "campaigns" | "domainMatch" | "brevoAttributes" | undefined;
333
337
  }, {
334
- step?: "all" | "reconcile" | "deferrals" | "campaigns" | "domainMatch" | "brevoAttributes" | undefined;
338
+ step?: "all" | "reconcile" | "deferrals" | "statusRecompute" | "sequenceFinish" | "cadence" | "campaigns" | "domainMatch" | "brevoAttributes" | undefined;
335
339
  }>;
336
340
  response: z.ZodObject<{
337
341
  undeferred: z.ZodNumber;
342
+ /** Schools whose derived status changed; blocked when the circuit breaker tripped. */
343
+ recomputed: z.ZodOptional<z.ZodNumber>;
344
+ recomputeBlocked: z.ZodOptional<z.ZodBoolean>;
345
+ sequenceFinished: z.ZodOptional<z.ZodNumber>;
346
+ cadenceChanged: z.ZodOptional<z.ZodNumber>;
338
347
  campaignsSynced: z.ZodNumber;
339
348
  domainMatches: z.ZodNumber;
340
349
  attributesPushed: z.ZodNumber;
@@ -357,6 +366,10 @@ export declare const outreachCallables: {
357
366
  marketingOnlyInBrevo: number;
358
367
  missingFromBrevo: number;
359
368
  } | undefined;
369
+ recomputed?: number | undefined;
370
+ recomputeBlocked?: boolean | undefined;
371
+ sequenceFinished?: number | undefined;
372
+ cadenceChanged?: number | undefined;
360
373
  }, {
361
374
  undeferred: number;
362
375
  campaignsSynced: number;
@@ -366,6 +379,791 @@ export declare const outreachCallables: {
366
379
  marketingOnlyInBrevo: number;
367
380
  missingFromBrevo: number;
368
381
  } | undefined;
382
+ recomputed?: number | undefined;
383
+ recomputeBlocked?: boolean | undefined;
384
+ sequenceFinished?: number | undefined;
385
+ cadenceChanged?: number | undefined;
386
+ }>;
387
+ };
388
+ "outreach-saveMonthlySend": {
389
+ request: z.ZodObject<{
390
+ /** YYYY-MM; also the doc id. Only drafts and tested emails can be edited; editing needs a new test. */
391
+ month: z.ZodString;
392
+ templates: z.ZodObject<{
393
+ secondary: z.ZodObject<{
394
+ templateId: z.ZodNumber;
395
+ subject: z.ZodString;
396
+ }, "strip", z.ZodTypeAny, {
397
+ subject: string;
398
+ templateId: number;
399
+ }, {
400
+ subject: string;
401
+ templateId: number;
402
+ }>;
403
+ college: z.ZodOptional<z.ZodObject<{
404
+ templateId: z.ZodNumber;
405
+ subject: z.ZodString;
406
+ }, "strip", z.ZodTypeAny, {
407
+ subject: string;
408
+ templateId: number;
409
+ }, {
410
+ subject: string;
411
+ templateId: number;
412
+ }>>;
413
+ }, "strip", z.ZodTypeAny, {
414
+ secondary: {
415
+ subject: string;
416
+ templateId: number;
417
+ };
418
+ college?: {
419
+ subject: string;
420
+ templateId: number;
421
+ } | undefined;
422
+ }, {
423
+ secondary: {
424
+ subject: string;
425
+ templateId: number;
426
+ };
427
+ college?: {
428
+ subject: string;
429
+ templateId: number;
430
+ } | undefined;
431
+ }>;
432
+ /** Omit to keep the default (second term-week Tuesday of the month). */
433
+ sendDate: z.ZodOptional<z.ZodString>;
434
+ /** Omit to use the saved default; given ones become the new default. */
435
+ testEmails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
436
+ }, "strip", z.ZodTypeAny, {
437
+ month: string;
438
+ templates: {
439
+ secondary: {
440
+ subject: string;
441
+ templateId: number;
442
+ };
443
+ college?: {
444
+ subject: string;
445
+ templateId: number;
446
+ } | undefined;
447
+ };
448
+ sendDate?: string | undefined;
449
+ testEmails?: string[] | undefined;
450
+ }, {
451
+ month: string;
452
+ templates: {
453
+ secondary: {
454
+ subject: string;
455
+ templateId: number;
456
+ };
457
+ college?: {
458
+ subject: string;
459
+ templateId: number;
460
+ } | undefined;
461
+ };
462
+ sendDate?: string | undefined;
463
+ testEmails?: string[] | undefined;
464
+ }>;
465
+ response: z.ZodObject<{
466
+ id: z.ZodString;
467
+ /** Schools it would reach today. */
468
+ recipients: z.ZodObject<{
469
+ total: z.ZodNumber;
470
+ secondary: z.ZodNumber;
471
+ college: z.ZodNumber;
472
+ }, "strip", z.ZodTypeAny, {
473
+ total: number;
474
+ college: number;
475
+ secondary: number;
476
+ }, {
477
+ total: number;
478
+ college: number;
479
+ secondary: number;
480
+ }>;
481
+ date: z.ZodString;
482
+ warnings: z.ZodArray<z.ZodString, "many">;
483
+ }, "strip", z.ZodTypeAny, {
484
+ id: string;
485
+ date: string;
486
+ recipients: {
487
+ total: number;
488
+ college: number;
489
+ secondary: number;
490
+ };
491
+ warnings: string[];
492
+ }, {
493
+ id: string;
494
+ date: string;
495
+ recipients: {
496
+ total: number;
497
+ college: number;
498
+ secondary: number;
499
+ };
500
+ warnings: string[];
501
+ }>;
502
+ };
503
+ "outreach-testMonthlySend": {
504
+ request: z.ZodObject<{
505
+ id: z.ZodString;
506
+ }, "strip", z.ZodTypeAny, {
507
+ id: string;
508
+ }, {
509
+ id: string;
510
+ }>;
511
+ response: z.ZodObject<{
512
+ sentTo: z.ZodArray<z.ZodString, "many">;
513
+ testedAt: z.ZodString;
514
+ }, "strip", z.ZodTypeAny, {
515
+ sentTo: string[];
516
+ testedAt: string;
517
+ }, {
518
+ sentTo: string[];
519
+ testedAt: string;
520
+ }>;
521
+ };
522
+ "outreach-approveMonthlySend": {
523
+ request: z.ZodObject<{
524
+ id: z.ZodString;
525
+ }, "strip", z.ZodTypeAny, {
526
+ id: string;
527
+ }, {
528
+ id: string;
529
+ }>;
530
+ /** Drafts are made the day before this date (now, if that has passed). */
531
+ response: z.ZodObject<{
532
+ date: z.ZodString;
533
+ drafted: z.ZodBoolean;
534
+ }, "strip", z.ZodTypeAny, {
535
+ date: string;
536
+ drafted: boolean;
537
+ }, {
538
+ date: string;
539
+ drafted: boolean;
540
+ }>;
541
+ };
542
+ "outreach-controlMonthlySend": {
543
+ request: z.ZodObject<{
544
+ id: z.ZodString;
545
+ action: z.ZodEnum<["cancel"]>;
546
+ }, "strip", z.ZodTypeAny, {
547
+ id: string;
548
+ action: "cancel";
549
+ }, {
550
+ id: string;
551
+ action: "cancel";
552
+ }>;
553
+ response: z.ZodObject<{
554
+ status: z.ZodEnum<["draft", "tested", "approved", "drafted", "sent", "cancelled"]>;
555
+ }, "strip", z.ZodTypeAny, {
556
+ status: "cancelled" | "draft" | "approved" | "sent" | "drafted" | "tested";
557
+ }, {
558
+ status: "cancelled" | "draft" | "approved" | "sent" | "drafted" | "tested";
559
+ }>;
560
+ };
561
+ "outreach-runSequence": {
562
+ request: z.ZodObject<{
563
+ /** Preview the next Tuesday: no drafts are made and schools are not touched. */
564
+ dryRun: z.ZodOptional<z.ZodBoolean>;
565
+ }, "strip", z.ZodTypeAny, {
566
+ dryRun?: boolean | undefined;
567
+ }, {
568
+ dryRun?: boolean | undefined;
569
+ }>;
570
+ response: z.ZodObject<{
571
+ date: z.ZodString;
572
+ dryRun: z.ZodBoolean;
573
+ skip: z.ZodOptional<z.ZodEnum<["disabled", "blackout", "notSendDay"]>>;
574
+ sends: z.ZodArray<z.ZodObject<{
575
+ step: z.ZodNumber;
576
+ variant: z.ZodEnum<["secondary", "college", "referral"]>;
577
+ count: z.ZodNumber;
578
+ campaignId: z.ZodOptional<z.ZodNumber>;
579
+ error: z.ZodOptional<z.ZodString>;
580
+ }, "strip", z.ZodTypeAny, {
581
+ variant: "college" | "secondary" | "referral";
582
+ count: number;
583
+ step: number;
584
+ error?: string | undefined;
585
+ campaignId?: number | undefined;
586
+ }, {
587
+ variant: "college" | "secondary" | "referral";
588
+ count: number;
589
+ step: number;
590
+ error?: string | undefined;
591
+ campaignId?: number | undefined;
592
+ }>, "many">;
593
+ starts: z.ZodNumber;
594
+ blocked: z.ZodArray<z.ZodObject<{
595
+ urn: z.ZodNumber;
596
+ reason: z.ZodString;
597
+ }, "strip", z.ZodTypeAny, {
598
+ reason: string;
599
+ urn: number;
600
+ }, {
601
+ reason: string;
602
+ urn: number;
603
+ }>, "many">;
604
+ }, "strip", z.ZodTypeAny, {
605
+ blocked: {
606
+ reason: string;
607
+ urn: number;
608
+ }[];
609
+ date: string;
610
+ dryRun: boolean;
611
+ sends: {
612
+ variant: "college" | "secondary" | "referral";
613
+ count: number;
614
+ step: number;
615
+ error?: string | undefined;
616
+ campaignId?: number | undefined;
617
+ }[];
618
+ starts: number;
619
+ skip?: "disabled" | "blackout" | "notSendDay" | undefined;
620
+ }, {
621
+ blocked: {
622
+ reason: string;
623
+ urn: number;
624
+ }[];
625
+ date: string;
626
+ dryRun: boolean;
627
+ sends: {
628
+ variant: "college" | "secondary" | "referral";
629
+ count: number;
630
+ step: number;
631
+ error?: string | undefined;
632
+ campaignId?: number | undefined;
633
+ }[];
634
+ starts: number;
635
+ skip?: "disabled" | "blackout" | "notSendDay" | undefined;
636
+ }>;
637
+ };
638
+ "outreach-setSequenceConfig": {
639
+ request: z.ZodObject<{
640
+ onlyGroups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
641
+ allowlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
642
+ sender: z.ZodOptional<z.ZodObject<{
643
+ email: z.ZodString;
644
+ name: z.ZodString;
645
+ }, "strip", z.ZodTypeAny, {
646
+ name: string;
647
+ email: string;
648
+ }, {
649
+ name: string;
650
+ email: string;
651
+ }>>;
652
+ steps: z.ZodOptional<z.ZodObject<{
653
+ secondary: z.ZodOptional<z.ZodArray<z.ZodObject<{
654
+ templateId: z.ZodNumber;
655
+ subject: z.ZodString;
656
+ }, "strip", z.ZodTypeAny, {
657
+ subject: string;
658
+ templateId: number;
659
+ }, {
660
+ subject: string;
661
+ templateId: number;
662
+ }>, "many">>;
663
+ college: z.ZodOptional<z.ZodArray<z.ZodObject<{
664
+ templateId: z.ZodNumber;
665
+ subject: z.ZodString;
666
+ }, "strip", z.ZodTypeAny, {
667
+ subject: string;
668
+ templateId: number;
669
+ }, {
670
+ subject: string;
671
+ templateId: number;
672
+ }>, "many">>;
673
+ referral: z.ZodOptional<z.ZodArray<z.ZodObject<{
674
+ templateId: z.ZodNumber;
675
+ subject: z.ZodString;
676
+ }, "strip", z.ZodTypeAny, {
677
+ subject: string;
678
+ templateId: number;
679
+ }, {
680
+ subject: string;
681
+ templateId: number;
682
+ }>, "many">>;
683
+ }, "strip", z.ZodTypeAny, {
684
+ college?: {
685
+ subject: string;
686
+ templateId: number;
687
+ }[] | undefined;
688
+ secondary?: {
689
+ subject: string;
690
+ templateId: number;
691
+ }[] | undefined;
692
+ referral?: {
693
+ subject: string;
694
+ templateId: number;
695
+ }[] | undefined;
696
+ }, {
697
+ college?: {
698
+ subject: string;
699
+ templateId: number;
700
+ }[] | undefined;
701
+ secondary?: {
702
+ subject: string;
703
+ templateId: number;
704
+ }[] | undefined;
705
+ referral?: {
706
+ subject: string;
707
+ templateId: number;
708
+ }[] | undefined;
709
+ }>>;
710
+ blackouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
711
+ start: z.ZodString;
712
+ end: z.ZodString;
713
+ label: z.ZodString;
714
+ }, "strip", z.ZodTypeAny, {
715
+ end: string;
716
+ start: string;
717
+ label: string;
718
+ }, {
719
+ end: string;
720
+ start: string;
721
+ label: string;
722
+ }>, "many">>;
723
+ }, "strip", z.ZodTypeAny, {
724
+ steps?: {
725
+ college?: {
726
+ subject: string;
727
+ templateId: number;
728
+ }[] | undefined;
729
+ secondary?: {
730
+ subject: string;
731
+ templateId: number;
732
+ }[] | undefined;
733
+ referral?: {
734
+ subject: string;
735
+ templateId: number;
736
+ }[] | undefined;
737
+ } | undefined;
738
+ onlyGroups?: string[] | undefined;
739
+ allowlist?: string[] | undefined;
740
+ sender?: {
741
+ name: string;
742
+ email: string;
743
+ } | undefined;
744
+ blackouts?: {
745
+ end: string;
746
+ start: string;
747
+ label: string;
748
+ }[] | undefined;
749
+ }, {
750
+ steps?: {
751
+ college?: {
752
+ subject: string;
753
+ templateId: number;
754
+ }[] | undefined;
755
+ secondary?: {
756
+ subject: string;
757
+ templateId: number;
758
+ }[] | undefined;
759
+ referral?: {
760
+ subject: string;
761
+ templateId: number;
762
+ }[] | undefined;
763
+ } | undefined;
764
+ onlyGroups?: string[] | undefined;
765
+ allowlist?: string[] | undefined;
766
+ sender?: {
767
+ name: string;
768
+ email: string;
769
+ } | undefined;
770
+ blackouts?: {
771
+ end: string;
772
+ start: string;
773
+ label: string;
774
+ }[] | undefined;
775
+ }>;
776
+ response: z.ZodObject<{
777
+ saved: z.ZodBoolean;
778
+ }, "strip", z.ZodTypeAny, {
779
+ saved: boolean;
780
+ }, {
781
+ saved: boolean;
782
+ }>;
783
+ };
784
+ "outreach-setFeatures": {
785
+ request: z.ZodObject<{
786
+ coldSequence: z.ZodOptional<z.ZodBoolean>;
787
+ monthlyEmails: z.ZodOptional<z.ZodBoolean>;
788
+ replyPause: z.ZodOptional<z.ZodBoolean>;
789
+ replyTriage: z.ZodOptional<z.ZodBoolean>;
790
+ statusSync: z.ZodOptional<z.ZodBoolean>;
791
+ brevoSync: z.ZodOptional<z.ZodBoolean>;
792
+ }, "strip", z.ZodTypeAny, {
793
+ coldSequence?: boolean | undefined;
794
+ monthlyEmails?: boolean | undefined;
795
+ replyPause?: boolean | undefined;
796
+ replyTriage?: boolean | undefined;
797
+ statusSync?: boolean | undefined;
798
+ brevoSync?: boolean | undefined;
799
+ }, {
800
+ coldSequence?: boolean | undefined;
801
+ monthlyEmails?: boolean | undefined;
802
+ replyPause?: boolean | undefined;
803
+ replyTriage?: boolean | undefined;
804
+ statusSync?: boolean | undefined;
805
+ brevoSync?: boolean | undefined;
806
+ }>;
807
+ response: z.ZodObject<{
808
+ saved: z.ZodBoolean;
809
+ }, "strip", z.ZodTypeAny, {
810
+ saved: boolean;
811
+ }, {
812
+ saved: boolean;
813
+ }>;
814
+ };
815
+ "outreach-pauseSequence": {
816
+ request: z.ZodObject<{
817
+ urn: z.ZodNumber;
818
+ paused: z.ZodBoolean;
819
+ }, "strip", z.ZodTypeAny, {
820
+ paused: boolean;
821
+ urn: number;
822
+ }, {
823
+ paused: boolean;
824
+ urn: number;
825
+ }>;
826
+ response: z.ZodObject<{
827
+ urn: z.ZodNumber;
828
+ paused: z.ZodBoolean;
829
+ }, "strip", z.ZodTypeAny, {
830
+ paused: boolean;
831
+ urn: number;
832
+ }, {
833
+ paused: boolean;
834
+ urn: number;
835
+ }>;
836
+ };
837
+ "outreach-restartSequence": {
838
+ request: z.ZodObject<{
839
+ urn: z.ZodNumber;
840
+ variant: z.ZodOptional<z.ZodEnum<["secondary", "college", "referral"]>>;
841
+ }, "strip", z.ZodTypeAny, {
842
+ urn: number;
843
+ variant?: "college" | "secondary" | "referral" | undefined;
844
+ }, {
845
+ urn: number;
846
+ variant?: "college" | "secondary" | "referral" | undefined;
847
+ }>;
848
+ response: z.ZodObject<{
849
+ urn: z.ZodNumber;
850
+ status: z.ZodEnum<["queued", "sequence", "pool", "lead", "deferred", "customer", "trustMember", "hubSchool", "doNotContact"]>;
851
+ }, "strip", z.ZodTypeAny, {
852
+ status: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
853
+ urn: number;
854
+ }, {
855
+ status: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
856
+ urn: number;
857
+ }>;
858
+ };
859
+ "outreach-resolveReview": {
860
+ request: z.ZodObject<{
861
+ reviewId: z.ZodString;
862
+ action: z.ZodEnum<["replaceContact", "contactLeft", "linkSchool", "linkTrust", "dismiss"]>;
863
+ /** linkTrust: the GIAS trust UID for the review's institute. */
864
+ trustUid: z.ZodOptional<z.ZodString>;
865
+ urn: z.ZodOptional<z.ZodNumber>;
866
+ newEmail: z.ZodOptional<z.ZodString>;
867
+ newContact: z.ZodOptional<z.ZodString>;
868
+ newRole: z.ZodOptional<z.ZodString>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ action: "replaceContact" | "contactLeft" | "linkSchool" | "linkTrust" | "dismiss";
871
+ reviewId: string;
872
+ newEmail?: string | undefined;
873
+ urn?: number | undefined;
874
+ trustUid?: string | undefined;
875
+ newContact?: string | undefined;
876
+ newRole?: string | undefined;
877
+ }, {
878
+ action: "replaceContact" | "contactLeft" | "linkSchool" | "linkTrust" | "dismiss";
879
+ reviewId: string;
880
+ newEmail?: string | undefined;
881
+ urn?: number | undefined;
882
+ trustUid?: string | undefined;
883
+ newContact?: string | undefined;
884
+ newRole?: string | undefined;
885
+ }>;
886
+ response: z.ZodObject<{
887
+ status: z.ZodEnum<["resolved", "dismissed"]>;
888
+ affectedUrns: z.ZodArray<z.ZodNumber, "many">;
889
+ }, "strip", z.ZodTypeAny, {
890
+ status: "resolved" | "dismissed";
891
+ affectedUrns: number[];
892
+ }, {
893
+ status: "resolved" | "dismissed";
894
+ affectedUrns: number[];
895
+ }>;
896
+ };
897
+ "outreach-linkInstitute": {
898
+ request: z.ZodObject<{
899
+ oId: z.ZodString;
900
+ /** A school institute's URN; null clears it. Omit to leave alone. */
901
+ urn: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
902
+ /** A trust institute's GIAS trust UID; null clears it. Omit to leave alone. */
903
+ trustUid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
904
+ }, "strip", z.ZodTypeAny, {
905
+ oId: string;
906
+ urn?: number | null | undefined;
907
+ trustUid?: string | null | undefined;
908
+ }, {
909
+ oId: string;
910
+ urn?: number | null | undefined;
911
+ trustUid?: string | null | undefined;
912
+ }>;
913
+ response: z.ZodObject<{
914
+ oId: z.ZodString;
915
+ urn: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
916
+ trustUid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
917
+ }, "strip", z.ZodTypeAny, {
918
+ oId: string;
919
+ urn?: number | null | undefined;
920
+ trustUid?: string | null | undefined;
921
+ }, {
922
+ oId: string;
923
+ urn?: number | null | undefined;
924
+ trustUid?: string | null | undefined;
925
+ }>;
926
+ };
927
+ "outreach-upsertTrusts": {
928
+ request: z.ZodObject<{
929
+ /** GIAS groups rows: trustUid and name required. */
930
+ trusts: z.ZodOptional<z.ZodArray<z.ZodObject<{
931
+ trustUid: z.ZodString;
932
+ name: z.ZodString;
933
+ companiesHouseNumber: z.ZodOptional<z.ZodString>;
934
+ type: z.ZodOptional<z.ZodString>;
935
+ postcode: z.ZodOptional<z.ZodString>;
936
+ }, "strip", z.ZodTypeAny, {
937
+ name: string;
938
+ trustUid: string;
939
+ type?: string | undefined;
940
+ companiesHouseNumber?: string | undefined;
941
+ postcode?: string | undefined;
942
+ }, {
943
+ name: string;
944
+ trustUid: string;
945
+ type?: string | undefined;
946
+ companiesHouseNumber?: string | undefined;
947
+ postcode?: string | undefined;
948
+ }>, "many">>;
949
+ /** GIAS links rows: which trust each school is in. Only schools already in dfeSchoolContacts are linked. */
950
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
951
+ urn: z.ZodNumber;
952
+ trustUid: z.ZodString;
953
+ }, "strip", z.ZodTypeAny, {
954
+ urn: number;
955
+ trustUid: string;
956
+ }, {
957
+ urn: number;
958
+ trustUid: string;
959
+ }>, "many">>;
960
+ }, "strip", z.ZodTypeAny, {
961
+ trusts?: {
962
+ name: string;
963
+ trustUid: string;
964
+ type?: string | undefined;
965
+ companiesHouseNumber?: string | undefined;
966
+ postcode?: string | undefined;
967
+ }[] | undefined;
968
+ links?: {
969
+ urn: number;
970
+ trustUid: string;
971
+ }[] | undefined;
972
+ }, {
973
+ trusts?: {
974
+ name: string;
975
+ trustUid: string;
976
+ type?: string | undefined;
977
+ companiesHouseNumber?: string | undefined;
978
+ postcode?: string | undefined;
979
+ }[] | undefined;
980
+ links?: {
981
+ urn: number;
982
+ trustUid: string;
983
+ }[] | undefined;
984
+ }>;
985
+ response: z.ZodObject<{
986
+ trustsWritten: z.ZodNumber;
987
+ schoolsLinked: z.ZodNumber;
988
+ schoolsNotFound: z.ZodNumber;
989
+ unknownTrusts: z.ZodNumber;
990
+ }, "strip", z.ZodTypeAny, {
991
+ trustsWritten: number;
992
+ schoolsLinked: number;
993
+ schoolsNotFound: number;
994
+ unknownTrusts: number;
995
+ }, {
996
+ trustsWritten: number;
997
+ schoolsLinked: number;
998
+ schoolsNotFound: number;
999
+ unknownTrusts: number;
1000
+ }>;
1001
+ };
1002
+ "outreach-linkLeadSchool": {
1003
+ /** A school lead (urn) never keeps a trustUid; a trust lead is urn null plus trustUid. */
1004
+ request: z.ZodObject<{
1005
+ leadId: z.ZodString;
1006
+ urn: z.ZodNullable<z.ZodNumber>;
1007
+ trustUid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1008
+ }, "strip", z.ZodTypeAny, {
1009
+ urn: number | null;
1010
+ leadId: string;
1011
+ trustUid?: string | null | undefined;
1012
+ }, {
1013
+ urn: number | null;
1014
+ leadId: string;
1015
+ trustUid?: string | null | undefined;
1016
+ }>;
1017
+ response: z.ZodObject<{
1018
+ leadId: z.ZodString;
1019
+ urn: z.ZodNullable<z.ZodNumber>;
1020
+ }, "strip", z.ZodTypeAny, {
1021
+ urn: number | null;
1022
+ leadId: string;
1023
+ }, {
1024
+ urn: number | null;
1025
+ leadId: string;
1026
+ }>;
1027
+ };
1028
+ "outreach-recompute": {
1029
+ request: z.ZodObject<{
1030
+ urns: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1031
+ /** Bypass the circuit breaker. */
1032
+ force: z.ZodOptional<z.ZodBoolean>;
1033
+ }, "strip", z.ZodTypeAny, {
1034
+ urns?: number[] | undefined;
1035
+ force?: boolean | undefined;
1036
+ }, {
1037
+ urns?: number[] | undefined;
1038
+ force?: boolean | undefined;
1039
+ }>;
1040
+ response: z.ZodObject<{
1041
+ checked: z.ZodNumber;
1042
+ changed: z.ZodNumber;
1043
+ blocked: z.ZodBoolean;
1044
+ sample: z.ZodArray<z.ZodObject<{
1045
+ urn: z.ZodNumber;
1046
+ from: z.ZodEnum<["queued", "sequence", "pool", "lead", "deferred", "customer", "trustMember", "hubSchool", "doNotContact"]>;
1047
+ to: z.ZodEnum<["queued", "sequence", "pool", "lead", "deferred", "customer", "trustMember", "hubSchool", "doNotContact"]>;
1048
+ reason: z.ZodString;
1049
+ }, "strip", z.ZodTypeAny, {
1050
+ reason: string;
1051
+ from: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
1052
+ to: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
1053
+ urn: number;
1054
+ }, {
1055
+ reason: string;
1056
+ from: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
1057
+ to: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
1058
+ urn: number;
1059
+ }>, "many">;
1060
+ }, "strip", z.ZodTypeAny, {
1061
+ changed: number;
1062
+ sample: {
1063
+ reason: string;
1064
+ from: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
1065
+ to: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
1066
+ urn: number;
1067
+ }[];
1068
+ blocked: boolean;
1069
+ checked: number;
1070
+ }, {
1071
+ changed: number;
1072
+ sample: {
1073
+ reason: string;
1074
+ from: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
1075
+ to: "sequence" | "queued" | "pool" | "lead" | "deferred" | "customer" | "trustMember" | "hubSchool" | "doNotContact";
1076
+ urn: number;
1077
+ }[];
1078
+ blocked: boolean;
1079
+ checked: number;
1080
+ }>;
1081
+ };
1082
+ "outreach-migrateV2": {
1083
+ request: z.ZodObject<{
1084
+ dryRun: z.ZodOptional<z.ZodBoolean>;
1085
+ }, "strip", z.ZodTypeAny, {
1086
+ dryRun?: boolean | undefined;
1087
+ }, {
1088
+ dryRun?: boolean | undefined;
1089
+ }>;
1090
+ response: z.ZodObject<{
1091
+ dryRun: z.ZodBoolean;
1092
+ institutesLinked: z.ZodNumber;
1093
+ /** Of institutesLinked: matched on postcode and name, or on a single school at the email domain. */
1094
+ institutesLinkedBy: z.ZodObject<{
1095
+ postcode: z.ZodNumber;
1096
+ domain: z.ZodNumber;
1097
+ }, "strip", z.ZodTypeAny, {
1098
+ domain: number;
1099
+ postcode: number;
1100
+ }, {
1101
+ domain: number;
1102
+ postcode: number;
1103
+ }>;
1104
+ /** Institutes sent to the review queue (instituteNeedsSchool), with or without candidates. */
1105
+ institutesToReview: z.ZodNumber;
1106
+ institutesUnresolved: z.ZodArray<z.ZodObject<{
1107
+ oId: z.ZodString;
1108
+ name: z.ZodString;
1109
+ }, "strip", z.ZodTypeAny, {
1110
+ name: string;
1111
+ oId: string;
1112
+ }, {
1113
+ name: string;
1114
+ oId: string;
1115
+ }>, "many">;
1116
+ leadsLinked: z.ZodNumber;
1117
+ leadsNeedingSchool: z.ZodNumber;
1118
+ queued: z.ZodNumber;
1119
+ recompute: z.ZodObject<{
1120
+ checked: z.ZodNumber;
1121
+ changed: z.ZodNumber;
1122
+ }, "strip", z.ZodTypeAny, {
1123
+ changed: number;
1124
+ checked: number;
1125
+ }, {
1126
+ changed: number;
1127
+ checked: number;
1128
+ }>;
1129
+ }, "strip", z.ZodTypeAny, {
1130
+ recompute: {
1131
+ changed: number;
1132
+ checked: number;
1133
+ };
1134
+ queued: number;
1135
+ dryRun: boolean;
1136
+ institutesLinked: number;
1137
+ institutesLinkedBy: {
1138
+ domain: number;
1139
+ postcode: number;
1140
+ };
1141
+ institutesToReview: number;
1142
+ institutesUnresolved: {
1143
+ name: string;
1144
+ oId: string;
1145
+ }[];
1146
+ leadsLinked: number;
1147
+ leadsNeedingSchool: number;
1148
+ }, {
1149
+ recompute: {
1150
+ changed: number;
1151
+ checked: number;
1152
+ };
1153
+ queued: number;
1154
+ dryRun: boolean;
1155
+ institutesLinked: number;
1156
+ institutesLinkedBy: {
1157
+ domain: number;
1158
+ postcode: number;
1159
+ };
1160
+ institutesToReview: number;
1161
+ institutesUnresolved: {
1162
+ name: string;
1163
+ oId: string;
1164
+ }[];
1165
+ leadsLinked: number;
1166
+ leadsNeedingSchool: number;
369
1167
  }>;
370
1168
  };
371
1169
  };