@remit/api-openapi-types 0.0.61 → 0.0.63

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 (2) hide show
  1. package/package.json +1 -1
  2. package/types.d.ts +54 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -61,6 +61,10 @@ writer can reach is a vocabulary that lies about what the field means.
61
61
  * Authentication mechanism used by an email account
62
62
  */
63
63
  export type AccountAuthType = "password" | "oauthMicrosoft";
64
+ /**
65
+ * A service an account syncs. `Mail` covers messages, folders and sending; `Calendar` covers a provider calendar read into the calendar store.
66
+ */
67
+ export type AccountService = "Mail" | "Calendar";
64
68
  /**
65
69
  * IMAP connection states per RFC 9051 Section 3
66
70
  */
@@ -597,11 +601,9 @@ unless the refusal names its own — see `FolderRoleConflict`,
597
601
  details?: Record;
598
602
  }
599
603
  /**
600
- * The same flat 409 body as `FolderRoleConflict`, with one code only this endpoint can answer with.
604
+ * The same flat 409 body as `FolderRoleConflict`, with the codes only this endpoint can answer with.
601
605
 
602
606
  `code: "folder_role_unresolved"` — as everywhere else, with `details` carrying `role`, `accountId` and `reason`.
603
-
604
- `code: "mailbox_not_settled"` — the mailbox being appointed is still being created or deleted on the mail server, so it cannot yet hold a role. `details` carries `mailboxId` and `syncStatus`. Clearing a role is never refused this way.
605
607
  */
606
608
  export interface AppointFolderRoleConflict {
607
609
  statusCode: 409;
@@ -618,6 +620,28 @@ unless the refusal names its own — see `FolderRoleConflict`,
618
620
  */
619
621
  details?: Record;
620
622
  }
623
+ /**
624
+ * The write binds a durable reference — a role appointment, a filter's move target, a message's destination — to a folder whose own mutation has not settled, so the reference would point at something that may never exist.
625
+
626
+ `code: "mailbox_not_settled"` — `details` carries `mailboxId` and `syncStatus`, one of `pending` (the mail server has not confirmed the folder yet), `deleting` (it is on its way out) or `failed` (its last rename or delete did not land, and the user has a retry or a dismissal to make first). Clearing a reference is never refused this way, and neither is moving mail *out of* such a folder.
627
+
628
+ 422 rather than a second 409: 409 means somebody else is changing this folder right now and the client should refresh, which is different copy and a different remedy.
629
+ */
630
+ export interface MailboxNotSettled {
631
+ statusCode: 422;
632
+ /**
633
+ * Stable token naming the refusal. Branch on this, never on `message`.
634
+ */
635
+ code: string;
636
+ /**
637
+ * Human-readable error message
638
+ */
639
+ message: string;
640
+ /**
641
+ * Additional error details
642
+ */
643
+ details?: Record;
644
+ }
621
645
  /**
622
646
  * The condition the request stated is no longer true. Answered when an
623
647
  `If-Match` names an etag the stored resource no longer carries: somebody else
@@ -1210,6 +1234,10 @@ never from a raw content-type line — parameters carry `name=` and
1210
1234
  * Authentication mechanism used by this account
1211
1235
  */
1212
1236
  authType: AccountAuthType;
1237
+ /**
1238
+ * Services this account syncs. Never empty. A password account holds `Mail` alone. Every account written before this field existed holds `#[AccountService.Mail]`.
1239
+ */
1240
+ syncedServices: AccountService[];
1213
1241
  /**
1214
1242
  * Hashed password for authentication (password accounts only)
1215
1243
  */
@@ -1329,6 +1357,10 @@ never from a raw content-type line — parameters carry `name=` and
1329
1357
  * Authentication mechanism used by this account
1330
1358
  */
1331
1359
  authType: AccountAuthType;
1360
+ /**
1361
+ * Services this account syncs. Never empty. A password account holds `Mail` alone. Every account written before this field existed holds `#[AccountService.Mail]`.
1362
+ */
1363
+ syncedServices: AccountService[];
1332
1364
  /**
1333
1365
  * IMAP server hostname or IP address
1334
1366
  */
@@ -3164,6 +3196,10 @@ asking "is this slot free" never has to do the merging itself.
3164
3196
  * Authentication mechanism for this account. Defaults to `password`. Pass `oauthMicrosoft` only via the OAuth connect flow (POST /accounts/oauth/microsoft/start).
3165
3197
  */
3166
3198
  authType?: AccountAuthType;
3199
+ /**
3200
+ * Services this account syncs. Defaults to `#[Mail]`. Refused when empty, and refused for a password account unless it is exactly `#[Mail]`.
3201
+ */
3202
+ syncedServices?: AccountService[];
3167
3203
  /**
3168
3204
  * Account password (will be encrypted). Required for password accounts; omit for OAuth accounts.
3169
3205
  */
@@ -3351,6 +3387,10 @@ asking "is this slot free" never has to do the merging itself.
3351
3387
  * Enable/disable account
3352
3388
  */
3353
3389
  isActive?: boolean;
3390
+ /**
3391
+ * Replaces the stored service set outright. Refused when empty, on a password account unless it is exactly `#[Mail]`, or when it names a service the account's OAuth grant does not cover. That last case is a consent round trip through the OAuth start route.
3392
+ */
3393
+ syncedServices?: AccountService[];
3354
3394
  /**
3355
3395
  * Plain text email signature
3356
3396
  */
