@remit/api-http-client 0.0.56 → 0.0.57

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.
@@ -364,6 +364,9 @@ export const mailboxDetailOperationsGetMailboxOptions = (options: Options<Mailbo
364
364
  queryKey: mailboxDetailOperationsGetMailboxQueryKey(options)
365
365
  });
366
366
 
367
+ /**
368
+ * Rename a folder, or dismiss a folder mutation that failed. `fullPath` records the rename target over the folder and everything under it; the folder keeps the path the mail server holds until the rename lands. A `fullPath` equal to the folder's current one is a dismissal: it clears a failed rename or delete and enqueues nothing. Refused with 400 for INBOX at either end, a name reserved for a system folder, and a name another folder already has; with 409 when a mutation is already in flight on the folder or on anything inside it.
369
+ */
367
370
  export const mailboxDetailOperationsRenameMailboxMutation = (options?: Partial<Options<MailboxDetailOperationsRenameMailboxData>>): UseMutationOptions<MailboxDetailOperationsRenameMailboxResponse, MailboxDetailOperationsRenameMailboxError, Options<MailboxDetailOperationsRenameMailboxData>> => {
368
371
  const mutationOptions: UseMutationOptions<MailboxDetailOperationsRenameMailboxResponse, MailboxDetailOperationsRenameMailboxError, Options<MailboxDetailOperationsRenameMailboxData>> = {
369
372
  mutationFn: async (fnOptions) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-http-client",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.ts",
package/sdk.gen.ts CHANGED
@@ -204,6 +204,9 @@ export const mailboxDetailOperationsGetMailbox = <ThrowOnError extends boolean =
204
204
  ...options
205
205
  });
206
206
 
207
+ /**
208
+ * Rename a folder, or dismiss a folder mutation that failed. `fullPath` records the rename target over the folder and everything under it; the folder keeps the path the mail server holds until the rename lands. A `fullPath` equal to the folder's current one is a dismissal: it clears a failed rename or delete and enqueues nothing. Refused with 400 for INBOX at either end, a name reserved for a system folder, and a name another folder already has; with 409 when a mutation is already in flight on the folder or on anything inside it.
209
+ */
207
210
  export const mailboxDetailOperationsRenameMailbox = <ThrowOnError extends boolean = false>(options: Options<MailboxDetailOperationsRenameMailboxData, ThrowOnError>): RequestResult<MailboxDetailOperationsRenameMailboxResponses, MailboxDetailOperationsRenameMailboxErrors, ThrowOnError> => (options.client ?? client).patch<MailboxDetailOperationsRenameMailboxResponses, MailboxDetailOperationsRenameMailboxErrors, ThrowOnError>({
208
211
  security: [{ name: 'Authorization', type: 'apiKey' }],
209
212
  url: '/accounts/{accountId}/mailboxes/{mailboxId}',
package/types.gen.ts CHANGED
@@ -4828,6 +4828,25 @@ export type MailboxDetailOperationsRenameMailboxData = {
4828
4828
  };
4829
4829
 
4830
4830
  export type MailboxDetailOperationsRenameMailboxErrors = {
4831
+ /**
4832
+ * The request was refused as malformed or contradictory. `code` is
4833
+ * `invalid_request` where nothing more specific is known, and the refusal's own
4834
+ * token where there is one.
4835
+ *
4836
+ * The calendar surface answers with the reason it read the request by:
4837
+ * `invalid_window`, `invalid_scope`, `invalid_url_segment`, `url_segment_taken`,
4838
+ * `unknown_time_zone` and `default_calendar_undeletable` on the collection and
4839
+ * the query, and, for a VCALENDAR it could not accept,
4840
+ * `malformed_icalendar`, `not_a_calendar`, `unsupported_component`, `no_event`,
4841
+ * `no_master_event`, `multiple_master_events`, `missing_uid`, `mismatched_uid`,
4842
+ * `missing_dt_start`, `backwards_end`, `invalid_date_time`,
4843
+ * `invalid_recurrence_rule`, `missing_recurrence_id`, `not_recurring` and
4844
+ * `unknown_occurrence`.
4845
+ *
4846
+ * `errors` is present only when the request failed schema validation before any
4847
+ * handler ran, and names every field that was refused.
4848
+ */
4849
+ 400: ValidationError;
4831
4850
  /**
4832
4851
  * The request carried no usable credential. `code` is `unauthorized`.
4833
4852
  */
@@ -4840,6 +4859,12 @@ export type MailboxDetailOperationsRenameMailboxErrors = {
4840
4859
  * Nothing answers to this address, or the caller may not learn that something does. `code` is `not_found`.
4841
4860
  */
4842
4861
  404: ApiError;
4862
+ /**
4863
+ * The request contradicts the state the resource is in. `code` is `conflict`
4864
+ * unless the refusal names its own — see `FolderRoleConflict`,
4865
+ * `MessagePlacementConflict` and `ConfigImportConflict`.
4866
+ */
4867
+ 409: ApiError;
4843
4868
  };
4844
4869
 
4845
4870
  export type MailboxDetailOperationsRenameMailboxError = MailboxDetailOperationsRenameMailboxErrors[keyof MailboxDetailOperationsRenameMailboxErrors];