@remit/api-http-client 0.0.60 → 0.0.62

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.
@@ -321,6 +321,9 @@ export const mailboxOperationsListMailboxesOptions = (options: Options<MailboxOp
321
321
  queryKey: mailboxOperationsListMailboxesQueryKey(options)
322
322
  });
323
323
 
324
+ /**
325
+ * Create a folder. Refused with 400 when the account already has a folder at that path.
326
+ */
324
327
  export const mailboxOperationsCreateMailboxMutation = (options?: Partial<Options<MailboxOperationsCreateMailboxData>>): UseMutationOptions<MailboxOperationsCreateMailboxResponse, MailboxOperationsCreateMailboxError, Options<MailboxOperationsCreateMailboxData>> => {
325
328
  const mutationOptions: UseMutationOptions<MailboxOperationsCreateMailboxResponse, MailboxOperationsCreateMailboxError, Options<MailboxOperationsCreateMailboxData>> = {
326
329
  mutationFn: async (fnOptions) => {
@@ -1451,7 +1454,7 @@ export const systemOperationsApplySystemUpdateMutation = (options?: Partial<Opti
1451
1454
  export const unifiedThreadOperationsListAllThreadsQueryKey = (options?: Options<UnifiedThreadOperationsListAllThreadsData>) => createQueryKey('unifiedThreadOperationsListAllThreads', options);
1452
1455
 
1453
1456
  /**
1454
- * List threads across all non-muted accounts of the caller, ordered by sentDate desc. Each row carries an attached `accountId` (derived from a mailboxId→accountId map at read time) plus the usual `senderTrust` enrichment; `category` is served from the ThreadMessage row. Served by the `byDate` LSI1 (pk = the caller's account config), so the caller can never see another account config's threads.
1457
+ * List threads across all non-muted accounts of the caller, ordered by sentDate desc (search mode ranks sender matches first, see below). Each row carries an attached `accountId` (derived from a mailboxId→accountId map at read time) plus the usual `senderTrust` enrichment; `category` is served from the ThreadMessage row. Served by the `byDate` LSI1 (pk = the caller's account config), so the caller can never see another account config's threads.
1455
1458
  *
1456
1459
  * INBOX scope: results are filtered to each account's top-level INBOX, matched by exact path `fullPath === "INBOX"` (RFC 6154 defines no Inbox special-use). By design this excludes namespaced sub-paths like `INBOX/Receipts` and non-English server primaries — the unified inbox is each account's primary INBOX, not its sub-folders. Soft-deleted rows are also excluded.
1457
1460
  *
@@ -1461,7 +1464,7 @@ export const unifiedThreadOperationsListAllThreadsQueryKey = (options?: Options<
1461
1464
  *
1462
1465
  * Starred mode (`starred=true`): served by the `byStarred` LSI4 instead. A star is a marker on the mail rather than on its placement, so the INBOX scope does not apply and a starred thread in Archive is still returned. Excluded are muted and soft-deleted rows as usual, plus the folders a star never surfaces from: Junk, Trash, and Gmail's All Mail (a second copy of everything, whose rows would otherwise double every starred message). All filtering happens in the query, so a page is short only when the results are exhausted. Rows are per mailbox: the same mail filed in two folders is two rows sharing a `threadId`, and a client rendering one row per conversation collapses by `threadId` across the pages it has accumulated.
1463
1466
  *
1464
- * Search mode (`query=<text>`): the listing widens past the INBOX scope to every non-muted mailbox of every non-muted account, and returns only rows whose subject, From address or body text matches the text. This is the unscoped search of the daily brief: one query reaching every folder of every account. Whitespace splits the text into terms and every term must match (AND), each against subject OR From OR body. Matching is case-insensitive substring, not tokenized full-text, so it neither stems nor ranks.
1467
+ * Search mode (`query=<text>`): the listing widens past the INBOX scope to every non-muted mailbox of every non-muted account, and returns only rows whose subject, From address or body text matches the text. This is the unscoped search of the daily brief: one query reaching every folder of every account. Whitespace splits the text into terms and every term must match (AND), each against subject OR From OR body. Matching is case-insensitive substring, not tokenized full-text, so it does not stem. Rows come in two tiers: a row whose From matches any term ranks above a row that only mentions the terms in its subject or body text, and each tier runs in date order.
1465
1468
  *
1466
1469
  * Body text is the stored preview the row carries — the first prose of the message with quoted replies removed, which is the same text the row renders under its subject. A term further into a long message is not reached; a term the reader can see on the row is.
1467
1470
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-http-client",
3
- "version": "0.0.60",
3
+ "version": "0.0.62",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.ts",
package/sdk.gen.ts CHANGED
@@ -182,6 +182,9 @@ export const mailboxOperationsListMailboxes = <ThrowOnError extends boolean = fa
182
182
  ...options
183
183
  });
184
184
 
185
+ /**
186
+ * Create a folder. Refused with 400 when the account already has a folder at that path.
187
+ */
185
188
  export const mailboxOperationsCreateMailbox = <ThrowOnError extends boolean = false>(options: Options<MailboxOperationsCreateMailboxData, ThrowOnError>): RequestResult<MailboxOperationsCreateMailboxResponses, MailboxOperationsCreateMailboxErrors, ThrowOnError> => (options.client ?? client).post<MailboxOperationsCreateMailboxResponses, MailboxOperationsCreateMailboxErrors, ThrowOnError>({
186
189
  security: [{ name: 'Authorization', type: 'apiKey' }],
187
190
  url: '/accounts/{accountId}/mailboxes',
@@ -876,7 +879,7 @@ export const systemOperationsApplySystemUpdate = <ThrowOnError extends boolean =
876
879
  });
877
880
 
878
881
  /**
879
- * List threads across all non-muted accounts of the caller, ordered by sentDate desc. Each row carries an attached `accountId` (derived from a mailboxId→accountId map at read time) plus the usual `senderTrust` enrichment; `category` is served from the ThreadMessage row. Served by the `byDate` LSI1 (pk = the caller's account config), so the caller can never see another account config's threads.
882
+ * List threads across all non-muted accounts of the caller, ordered by sentDate desc (search mode ranks sender matches first, see below). Each row carries an attached `accountId` (derived from a mailboxId→accountId map at read time) plus the usual `senderTrust` enrichment; `category` is served from the ThreadMessage row. Served by the `byDate` LSI1 (pk = the caller's account config), so the caller can never see another account config's threads.
880
883
  *
881
884
  * INBOX scope: results are filtered to each account's top-level INBOX, matched by exact path `fullPath === "INBOX"` (RFC 6154 defines no Inbox special-use). By design this excludes namespaced sub-paths like `INBOX/Receipts` and non-English server primaries — the unified inbox is each account's primary INBOX, not its sub-folders. Soft-deleted rows are also excluded.
882
885
  *
@@ -886,7 +889,7 @@ export const systemOperationsApplySystemUpdate = <ThrowOnError extends boolean =
886
889
  *
887
890
  * Starred mode (`starred=true`): served by the `byStarred` LSI4 instead. A star is a marker on the mail rather than on its placement, so the INBOX scope does not apply and a starred thread in Archive is still returned. Excluded are muted and soft-deleted rows as usual, plus the folders a star never surfaces from: Junk, Trash, and Gmail's All Mail (a second copy of everything, whose rows would otherwise double every starred message). All filtering happens in the query, so a page is short only when the results are exhausted. Rows are per mailbox: the same mail filed in two folders is two rows sharing a `threadId`, and a client rendering one row per conversation collapses by `threadId` across the pages it has accumulated.
888
891
  *
889
- * Search mode (`query=<text>`): the listing widens past the INBOX scope to every non-muted mailbox of every non-muted account, and returns only rows whose subject, From address or body text matches the text. This is the unscoped search of the daily brief: one query reaching every folder of every account. Whitespace splits the text into terms and every term must match (AND), each against subject OR From OR body. Matching is case-insensitive substring, not tokenized full-text, so it neither stems nor ranks.
892
+ * Search mode (`query=<text>`): the listing widens past the INBOX scope to every non-muted mailbox of every non-muted account, and returns only rows whose subject, From address or body text matches the text. This is the unscoped search of the daily brief: one query reaching every folder of every account. Whitespace splits the text into terms and every term must match (AND), each against subject OR From OR body. Matching is case-insensitive substring, not tokenized full-text, so it does not stem. Rows come in two tiers: a row whose From matches any term ranks above a row that only mentions the terms in its subject or body text, and each tier runs in date order.
890
893
  *
891
894
  * Body text is the stored preview the row carries — the first prose of the message with quoted replies removed, which is the same text the row renders under its subject. A term further into a long message is not reached; a term the reader can see on the row is.
892
895
  *
package/types.gen.ts CHANGED
@@ -4763,6 +4763,25 @@ export type MailboxOperationsCreateMailboxData = {
4763
4763
  };
4764
4764
 
4765
4765
  export type MailboxOperationsCreateMailboxErrors = {
4766
+ /**
4767
+ * The request was refused as malformed or contradictory. `code` is
4768
+ * `invalid_request` where nothing more specific is known, and the refusal's own
4769
+ * token where there is one.
4770
+ *
4771
+ * The calendar surface answers with the reason it read the request by:
4772
+ * `invalid_window`, `invalid_scope`, `invalid_url_segment`, `url_segment_taken`,
4773
+ * `unknown_time_zone` and `default_calendar_undeletable` on the collection and
4774
+ * the query, and, for a VCALENDAR it could not accept,
4775
+ * `malformed_icalendar`, `not_a_calendar`, `unsupported_component`, `no_event`,
4776
+ * `no_master_event`, `multiple_master_events`, `missing_uid`, `mismatched_uid`,
4777
+ * `missing_dt_start`, `backwards_end`, `invalid_date_time`,
4778
+ * `invalid_recurrence_rule`, `missing_recurrence_id`, `not_recurring` and
4779
+ * `unknown_occurrence`.
4780
+ *
4781
+ * `errors` is present only when the request failed schema validation before any
4782
+ * handler ran, and names every field that was refused.
4783
+ */
4784
+ 400: ValidationError;
4766
4785
  /**
4767
4786
  * The request carried no usable credential. `code` is `unauthorized`.
4768
4787
  */