@remit/api-http-client 0.0.37 → 0.0.39

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.
package/types.gen.ts CHANGED
@@ -553,6 +553,254 @@ export type RemitImapBulkUpdateFlagsInput = {
553
553
  starColor?: RemitImapStarColor;
554
554
  };
555
555
 
556
+ /**
557
+ * Display color for a calendar collection. Positional rather than named: the palette is a client-side concern, so the store carries the slot and the client owns what it renders (issue #15).
558
+ */
559
+ export type RemitImapCalendarColor = 'Cal1' | 'Cal2' | 'Cal3' | 'Cal4' | 'Cal5' | 'Cal6';
560
+
561
+ /**
562
+ * Which iCalendar components a collection accepts (RFC 4791 supported-calendar-component-set). Only VEVENT is stored today; VTODO and VJOURNAL collections would be separate members, so the value is a property of the collection rather than of each object.
563
+ */
564
+ export type RemitImapCalendarComponentSet = 'VeventOnly';
565
+
566
+ /**
567
+ * One occurrence of an event, in the window the caller asked for (issue #15).
568
+ *
569
+ * Instances are expanded by the server. A client never reads an RRULE and never
570
+ * reconstructs a series: it renders what this returns, and addresses one
571
+ * occurrence by `calendarObjectId` plus `recurrenceId`.
572
+ */
573
+ export type RemitImapCalendarEventInstance = {
574
+ /**
575
+ * Collection this occurrence belongs to
576
+ */
577
+ calendarId: Uuid;
578
+ /**
579
+ * Resource this occurrence was expanded from
580
+ */
581
+ calendarObjectId: Uuid;
582
+ /**
583
+ * RECURRENCE-ID of this occurrence as an ISO 8601 UTC instant, or `""` for a resource that does not recur. This is the value a scoped write passes back to name the occurrence it means.
584
+ */
585
+ recurrenceId: String64;
586
+ /**
587
+ * The event's iCalendar UID, shared by every occurrence of the series
588
+ */
589
+ icalUid: String512;
590
+ /**
591
+ * Projection of the VEVENT's SUMMARY. `""` when the event carries none.
592
+ */
593
+ summary: String512;
594
+ /**
595
+ * When this occurrence starts, as an ISO 8601 date-time with zone offset, read in the collection's timezone. A business date, not an epoch instant: an all-day occurrence carries midnight of its civil date.
596
+ */
597
+ start: String64;
598
+ /**
599
+ * When this occurrence ends, as an ISO 8601 date-time with zone offset. Exclusive for an all-day occurrence, per RFC 5545 3.6.1.
600
+ */
601
+ end: String64;
602
+ /**
603
+ * Whether this occurrence is all-day
604
+ */
605
+ allDay: boolean;
606
+ /**
607
+ * Projection of the occurrence's STATUS
608
+ */
609
+ status: RemitImapCalendarEventStatus;
610
+ /**
611
+ * Projection of the occurrence's TRANSP — whether it consumes free/busy time
612
+ */
613
+ transparency: RemitImapCalendarTransparency;
614
+ /**
615
+ * How the resource's start was placed on the clock. `Ambiguous` means the resource named a zone nothing could resolve, so this occurrence may be hours out; a client says so rather than presenting the guess as a fact.
616
+ */
617
+ zoneCertainty: RemitImapZoneCertainty;
618
+ /**
619
+ * Entity tag of the resource this occurrence came from. Pass it as `If-Match` on a scoped write to refuse an edit built on a version somebody has since replaced.
620
+ */
621
+ etag: String64;
622
+ /**
623
+ * Whether the resource this occurrence came from expands to more than one instance. A client showing the recurrence-scope prompt gates on this.
624
+ */
625
+ hasRecurrence: boolean;
626
+ };
627
+
628
+ /**
629
+ * Expanded occurrences in the requested window, in start order.
630
+ *
631
+ * Includes an occurrence that began before `from` and runs into the window, up
632
+ * to a bounded lookback — a meeting that started last night is part of this
633
+ * morning. Unpaginated: the window is the bound.
634
+ */
635
+ export type RemitImapCalendarEventListResponse = {
636
+ items: Array<RemitImapCalendarEventInstance>;
637
+ };
638
+
639
+ /**
640
+ * A stored calendar resource — the bytes behind one event, plus the columns projected from them. `icalData` is canonical; every other field is derived from it on write.
641
+ */
642
+ export type RemitImapCalendarEventResponse = {
643
+ /**
644
+ * Primary identifier, derived from calendarId + resourceName
645
+ */
646
+ calendarObjectId: Uuid;
647
+ /**
648
+ * Collection this resource belongs to
649
+ */
650
+ calendarId: Uuid;
651
+ /**
652
+ * Last path segment of the resource's URL, e.g. "a1b2c3.ics". Unique within the collection and chosen by whoever wrote the resource, never derived from its contents — a client is free to rename a resource without changing the event it holds.
653
+ */
654
+ resourceName: String256;
655
+ /**
656
+ * The VEVENT's UID property (RFC 5545 3.8.4.7). Identifies the event across collections and servers, which `resourceName` does not.
657
+ */
658
+ icalUid: String512;
659
+ /**
660
+ * The complete VCALENDAR text, byte-for-byte as stored — CANONICAL. Line endings are CRLF and are never normalized; unknown properties and components are preserved verbatim.
661
+ */
662
+ readonly icalData: string;
663
+ /**
664
+ * Strong entity tag over the stored `icalData` bytes, used for If-Match on a conditional write and for change detection on read.
665
+ */
666
+ etag: String64;
667
+ /**
668
+ * The VEVENT's SEQUENCE property (RFC 5545 3.8.7.4) — the organizer's own revision counter, carried for scheduling comparisons. `0` when the event declares none, which is the RFC default.
669
+ */
670
+ readonly sequence: number;
671
+ /**
672
+ * Value the owning collection's `syncSequence` held after the write that produced this row. Pages the `bySyncSequence` read.
673
+ */
674
+ readonly syncSequence: number;
675
+ /**
676
+ * Projection of the VEVENT's SUMMARY (RFC 5545 3.8.1.12). `""` when the event carries none.
677
+ */
678
+ summary: String512;
679
+ /**
680
+ * Projection of the master VEVENT's DTSTART as an ISO 8601 date-time with zone offset — a business date, not an epoch instant. An all-day event carries midnight in the event's own zone.
681
+ */
682
+ dtStart: String64;
683
+ /**
684
+ * Projection of the master VEVENT's effective end as an ISO 8601 date-time with zone offset, resolved from DTEND or from DTSTART + DURATION. An event with neither ends when it starts (RFC 5545 3.6.1).
685
+ */
686
+ dtEnd: String64;
687
+ /**
688
+ * Whether the master VEVENT's DTSTART is a DATE rather than a DATE-TIME (RFC 5545 3.3.4) — an all-day or multi-day event, whose end is exclusive.
689
+ */
690
+ readonly allDay: boolean;
691
+ /**
692
+ * How the master VEVENT's DTSTART was placed on the clock. `Ambiguous` means the resource named a zone nothing could resolve, so `dtStart` and every occurrence expanded from it may be off by hours — a client shows the event and says so rather than presenting a guess as a fact.
693
+ */
694
+ zoneCertainty: RemitImapZoneCertainty;
695
+ /**
696
+ * Projection of the master VEVENT's STATUS
697
+ */
698
+ status: RemitImapCalendarEventStatus;
699
+ /**
700
+ * Projection of the master VEVENT's TRANSP
701
+ */
702
+ transparency: RemitImapCalendarTransparency;
703
+ /**
704
+ * Whether the resource expands to more than its master instance — an RRULE, an RDATE, or an override VEVENT. Overrides count on their own: a client that edits one instance and then drops the rule leaves a resource with a master and its exceptions, and each of those is still an occurrence.
705
+ */
706
+ readonly hasRecurrence: boolean;
707
+ /**
708
+ * ISO 8601 UTC instant through which `CalendarEventIndex` rows exist for this resource, when the series runs past the expansion horizon and the index is therefore incomplete. `""` when the index is exhaustive — a single event, or a series that ends inside the horizon. A later live-expansion pass reads this to find the resources whose instances it must compute rather than query.
709
+ */
710
+ expandedThrough: String64;
711
+ readonly createdAt: number;
712
+ readonly updatedAt: number;
713
+ };
714
+
715
+ /**
716
+ * Projection of a VEVENT's STATUS property (RFC 5545 3.8.1.11). A VEVENT with no STATUS projects as `Confirmed`, which is the value RFC 5545 gives an event whose status is unstated.
717
+ */
718
+ export type RemitImapCalendarEventStatus = 'Confirmed' | 'Tentative' | 'Cancelled';
719
+
720
+ /**
721
+ * Merged busy spans over the requested window, in start order. An event marked TRANSP:TRANSPARENT or STATUS:CANCELLED is not busy time and never appears here.
722
+ */
723
+ export type RemitImapCalendarFreeBusyResponse = {
724
+ items: Array<RemitImapCalendarFreeBusySpan>;
725
+ };
726
+
727
+ /**
728
+ * One stretch of time the caller is busy in. Merged across every calendar they
729
+ * hold, so two overlapping meetings in two calendars are one span and a caller
730
+ * asking "is this slot free" never has to do the merging itself.
731
+ */
732
+ export type RemitImapCalendarFreeBusySpan = {
733
+ /**
734
+ * When the busy stretch starts, as an ISO 8601 date-time with a `+00:00` offset. A busy span is an interval on the clock rather than a civil date, so it carries no calendar's local zone — the caller renders it in whichever zone it is drawing.
735
+ */
736
+ start: String64;
737
+ /**
738
+ * When the busy stretch ends, as an ISO 8601 date-time with a `+00:00` offset
739
+ */
740
+ end: String64;
741
+ };
742
+
743
+ /**
744
+ * Every calendar collection of the caller's account config, url segment first. Unpaginated: an account holds a handful of calendars, and a page boundary in a sidebar is a bug waiting to happen.
745
+ */
746
+ export type RemitImapCalendarListResponse = {
747
+ items: Array<RemitImapCalendarResponse>;
748
+ };
749
+
750
+ /**
751
+ * A calendar collection as the API returns it.
752
+ */
753
+ export type RemitImapCalendarResponse = {
754
+ /**
755
+ * Primary identifier, derived from accountConfigId + urlSegment
756
+ */
757
+ calendarId: Uuid;
758
+ /**
759
+ * Owning account configuration
760
+ */
761
+ accountConfigId: Uuid;
762
+ /**
763
+ * Path segment this collection is addressed by, unique within the account config. Stored case-folded, the same folding `calendarId` is derived from — a DAV path is matched case-insensitively, and storing the writer's casing would let a lookup by segment and a lookup by derived id disagree about one path. The default collection provisioned on first use holds "default".
764
+ */
765
+ urlSegment: String64;
766
+ /**
767
+ * Human-readable collection name (display)
768
+ */
769
+ displayName: String140;
770
+ /**
771
+ * Display color slot for this collection
772
+ */
773
+ color: RemitImapCalendarColor;
774
+ /**
775
+ * Which iCalendar components this collection accepts
776
+ */
777
+ componentSet: RemitImapCalendarComponentSet;
778
+ /**
779
+ * Where this collection came from
780
+ */
781
+ source: RemitImapCalendarSource;
782
+ /**
783
+ * IANA time zone this collection's floating times are read in, e.g. "Europe/Amsterdam". `""` when none is set, which reads as UTC.
784
+ */
785
+ timezone: String64;
786
+ /**
787
+ * Monotonic change counter for this collection. Bumped by every write to one of its objects; the value stamped on `CalendarObject.syncSequence` is the value this counter held after that write.
788
+ */
789
+ readonly syncSequence: number;
790
+ readonly createdAt: number;
791
+ readonly updatedAt: number;
792
+ };
793
+
794
+ /**
795
+ * Where a calendar collection came from. `Default` is the one provisioned per account config on first use and is never deleted; `UserCreated` is one a person made; `MailDerived` is one populated from mail rather than by a person.
796
+ */
797
+ export type RemitImapCalendarSource = 'Default' | 'UserCreated' | 'MailDerived';
798
+
799
+ /**
800
+ * Projection of a VEVENT's TRANSP property (RFC 5545 3.8.2.7) — whether the event consumes free/busy time. A VEVENT with no TRANSP projects as `Opaque`, the RFC default.
801
+ */
802
+ export type RemitImapCalendarTransparency = 'Opaque' | 'Transparent';
803
+
556
804
  /**
557
805
  * The fixed anchor set of canonical mailbox roles a user appoints to a folder (RFC 032 exclusive-folder-appointment, issue #976). Mirrors the IMAP SPECIAL-USE roles (RFC 6154). Each role resolves to at most one mailbox per account — see FolderAppointment.
558
806
  */