@@ -6399,6 +6439,8 @@ declare namespace Paths {
6399
6439
  }
6400
6440
  namespace Responses {
6401
6441
  export type $204 = void;
6442
+ export type $400 = void;
6443
+ export type $409 = void;
6402
6444
  export type $404 = void;
6403
6445
  export type $403 = void;
6404
6446
  export type $401 = void;
@@ -6413,6 +6455,7 @@ declare namespace Paths {
6413
6455
  namespace Responses {
6414
6456
  export type $200 = void;
6415
6457
  export type $409 = void;
6458
+ export type $422 = void;
6416
6459
  export type $404 = void;
6417
6460
  export type $403 = void;
6418
6461
  export type $401 = void;
@@ -6440,6 +6483,7 @@ declare namespace Paths {
6440
6483
  namespace Responses {
6441
6484
  export type $200 = void;
6442
6485
  export type $400 = void;
6486
+ export type $422 = void;
6443
6487
  export type $404 = void;
6444
6488
  export type $403 = void;
6445
6489
  export type $401 = void;
@@ -6464,6 +6508,7 @@ declare namespace Paths {
6464
6508
  export type RequestBody = Components.Schemas.UpdateFilterInput;
6465
6509
  namespace Responses {
6466
6510
  export type $200 = void;
6511
+ export type $422 = void;
6467
6512
  export type $404 = void;
6468
6513
  export type $403 = void;
6469
6514
  export type $401 = void;
@@ -7106,6 +7151,7 @@ declare namespace Paths {
7106
7151
  namespace Responses {
7107
7152
  export type $200 = void;
7108
7153
  export type $409 = void;
7154
+ export type $422 = void;
7109
7155
  export type $404 = void;
7110
7156
  export type $403 = void;
7111
7157
  export type $401 = void;
@@ -7116,6 +7162,7 @@ declare namespace Paths {
7116
7162
  namespace Responses {
7117
7163
  export type $200 = void;
7118
7164
  export type $409 = void;
7165
+ export type $422 = void;
7119
7166
  export type $404 = void;
7120
7167
  export type $403 = void;
7121
7168
  export type $401 = void;
@@ -7320,7 +7367,7 @@ export interface OperationMethods {
7320
7367
  config?: AxiosRequestConfig
7321
7368
  ): OperationResponse<Paths.RenameMailbox.Responses.$200>;
7322
7369
  /**
7323
- * deleteMailbox
7370
+ * deleteMailbox - Record a delete intent for a folder. The folder stays listed, marked as being deleted, until the mail server confirms it and its mail goes with it. Refused with 400 for INBOX, for a folder with folders inside it, and for a folder a filter or a canonical role is bound to — the message names each binding; with 409 when a mutation is already in flight on it.
7324
7371
  */
7325
7372
  'deleteMailbox'(
7326
7373
  parameters?: Parameters<Paths.DeleteMailbox.PathParameters> | null,
@@ -8106,7 +8153,7 @@ export interface PathsDictionary {
8106
8153
  config?: AxiosRequestConfig
8107
8154
  ): OperationResponse<Paths.RenameMailbox.Responses.$200>;
8108
8155
  /**
8109
- * deleteMailbox
8156
+ * deleteMailbox - Record a delete intent for a folder. The folder stays listed, marked as being deleted, until the mail server confirms it and its mail goes with it. Refused with 400 for INBOX, for a folder with folders inside it, and for a folder a filter or a canonical role is bound to — the message names each binding; with 409 when a mutation is already in flight on it.
8110
8157
  */
8111
8158
  'delete'(
8112
8159
  parameters?: Parameters<Paths.DeleteMailbox.PathParameters> | null,
@@ -8874,6 +8921,7 @@ export type ForbiddenError = Components.Schemas.ForbiddenError;
8874
8921
  export type NoContent = Components.Schemas.NoContent;
8875
8922
  export type FolderRoleConflict = Components.Schemas.FolderRoleConflict;
8876
8923
  export type AppointFolderRoleConflict = Components.Schemas.AppointFolderRoleConflict;
8924
+ export type MailboxNotSettled = Components.Schemas.MailboxNotSettled;
8877
8925
  export type PreconditionFailedError = Components.Schemas.PreconditionFailedError;
8878
8926
  export type DeleteMessagesConflict = Components.Schemas.DeleteMessagesConflict;
8879
8927
  export type MessagePlacementConflict = Components.Schemas.MessagePlacementConflict;
@@ -9052,6 +9100,7 @@ export type QuarantineFailureStage = Components.Schemas.QuarantineFailureStage;
9052
9100
  export type QuarantineFailureCode = Components.Schemas.QuarantineFailureCode;
9053
9101
  export type AccountConfigState = Components.Schemas.AccountConfigState;
9054
9102
  export type AccountAuthType = Components.Schemas.AccountAuthType;
9103
+ export type AccountService = Components.Schemas.AccountService;
9055
9104
  export type ConnectionState = Components.Schemas.ConnectionState;
9056
9105
  export type SyncPhase = Components.Schemas.SyncPhase;
9057
9106
  export type FolderAppointmentSource = Components.Schemas.FolderAppointmentSource;