@remit/api-http-client 0.0.42 → 0.0.44
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 +4 -0
- package/package.json +1 -1
- package/sdk.gen.ts +4 -0
- package/types.gen.ts +83 -23
|
@@ -1466,6 +1466,10 @@ export const unifiedThreadOperationsListAllThreadsQueryKey = (options?: Options<
|
|
|
1466
1466
|
* What a row is in search mode: one per message, not one per mailbox. This differs from the starred mode above, where the same mail filed in two folders is two rows sharing a `threadId`. Collapsing by `threadId` is still a client's job if it renders one row per CONVERSATION, since distinct messages in one thread remain distinct rows here.
|
|
1467
1467
|
*
|
|
1468
1468
|
* Callers that omit `query` are unaffected: the INBOX (and starred) listings behave exactly as before.
|
|
1469
|
+
*
|
|
1470
|
+
* Row filters: `category`, `unread` and `attachments` are columns on the ThreadMessage row, so each is a predicate inside the query rather than a pass over what a page returned. They compose with every mode above — INBOX, starred and search alike — and a page therefore comes back full of matches however rare the criterion is. This is what the cross-account collections need: filtering the pages a client happens to have loaded shows an empty list whenever the matching mail sits below the newest page (#308).
|
|
1471
|
+
*
|
|
1472
|
+
* Counting: `count=true` answers how many CONVERSATIONS match, over the whole scope and independent of `limit`. `results=false` omits the rows, which is how a header total is read without also paying for a page of mail. Conversations rather than rows because that is what this listing renders: a row is per mailbox, so the same mail filed in two folders is two rows sharing a `threadId`, and clients collapse by it. Counting rows would put a third number beside a list that shows a second one.
|
|
1469
1473
|
*/
|
|
1470
1474
|
export const unifiedThreadOperationsListAllThreadsOptions = (options?: Options<UnifiedThreadOperationsListAllThreadsData>) => queryOptions<UnifiedThreadOperationsListAllThreadsResponse, DefaultError, UnifiedThreadOperationsListAllThreadsResponse, ReturnType<typeof unifiedThreadOperationsListAllThreadsQueryKey>>({
|
|
1471
1475
|
queryFn: async ({ queryKey, signal }) => {
|
package/package.json
CHANGED
package/sdk.gen.ts
CHANGED
|
@@ -891,6 +891,10 @@ export const systemOperationsApplySystemUpdate = <ThrowOnError extends boolean =
|
|
|
891
891
|
* What a row is in search mode: one per message, not one per mailbox. This differs from the starred mode above, where the same mail filed in two folders is two rows sharing a `threadId`. Collapsing by `threadId` is still a client's job if it renders one row per CONVERSATION, since distinct messages in one thread remain distinct rows here.
|
|
892
892
|
*
|
|
893
893
|
* Callers that omit `query` are unaffected: the INBOX (and starred) listings behave exactly as before.
|
|
894
|
+
*
|
|
895
|
+
* Row filters: `category`, `unread` and `attachments` are columns on the ThreadMessage row, so each is a predicate inside the query rather than a pass over what a page returned. They compose with every mode above — INBOX, starred and search alike — and a page therefore comes back full of matches however rare the criterion is. This is what the cross-account collections need: filtering the pages a client happens to have loaded shows an empty list whenever the matching mail sits below the newest page (#308).
|
|
896
|
+
*
|
|
897
|
+
* Counting: `count=true` answers how many CONVERSATIONS match, over the whole scope and independent of `limit`. `results=false` omits the rows, which is how a header total is read without also paying for a page of mail. Conversations rather than rows because that is what this listing renders: a row is per mailbox, so the same mail filed in two folders is two rows sharing a `threadId`, and clients collapse by it. Counting rows would put a third number beside a list that shows a second one.
|
|
894
898
|
*/
|
|
895
899
|
export const unifiedThreadOperationsListAllThreads = <ThrowOnError extends boolean = false>(options?: Options<UnifiedThreadOperationsListAllThreadsData, ThrowOnError>): RequestResult<UnifiedThreadOperationsListAllThreadsResponses, unknown, ThrowOnError> => (options?.client ?? client).get<UnifiedThreadOperationsListAllThreadsResponses, unknown, ThrowOnError>({
|
|
896
900
|
security: [{ name: 'Authorization', type: 'apiKey' }],
|
package/types.gen.ts
CHANGED
|
@@ -3049,11 +3049,18 @@ export type RemitImapThreadMessageResponse = {
|
|
|
3049
3049
|
};
|
|
3050
3050
|
|
|
3051
3051
|
/**
|
|
3052
|
-
* Aggregate response for
|
|
3053
|
-
*
|
|
3054
|
-
*
|
|
3055
|
-
*
|
|
3056
|
-
* (7 endpoints)
|
|
3052
|
+
* Aggregate response for the filterable thread listings — `searchThreads` and
|
|
3053
|
+
* `listAllThreads`. Carries the matching rows (`items`), a pagination
|
|
3054
|
+
* `continuationToken`, and an optional `count` of what the query matches.
|
|
3055
|
+
* `items` is omitted when `results=false` (count-only); `count` is present only
|
|
3056
|
+
* when `count=true`. Thread-specific so the shared `ResultList<T>` (7 endpoints)
|
|
3057
|
+
* stays untouched.
|
|
3058
|
+
*
|
|
3059
|
+
* `listAllThreads` answers with this model rather than `ResultList<T>` for that
|
|
3060
|
+
* same reason: it needs the count field and the shared model cannot carry one.
|
|
3061
|
+
* One model over both operations rather than a second of the same shape, so a
|
|
3062
|
+
* client reading a filtered thread listing reads one response type whether the
|
|
3063
|
+
* listing is scoped to a mailbox or spans every account.
|
|
3057
3064
|
*/
|
|
3058
3065
|
export type RemitImapThreadSearchResponse = {
|
|
3059
3066
|
/**
|
|
@@ -3065,7 +3072,23 @@ export type RemitImapThreadSearchResponse = {
|
|
|
3065
3072
|
*/
|
|
3066
3073
|
continuationToken?: String800;
|
|
3067
3074
|
/**
|
|
3068
|
-
* How
|
|
3075
|
+
* How much the query matches, over the whole scope. Exact: no page size bounds
|
|
3076
|
+
* it, no cursor narrows it, so it is the same number on the first page and the
|
|
3077
|
+
* last. Present only when `count=true`.
|
|
3078
|
+
*
|
|
3079
|
+
* Each operation counts what it lists. `searchThreads` lists messages of one
|
|
3080
|
+
* mailbox and counts messages. `listAllThreads` counts CONVERSATIONS across
|
|
3081
|
+
* every non-muted mailbox of every account — a thread holding two matching
|
|
3082
|
+
* messages counts once, and so does one message reachable through a real
|
|
3083
|
+
* folder and a virtual copy of it — because that is what the cross-account
|
|
3084
|
+
* listing renders after collapsing by `threadId`. A count that disagreed with
|
|
3085
|
+
* the rows beneath it would be a third number for the same set.
|
|
3086
|
+
*
|
|
3087
|
+
* Absent when the query carries `senderTrust` or `dkimMismatch`, even with
|
|
3088
|
+
* `count=true`. Those are resolved by enriching rows rather than by a
|
|
3089
|
+
* predicate, so no exact count exists short of enriching the whole mailbox.
|
|
3090
|
+
* Absence says so; a page's post-filter length labelled `count` would be a
|
|
3091
|
+
* page length presented as a total. A client with no number renders none.
|
|
3069
3092
|
*/
|
|
3070
3093
|
count?: number;
|
|
3071
3094
|
};
|
|
@@ -3769,11 +3792,18 @@ export type RemitImapThreadMessageResponseWritable = {
|
|
|
3769
3792
|
};
|
|
3770
3793
|
|
|
3771
3794
|
/**
|
|
3772
|
-
* Aggregate response for
|
|
3773
|
-
*
|
|
3774
|
-
*
|
|
3775
|
-
*
|
|
3776
|
-
* (7 endpoints)
|
|
3795
|
+
* Aggregate response for the filterable thread listings — `searchThreads` and
|
|
3796
|
+
* `listAllThreads`. Carries the matching rows (`items`), a pagination
|
|
3797
|
+
* `continuationToken`, and an optional `count` of what the query matches.
|
|
3798
|
+
* `items` is omitted when `results=false` (count-only); `count` is present only
|
|
3799
|
+
* when `count=true`. Thread-specific so the shared `ResultList<T>` (7 endpoints)
|
|
3800
|
+
* stays untouched.
|
|
3801
|
+
*
|
|
3802
|
+
* `listAllThreads` answers with this model rather than `ResultList<T>` for that
|
|
3803
|
+
* same reason: it needs the count field and the shared model cannot carry one.
|
|
3804
|
+
* One model over both operations rather than a second of the same shape, so a
|
|
3805
|
+
* client reading a filtered thread listing reads one response type whether the
|
|
3806
|
+
* listing is scoped to a mailbox or spans every account.
|
|
3777
3807
|
*/
|
|
3778
3808
|
export type RemitImapThreadSearchResponseWritable = {
|
|
3779
3809
|
/**
|
|
@@ -3785,7 +3815,23 @@ export type RemitImapThreadSearchResponseWritable = {
|
|
|
3785
3815
|
*/
|
|
3786
3816
|
continuationToken?: String800;
|
|
3787
3817
|
/**
|
|
3788
|
-
* How
|
|
3818
|
+
* How much the query matches, over the whole scope. Exact: no page size bounds
|
|
3819
|
+
* it, no cursor narrows it, so it is the same number on the first page and the
|
|
3820
|
+
* last. Present only when `count=true`.
|
|
3821
|
+
*
|
|
3822
|
+
* Each operation counts what it lists. `searchThreads` lists messages of one
|
|
3823
|
+
* mailbox and counts messages. `listAllThreads` counts CONVERSATIONS across
|
|
3824
|
+
* every non-muted mailbox of every account — a thread holding two matching
|
|
3825
|
+
* messages counts once, and so does one message reachable through a real
|
|
3826
|
+
* folder and a virtual copy of it — because that is what the cross-account
|
|
3827
|
+
* listing renders after collapsing by `threadId`. A count that disagreed with
|
|
3828
|
+
* the rows beneath it would be a third number for the same set.
|
|
3829
|
+
*
|
|
3830
|
+
* Absent when the query carries `senderTrust` or `dkimMismatch`, even with
|
|
3831
|
+
* `count=true`. Those are resolved by enriching rows rather than by a
|
|
3832
|
+
* predicate, so no exact count exists short of enriching the whole mailbox.
|
|
3833
|
+
* Absence says so; a page's post-filter length labelled `count` would be a
|
|
3834
|
+
* page length presented as a total. A client with no number renders none.
|
|
3789
3835
|
*/
|
|
3790
3836
|
count?: number;
|
|
3791
3837
|
};
|
|
@@ -5142,7 +5188,7 @@ export type ThreadOperationsSearchThreadsData = {
|
|
|
5142
5188
|
starred?: boolean;
|
|
5143
5189
|
attachments?: boolean;
|
|
5144
5190
|
/**
|
|
5145
|
-
* Filter to messages whose From address has one of these trust levels. Off-row criterion
|
|
5191
|
+
* Filter to messages whose From address has one of these trust levels. Off-row criterion: resolved by enriching the rows this page read, not by a predicate over the mailbox, so `count` comes back absent whenever it is supplied.
|
|
5146
5192
|
*/
|
|
5147
5193
|
senderTrust?: Array<RemitImapSenderTrust>;
|
|
5148
5194
|
/**
|
|
@@ -5150,11 +5196,11 @@ export type ThreadOperationsSearchThreadsData = {
|
|
|
5150
5196
|
*/
|
|
5151
5197
|
category?: Array<RemitImapMessageCategory>;
|
|
5152
5198
|
/**
|
|
5153
|
-
* Filter on the DKIM-alignment signal (true = DKIM mismatch). Off-row criterion
|
|
5199
|
+
* Filter on the DKIM-alignment signal (true = DKIM mismatch). Off-row criterion, like `senderTrust`: rows without an authenticity signal never match, and `count` comes back absent whenever it is supplied.
|
|
5154
5200
|
*/
|
|
5155
5201
|
dkimMismatch?: boolean;
|
|
5156
5202
|
/**
|
|
5157
|
-
* Include how many messages the query matches
|
|
5203
|
+
* Include how many messages the query matches, exactly, over the whole mailbox. Opt-in because it is a second read over the entire match set rather than a by-product of the page: ask for it on a deliberate act, never on a keystroke. Answered as absent — not as a page length — when the query carries `senderTrust` or `dkimMismatch`, which no predicate can count.
|
|
5158
5204
|
*/
|
|
5159
5205
|
count?: boolean;
|
|
5160
5206
|
/**
|
|
@@ -5162,7 +5208,7 @@ export type ThreadOperationsSearchThreadsData = {
|
|
|
5162
5208
|
*/
|
|
5163
5209
|
results?: boolean;
|
|
5164
5210
|
/**
|
|
5165
|
-
* Page size for the rows returned, capped server-side at 500.
|
|
5211
|
+
* Page size for the rows returned, capped server-side at 500. It bounds this page and nothing else: `count` is over the whole mailbox and does not move when this does.
|
|
5166
5212
|
*/
|
|
5167
5213
|
limit?: number;
|
|
5168
5214
|
};
|
|
@@ -5775,6 +5821,26 @@ export type UnifiedThreadOperationsListAllThreadsData = {
|
|
|
5775
5821
|
* Free text to match against subject and From address. Supplying it switches the listing into search mode, which widens the scope past INBOX to every non-muted mailbox — see the operation description. Omitting it leaves the listing unchanged.
|
|
5776
5822
|
*/
|
|
5777
5823
|
query?: string;
|
|
5824
|
+
/**
|
|
5825
|
+
* Filter to messages with one of these header-derived categories, as a union over the values given. Applied as a SQL predicate over the whole scope, so a page comes back full of matches however rare the category is. `uncategorized` is one of them — the pending state's name, never the absence of one.
|
|
5826
|
+
*/
|
|
5827
|
+
category?: Array<RemitImapMessageCategory>;
|
|
5828
|
+
/**
|
|
5829
|
+
* When true, return only unread messages. A column on the row, so it narrows the query rather than the page.
|
|
5830
|
+
*/
|
|
5831
|
+
unread?: boolean;
|
|
5832
|
+
/**
|
|
5833
|
+
* When true, return only messages carrying an attachment. A column on the row, so it narrows the query rather than the page.
|
|
5834
|
+
*/
|
|
5835
|
+
attachments?: boolean;
|
|
5836
|
+
/**
|
|
5837
|
+
* Include how many conversations the listing matches, exactly, over the whole scope. Opt-in because it is a second read over the entire match set rather than a by-product of the page: ask for it on a deliberate act, never on a keystroke.
|
|
5838
|
+
*/
|
|
5839
|
+
count?: boolean;
|
|
5840
|
+
/**
|
|
5841
|
+
* Return matching rows. Default true; set false for a count-only response.
|
|
5842
|
+
*/
|
|
5843
|
+
results?: boolean;
|
|
5778
5844
|
};
|
|
5779
5845
|
url: '/threads';
|
|
5780
5846
|
};
|
|
@@ -5783,13 +5849,7 @@ export type UnifiedThreadOperationsListAllThreadsResponses = {
|
|
|
5783
5849
|
/**
|
|
5784
5850
|
* The request has succeeded.
|
|
5785
5851
|
*/
|
|
5786
|
-
200:
|
|
5787
|
-
/**
|
|
5788
|
-
* Opaque, server-minted cursor: absent means the first (or last) page, present means resume from here. Echo it back unchanged to fetch the next page. Every listing endpoint that accepts it rejects a token it cannot decode with 400 ValidationError rather than silently restarting from the first page (#136, #172).
|
|
5789
|
-
*/
|
|
5790
|
-
continuationToken?: String800;
|
|
5791
|
-
items: Array<RemitImapThreadMessageResponse>;
|
|
5792
|
-
};
|
|
5852
|
+
200: RemitImapThreadSearchResponse;
|
|
5793
5853
|
};
|
|
5794
5854
|
|
|
5795
5855
|
export type UnifiedThreadOperationsListAllThreadsResponse = UnifiedThreadOperationsListAllThreadsResponses[keyof UnifiedThreadOperationsListAllThreadsResponses];
|