@@ -584,6 +832,10 @@ export type RemitImapConfigDescriptionResponse = {
584
832
  * Associated email accounts
585
833
  */
586
834
  accounts: Array<RemitImapAccountResponse>;
835
+ /**
836
+ * Absent unless a configuration import is still waiting on folders IMAP has not produced yet (#1021). Nothing polls a separate route for it.
837
+ */
838
+ pendingImport?: RemitImapPendingConfigImport;
587
839
  };
588
840
 
589
841
  /**
@@ -602,10 +854,80 @@ export type RemitImapConfigExportResponse = {
602
854
  };
603
855
  };
604
856
 
857
+ /**
858
+ * What became of one item in the submitted document
859
+ */
860
+ export type RemitImapConfigImportItemReport = {
861
+ /**
862
+ * Which section: accounts | labels | filters | addressFlags | settings
863
+ */
864
+ section: string;
865
+ /**
866
+ * Human key of the item - an email, a label name, a filter name
867
+ */
868
+ key: string;
869
+ /**
870
+ * created | updated | unchanged | skipped | rejected
871
+ */
872
+ verdict: string;
873
+ /**
874
+ * Why, when the verdict is skipped or rejected
875
+ */
876
+ reason?: string;
877
+ };
878
+
879
+ /**
880
+ * Whether an import writes. The default is the dry run, so the wizard can show what a file would do before anything lands.
881
+ */
882
+ export type RemitImapConfigImportMode = 'validate' | 'apply';
883
+
884
+ /**
885
+ * What an import does when the configuration it is importing into is not empty.
886
+ */
887
+ export type RemitImapConfigImportOnExisting = 'abort' | 'merge';
888
+
889
+ /**
890
+ * The outcome of a validate or an apply. A rejected document is an answer, not a failure: `valid` is false and `errors` says why.
891
+ */
892
+ export type RemitImapConfigImportReport = {
893
+ /**
894
+ * Import identity; present on apply, so the folder bindings this import is still waiting on can be named later
895
+ */
896
+ importId?: Uuid;
897
+ /**
898
+ * Whether the document is importable at all
899
+ */
900
+ valid: boolean;
901
+ /**
902
+ * Schema version of the submitted document
903
+ */
904
+ schemaVersion: number;
905
+ /**
906
+ * Whether anything was written
907
+ */
908
+ applied: boolean;
909
+ /**
910
+ * Per-item verdicts
911
+ */
912
+ items: Array<RemitImapConfigImportItemReport>;
913
+ /**
914
+ * Blocking problems; non-empty means nothing was written
915
+ */
916
+ errors: Array<ApiError>;
917
+ /**
918
+ * Non-blocking notes - e.g. a folder path this account does not hold yet
919
+ */
920
+ warnings: Array<ApiError>;
921
+ /**
922
+ * Accounts that landed needing a credential before they can sync
923
+ */
924
+ accountsNeedingCredentials: Array<Uuid>;
925
+ };
926
+
605
927
  /**
606
928
  * IMAP connection states per RFC 9051 Section 3
607
929
  */
