@remit/api-http-client 0.0.56 → 0.0.58
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/@tanstack/react-query.gen.ts +6 -0
- package/package.json +1 -1
- package/sdk.gen.ts +6 -0
- package/types.gen.ts +91 -3
|
@@ -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) => {
|
|
@@ -364,6 +367,9 @@ export const mailboxDetailOperationsGetMailboxOptions = (options: Options<Mailbo
|
|
|
364
367
|
queryKey: mailboxDetailOperationsGetMailboxQueryKey(options)
|
|
365
368
|
});
|
|
366
369
|
|
|
370
|
+
/**
|
|
371
|
+
* 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.
|
|
372
|
+
*/
|
|
367
373
|
export const mailboxDetailOperationsRenameMailboxMutation = (options?: Partial<Options<MailboxDetailOperationsRenameMailboxData>>): UseMutationOptions<MailboxDetailOperationsRenameMailboxResponse, MailboxDetailOperationsRenameMailboxError, Options<MailboxDetailOperationsRenameMailboxData>> => {
|
|
368
374
|
const mutationOptions: UseMutationOptions<MailboxDetailOperationsRenameMailboxResponse, MailboxDetailOperationsRenameMailboxError, Options<MailboxDetailOperationsRenameMailboxData>> = {
|
|
369
375
|
mutationFn: async (fnOptions) => {
|
package/package.json
CHANGED
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}',
|
|
@@ -204,6 +207,9 @@ export const mailboxDetailOperationsGetMailbox = <ThrowOnError extends boolean =
|
|
|
204
207
|
...options
|
|
205
208
|
});
|
|
206
209
|
|
|
210
|
+
/**
|
|
211
|
+
* 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.
|
|
212
|
+
*/
|
|
207
213
|
export const mailboxDetailOperationsRenameMailbox = <ThrowOnError extends boolean = false>(options: Options<MailboxDetailOperationsRenameMailboxData, ThrowOnError>): RequestResult<MailboxDetailOperationsRenameMailboxResponses, MailboxDetailOperationsRenameMailboxErrors, ThrowOnError> => (options.client ?? client).patch<MailboxDetailOperationsRenameMailboxResponses, MailboxDetailOperationsRenameMailboxErrors, ThrowOnError>({
|
|
208
214
|
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
209
215
|
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
|
|
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];
|
|
@@ -4828,6 +4875,25 @@ export type MailboxDetailOperationsRenameMailboxData = {
|
|
|
4828
4875
|
};
|
|
4829
4876
|
|
|
4830
4877
|
export type MailboxDetailOperationsRenameMailboxErrors = {
|
|
4878
|
+
/**
|
|
4879
|
+
* The request was refused as malformed or contradictory. `code` is
|
|
4880
|
+
* `invalid_request` where nothing more specific is known, and the refusal's own
|
|
4881
|
+
* token where there is one.
|
|
4882
|
+
*
|
|
4883
|
+
* The calendar surface answers with the reason it read the request by:
|
|
4884
|
+
* `invalid_window`, `invalid_scope`, `invalid_url_segment`, `url_segment_taken`,
|
|
4885
|
+
* `unknown_time_zone` and `default_calendar_undeletable` on the collection and
|
|
4886
|
+
* the query, and, for a VCALENDAR it could not accept,
|
|
4887
|
+
* `malformed_icalendar`, `not_a_calendar`, `unsupported_component`, `no_event`,
|
|
4888
|
+
* `no_master_event`, `multiple_master_events`, `missing_uid`, `mismatched_uid`,
|
|
4889
|
+
* `missing_dt_start`, `backwards_end`, `invalid_date_time`,
|
|
4890
|
+
* `invalid_recurrence_rule`, `missing_recurrence_id`, `not_recurring` and
|
|
4891
|
+
* `unknown_occurrence`.
|
|
4892
|
+
*
|
|
4893
|
+
* `errors` is present only when the request failed schema validation before any
|
|
4894
|
+
* handler ran, and names every field that was refused.
|
|
4895
|
+
*/
|
|
4896
|
+
400: ValidationError;
|
|
4831
4897
|
/**
|
|
4832
4898
|
* The request carried no usable credential. `code` is `unauthorized`.
|
|
4833
4899
|
*/
|
|
@@ -4840,6 +4906,12 @@ export type MailboxDetailOperationsRenameMailboxErrors = {
|
|
|
4840
4906
|
* Nothing answers to this address, or the caller may not learn that something does. `code` is `not_found`.
|
|
4841
4907
|
*/
|
|
4842
4908
|
404: ApiError;
|
|
4909
|
+
/**
|
|
4910
|
+
* The request contradicts the state the resource is in. `code` is `conflict`
|
|
4911
|
+
* unless the refusal names its own — see `FolderRoleConflict`,
|
|
4912
|
+
* `MessagePlacementConflict` and `ConfigImportConflict`.
|
|
4913
|
+
*/
|
|
4914
|
+
409: ApiError;
|
|
4843
4915
|
};
|
|
4844
4916
|
|
|
4845
4917
|
export type MailboxDetailOperationsRenameMailboxError = MailboxDetailOperationsRenameMailboxErrors[keyof MailboxDetailOperationsRenameMailboxErrors];
|
|
@@ -6495,6 +6567,14 @@ export type MessageBulkOperationsCopyMessagesErrors = {
|
|
|
6495
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).
|
|
6496
6568
|
*/
|
|
6497
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;
|
|
6498
6578
|
};
|
|
6499
6579
|
|
|
6500
6580
|
export type MessageBulkOperationsCopyMessagesError = MessageBulkOperationsCopyMessagesErrors[keyof MessageBulkOperationsCopyMessagesErrors];
|
|
@@ -6641,6 +6721,14 @@ export type MessageBulkOperationsMoveMessagesErrors = {
|
|
|
6641
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).
|
|
6642
6722
|
*/
|
|
6643
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;
|
|
6644
6732
|
};
|
|
6645
6733
|
|
|
6646
6734
|
export type MessageBulkOperationsMoveMessagesError = MessageBulkOperationsMoveMessagesErrors[keyof MessageBulkOperationsMoveMessagesErrors];
|