@remit/api-http-client 0.0.63 → 0.0.65

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.gen.ts +31 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-http-client",
3
- "version": "0.0.63",
3
+ "version": "0.0.65",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.ts",
package/types.gen.ts CHANGED
@@ -44,6 +44,10 @@ export type MicrosoftOAuthStartRequest = {
44
44
  * Optional email hint for the Microsoft login page
45
45
  */
46
46
  email?: string;
47
+ /**
48
+ * Services to request consent for. The authorization URL asks for the scopes these map to. Defaults to `#[Mail]`; refused when empty. Adding a service to a connected account is this same request carrying the full set the account should sync.
49
+ */
50
+ services?: Array<RemitImapAccountService>;
47
51
  };
48
52
 
49
53
  export type MicrosoftOAuthStartResponse = {
@@ -184,6 +188,10 @@ export type RemitImapAccountResponse = {
184
188
  * Services this account syncs. Never empty. A password account holds `Mail` alone. Every account written before this field existed holds `#[AccountService.Mail]`.
185
189
  */
186
190
  readonly syncedServices: Array<RemitImapAccountService>;
191
+ /**
192
+ * OAuth scopes the provider confirmed on the last consent, as full scope URIs. Empty on a password account. A Microsoft account can only select a service these scopes cover; one that lacks it goes back through POST /accounts/oauth/microsoft/start carrying that service.
193
+ */
194
+ readonly grantedScopes: Array<string>;
187
195
  /**
188
196
  * IMAP server hostname or IP address
189
197
  */
@@ -1882,6 +1890,10 @@ export type RemitImapMailboxResponse = {
1882
1890
  * The path a recorded rename is moving this folder to. Absent unless a rename is in flight or has just failed, which is what tells a create in flight from a rename in flight (D2, D3). `fullPath` stays the path the server holds throughout, so a failed rename is this field cleared rather than a subtree of paths restored. Invariant: non-null only while `syncStatus` is `pending` or `failed`.
1883
1891
  */
1884
1892
  pendingPath?: String512;
1893
+ /**
1894
+ * What the mail server said when it refused the last folder mutation, verbatim, so a folder in `failed` can say why. Total: the empty string whenever `syncStatus` is not `failed`, and on a failure the server gave no text for.
1895
+ */
1896
+ readonly syncFailureReason: string;
1885
1897
  /**
1886
1898
  * Denormalized list of IMAP SPECIAL-USE designations (RFC 6154). Populated from the same `\Sent`, `\Drafts`, etc. attributes the server reports during LIST. Stored on the row to avoid an N+1 join when listing mailboxes.
1887
1899
  */
@@ -4100,6 +4112,25 @@ export type MicrosoftOAuthOperationsMicrosoftOAuthStartData = {
4100
4112
  };
4101
4113
 
4102
4114
  export type MicrosoftOAuthOperationsMicrosoftOAuthStartErrors = {
4115
+ /**
4116
+ * The request was refused as malformed or contradictory. `code` is
4117
+ * `invalid_request` where nothing more specific is known, and the refusal's own
4118
+ * token where there is one.
4119
+ *
4120
+ * The calendar surface answers with the reason it read the request by:
4121
+ * `invalid_window`, `invalid_scope`, `invalid_url_segment`, `url_segment_taken`,
4122
+ * `unknown_time_zone` and `default_calendar_undeletable` on the collection and
4123
+ * the query, and, for a VCALENDAR it could not accept,
4124
+ * `malformed_icalendar`, `not_a_calendar`, `unsupported_component`, `no_event`,
4125
+ * `no_master_event`, `multiple_master_events`, `missing_uid`, `mismatched_uid`,
4126
+ * `missing_dt_start`, `backwards_end`, `invalid_date_time`,
4127
+ * `invalid_recurrence_rule`, `missing_recurrence_id`, `not_recurring`,
4128
+ * `unknown_occurrence` and `unmovable_recurrence_rule`.
4129
+ *
4130
+ * `errors` is present only when the request failed schema validation before any
4131
+ * handler ran, and names every field that was refused.
4132
+ */
4133
+ 400: ValidationError;
4103
4134
  /**
4104
4135
  * The request carried no usable credential. `code` is `unauthorized`.
4105
4136
  */