608
- export type RemitImapConnectionState = 'not_authenticated' | 'authenticated' | 'selected' | 'logout' | 'reauth_required';
930
+ export type RemitImapConnectionState = 'not_authenticated' | 'authenticated' | 'selected' | 'logout' | 'reauth_required' | 'credentials_missing';
609
931
 
610
932
  /**
611
933
  * Content disposition types per RFC 2183
@@ -696,6 +1018,94 @@ export type RemitImapCreateAccountInput = {
696
1018
  smtpPassword?: string;
697
1019
  };
698
1020
 
1021
+ /**
1022
+ * Input for creating an event (issue #15). The server builds the VEVENT and
1023
+ * writes it through the single calendar write path, so an event created here,
1024
+ * one accepted from an invitation, and one PUT over CalDAV are the same bytes
1025
+ * written the same way.
1026
+ *
1027
+ * Times are ISO 8601 with zone offset — or a bare `YYYY-MM-DD` date when
1028
+ * `allDay` is set. The offset pins the instant; `timeZone` names the zone the
1029
+ * event is anchored in, which is what a recurring event needs to survive a DST
1030
+ * transition. An offset alone cannot: a weekly 09:00 meeting written as
1031
+ * `+02:00` becomes an 08:00 meeting in November.
1032
+ */
1033
+ export type RemitImapCreateCalendarEventInput = {
1034
+ /**
1035
+ * Collection to write the event into
1036
+ */
1037
+ calendarId: Uuid;
1038
+ /**
1039
+ * SUMMARY of the event
1040
+ */
1041
+ summary: String512;
1042
+ /**
1043
+ * DESCRIPTION of the event. Absent writes none.
1044
+ */
1045
+ description?: String2048;
1046
+ /**
1047
+ * LOCATION of the event. Absent writes none.
1048
+ */
1049
+ location?: String512;
1050
+ /**
1051
+ * When the event starts: an ISO 8601 date-time with zone offset, or a `YYYY-MM-DD` date when `allDay` is set.
1052
+ */
1053
+ start: String64;
1054
+ /**
1055
+ * When the event ends, in the same form as `start`. Exclusive for an all-day event, per RFC 5545 3.6.1.
1056
+ */
1057
+ end: String64;
1058
+ /**
1059
+ * Whether this is an all-day event, whose times are civil dates rather than instants
1060
+ */
1061
+ allDay?: boolean;
1062
+ /**
1063
+ * IANA time zone the event is anchored in, e.g. "Europe/Amsterdam", written as the DTSTART TZID. Absent anchors the event in UTC. Refused with 400 when the zone is one this server cannot resolve — a calendar that accepted an unknown zone would draw the event hours away from where it belongs.
1064
+ */
1065
+ timeZone?: String64;
1066
+ /**
1067
+ * STATUS of the event
1068
+ */
1069
+ status?: RemitImapCalendarEventStatus;
1070
+ /**
1071
+ * TRANSP of the event — whether it consumes free/busy time
1072
+ */
1073
+ transparency?: RemitImapCalendarTransparency;
1074
+ /**
1075
+ * RRULE value for a recurring event, e.g. "FREQ=WEEKLY;BYDAY=MO" (RFC 5545 3.8.5.3), without the property name. `""` creates a single event. Refused with 400 when it is not a rule this server can read.
1076
+ */
1077
+ recurrenceRule?: String512;
1078
+ };
1079
+
1080
+ /**
1081
+ * Input for creating a calendar collection (issue #15).
1082
+ *
1083
+ * `urlSegment` is supplied rather than derived from the display name: it is the
1084
+ * collection's identity — `calendarId` is a hash of it — and the path a CalDAV
1085
+ * client will later bookmark. Slugging a name would make two calendars called
1086
+ * "Work" one row, and a rename would either move a bookmarked path or leave a
1087
+ * segment that no longer matches anything a person recognises. The name is the
1088
+ * mutable overlay; this is the address.
1089
+ */
1090
+ export type RemitImapCreateCalendarInput = {
1091
+ /**
1092
+ * Human-readable collection name (display)
1093
+ */
1094
+ displayName: String140;
1095
+ /**
1096
+ * Path segment addressing this collection, unique within the account config. Case-folded on write, so "Work" and "work" name the same collection and the second create is refused rather than silently merged into the first.
1097
+ */
1098
+ urlSegment: String64;
1099
+ /**
1100
+ * Display colour slot. Absent takes the collection's own default.
1101
+ */
1102
+ color?: RemitImapCalendarColor;
1103
+ /**
1104
+ * IANA time zone this collection's floating times are read in. Absent reads them as UTC.
1105
+ */
1106
+ timezone?: String64;
1107
+ };
1108
+
699
1109
  /**
700
1110
  * Response body for POST /me/export
701
1111
  */
