@remit/api-http-client 0.0.57 → 0.0.59

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.
@@ -335,6 +335,9 @@ export const mailboxOperationsCreateMailboxMutation = (options?: Partial<Options
335
335
  return mutationOptions;
336
336
  };
337
337
 
338
+ /**
339
+ * 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.
340
+ */
338
341
  export const mailboxDetailOperationsDeleteMailboxMutation = (options?: Partial<Options<MailboxDetailOperationsDeleteMailboxData>>): UseMutationOptions<MailboxDetailOperationsDeleteMailboxResponse, MailboxDetailOperationsDeleteMailboxError, Options<MailboxDetailOperationsDeleteMailboxData>> => {
339
342
  const mutationOptions: UseMutationOptions<MailboxDetailOperationsDeleteMailboxResponse, MailboxDetailOperationsDeleteMailboxError, Options<MailboxDetailOperationsDeleteMailboxData>> = {
340
343
  mutationFn: async (fnOptions) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-http-client",
3
- "version": "0.0.57",
3
+ "version": "0.0.59",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.ts",
package/sdk.gen.ts CHANGED
@@ -192,6 +192,9 @@ export const mailboxOperationsCreateMailbox = <ThrowOnError extends boolean = fa
192
192
  }
193
193
  });
194
194
 
195
+ /**
196
+ * 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.
197
+ */
195
198
  export const mailboxDetailOperationsDeleteMailbox = <ThrowOnError extends boolean = false>(options: Options<MailboxDetailOperationsDeleteMailboxData, ThrowOnError>): RequestResult<MailboxDetailOperationsDeleteMailboxResponses, MailboxDetailOperationsDeleteMailboxErrors, ThrowOnError> => (options.client ?? client).delete<MailboxDetailOperationsDeleteMailboxResponses, MailboxDetailOperationsDeleteMailboxErrors, ThrowOnError>({
196
199
  security: [{ name: 'Authorization', type: 'apiKey' }],
197
200
  url: '/accounts/{accountId}/mailboxes/{mailboxId}',
package/types.gen.ts CHANGED
@@ -4298,6 +4298,14 @@ export type FilterOperationsCreateFilterErrors = {
4298
4298
  * Nothing answers to this address, or the caller may not learn that something does. `code` is `not_found`.
4299
4299
  */
4300
4300
  404: ApiError;
4301
+ /**
4302
+ * 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.
4303
+ *
4304
+ * `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.
4305
+ *
4306
+ * 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.
4307
+ */
4308
+ 422: ApiError;
4301
4309
  };
4302
4310
 
4303
4311
  export type FilterOperationsCreateFilterError = FilterOperationsCreateFilterErrors[keyof FilterOperationsCreateFilterErrors];
@@ -4402,6 +4410,14 @@ export type FilterDetailOperationsUpdateFilterErrors = {
4402
4410
  * Nothing answers to this address, or the caller may not learn that something does. `code` is `not_found`.
4403
4411
  */
4404
4412
  404: ApiError;
4413
+ /**
4414
+ * 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.
4415
+ *
4416
+ * `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.
4417
+ *
4418
+ * 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.
4419
+ */
4420
+ 422: ApiError;
4405
4421
  };
4406
4422
 
4407
4423
  export type FilterDetailOperationsUpdateFilterError = FilterDetailOperationsUpdateFilterErrors[keyof FilterDetailOperationsUpdateFilterErrors];
@@ -4439,13 +4455,19 @@ export type FolderRoleOperationsAppointFolderRoleErrors = {
4439
4455
  */
4440
4456
  404: ApiError;
4441
4457
  /**
4442
- * The same flat 409 body as `FolderRoleConflict`, with one code only this endpoint can answer with.
4458
+ * The same flat 409 body as `FolderRoleConflict`, with the codes only this endpoint can answer with.
4443
4459
  *
4444
4460
  * `code: "folder_role_unresolved"` — as everywhere else, with `details` carrying `role`, `accountId` and `reason`.
4445
- *
4446
- * `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.
4447
4461
  */
4448
4462
  409: ApiError;
4463
+ /**
4464
+ * 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.
4465
+ *
4466
+ * `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.
4467
+ *
4468
+ * 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.
4469
+ */
4470
+ 422: ApiError;
4449
4471
  };
4450
4472
 
4451
4473
  export type FolderRoleOperationsAppointFolderRoleError = FolderRoleOperationsAppointFolderRoleErrors[keyof FolderRoleOperationsAppointFolderRoleErrors];
@@ -4760,6 +4782,25 @@ export type MailboxDetailOperationsDeleteMailboxData = {
4760
4782
  };
4761
4783
 
4762
4784
  export type MailboxDetailOperationsDeleteMailboxErrors = {
4785
+ /**
4786
+ * The request was refused as malformed or contradictory. `code` is
4787
+ * `invalid_request` where nothing more specific is known, and the refusal's own
4788
+ * token where there is one.
4789
+ *
4790
+ * The calendar surface answers with the reason it read the request by:
4791
+ * `invalid_window`, `invalid_scope`, `invalid_url_segment`, `url_segment_taken`,
4792
+ * `unknown_time_zone` and `default_calendar_undeletable` on the collection and
4793
+ * the query, and, for a VCALENDAR it could not accept,
4794
+ * `malformed_icalendar`, `not_a_calendar`, `unsupported_component`, `no_event`,
4795
+ * `no_master_event`, `multiple_master_events`, `missing_uid`, `mismatched_uid`,
4796
+ * `missing_dt_start`, `backwards_end`, `invalid_date_time`,
4797
+ * `invalid_recurrence_rule`, `missing_recurrence_id`, `not_recurring` and
4798
+ * `unknown_occurrence`.
4799
+ *
4800
+ * `errors` is present only when the request failed schema validation before any
4801
+ * handler ran, and names every field that was refused.
4802
+ */
4803
+ 400: ValidationError;
4763
4804
  /**
4764
4805
  * The request carried no usable credential. `code` is `unauthorized`.
4765
4806
  */
@@ -4772,6 +4813,12 @@ export type MailboxDetailOperationsDeleteMailboxErrors = {
4772
4813
  * Nothing answers to this address, or the caller may not learn that something does. `code` is `not_found`.
4773
4814
  */
4774
4815
  404: ApiError;
4816
+ /**
4817
+ * The request contradicts the state the resource is in. `code` is `conflict`
4818
+ * unless the refusal names its own — see `FolderRoleConflict`,
4819
+ * `MessagePlacementConflict` and `ConfigImportConflict`.
4820
+ */
4821
+ 409: ApiError;
4775
4822
  };
4776
4823
 
4777
4824
  export type MailboxDetailOperationsDeleteMailboxError = MailboxDetailOperationsDeleteMailboxErrors[keyof MailboxDetailOperationsDeleteMailboxErrors];
@@ -5446,7 +5493,7 @@ export type CalendarEventDetailOperationsUpdateCalendarEventData = {
5446
5493
  */
5447
5494
  scope?: RemitImapRecurrenceScope;
5448
5495
  /**
5449
- * RECURRENCE-ID of the occurrence the update is anchored at, as the ISO 8601 UTC instant a listing returned. Required for `This` and `Following`.
5496
+ * RECURRENCE-ID of the occurrence the update is anchored at, as the ISO 8601 UTC instant a listing returned. Required for `This` and `Following`. Optional for `All`, where it names the occurrence the edit was made from: a start or end in the patch is that occurrence's new time, and the whole series moves by as much.
5450
5497
  */
5451
5498
  recurrenceId?: string;
5452
5499
  };
@@ -6520,6 +6567,14 @@ export type MessageBulkOperationsCopyMessagesErrors = {
6520
6567
  * `code: "message_placement_unsettled"` — the message is mid-move, so its row names the destination folder while its uid still belongs to the source; acting on that pair would hit whatever the destination holds at that uid. `details` carries `accountId`, `messageId` and `reason`, one of: `in_flight` (the move is still running, and the same request succeeds once it confirms) or `unverified` (the move gave up without confirming, so where the message sits is unknown until the folder is resynced).
6521
6568
  */
6522
6569
  409: ApiError;
6570
+ /**
6571
+ * 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.
6572
+ *
6573
+ * `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.
6574
+ *
6575
+ * 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.
6576
+ */
6577
+ 422: ApiError;
6523
6578
  };
6524
6579
 
6525
6580
  export type MessageBulkOperationsCopyMessagesError = MessageBulkOperationsCopyMessagesErrors[keyof MessageBulkOperationsCopyMessagesErrors];
@@ -6666,6 +6721,14 @@ export type MessageBulkOperationsMoveMessagesErrors = {
6666
6721
  * `code: "message_placement_unsettled"` — the message is mid-move, so its row names the destination folder while its uid still belongs to the source; acting on that pair would hit whatever the destination holds at that uid. `details` carries `accountId`, `messageId` and `reason`, one of: `in_flight` (the move is still running, and the same request succeeds once it confirms) or `unverified` (the move gave up without confirming, so where the message sits is unknown until the folder is resynced).
6667
6722
  */
6668
6723
  409: ApiError;
6724
+ /**
6725
+ * 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.
6726
+ *
6727
+ * `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.
6728
+ *
6729
+ * 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.
6730
+ */
6731
+ 422: ApiError;
6669
6732
  };
6670
6733
 
6671
6734
  export type MessageBulkOperationsMoveMessagesError = MessageBulkOperationsMoveMessagesErrors[keyof MessageBulkOperationsMoveMessagesErrors];