@@ -1137,6 +1547,26 @@ export type RemitImapFolderAppointment = {
1137
1547
  */
1138
1548
  export type RemitImapFolderAppointmentSource = 'Appointed' | 'Flagged' | 'Reserved' | 'Proposed' | 'Stale' | 'None';
1139
1549
 
1550
+ /**
1551
+ * Request body for POST /config/import
1552
+ */
1553
+ export type RemitImapImportConfigInput = {
1554
+ /**
1555
+ * `validate` writes nothing; `apply` writes.
1556
+ */
1557
+ mode?: RemitImapConfigImportMode;
1558
+ /**
1559
+ * What to do when this configuration is not empty.
1560
+ */
1561
+ onExisting?: RemitImapConfigImportOnExisting;
1562
+ /**
1563
+ * The config document, as exported.
1564
+ */
1565
+ document: {
1566
+ [key: string]: unknown;
1567
+ };
1568
+ };
1569
+
1140
1570
  /**
1141
1571
  * Address was only ever seen on mail in a Junk folder: withheld from autocomplete suggestions until the account corresponds with it, flags it, or meets it on live mail. Written by sync and by the boot-time repair; clear it by patching this key to null.
1142
1572
  */
@@ -1818,6 +2248,24 @@ export type RemitImapOutboxMessageResponse = {
1818
2248
  */
1819
2249
  export type RemitImapOutboxMessageStatus = 'draft' | 'queued' | 'sending' | 'sent' | 'unfiled' | 'failed' | 'blocked';
1820
2250
 
2251
+ /**
2252
+ * An import that is still waiting for IMAP discovery to produce the folders its
2253
+ * file named. The folder appointed to a role, a folder's own display name or
2254
+ * mute, and a filter's move destination are all bound by path; a path this
2255
+ * account does not hold yet is kept, not guessed, and bound the moment discovery
2256
+ * finds it.
2257
+ */
2258
+ export type RemitImapPendingConfigImport = {
2259
+ /**
2260
+ * The import still waiting
2261
+ */
2262
+ importId: Uuid;
2263
+ /**
2264
+ * The IMAP paths no mailbox answers to yet, deduplicated
2265
+ */
2266
+ folderPaths: Array<string>;
2267
+ };
2268
+
1821
2269
  /**
1822
2270
  * Actionable placement verdict — the direction Remit decided to move a message. `leave` is not represented: a left-in-place verdict means the placement sub-model is absent.
1823
2271
  */
@@ -1998,6 +2446,11 @@ export type RemitImapRawMessageResponse = {
1998
2446
  raw: string;
1999
2447
  };
2000
2448
 
2449
+ /**
2450
+ * Which occurrences of a recurring event a write applies to (issue #15). A request parameter, never a stored column: the resource records what the series is, and this records what the caller meant by editing one drawing of it.
2451
+ */
2452
+ export type RemitImapRecurrenceScope = 'This' | 'Following' | 'All';
2453
+
2001
2454
  /**
2002
2455
  * Message reference types per RFC 2822 Section 3.6.4
2003
2456
  */
@@ -2591,6 +3044,50 @@ export type RemitImapUpdateAddressInput = {
2591
3044
  flags?: RemitImapUpdateAddressFlagsInput;
2592
3045
  };
2593
3046
 
3047
+ /**
3048
+ * Input for updating an event. Every field is optional and absence means
3049
+ * untouched — a patch that carries only `summary` renames the event and moves
3050
+ * nothing.
3051
+ *
3052
+ * What the patch applies to is the `scope` parameter's business: `All` rewrites
3053
+ * the master, `This` writes a RECURRENCE-ID override for one occurrence, and
3054
+ * `Following` splits the series at one occurrence and applies the patch to the
3055
+ * remainder.
3056
+ */
3057
+ export type RemitImapUpdateCalendarEventInput = {
3058
+ summary?: String512;
3059
+ description?: String2048;
3060
+ location?: String512;
3061
+ start?: String64;
3062
+ end?: String64;
3063
+ allDay?: boolean;
3064
+ timeZone?: String64;
3065
+ status?: RemitImapCalendarEventStatus;
3066
+ transparency?: RemitImapCalendarTransparency;
3067
+ /**
3068
+ * RRULE value, or `""` to drop the rule. Only meaningful with `scope=All` or `scope=Following`: an override is one occurrence and carries no rule of its own.
3069
+ */
3070
+ recurrenceRule?: String512;
3071
+ };
3072
+
3073
+ /**
3074
+ * Input for updating a calendar collection. The name, colour and timezone are the mutable overlay; `urlSegment` is not among them, because it is the collection's identity and the path a client has bookmarked.
3075
+ */
3076
+ export type RemitImapUpdateCalendarInput = {
3077
+ /**
3078
+ * Human-readable collection name (display)
3079
+ */
3080
+ displayName?: String140;
3081
+ /**
3082
+ * Display color slot for this collection
3083
+ */
3084
+ color?: RemitImapCalendarColor;
3085
+ /**
3086
+ * IANA time zone this collection's floating times are read in, e.g. "Europe/Amsterdam". `""` when none is set, which reads as UTC.
3087
+ */
3088
+ timezone?: String64;
3089
+ };
3090
+
2594
3091
  /**
2595
3092
  * Input for updating a filter (RFC 034, reader #266). The name, predicate,
2596
3093
  * action, scope, and expiresAt are all updatable; `ttl` is always
@@ -2808,6 +3305,11 @@ export type RemitImapWellknownFlagUpdate = RemitImapAddressFlagBaseUpdate & {
2808
3305
  value?: boolean;
2809
3306
  };
2810
3307
 
3308
+ /**
3309
+ * How confidently a stored time was placed on the clock. A calendar that cannot say this hides its worst failure: an event read in the wrong zone is off by hours and looks exactly like an event read correctly.
3310
+ */
3311
+ export type RemitImapZoneCertainty = 'Local' | 'Explicit' | 'Ambiguous';
3312
+
2811
3313
  export type String140 = string;
2812
3314
 
2813
3315
  export type String2048 = string;
@@ -2869,6 +3371,31 @@ export type RemitImapBodyPartResponseWritable = {
2869
3371
  contentUrl: string;
2870
3372
  };
2871
3373
 
3374
+ /**
3375
+ * Every calendar collection of the caller's account config, url segment first. Unpaginated: an account holds a handful of calendars, and a page boundary in a sidebar is a bug waiting to happen.
3376
+ */
3377
+ export type RemitImapCalendarListResponseWritable = {
3378
+ items: Array<RemitImapCalendarResponseWritable>;
3379
+ };
3380
+
3381
+ /**
3382
+ * A calendar collection as the API returns it.
3383
+ */
3384
+ export type RemitImapCalendarResponseWritable = {
3385
+ /**
3386
+ * Human-readable collection name (display)
3387
+ */
3388
+ displayName: String140;
3389
+ /**
3390
+ * Display color slot for this collection
3391
+ */
3392
+ color: RemitImapCalendarColor;
3393
+ /**
3394
+ * IANA time zone this collection's floating times are read in, e.g. "Europe/Amsterdam". `""` when none is set, which reads as UTC.
3395
+ */
3396
+ timezone: String64;
3397
+ };
3398
+
2872
3399
  /**
2873
3400
  * Full configuration description including accounts
2874
3401
  */
@@ -2881,6 +3408,10 @@ export type RemitImapConfigDescriptionResponseWritable = {
2881
3408
  * Associated email accounts
2882
3409
  */
2883
3410
  accounts: Array<RemitImapAccountResponseWritable>;
3411
+ /**
3412
+ * Absent unless a configuration import is still waiting on folders IMAP has not produced yet (#1021). Nothing polls a separate route for it.
3413
+ */
3414
+ pendingImport?: RemitImapPendingConfigImport;
2884
3415
  };
2885
3416
 
2886
3417
  /**
@@ -3715,6 +4246,387 @@ export type AddressDetailOperationsUpdateAddressResponses = {
3715
4246
 
3716
4247
  export type AddressDetailOperationsUpdateAddressResponse = AddressDetailOperationsUpdateAddressResponses[keyof AddressDetailOperationsUpdateAddressResponses];
3717
4248
 
4249
+ export type CalendarEventOperationsListCalendarEventsData = {
4250
+ body?: never;
4251
+ path?: never;
4252
+ query: {
4253
+ /**
4254
+ * Start of the window, an ISO 8601 date-time with zone offset. Inclusive.
4255
+ */
4256
+ from: string;
4257
+ /**
4258
+ * End of the window, an ISO 8601 date-time with zone offset. Exclusive.
4259
+ */
4260
+ to: string;
4261
+ /**
4262
+ * Restrict to these collections, repeated once per calendar. Omitted means every calendar the caller holds.
4263
+ */
4264
+ calendarId?: Array<Uuid>;
4265
+ };
4266
+ url: '/calendar-events';
4267
+ };
4268
+
4269
+ export type CalendarEventOperationsListCalendarEventsErrors = {
4270
+ /**
4271
+ * Validation error response
4272
+ */
4273
+ 400: ApiError;
4274
+ /**
4275
+ * Not found error response
4276
+ */
4277
+ 404: ApiError;
4278
+ };
4279
+
4280
+ export type CalendarEventOperationsListCalendarEventsError = CalendarEventOperationsListCalendarEventsErrors[keyof CalendarEventOperationsListCalendarEventsErrors];
4281
+
4282
+ export type CalendarEventOperationsListCalendarEventsResponses = {
4283
+ /**
4284
+ * The request has succeeded.
4285
+ */
4286
+ 200: RemitImapCalendarEventListResponse;
4287
+ };
4288
+
4289
+ export type CalendarEventOperationsListCalendarEventsResponse = CalendarEventOperationsListCalendarEventsResponses[keyof CalendarEventOperationsListCalendarEventsResponses];
4290
+
4291
+ export type CalendarEventOperationsCreateCalendarEventData = {
4292
+ body: RemitImapCreateCalendarEventInput;
4293
+ path?: never;
4294
+ query?: never;
4295
+ url: '/calendar-events';
4296
+ };
4297
+
4298
+ export type CalendarEventOperationsCreateCalendarEventErrors = {
4299
+ /**
4300
+ * Validation error response
4301
+ */
4302
+ 400: ApiError;
4303
+ /**
4304
+ * Not found error response
4305
+ */
4306
+ 404: ApiError;
4307
+ };
4308
+
4309
+ export type CalendarEventOperationsCreateCalendarEventError = CalendarEventOperationsCreateCalendarEventErrors[keyof CalendarEventOperationsCreateCalendarEventErrors];
4310
+
4311
+ export type CalendarEventOperationsCreateCalendarEventResponses = {
4312
+ /**
4313
+ * The request has succeeded.
4314
+ */
4315
+ 200: RemitImapCalendarEventResponse;
4316
+ };
4317
+
4318
+ export type CalendarEventOperationsCreateCalendarEventResponse = CalendarEventOperationsCreateCalendarEventResponses[keyof CalendarEventOperationsCreateCalendarEventResponses];
4319
+
4320
+ export type CalendarEventDetailOperationsDeleteCalendarEventData = {
4321
+ body?: never;
4322
+ headers?: {
4323
+ 'If-Match'?: string;
4324
+ };
4325
+ path: {
4326
+ calendarObjectId: Uuid;
4327
+ };
4328
+ query: {
4329
+ /**
4330
+ * Collection the resource lives in
4331
+ */
4332
+ calendarId: Uuid;
4333
+ /**
4334
+ * Which occurrences this delete applies to. Defaults to `All`.
4335
+ */
4336
+ scope?: RemitImapRecurrenceScope;
4337
+ /**
4338
+ * RECURRENCE-ID of the occurrence the delete is anchored at. Required for `This` and `Following`.
4339
+ */
4340
+ recurrenceId?: string;
4341
+ };
4342
+ url: '/calendar-events/{calendarObjectId}';
4343
+ };
4344
+
4345
+ export type CalendarEventDetailOperationsDeleteCalendarEventErrors = {
4346
+ /**
4347
+ * Validation error response
4348
+ */
4349
+ 400: ApiError;
4350
+ /**
4351
+ * Not found error response
4352
+ */
4353
+ 404: ApiError;
4354
+ /**
4355
+ * The condition the request stated is no longer true. Answered when an
4356
+ * `If-Match` names an etag the stored resource no longer carries: somebody else
4357
+ * wrote it in between, so applying this request would silently discard their
4358
+ * change. The client re-reads the resource and decides what to do with the
4359
+ * version it now has.
4360
+ */
4361
+ 412: ApiError;
4362
+ };
4363
+
4364
+ export type CalendarEventDetailOperationsDeleteCalendarEventError = CalendarEventDetailOperationsDeleteCalendarEventErrors[keyof CalendarEventDetailOperationsDeleteCalendarEventErrors];
4365
+
4366
+ export type CalendarEventDetailOperationsDeleteCalendarEventResponses = {
4367
+ /**
4368
+ * Nothing to return. The resource, or the occurrence, is gone.
4369
+ */
4370
+ 204: void;
4371
+ };
4372
+
4373
+ export type CalendarEventDetailOperationsDeleteCalendarEventResponse = CalendarEventDetailOperationsDeleteCalendarEventResponses[keyof CalendarEventDetailOperationsDeleteCalendarEventResponses];
4374
+
4375
+ export type CalendarEventDetailOperationsGetCalendarEventData = {
4376
+ body?: never;
4377
+ path: {
4378
+ calendarObjectId: Uuid;
4379
+ };
4380
+ query: {
4381
+ /**
4382
+ * Collection the resource lives in. A resource is addressed by its collection and its own id, which is what a client holds: every occurrence a listing returns carries both.
4383
+ */
4384
+ calendarId: Uuid;
4385
+ };
4386
+ url: '/calendar-events/{calendarObjectId}';
4387
+ };
4388
+
4389
+ export type CalendarEventDetailOperationsGetCalendarEventErrors = {
4390
+ /**
4391
+ * Validation error response
4392
+ */
4393
+ 400: ApiError;
4394
+ /**
4395
+ * Not found error response
4396
+ */
4397
+ 404: ApiError;
4398
+ };
4399
+
4400
+ export type CalendarEventDetailOperationsGetCalendarEventError = CalendarEventDetailOperationsGetCalendarEventErrors[keyof CalendarEventDetailOperationsGetCalendarEventErrors];
4401
+
4402
+ export type CalendarEventDetailOperationsGetCalendarEventResponses = {
4403
+ /**
4404
+ * The request has succeeded.
4405
+ */
4406
+ 200: RemitImapCalendarEventResponse;
4407
+ };
4408
+
4409
+ export type CalendarEventDetailOperationsGetCalendarEventResponse = CalendarEventDetailOperationsGetCalendarEventResponses[keyof CalendarEventDetailOperationsGetCalendarEventResponses];
4410
+
4411
+ export type CalendarEventDetailOperationsUpdateCalendarEventData = {
4412
+ body: RemitImapUpdateCalendarEventInput;
4413
+ headers?: {
4414
+ 'If-Match'?: string;
4415
+ };
4416
+ path: {
4417
+ calendarObjectId: Uuid;
4418
+ };
4419
+ query: {
4420
+ /**
4421
+ * Collection the resource lives in
4422
+ */
4423
+ calendarId: Uuid;
4424
+ /**
4425
+ * Which occurrences this update applies to. Defaults to `All`.
4426
+ */
4427
+ scope?: RemitImapRecurrenceScope;
4428
+ /**
4429
+ * RECURRENCE-ID of the occurrence the update is anchored at, as the ISO 8601 UTC instant a listing returned. Required for `This` and `Following`.
4430
+ */
4431
+ recurrenceId?: string;
4432
+ };
4433
+ url: '/calendar-events/{calendarObjectId}';
4434
+ };
4435
+
4436
+ export type CalendarEventDetailOperationsUpdateCalendarEventErrors = {
4437
+ /**
4438
+ * Validation error response
4439
+ */
4440
+ 400: ApiError;
4441
+ /**
4442
+ * Not found error response
4443
+ */
4444
+ 404: ApiError;
4445
+ /**
4446
+ * The condition the request stated is no longer true. Answered when an
4447
+ * `If-Match` names an etag the stored resource no longer carries: somebody else
4448
+ * wrote it in between, so applying this request would silently discard their
4449
+ * change. The client re-reads the resource and decides what to do with the
4450
+ * version it now has.
4451
+ */
4452
+ 412: ApiError;
4453
+ };
4454
+
4455
+ export type CalendarEventDetailOperationsUpdateCalendarEventError = CalendarEventDetailOperationsUpdateCalendarEventErrors[keyof CalendarEventDetailOperationsUpdateCalendarEventErrors];
4456
+
4457
+ export type CalendarEventDetailOperationsUpdateCalendarEventResponses = {
4458
+ /**
4459
+ * The request has succeeded.
4460
+ */
4461
+ 200: RemitImapCalendarEventResponse;
4462
+ };
4463
+
4464
+ export type CalendarEventDetailOperationsUpdateCalendarEventResponse = CalendarEventDetailOperationsUpdateCalendarEventResponses[keyof CalendarEventDetailOperationsUpdateCalendarEventResponses];
4465
+
4466
+ export type CalendarFreeBusyOperationsListCalendarFreeBusyData = {
4467
+ body?: never;
4468
+ path?: never;
4469
+ query: {
4470
+ /**
4471
+ * Start of the window, an ISO 8601 date-time with zone offset. Inclusive.
4472
+ */
4473
+ from: string;
4474
+ /**
4475
+ * End of the window, an ISO 8601 date-time with zone offset. Exclusive.
4476
+ */
4477
+ to: string;
4478
+ };
4479
+ url: '/calendar-free-busy';
4480
+ };
4481
+
4482
+ export type CalendarFreeBusyOperationsListCalendarFreeBusyErrors = {
4483
+ /**
4484
+ * Validation error response
4485
+ */
4486
+ 400: ApiError;
4487
+ };
4488
+
4489
+ export type CalendarFreeBusyOperationsListCalendarFreeBusyError = CalendarFreeBusyOperationsListCalendarFreeBusyErrors[keyof CalendarFreeBusyOperationsListCalendarFreeBusyErrors];
4490
+
4491
+ export type CalendarFreeBusyOperationsListCalendarFreeBusyResponses = {
4492
+ /**
4493
+ * The request has succeeded.
4494
+ */
4495
+ 200: RemitImapCalendarFreeBusyResponse;
4496
+ };
4497
+
4498
+ export type CalendarFreeBusyOperationsListCalendarFreeBusyResponse = CalendarFreeBusyOperationsListCalendarFreeBusyResponses[keyof CalendarFreeBusyOperationsListCalendarFreeBusyResponses];
4499
+
4500
+ export type CalendarOperationsListCalendarsData = {
4501
+ body?: never;
4502
+ path?: never;
4503
+ query?: never;
4504
+ url: '/calendars';
4505
+ };
4506
+
4507
+ export type CalendarOperationsListCalendarsResponses = {
4508
+ /**
4509
+ * The request has succeeded.
4510
+ */
4511
+ 200: RemitImapCalendarListResponse;
4512
+ };
4513
+
4514
+ export type CalendarOperationsListCalendarsResponse = CalendarOperationsListCalendarsResponses[keyof CalendarOperationsListCalendarsResponses];
4515
+
4516
+ export type CalendarOperationsCreateCalendarData = {
4517
+ body: RemitImapCreateCalendarInput;
4518
+ path?: never;
4519
+ query?: never;
4520
+ url: '/calendars';
4521
+ };
4522
+
4523
+ export type CalendarOperationsCreateCalendarErrors = {
4524
+ /**
4525
+ * Validation error response
4526
+ */
4527
+ 400: ApiError;
4528
+ };
4529
+
4530
+ export type CalendarOperationsCreateCalendarError = CalendarOperationsCreateCalendarErrors[keyof CalendarOperationsCreateCalendarErrors];
4531
+
4532
+ export type CalendarOperationsCreateCalendarResponses = {
4533
+ /**
4534
+ * The request has succeeded.
4535
+ */
4536
+ 200: RemitImapCalendarResponse;
4537
+ };
4538
+
4539
+ export type CalendarOperationsCreateCalendarResponse = CalendarOperationsCreateCalendarResponses[keyof CalendarOperationsCreateCalendarResponses];
4540
+
4541
+ export type CalendarDetailOperationsDeleteCalendarData = {
4542
+ body?: never;
4543
+ path: {
4544
+ calendarId: Uuid;
4545
+ };
4546
+ query?: never;
4547
+ url: '/calendars/{calendarId}';
4548
+ };
4549
+
4550
+ export type CalendarDetailOperationsDeleteCalendarErrors = {
4551
+ /**
4552
+ * Validation error response
4553
+ */
4554
+ 400: ApiError;
4555
+ /**
4556
+ * Not found error response
4557
+ */
4558
+ 404: ApiError;
4559
+ };
4560
+
4561
+ export type CalendarDetailOperationsDeleteCalendarError = CalendarDetailOperationsDeleteCalendarErrors[keyof CalendarDetailOperationsDeleteCalendarErrors];
4562
+
4563
+ export type CalendarDetailOperationsDeleteCalendarResponses = {
4564
+ /**
4565
+ * Nothing to return. The resource, or the occurrence, is gone.
4566
+ */
4567
+ 204: void;
4568
+ };
4569
+
4570
+ export type CalendarDetailOperationsDeleteCalendarResponse = CalendarDetailOperationsDeleteCalendarResponses[keyof CalendarDetailOperationsDeleteCalendarResponses];
4571
+
4572
+ export type CalendarDetailOperationsGetCalendarData = {
4573
+ body?: never;
4574
+ path: {
4575
+ calendarId: Uuid;
4576
+ };
4577
+ query?: never;
4578
+ url: '/calendars/{calendarId}';
4579
+ };
4580
+
4581
+ export type CalendarDetailOperationsGetCalendarErrors = {
4582
+ /**
4583
+ * Not found error response
4584
+ */
4585
+ 404: ApiError;
4586
+ };
4587
+
4588
+ export type CalendarDetailOperationsGetCalendarError = CalendarDetailOperationsGetCalendarErrors[keyof CalendarDetailOperationsGetCalendarErrors];
4589
+
4590
+ export type CalendarDetailOperationsGetCalendarResponses = {
4591
+ /**
4592
+ * The request has succeeded.
4593
+ */
4594
+ 200: RemitImapCalendarResponse;
4595
+ };
4596
+
4597
+ export type CalendarDetailOperationsGetCalendarResponse = CalendarDetailOperationsGetCalendarResponses[keyof CalendarDetailOperationsGetCalendarResponses];
4598
+
4599
+ export type CalendarDetailOperationsUpdateCalendarData = {
4600
+ body: RemitImapUpdateCalendarInput;
4601
+ path: {
4602
+ calendarId: Uuid;
4603
+ };
4604
+ query?: never;
4605
+ url: '/calendars/{calendarId}';
4606
+ };
4607
+
4608
+ export type CalendarDetailOperationsUpdateCalendarErrors = {
4609
+ /**
4610
+ * Validation error response
4611
+ */
4612
+ 400: ApiError;
4613
+ /**
4614
+ * Not found error response
4615
+ */
4616
+ 404: ApiError;
4617
+ };
4618
+
4619
+ export type CalendarDetailOperationsUpdateCalendarError = CalendarDetailOperationsUpdateCalendarErrors[keyof CalendarDetailOperationsUpdateCalendarErrors];
4620
+
4621
+ export type CalendarDetailOperationsUpdateCalendarResponses = {
4622
+ /**
4623
+ * The request has succeeded.
4624
+ */
4625
+ 200: RemitImapCalendarResponse;
4626
+ };
4627
+
4628
+ export type CalendarDetailOperationsUpdateCalendarResponse = CalendarDetailOperationsUpdateCalendarResponses[keyof CalendarDetailOperationsUpdateCalendarResponses];
4629
+
3718
4630
  export type ConfigOperationsGetConfigData = {
3719
4631
  body?: never;
3720
4632
  path?: never;
@@ -3747,6 +4659,40 @@ export type ConfigOperationsExportConfigResponses = {
3747
4659
 
3748
4660
  export type ConfigOperationsExportConfigResponse = ConfigOperationsExportConfigResponses[keyof ConfigOperationsExportConfigResponses];
3749
4661
 
4662
+ export type ConfigOperationsImportConfigData = {
4663
+ body: RemitImapImportConfigInput;
4664
+ path?: never;
4665
+ query?: never;
4666
+ url: '/config/import';
4667
+ };
4668
+
4669
+ export type ConfigOperationsImportConfigErrors = {
4670
+ /**
4671
+ * Validation error response
4672
+ */
4673
+ 400: ApiError;
4674
+ /**
4675
+ * The import was refused because this configuration is not empty. The body is
4676
+ * flat: `code`, `message` and `details` sit at the top level.
4677
+ *
4678
+ * `code: "config_not_empty"` — the configuration already holds an account, a
4679
+ * label, a filter or an address flag. `details` names how many of each. Re-send
4680
+ * with `onExisting: merge` to upsert instead.
4681
+ */
4682
+ 409: ApiError;
4683
+ };
4684
+
4685
+ export type ConfigOperationsImportConfigError = ConfigOperationsImportConfigErrors[keyof ConfigOperationsImportConfigErrors];
4686
+
4687
+ export type ConfigOperationsImportConfigResponses = {
4688
+ /**
4689
+ * The request has succeeded.
4690
+ */
4691
+ 200: RemitImapConfigImportReport;
4692
+ };
4693
+
4694
+ export type ConfigOperationsImportConfigResponse = ConfigOperationsImportConfigResponses[keyof ConfigOperationsImportConfigResponses];
4695
+
3750
4696
  export type ThreadOperationsListThreadsData = {
3751
4697
  body?: never;
3752
4698
  path: {