@remit/api-http-client 0.0.78 → 0.0.80

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.
Files changed (47) hide show
  1. package/dist/@tanstack/react-query.gen.d.ts +1363 -0
  2. package/{@tanstack/react-query.gen.ts → dist/@tanstack/react-query.gen.js} +298 -300
  3. package/dist/client/client.gen.d.ts +2 -0
  4. package/dist/client/client.gen.js +216 -0
  5. package/{client/index.ts → dist/client/index.d.ts} +2 -19
  6. package/dist/client/index.js +6 -0
  7. package/dist/client/types.gen.d.ts +120 -0
  8. package/dist/client/types.gen.js +2 -0
  9. package/dist/client/utils.gen.d.ts +37 -0
  10. package/dist/client/utils.gen.js +228 -0
  11. package/{client.gen.ts → dist/client.gen.d.ts} +2 -6
  12. package/dist/client.gen.js +3 -0
  13. package/dist/core/auth.gen.d.ts +25 -0
  14. package/dist/core/auth.gen.js +14 -0
  15. package/dist/core/bodySerializer.gen.d.ts +25 -0
  16. package/dist/core/bodySerializer.gen.js +57 -0
  17. package/dist/core/params.gen.d.ts +43 -0
  18. package/dist/core/params.gen.js +109 -0
  19. package/dist/core/pathSerializer.gen.d.ts +33 -0
  20. package/dist/core/pathSerializer.gen.js +106 -0
  21. package/dist/core/queryKeySerializer.gen.d.ts +18 -0
  22. package/dist/core/queryKeySerializer.gen.js +92 -0
  23. package/dist/core/serverSentEvents.gen.d.ts +71 -0
  24. package/dist/core/serverSentEvents.gen.js +132 -0
  25. package/dist/core/types.gen.d.ts +83 -0
  26. package/dist/core/types.gen.js +2 -0
  27. package/dist/core/utils.gen.d.ts +19 -0
  28. package/dist/core/utils.gen.js +87 -0
  29. package/{index.ts → dist/index.d.ts} +2 -4
  30. package/dist/index.js +2 -0
  31. package/dist/sdk.gen.d.ts +444 -0
  32. package/dist/sdk.gen.js +935 -0
  33. package/{types.gen.ts → dist/types.gen.d.ts} +602 -634
  34. package/dist/types.gen.js +2 -0
  35. package/package.json +19 -3
  36. package/client/client.gen.ts +0 -277
  37. package/client/types.gen.ts +0 -218
  38. package/client/utils.gen.ts +0 -316
  39. package/core/auth.gen.ts +0 -48
  40. package/core/bodySerializer.gen.ts +0 -82
  41. package/core/params.gen.ts +0 -178
  42. package/core/pathSerializer.gen.ts +0 -171
  43. package/core/queryKeySerializer.gen.ts +0 -117
  44. package/core/serverSentEvents.gen.ts +0 -242
  45. package/core/types.gen.ts +0 -110
  46. package/core/utils.gen.ts +0 -140
  47. package/sdk.gen.ts +0 -959
package/sdk.gen.ts DELETED
@@ -1,959 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
-
3
- import { client } from './client.gen.js';
4
- import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
5
- import type { AccountDetailOperationsDeleteAccountData, AccountDetailOperationsDeleteAccountErrors, AccountDetailOperationsDeleteAccountResponses, AccountDetailOperationsUpdateAccountData, AccountDetailOperationsUpdateAccountErrors, AccountDetailOperationsUpdateAccountResponses, AccountOperationsCreateAccountData, AccountOperationsCreateAccountErrors, AccountOperationsCreateAccountResponses, AccountOperationsTestConnectionData, AccountOperationsTestConnectionErrors, AccountOperationsTestConnectionResponses, AddressDetailOperationsUpdateAddressData, AddressDetailOperationsUpdateAddressErrors, AddressDetailOperationsUpdateAddressResponses, AddressOperationsSearchAddressesData, AddressOperationsSearchAddressesErrors, AddressOperationsSearchAddressesResponses, CalendarDetailOperationsDeleteCalendarData, CalendarDetailOperationsDeleteCalendarErrors, CalendarDetailOperationsDeleteCalendarResponses, CalendarDetailOperationsGetCalendarData, CalendarDetailOperationsGetCalendarErrors, CalendarDetailOperationsGetCalendarFeedData, CalendarDetailOperationsGetCalendarFeedErrors, CalendarDetailOperationsGetCalendarFeedResponses, CalendarDetailOperationsGetCalendarResponses, CalendarDetailOperationsPutCalendarFeedData, CalendarDetailOperationsPutCalendarFeedErrors, CalendarDetailOperationsPutCalendarFeedResponses, CalendarDetailOperationsRevokeCalendarFeedData, CalendarDetailOperationsRevokeCalendarFeedErrors, CalendarDetailOperationsRevokeCalendarFeedResponses, CalendarDetailOperationsUpdateCalendarData, CalendarDetailOperationsUpdateCalendarErrors, CalendarDetailOperationsUpdateCalendarResponses, CalendarEventDetailOperationsDeleteCalendarEventData, CalendarEventDetailOperationsDeleteCalendarEventErrors, CalendarEventDetailOperationsDeleteCalendarEventResponses, CalendarEventDetailOperationsGetCalendarEventData, CalendarEventDetailOperationsGetCalendarEventErrors, CalendarEventDetailOperationsGetCalendarEventResponses, CalendarEventDetailOperationsUpdateCalendarEventData, CalendarEventDetailOperationsUpdateCalendarEventErrors, CalendarEventDetailOperationsUpdateCalendarEventResponses, CalendarEventOperationsCreateCalendarEventData, CalendarEventOperationsCreateCalendarEventErrors, CalendarEventOperationsCreateCalendarEventResponses, CalendarEventOperationsListCalendarEventsData, CalendarEventOperationsListCalendarEventsErrors, CalendarEventOperationsListCalendarEventsResponses, CalendarFeedOperationsGetCalendarFeedIcalData, CalendarFeedOperationsGetCalendarFeedIcalErrors, CalendarFeedOperationsGetCalendarFeedIcalResponses, CalendarFreeBusyOperationsListCalendarFreeBusyData, CalendarFreeBusyOperationsListCalendarFreeBusyErrors, CalendarFreeBusyOperationsListCalendarFreeBusyResponses, CalendarOperationsCreateCalendarData, CalendarOperationsCreateCalendarErrors, CalendarOperationsCreateCalendarResponses, CalendarOperationsListCalendarsData, CalendarOperationsListCalendarsErrors, CalendarOperationsListCalendarsResponses, CalendarSuggestionActionOperationsAcceptCalendarSuggestionData, CalendarSuggestionActionOperationsAcceptCalendarSuggestionErrors, CalendarSuggestionActionOperationsAcceptCalendarSuggestionResponses, CalendarSuggestionActionOperationsDeclineCalendarSuggestionData, CalendarSuggestionActionOperationsDeclineCalendarSuggestionErrors, CalendarSuggestionActionOperationsDeclineCalendarSuggestionResponses, CalendarSuggestionActionOperationsDismissCalendarSuggestionData, CalendarSuggestionActionOperationsDismissCalendarSuggestionErrors, CalendarSuggestionActionOperationsDismissCalendarSuggestionResponses, CalendarSuggestionActionOperationsReopenCalendarSuggestionData, CalendarSuggestionActionOperationsReopenCalendarSuggestionErrors, CalendarSuggestionActionOperationsReopenCalendarSuggestionResponses, CalendarSuggestionOperationsListCalendarSuggestionsData, CalendarSuggestionOperationsListCalendarSuggestionsErrors, CalendarSuggestionOperationsListCalendarSuggestionsResponses, ConfigOperationsExportConfigData, ConfigOperationsExportConfigErrors, ConfigOperationsExportConfigResponses, ConfigOperationsGetConfigData, ConfigOperationsGetConfigErrors, ConfigOperationsGetConfigResponses, ConfigOperationsImportConfigData, ConfigOperationsImportConfigErrors, ConfigOperationsImportConfigResponses, FilterDetailOperationsDeleteFilterData, FilterDetailOperationsDeleteFilterErrors, FilterDetailOperationsDeleteFilterResponses, FilterDetailOperationsGetFilterData, FilterDetailOperationsGetFilterErrors, FilterDetailOperationsGetFilterResponses, FilterDetailOperationsUpdateFilterData, FilterDetailOperationsUpdateFilterErrors, FilterDetailOperationsUpdateFilterResponses, FilterOperationsCreateFilterData, FilterOperationsCreateFilterErrors, FilterOperationsCreateFilterResponses, FilterOperationsListFiltersData, FilterOperationsListFiltersErrors, FilterOperationsListFiltersResponses, FolderRoleOperationsAppointFolderRoleData, FolderRoleOperationsAppointFolderRoleErrors, FolderRoleOperationsAppointFolderRoleResponses, LabelDetailOperationsDeleteLabelData, LabelDetailOperationsDeleteLabelErrors, LabelDetailOperationsDeleteLabelResponses, LabelDetailOperationsGetLabelData, LabelDetailOperationsGetLabelErrors, LabelDetailOperationsGetLabelResponses, LabelDetailOperationsUpdateLabelData, LabelDetailOperationsUpdateLabelErrors, LabelDetailOperationsUpdateLabelResponses, LabelOperationsCreateLabelData, LabelOperationsCreateLabelErrors, LabelOperationsCreateLabelResponses, LabelOperationsListLabelsData, LabelOperationsListLabelsErrors, LabelOperationsListLabelsResponses, MailboxDetailOperationsDeleteMailboxData, MailboxDetailOperationsDeleteMailboxErrors, MailboxDetailOperationsDeleteMailboxResponses, MailboxDetailOperationsGetMailboxData, MailboxDetailOperationsGetMailboxErrors, MailboxDetailOperationsGetMailboxResponses, MailboxDetailOperationsRenameMailboxData, MailboxDetailOperationsRenameMailboxErrors, MailboxDetailOperationsRenameMailboxResponses, MailboxOperationsCreateMailboxData, MailboxOperationsCreateMailboxErrors, MailboxOperationsCreateMailboxResponses, MailboxOperationsListMailboxesData, MailboxOperationsListMailboxesErrors, MailboxOperationsListMailboxesResponses, MeOperationsCreateExportData, MeOperationsCreateExportErrors, MeOperationsCreateExportResponses, MeOperationsDeleteMeData, MeOperationsDeleteMeErrors, MeOperationsDeleteMeResponses, MeOperationsGetExportData, MeOperationsGetExportErrors, MeOperationsGetExportResponses, MeOperationsListQuarantineData, MeOperationsListQuarantineErrors, MeOperationsListQuarantineResponses, MeOperationsListVipSuggestionsData, MeOperationsListVipSuggestionsErrors, MeOperationsListVipSuggestionsResponses, MessageBulkOperationsCopyMessagesData, MessageBulkOperationsCopyMessagesErrors, MessageBulkOperationsCopyMessagesResponses, MessageBulkOperationsDeleteMessagesData, MessageBulkOperationsDeleteMessagesErrors, MessageBulkOperationsDeleteMessagesResponses, MessageBulkOperationsMoveMessagesData, MessageBulkOperationsMoveMessagesErrors, MessageBulkOperationsMoveMessagesResponses, MessageBulkOperationsNotSpamData, MessageBulkOperationsNotSpamErrors, MessageBulkOperationsNotSpamResponses, MessageBulkOperationsReportSpamData, MessageBulkOperationsReportSpamErrors, MessageBulkOperationsReportSpamResponses, MessageBulkOperationsUpdateFlagsData, MessageBulkOperationsUpdateFlagsErrors, MessageBulkOperationsUpdateFlagsResponses, MessageBulkOperationsUpdateMessageLabelsData, MessageBulkOperationsUpdateMessageLabelsErrors, MessageBulkOperationsUpdateMessageLabelsResponses, MessageCalendarSuggestionOperationsListMessageCalendarSuggestionsData, MessageCalendarSuggestionOperationsListMessageCalendarSuggestionsErrors, MessageCalendarSuggestionOperationsListMessageCalendarSuggestionsResponses, MessageOperationsDescribeMessageData, MessageOperationsDescribeMessageErrors, MessageOperationsDescribeMessageResponses, MessageOperationsGetRawMessageData, MessageOperationsGetRawMessageErrors, MessageOperationsGetRawMessageResponses, MessageOperationsUpdateMessageFlagsData, MessageOperationsUpdateMessageFlagsErrors, MessageOperationsUpdateMessageFlagsResponses, MicrosoftOAuthOperationsMicrosoftOAuthCallbackData, MicrosoftOAuthOperationsMicrosoftOAuthStartData, MicrosoftOAuthOperationsMicrosoftOAuthStartErrors, MicrosoftOAuthOperationsMicrosoftOAuthStartResponses, OrganizeJobDetailOperationsGetOrganizeJobData, OrganizeJobDetailOperationsGetOrganizeJobErrors, OrganizeJobDetailOperationsGetOrganizeJobResponses, OrganizeOperationsCreateOrganizeJobData, OrganizeOperationsCreateOrganizeJobErrors, OrganizeOperationsCreateOrganizeJobResponses, OrganizeOperationsPreviewOrganizeData, OrganizeOperationsPreviewOrganizeErrors, OrganizeOperationsPreviewOrganizeResponses, OutboxAttachmentOperationsCompleteOutboxAttachmentData, OutboxAttachmentOperationsCompleteOutboxAttachmentErrors, OutboxAttachmentOperationsCompleteOutboxAttachmentResponses, OutboxDetailOperationsDeleteOutboxMessageData, OutboxDetailOperationsDeleteOutboxMessageErrors, OutboxDetailOperationsDeleteOutboxMessageResponses, OutboxDetailOperationsGetOutboxMessageData, OutboxDetailOperationsGetOutboxMessageErrors, OutboxDetailOperationsGetOutboxMessageResponses, OutboxDetailOperationsMintOutboxAttachmentData, OutboxDetailOperationsMintOutboxAttachmentErrors, OutboxDetailOperationsMintOutboxAttachmentResponses, OutboxDetailOperationsSendOutboxMessageData, OutboxDetailOperationsSendOutboxMessageErrors, OutboxDetailOperationsSendOutboxMessageResponses, OutboxDetailOperationsUpdateOutboxMessageData, OutboxDetailOperationsUpdateOutboxMessageErrors, OutboxDetailOperationsUpdateOutboxMessageResponses, OutboxOperationsCreateOutboxMessageData, OutboxOperationsCreateOutboxMessageErrors, OutboxOperationsCreateOutboxMessageResponses, OutboxOperationsListOutboxMessagesData, OutboxOperationsListOutboxMessagesErrors, OutboxOperationsListOutboxMessagesResponses, SyncOperationsGetSyncStatusData, SyncOperationsGetSyncStatusErrors, SyncOperationsGetSyncStatusResponses, SyncOperationsTriggerSyncData, SyncOperationsTriggerSyncErrors, SyncOperationsTriggerSyncResponses, SystemOperationsApplySystemUpdateData, SystemOperationsApplySystemUpdateErrors, SystemOperationsApplySystemUpdateResponses, SystemOperationsGetSystemUpdateData, SystemOperationsGetSystemUpdateErrors, SystemOperationsGetSystemUpdateResponses, ThreadDetailOperationsListThreadMessagesData, ThreadDetailOperationsListThreadMessagesErrors, ThreadDetailOperationsListThreadMessagesResponses, ThreadOperationsListThreadsData, ThreadOperationsListThreadsErrors, ThreadOperationsListThreadsResponses, ThreadOperationsSearchThreadsData, ThreadOperationsSearchThreadsErrors, ThreadOperationsSearchThreadsResponses, TrashOperationsEmptyTrashData, TrashOperationsEmptyTrashErrors, TrashOperationsEmptyTrashResponses, UnifiedThreadOperationsListAllThreadsData, UnifiedThreadOperationsListAllThreadsErrors, UnifiedThreadOperationsListAllThreadsResponses } from './types.gen.js';
6
-
7
- export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
8
- /**
9
- * You can provide a client instance returned by `createClient()` instead of
10
- * individual options. This might be also useful if you want to implement a
11
- * custom client.
12
- */
13
- client?: Client;
14
- /**
15
- * You can pass arbitrary values through the `meta` object. This can be
16
- * used to access values that aren't defined as part of the SDK function.
17
- */
18
- meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
19
- };
20
-
21
- /**
22
- * Create a new email account
23
- */
24
- export const accountOperationsCreateAccount = <ThrowOnError extends boolean = false>(options: Options<AccountOperationsCreateAccountData, ThrowOnError>): RequestResult<AccountOperationsCreateAccountResponses, AccountOperationsCreateAccountErrors, ThrowOnError> => (options.client ?? client).post<AccountOperationsCreateAccountResponses, AccountOperationsCreateAccountErrors, ThrowOnError>({
25
- security: [{ name: 'Authorization', type: 'apiKey' }],
26
- url: '/accounts',
27
- ...options,
28
- headers: {
29
- 'Content-Type': 'application/json',
30
- ...options.headers
31
- }
32
- });
33
-
34
- /**
35
- * Microsoft OAuth2 callback endpoint — receives the authorization code from Microsoft and exchanges it for tokens. This endpoint is intentionally unauthenticated: the browser is redirected here by Microsoft after the user grants consent, before any Cognito session is available. CSRF is prevented by an HMAC-signed state parameter.
36
- */
37
- export const microsoftOAuthOperationsMicrosoftOAuthCallback = <ThrowOnError extends boolean = false>(options?: Options<MicrosoftOAuthOperationsMicrosoftOAuthCallbackData, ThrowOnError>): RequestResult<unknown, unknown, ThrowOnError> => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/accounts/oauth/microsoft/callback', ...options });
38
-
39
- /**
40
- * Start Microsoft OAuth2 authorization flow
41
- */
42
- export const microsoftOAuthOperationsMicrosoftOAuthStart = <ThrowOnError extends boolean = false>(options: Options<MicrosoftOAuthOperationsMicrosoftOAuthStartData, ThrowOnError>): RequestResult<MicrosoftOAuthOperationsMicrosoftOAuthStartResponses, MicrosoftOAuthOperationsMicrosoftOAuthStartErrors, ThrowOnError> => (options.client ?? client).post<MicrosoftOAuthOperationsMicrosoftOAuthStartResponses, MicrosoftOAuthOperationsMicrosoftOAuthStartErrors, ThrowOnError>({
43
- security: [{ name: 'Authorization', type: 'apiKey' }],
44
- url: '/accounts/oauth/microsoft/start',
45
- ...options,
46
- headers: {
47
- 'Content-Type': 'application/json',
48
- ...options.headers
49
- }
50
- });
51
-
52
- /**
53
- * Test IMAP/SMTP connection without saving
54
- */
55
- export const accountOperationsTestConnection = <ThrowOnError extends boolean = false>(options: Options<AccountOperationsTestConnectionData, ThrowOnError>): RequestResult<AccountOperationsTestConnectionResponses, AccountOperationsTestConnectionErrors, ThrowOnError> => (options.client ?? client).post<AccountOperationsTestConnectionResponses, AccountOperationsTestConnectionErrors, ThrowOnError>({
56
- security: [{ name: 'Authorization', type: 'apiKey' }],
57
- url: '/accounts/test-connection',
58
- ...options,
59
- headers: {
60
- 'Content-Type': 'application/json',
61
- ...options.headers
62
- }
63
- });
64
-
65
- /**
66
- * Delete an account and all associated data
67
- */
68
- export const accountDetailOperationsDeleteAccount = <ThrowOnError extends boolean = false>(options: Options<AccountDetailOperationsDeleteAccountData, ThrowOnError>): RequestResult<AccountDetailOperationsDeleteAccountResponses, AccountDetailOperationsDeleteAccountErrors, ThrowOnError> => (options.client ?? client).delete<AccountDetailOperationsDeleteAccountResponses, AccountDetailOperationsDeleteAccountErrors, ThrowOnError>({
69
- security: [{ name: 'Authorization', type: 'apiKey' }],
70
- url: '/accounts/{accountId}',
71
- ...options
72
- });
73
-
74
- /**
75
- * Update an existing account
76
- */
77
- export const accountDetailOperationsUpdateAccount = <ThrowOnError extends boolean = false>(options: Options<AccountDetailOperationsUpdateAccountData, ThrowOnError>): RequestResult<AccountDetailOperationsUpdateAccountResponses, AccountDetailOperationsUpdateAccountErrors, ThrowOnError> => (options.client ?? client).patch<AccountDetailOperationsUpdateAccountResponses, AccountDetailOperationsUpdateAccountErrors, ThrowOnError>({
78
- security: [{ name: 'Authorization', type: 'apiKey' }],
79
- url: '/accounts/{accountId}',
80
- ...options,
81
- headers: {
82
- 'Content-Type': 'application/json',
83
- ...options.headers
84
- }
85
- });
86
-
87
- export const filterOperationsListFilters = <ThrowOnError extends boolean = false>(options: Options<FilterOperationsListFiltersData, ThrowOnError>): RequestResult<FilterOperationsListFiltersResponses, FilterOperationsListFiltersErrors, ThrowOnError> => (options.client ?? client).get<FilterOperationsListFiltersResponses, FilterOperationsListFiltersErrors, ThrowOnError>({
88
- security: [{ name: 'Authorization', type: 'apiKey' }],
89
- url: '/accounts/{accountId}/filters',
90
- ...options
91
- });
92
-
93
- export const filterOperationsCreateFilter = <ThrowOnError extends boolean = false>(options: Options<FilterOperationsCreateFilterData, ThrowOnError>): RequestResult<FilterOperationsCreateFilterResponses, FilterOperationsCreateFilterErrors, ThrowOnError> => (options.client ?? client).post<FilterOperationsCreateFilterResponses, FilterOperationsCreateFilterErrors, ThrowOnError>({
94
- security: [{ name: 'Authorization', type: 'apiKey' }],
95
- url: '/accounts/{accountId}/filters',
96
- ...options,
97
- headers: {
98
- 'Content-Type': 'application/json',
99
- ...options.headers
100
- }
101
- });
102
-
103
- export const filterDetailOperationsDeleteFilter = <ThrowOnError extends boolean = false>(options: Options<FilterDetailOperationsDeleteFilterData, ThrowOnError>): RequestResult<FilterDetailOperationsDeleteFilterResponses, FilterDetailOperationsDeleteFilterErrors, ThrowOnError> => (options.client ?? client).delete<FilterDetailOperationsDeleteFilterResponses, FilterDetailOperationsDeleteFilterErrors, ThrowOnError>({
104
- security: [{ name: 'Authorization', type: 'apiKey' }],
105
- url: '/accounts/{accountId}/filters/{filterId}',
106
- ...options
107
- });
108
-
109
- export const filterDetailOperationsGetFilter = <ThrowOnError extends boolean = false>(options: Options<FilterDetailOperationsGetFilterData, ThrowOnError>): RequestResult<FilterDetailOperationsGetFilterResponses, FilterDetailOperationsGetFilterErrors, ThrowOnError> => (options.client ?? client).get<FilterDetailOperationsGetFilterResponses, FilterDetailOperationsGetFilterErrors, ThrowOnError>({
110
- security: [{ name: 'Authorization', type: 'apiKey' }],
111
- url: '/accounts/{accountId}/filters/{filterId}',
112
- ...options
113
- });
114
-
115
- export const filterDetailOperationsUpdateFilter = <ThrowOnError extends boolean = false>(options: Options<FilterDetailOperationsUpdateFilterData, ThrowOnError>): RequestResult<FilterDetailOperationsUpdateFilterResponses, FilterDetailOperationsUpdateFilterErrors, ThrowOnError> => (options.client ?? client).patch<FilterDetailOperationsUpdateFilterResponses, FilterDetailOperationsUpdateFilterErrors, ThrowOnError>({
116
- security: [{ name: 'Authorization', type: 'apiKey' }],
117
- url: '/accounts/{accountId}/filters/{filterId}',
118
- ...options,
119
- headers: {
120
- 'Content-Type': 'application/json',
121
- ...options.headers
122
- }
123
- });
124
-
125
- /**
126
- * Appoint a canonical role to a mailbox, or clear it. Exclusive by construction: the role always resolves to exactly one mailbox, so appointing a new one silently replaces whichever mailbox previously held it — there is no second place a duplicate appointment could live. Returns the account with its refreshed folderAppointments.
127
- */
128
- export const folderRoleOperationsAppointFolderRole = <ThrowOnError extends boolean = false>(options: Options<FolderRoleOperationsAppointFolderRoleData, ThrowOnError>): RequestResult<FolderRoleOperationsAppointFolderRoleResponses, FolderRoleOperationsAppointFolderRoleErrors, ThrowOnError> => (options.client ?? client).put<FolderRoleOperationsAppointFolderRoleResponses, FolderRoleOperationsAppointFolderRoleErrors, ThrowOnError>({
129
- security: [{ name: 'Authorization', type: 'apiKey' }],
130
- url: '/accounts/{accountId}/folder-roles/{role}',
131
- ...options,
132
- headers: {
133
- 'Content-Type': 'application/json',
134
- ...options.headers
135
- }
136
- });
137
-
138
- export const labelOperationsListLabels = <ThrowOnError extends boolean = false>(options: Options<LabelOperationsListLabelsData, ThrowOnError>): RequestResult<LabelOperationsListLabelsResponses, LabelOperationsListLabelsErrors, ThrowOnError> => (options.client ?? client).get<LabelOperationsListLabelsResponses, LabelOperationsListLabelsErrors, ThrowOnError>({
139
- security: [{ name: 'Authorization', type: 'apiKey' }],
140
- url: '/accounts/{accountId}/labels',
141
- ...options
142
- });
143
-
144
- export const labelOperationsCreateLabel = <ThrowOnError extends boolean = false>(options: Options<LabelOperationsCreateLabelData, ThrowOnError>): RequestResult<LabelOperationsCreateLabelResponses, LabelOperationsCreateLabelErrors, ThrowOnError> => (options.client ?? client).post<LabelOperationsCreateLabelResponses, LabelOperationsCreateLabelErrors, ThrowOnError>({
145
- security: [{ name: 'Authorization', type: 'apiKey' }],
146
- url: '/accounts/{accountId}/labels',
147
- ...options,
148
- headers: {
149
- 'Content-Type': 'application/json',
150
- ...options.headers
151
- }
152
- });
153
-
154
- /**
155
- * Delete a label. Cascades in both directions (issue #26): every `MessageLabel` row for it is removed, and every filter whose `actionLabelId` is this label is deleted outright — never left dangling, never blocking the delete. The client is expected to confirm first, naming `LabelResponse.filterCount` as the number of filters that will go with it.
156
- */
157
- export const labelDetailOperationsDeleteLabel = <ThrowOnError extends boolean = false>(options: Options<LabelDetailOperationsDeleteLabelData, ThrowOnError>): RequestResult<LabelDetailOperationsDeleteLabelResponses, LabelDetailOperationsDeleteLabelErrors, ThrowOnError> => (options.client ?? client).delete<LabelDetailOperationsDeleteLabelResponses, LabelDetailOperationsDeleteLabelErrors, ThrowOnError>({
158
- security: [{ name: 'Authorization', type: 'apiKey' }],
159
- url: '/accounts/{accountId}/labels/{labelId}',
160
- ...options
161
- });
162
-
163
- export const labelDetailOperationsGetLabel = <ThrowOnError extends boolean = false>(options: Options<LabelDetailOperationsGetLabelData, ThrowOnError>): RequestResult<LabelDetailOperationsGetLabelResponses, LabelDetailOperationsGetLabelErrors, ThrowOnError> => (options.client ?? client).get<LabelDetailOperationsGetLabelResponses, LabelDetailOperationsGetLabelErrors, ThrowOnError>({
164
- security: [{ name: 'Authorization', type: 'apiKey' }],
165
- url: '/accounts/{accountId}/labels/{labelId}',
166
- ...options
167
- });
168
-
169
- export const labelDetailOperationsUpdateLabel = <ThrowOnError extends boolean = false>(options: Options<LabelDetailOperationsUpdateLabelData, ThrowOnError>): RequestResult<LabelDetailOperationsUpdateLabelResponses, LabelDetailOperationsUpdateLabelErrors, ThrowOnError> => (options.client ?? client).patch<LabelDetailOperationsUpdateLabelResponses, LabelDetailOperationsUpdateLabelErrors, ThrowOnError>({
170
- security: [{ name: 'Authorization', type: 'apiKey' }],
171
- url: '/accounts/{accountId}/labels/{labelId}',
172
- ...options,
173
- headers: {
174
- 'Content-Type': 'application/json',
175
- ...options.headers
176
- }
177
- });
178
-
179
- export const mailboxOperationsListMailboxes = <ThrowOnError extends boolean = false>(options: Options<MailboxOperationsListMailboxesData, ThrowOnError>): RequestResult<MailboxOperationsListMailboxesResponses, MailboxOperationsListMailboxesErrors, ThrowOnError> => (options.client ?? client).get<MailboxOperationsListMailboxesResponses, MailboxOperationsListMailboxesErrors, ThrowOnError>({
180
- security: [{ name: 'Authorization', type: 'apiKey' }],
181
- url: '/accounts/{accountId}/mailboxes',
182
- ...options
183
- });
184
-
185
- /**
186
- * Create a folder. Refused with 400 when the account already has a folder at that path.
187
- */
188
- export const mailboxOperationsCreateMailbox = <ThrowOnError extends boolean = false>(options: Options<MailboxOperationsCreateMailboxData, ThrowOnError>): RequestResult<MailboxOperationsCreateMailboxResponses, MailboxOperationsCreateMailboxErrors, ThrowOnError> => (options.client ?? client).post<MailboxOperationsCreateMailboxResponses, MailboxOperationsCreateMailboxErrors, ThrowOnError>({
189
- security: [{ name: 'Authorization', type: 'apiKey' }],
190
- url: '/accounts/{accountId}/mailboxes',
191
- ...options,
192
- headers: {
193
- 'Content-Type': 'application/json',
194
- ...options.headers
195
- }
196
- });
197
-
198
- /**
199
- * 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.
200
- */
201
- export const mailboxDetailOperationsDeleteMailbox = <ThrowOnError extends boolean = false>(options: Options<MailboxDetailOperationsDeleteMailboxData, ThrowOnError>): RequestResult<MailboxDetailOperationsDeleteMailboxResponses, MailboxDetailOperationsDeleteMailboxErrors, ThrowOnError> => (options.client ?? client).delete<MailboxDetailOperationsDeleteMailboxResponses, MailboxDetailOperationsDeleteMailboxErrors, ThrowOnError>({
202
- security: [{ name: 'Authorization', type: 'apiKey' }],
203
- url: '/accounts/{accountId}/mailboxes/{mailboxId}',
204
- ...options
205
- });
206
-
207
- export const mailboxDetailOperationsGetMailbox = <ThrowOnError extends boolean = false>(options: Options<MailboxDetailOperationsGetMailboxData, ThrowOnError>): RequestResult<MailboxDetailOperationsGetMailboxResponses, MailboxDetailOperationsGetMailboxErrors, ThrowOnError> => (options.client ?? client).get<MailboxDetailOperationsGetMailboxResponses, MailboxDetailOperationsGetMailboxErrors, ThrowOnError>({
208
- security: [{ name: 'Authorization', type: 'apiKey' }],
209
- url: '/accounts/{accountId}/mailboxes/{mailboxId}',
210
- ...options
211
- });
212
-
213
- /**
214
- * 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.
215
- */
216
- export const mailboxDetailOperationsRenameMailbox = <ThrowOnError extends boolean = false>(options: Options<MailboxDetailOperationsRenameMailboxData, ThrowOnError>): RequestResult<MailboxDetailOperationsRenameMailboxResponses, MailboxDetailOperationsRenameMailboxErrors, ThrowOnError> => (options.client ?? client).patch<MailboxDetailOperationsRenameMailboxResponses, MailboxDetailOperationsRenameMailboxErrors, ThrowOnError>({
217
- security: [{ name: 'Authorization', type: 'apiKey' }],
218
- url: '/accounts/{accountId}/mailboxes/{mailboxId}',
219
- ...options,
220
- headers: {
221
- 'Content-Type': 'application/json',
222
- ...options.headers
223
- }
224
- });
225
-
226
- /**
227
- * Start a one-time "all like these" back-apply: match the corpus against the given predicate and apply the action to every match, in one pass. Returns immediately with an organizeJobId; poll GET /accounts/{accountId}/organize/{organizeJobId} for state and counts. Never creates a Filter row (RFC 034 recap).
228
- */
229
- export const organizeOperationsCreateOrganizeJob = <ThrowOnError extends boolean = false>(options: Options<OrganizeOperationsCreateOrganizeJobData, ThrowOnError>): RequestResult<OrganizeOperationsCreateOrganizeJobResponses, OrganizeOperationsCreateOrganizeJobErrors, ThrowOnError> => (options.client ?? client).post<OrganizeOperationsCreateOrganizeJobResponses, OrganizeOperationsCreateOrganizeJobErrors, ThrowOnError>({
230
- security: [{ name: 'Authorization', type: 'apiKey' }],
231
- url: '/accounts/{accountId}/organize',
232
- ...options,
233
- headers: {
234
- 'Content-Type': 'application/json',
235
- ...options.headers
236
- }
237
- });
238
-
239
- /**
240
- * Preview an "all like these" back-apply: run the exact same matcher read-only and return the messages the action would be applied to, without applying it. The previewed set equals the set a job with the same input would apply to.
241
- */
242
- export const organizeOperationsPreviewOrganize = <ThrowOnError extends boolean = false>(options: Options<OrganizeOperationsPreviewOrganizeData, ThrowOnError>): RequestResult<OrganizeOperationsPreviewOrganizeResponses, OrganizeOperationsPreviewOrganizeErrors, ThrowOnError> => (options.client ?? client).post<OrganizeOperationsPreviewOrganizeResponses, OrganizeOperationsPreviewOrganizeErrors, ThrowOnError>({
243
- security: [{ name: 'Authorization', type: 'apiKey' }],
244
- url: '/accounts/{accountId}/organize/preview',
245
- ...options,
246
- headers: {
247
- 'Content-Type': 'application/json',
248
- ...options.headers
249
- }
250
- });
251
-
252
- /**
253
- * Get the status of a back-apply job, including matched/applied/failed counts. Terminal states are Complete and Failed.
254
- */
255
- export const organizeJobDetailOperationsGetOrganizeJob = <ThrowOnError extends boolean = false>(options: Options<OrganizeJobDetailOperationsGetOrganizeJobData, ThrowOnError>): RequestResult<OrganizeJobDetailOperationsGetOrganizeJobResponses, OrganizeJobDetailOperationsGetOrganizeJobErrors, ThrowOnError> => (options.client ?? client).get<OrganizeJobDetailOperationsGetOrganizeJobResponses, OrganizeJobDetailOperationsGetOrganizeJobErrors, ThrowOnError>({
256
- security: [{ name: 'Authorization', type: 'apiKey' }],
257
- url: '/accounts/{accountId}/organize/{organizeJobId}',
258
- ...options
259
- });
260
-
261
- export const syncOperationsTriggerSync = <ThrowOnError extends boolean = false>(options: Options<SyncOperationsTriggerSyncData, ThrowOnError>): RequestResult<SyncOperationsTriggerSyncResponses, SyncOperationsTriggerSyncErrors, ThrowOnError> => (options.client ?? client).post<SyncOperationsTriggerSyncResponses, SyncOperationsTriggerSyncErrors, ThrowOnError>({
262
- security: [{ name: 'Authorization', type: 'apiKey' }],
263
- url: '/accounts/{accountId}/sync',
264
- ...options
265
- });
266
-
267
- /**
268
- * Get the current sync status for an account, including per-mailbox progress computed from watermarks. Read-only — does not write or contend with the mailbox sync lock (RFC 023).
269
- */
270
- export const syncOperationsGetSyncStatus = <ThrowOnError extends boolean = false>(options: Options<SyncOperationsGetSyncStatusData, ThrowOnError>): RequestResult<SyncOperationsGetSyncStatusResponses, SyncOperationsGetSyncStatusErrors, ThrowOnError> => (options.client ?? client).get<SyncOperationsGetSyncStatusResponses, SyncOperationsGetSyncStatusErrors, ThrowOnError>({
271
- security: [{ name: 'Authorization', type: 'apiKey' }],
272
- url: '/accounts/{accountId}/sync/status',
273
- ...options
274
- });
275
-
276
- /**
277
- * Permanently delete all messages in the Trash mailbox
278
- */
279
- export const trashOperationsEmptyTrash = <ThrowOnError extends boolean = false>(options: Options<TrashOperationsEmptyTrashData, ThrowOnError>): RequestResult<TrashOperationsEmptyTrashResponses, TrashOperationsEmptyTrashErrors, ThrowOnError> => (options.client ?? client).post<TrashOperationsEmptyTrashResponses, TrashOperationsEmptyTrashErrors, ThrowOnError>({
280
- security: [{ name: 'Authorization', type: 'apiKey' }],
281
- url: '/accounts/{accountId}/trash/empty',
282
- ...options
283
- });
284
-
285
- /**
286
- * Search addresses for autocomplete
287
- */
288
- export const addressOperationsSearchAddresses = <ThrowOnError extends boolean = false>(options: Options<AddressOperationsSearchAddressesData, ThrowOnError>): RequestResult<AddressOperationsSearchAddressesResponses, AddressOperationsSearchAddressesErrors, ThrowOnError> => (options.client ?? client).get<AddressOperationsSearchAddressesResponses, AddressOperationsSearchAddressesErrors, ThrowOnError>({
289
- security: [{ name: 'Authorization', type: 'apiKey' }],
290
- url: '/addresses/search',
291
- ...options
292
- });
293
-
294
- /**
295
- * Update an address (currently: per-sender flags). Pass `flags` to set flags and `clearFlags: ["<name>"]` to remove them. Other flags are untouched.
296
- */
297
- export const addressDetailOperationsUpdateAddress = <ThrowOnError extends boolean = false>(options: Options<AddressDetailOperationsUpdateAddressData, ThrowOnError>): RequestResult<AddressDetailOperationsUpdateAddressResponses, AddressDetailOperationsUpdateAddressErrors, ThrowOnError> => (options.client ?? client).patch<AddressDetailOperationsUpdateAddressResponses, AddressDetailOperationsUpdateAddressErrors, ThrowOnError>({
298
- security: [{ name: 'Authorization', type: 'apiKey' }],
299
- url: '/addresses/{addressId}',
300
- ...options,
301
- headers: {
302
- 'Content-Type': 'application/json',
303
- ...options.headers
304
- }
305
- });
306
-
307
- /**
308
- * Expanded event occurrences in a window. The server does the recurrence
309
- * expansion and the client renders instances — no RRULE is ever evaluated
310
- * in a browser, so a week grid and a day strip agree with each other and
311
- * with what a native client will later read over CalDAV.
312
- *
313
- * Occurrences are served from the stored occurrence index. A series whose
314
- * index stops before `to` — an open-ended event older than the expansion
315
- * horizon — is expanded live for this window instead, and nothing
316
- * unbounded is written to serve a read.
317
- *
318
- * Refused with 400 when `from` and `to` are not ISO 8601 date-times, when
319
- * `to` is not after `from`, or when the window is wider than a year.
320
- */
321
- export const calendarEventOperationsListCalendarEvents = <ThrowOnError extends boolean = false>(options: Options<CalendarEventOperationsListCalendarEventsData, ThrowOnError>): RequestResult<CalendarEventOperationsListCalendarEventsResponses, CalendarEventOperationsListCalendarEventsErrors, ThrowOnError> => (options.client ?? client).get<CalendarEventOperationsListCalendarEventsResponses, CalendarEventOperationsListCalendarEventsErrors, ThrowOnError>({
322
- security: [{ name: 'Authorization', type: 'apiKey' }],
323
- url: '/calendar-events',
324
- ...options
325
- });
326
-
327
- /**
328
- * Create an event. The server builds the VEVENT and writes it through the single calendar write path — the same one an accepted invitation and a later CalDAV PUT go through — so the object, its expanded occurrences and the collection's sync sequence land together or not at all. Refused with 400 `read_only_calendar` for a `Subscribed` collection, whose events belong to the feed.
329
- */
330
- export const calendarEventOperationsCreateCalendarEvent = <ThrowOnError extends boolean = false>(options: Options<CalendarEventOperationsCreateCalendarEventData, ThrowOnError>): RequestResult<CalendarEventOperationsCreateCalendarEventResponses, CalendarEventOperationsCreateCalendarEventErrors, ThrowOnError> => (options.client ?? client).post<CalendarEventOperationsCreateCalendarEventResponses, CalendarEventOperationsCreateCalendarEventErrors, ThrowOnError>({
331
- security: [{ name: 'Authorization', type: 'apiKey' }],
332
- url: '/calendar-events',
333
- ...options,
334
- headers: {
335
- 'Content-Type': 'application/json',
336
- ...options.headers
337
- }
338
- });
339
-
340
- /**
341
- * Delete an event. `All` removes the resource and every occurrence it
342
- * produced; `This` writes an EXDATE for the named occurrence and keeps the
343
- * rest of the series; `Following` truncates the series to end just before
344
- * it.
345
- *
346
- * Same refusals and the same `If-Match` precondition as the update.
347
- * An event in a `Subscribed` collection is refused with 400
348
- * `read_only_calendar`, here and on the update.
349
- */
350
- export const calendarEventDetailOperationsDeleteCalendarEvent = <ThrowOnError extends boolean = false>(options: Options<CalendarEventDetailOperationsDeleteCalendarEventData, ThrowOnError>): RequestResult<CalendarEventDetailOperationsDeleteCalendarEventResponses, CalendarEventDetailOperationsDeleteCalendarEventErrors, ThrowOnError> => (options.client ?? client).delete<CalendarEventDetailOperationsDeleteCalendarEventResponses, CalendarEventDetailOperationsDeleteCalendarEventErrors, ThrowOnError>({
351
- security: [{ name: 'Authorization', type: 'apiKey' }],
352
- url: '/calendar-events/{calendarObjectId}',
353
- ...options
354
- });
355
-
356
- /**
357
- * Get one stored event, including its canonical iCalendar text and its etag.
358
- */
359
- export const calendarEventDetailOperationsGetCalendarEvent = <ThrowOnError extends boolean = false>(options: Options<CalendarEventDetailOperationsGetCalendarEventData, ThrowOnError>): RequestResult<CalendarEventDetailOperationsGetCalendarEventResponses, CalendarEventDetailOperationsGetCalendarEventErrors, ThrowOnError> => (options.client ?? client).get<CalendarEventDetailOperationsGetCalendarEventResponses, CalendarEventDetailOperationsGetCalendarEventErrors, ThrowOnError>({
360
- security: [{ name: 'Authorization', type: 'apiKey' }],
361
- url: '/calendar-events/{calendarObjectId}',
362
- ...options
363
- });
364
-
365
- /**
366
- * Update an event. `scope` says what the caller meant by editing one
367
- * drawing of a series: `All` rewrites the master, `This` writes a
368
- * RECURRENCE-ID override for the named occurrence, and `Following` splits
369
- * the series — the master's rule is truncated and a second resource carries
370
- * the remainder under a UID of its own.
371
- *
372
- * `recurrenceId` is required for `This` and `Following` and is refused with
373
- * 400 otherwise, along with a scope other than `All` on an event that does
374
- * not recur, and a `recurrenceId` naming no occurrence of the series.
375
- *
376
- * `If-Match` makes the write conditional on the etag the caller read. A
377
- * mismatch is 412: somebody replaced the resource in between, and applying
378
- * this patch would discard their change without either of them seeing it.
379
- */
380
- export const calendarEventDetailOperationsUpdateCalendarEvent = <ThrowOnError extends boolean = false>(options: Options<CalendarEventDetailOperationsUpdateCalendarEventData, ThrowOnError>): RequestResult<CalendarEventDetailOperationsUpdateCalendarEventResponses, CalendarEventDetailOperationsUpdateCalendarEventErrors, ThrowOnError> => (options.client ?? client).patch<CalendarEventDetailOperationsUpdateCalendarEventResponses, CalendarEventDetailOperationsUpdateCalendarEventErrors, ThrowOnError>({
381
- security: [{ name: 'Authorization', type: 'apiKey' }],
382
- url: '/calendar-events/{calendarObjectId}',
383
- ...options,
384
- headers: {
385
- 'Content-Type': 'application/json',
386
- ...options.headers
387
- }
388
- });
389
-
390
- /**
391
- * Busy spans over a window, merged across every calendar the caller holds. Backs the clash check beside a mail invitation and the free-stretch maths in the day strip, neither of which should have to fetch every event and merge them itself. Refused with 400 on the same window rules as the event listing.
392
- */
393
- export const calendarFreeBusyOperationsListCalendarFreeBusy = <ThrowOnError extends boolean = false>(options: Options<CalendarFreeBusyOperationsListCalendarFreeBusyData, ThrowOnError>): RequestResult<CalendarFreeBusyOperationsListCalendarFreeBusyResponses, CalendarFreeBusyOperationsListCalendarFreeBusyErrors, ThrowOnError> => (options.client ?? client).get<CalendarFreeBusyOperationsListCalendarFreeBusyResponses, CalendarFreeBusyOperationsListCalendarFreeBusyErrors, ThrowOnError>({
394
- security: [{ name: 'Authorization', type: 'apiKey' }],
395
- url: '/calendar-free-busy',
396
- ...options
397
- });
398
-
399
- /**
400
- * List the caller's suggestions in one state, newest first. `Pending` is the set that is waiting on a person and the one a client normally asks for.
401
- */
402
- export const calendarSuggestionOperationsListCalendarSuggestions = <ThrowOnError extends boolean = false>(options: Options<CalendarSuggestionOperationsListCalendarSuggestionsData, ThrowOnError>): RequestResult<CalendarSuggestionOperationsListCalendarSuggestionsResponses, CalendarSuggestionOperationsListCalendarSuggestionsErrors, ThrowOnError> => (options.client ?? client).get<CalendarSuggestionOperationsListCalendarSuggestionsResponses, CalendarSuggestionOperationsListCalendarSuggestionsErrors, ThrowOnError>({
403
- security: [{ name: 'Authorization', type: 'apiKey' }],
404
- url: '/calendar-suggestions',
405
- ...options
406
- });
407
-
408
- /**
409
- * Add the suggested event to a calendar. One transaction: a VCALENDAR is
410
- * built from the invitation's own bytes, keeping its UID and SEQUENCE and
411
- * marking the user `ATTENDEE;PARTSTAT=ACCEPTED`, and written through the
412
- * same service function every other calendar write goes through — so a web
413
- * edit and a native edit of that event cannot diverge. Accepting a `Cancel`
414
- * suggestion writes `STATUS:CANCELLED` on the resource the same way.
415
- *
416
- * `answer: Tentative` writes the same resource with `PARTSTAT=TENTATIVE`
417
- * and moves the suggestion to `Tentative` instead of `Accepted`.
418
- *
419
- * No reply is sent to the organizer. This endpoint sends no mail at all,
420
- * and the card says so.
421
- *
422
- * Idempotent: accepting an already-accepted suggestion rewrites the same
423
- * resource and returns the same suggestion, because both the resource id
424
- * and the suggestion id are derived rather than minted.
425
- *
426
- * 400 when the suggestion is not one that can be accepted — already
427
- * answered otherwise, dismissed or superseded — when a `Cancel` suggestion
428
- * is answered `Tentative`, or when its iCalendar will not parse.
429
- */
430
- export const calendarSuggestionActionOperationsAcceptCalendarSuggestion = <ThrowOnError extends boolean = false>(options: Options<CalendarSuggestionActionOperationsAcceptCalendarSuggestionData, ThrowOnError>): RequestResult<CalendarSuggestionActionOperationsAcceptCalendarSuggestionResponses, CalendarSuggestionActionOperationsAcceptCalendarSuggestionErrors, ThrowOnError> => (options.client ?? client).post<CalendarSuggestionActionOperationsAcceptCalendarSuggestionResponses, CalendarSuggestionActionOperationsAcceptCalendarSuggestionErrors, ThrowOnError>({
431
- security: [{ name: 'Authorization', type: 'apiKey' }],
432
- url: '/calendar-suggestions/{suggestionId}/accept',
433
- ...options,
434
- headers: {
435
- 'Content-Type': 'application/json',
436
- ...options.headers
437
- }
438
- });
439
-
440
- /**
441
- * Say no. Writes no calendar object and sends no reply to the organizer. Idempotent; 400 when the suggestion was already accepted, since a resource exists and declining would not remove it.
442
- */
443
- export const calendarSuggestionActionOperationsDeclineCalendarSuggestion = <ThrowOnError extends boolean = false>(options: Options<CalendarSuggestionActionOperationsDeclineCalendarSuggestionData, ThrowOnError>): RequestResult<CalendarSuggestionActionOperationsDeclineCalendarSuggestionResponses, CalendarSuggestionActionOperationsDeclineCalendarSuggestionErrors, ThrowOnError> => (options.client ?? client).post<CalendarSuggestionActionOperationsDeclineCalendarSuggestionResponses, CalendarSuggestionActionOperationsDeclineCalendarSuggestionErrors, ThrowOnError>({
444
- security: [{ name: 'Authorization', type: 'apiKey' }],
445
- url: '/calendar-suggestions/{suggestionId}/decline',
446
- ...options
447
- });
448
-
449
- /**
450
- * Wave the card away. Writes no calendar object. With `muteSender`, also writes a standing `Filter` rule on the message's sender so their invitations stop being offered. Idempotent; 400 when the suggestion was already accepted.
451
- */
452
- export const calendarSuggestionActionOperationsDismissCalendarSuggestion = <ThrowOnError extends boolean = false>(options: Options<CalendarSuggestionActionOperationsDismissCalendarSuggestionData, ThrowOnError>): RequestResult<CalendarSuggestionActionOperationsDismissCalendarSuggestionResponses, CalendarSuggestionActionOperationsDismissCalendarSuggestionErrors, ThrowOnError> => (options.client ?? client).post<CalendarSuggestionActionOperationsDismissCalendarSuggestionResponses, CalendarSuggestionActionOperationsDismissCalendarSuggestionErrors, ThrowOnError>({
453
- security: [{ name: 'Authorization', type: 'apiKey' }],
454
- url: '/calendar-suggestions/{suggestionId}/dismiss',
455
- ...options,
456
- headers: {
457
- 'Content-Type': 'application/json',
458
- ...options.headers
459
- }
460
- });
461
-
462
- /**
463
- * Take an answer back. An accepted, tentative, declined or dismissed
464
- * suggestion returns to `Pending`, so the card asks again. One
465
- * transaction: the suggestion is settled `Pending` with
466
- * `acceptedCalendarObjectId: ""`, and the calendar object an accept or a
467
- * maybe wrote is removed with its occurrences and every remainder a
468
- * this-and-following edit split off it in that calendar, unless another
469
- * suggestion is still answered into that object; then the object stays with
470
- * that answer. A sender rule written by
471
- * `dismiss{muteSender}` stays; it is a rule of its own, edited where rules
472
- * are.
473
- *
474
- * No mail is sent. Idempotent: a `Pending` suggestion is returned as it is.
475
- *
476
- * 400 when the suggestion is `Superseded`, which a later revision retired,
477
- * a `Cancel`, whose answer rewrote an event it cannot restore, or its
478
- * `answerOvertakenBy` is `Cancellation`, because a cancellation is terminal.
479
- */
480
- export const calendarSuggestionActionOperationsReopenCalendarSuggestion = <ThrowOnError extends boolean = false>(options: Options<CalendarSuggestionActionOperationsReopenCalendarSuggestionData, ThrowOnError>): RequestResult<CalendarSuggestionActionOperationsReopenCalendarSuggestionResponses, CalendarSuggestionActionOperationsReopenCalendarSuggestionErrors, ThrowOnError> => (options.client ?? client).post<CalendarSuggestionActionOperationsReopenCalendarSuggestionResponses, CalendarSuggestionActionOperationsReopenCalendarSuggestionErrors, ThrowOnError>({
481
- security: [{ name: 'Authorization', type: 'apiKey' }],
482
- url: '/calendar-suggestions/{suggestionId}/reopen',
483
- ...options
484
- });
485
-
486
- /**
487
- * List the caller's calendar collections. Provisions the account config's default collection when it has none, so a first read never comes back empty and no client has to know how a calendar gets made.
488
- */
489
- export const calendarOperationsListCalendars = <ThrowOnError extends boolean = false>(options?: Options<CalendarOperationsListCalendarsData, ThrowOnError>): RequestResult<CalendarOperationsListCalendarsResponses, CalendarOperationsListCalendarsErrors, ThrowOnError> => (options?.client ?? client).get<CalendarOperationsListCalendarsResponses, CalendarOperationsListCalendarsErrors, ThrowOnError>({
490
- security: [{ name: 'Authorization', type: 'apiKey' }],
491
- url: '/calendars',
492
- ...options
493
- });
494
-
495
- /**
496
- * Create a calendar collection. Refused with 400 when `urlSegment` is empty or already taken in this account config — the segment is the collection's identity, so a second create under the same one would otherwise silently return the collection that already exists. With `subscriptionUrl` the feed is fetched first and a fetch that fails is refused with 400 `subscription_unreachable`, naming why and never the URL.
497
- */
498
- export const calendarOperationsCreateCalendar = <ThrowOnError extends boolean = false>(options: Options<CalendarOperationsCreateCalendarData, ThrowOnError>): RequestResult<CalendarOperationsCreateCalendarResponses, CalendarOperationsCreateCalendarErrors, ThrowOnError> => (options.client ?? client).post<CalendarOperationsCreateCalendarResponses, CalendarOperationsCreateCalendarErrors, ThrowOnError>({
499
- security: [{ name: 'Authorization', type: 'apiKey' }],
500
- url: '/calendars',
501
- ...options,
502
- headers: {
503
- 'Content-Type': 'application/json',
504
- ...options.headers
505
- }
506
- });
507
-
508
- /**
509
- * Delete a calendar collection and every event in it. Refused with 400 for the account's default collection: it is the one place an accepted invitation or a first event can land, and an account with no calendar has nowhere to put an event.
510
- */
511
- export const calendarDetailOperationsDeleteCalendar = <ThrowOnError extends boolean = false>(options: Options<CalendarDetailOperationsDeleteCalendarData, ThrowOnError>): RequestResult<CalendarDetailOperationsDeleteCalendarResponses, CalendarDetailOperationsDeleteCalendarErrors, ThrowOnError> => (options.client ?? client).delete<CalendarDetailOperationsDeleteCalendarResponses, CalendarDetailOperationsDeleteCalendarErrors, ThrowOnError>({
512
- security: [{ name: 'Authorization', type: 'apiKey' }],
513
- url: '/calendars/{calendarId}',
514
- ...options
515
- });
516
-
517
- export const calendarDetailOperationsGetCalendar = <ThrowOnError extends boolean = false>(options: Options<CalendarDetailOperationsGetCalendarData, ThrowOnError>): RequestResult<CalendarDetailOperationsGetCalendarResponses, CalendarDetailOperationsGetCalendarErrors, ThrowOnError> => (options.client ?? client).get<CalendarDetailOperationsGetCalendarResponses, CalendarDetailOperationsGetCalendarErrors, ThrowOnError>({
518
- security: [{ name: 'Authorization', type: 'apiKey' }],
519
- url: '/calendars/{calendarId}',
520
- ...options
521
- });
522
-
523
- /**
524
- * Update a calendar collection. `subscriptionEnabled` is refused with 400 `not_subscribed` on a collection that is not `Subscribed`. Turning it off stops the refresh and removes nothing.
525
- */
526
- export const calendarDetailOperationsUpdateCalendar = <ThrowOnError extends boolean = false>(options: Options<CalendarDetailOperationsUpdateCalendarData, ThrowOnError>): RequestResult<CalendarDetailOperationsUpdateCalendarResponses, CalendarDetailOperationsUpdateCalendarErrors, ThrowOnError> => (options.client ?? client).patch<CalendarDetailOperationsUpdateCalendarResponses, CalendarDetailOperationsUpdateCalendarErrors, ThrowOnError>({
527
- security: [{ name: 'Authorization', type: 'apiKey' }],
528
- url: '/calendars/{calendarId}',
529
- ...options,
530
- headers: {
531
- 'Content-Type': 'application/json',
532
- ...options.headers
533
- }
534
- });
535
-
536
- /**
537
- * Revoke the calendar's feed address. Every subscribed client starts getting 404 on its next poll. Answered 404 when the calendar has no feed, so a revoke is never reported as having taken something away that was not there.
538
- */
539
- export const calendarDetailOperationsRevokeCalendarFeed = <ThrowOnError extends boolean = false>(options: Options<CalendarDetailOperationsRevokeCalendarFeedData, ThrowOnError>): RequestResult<CalendarDetailOperationsRevokeCalendarFeedResponses, CalendarDetailOperationsRevokeCalendarFeedErrors, ThrowOnError> => (options.client ?? client).delete<CalendarDetailOperationsRevokeCalendarFeedResponses, CalendarDetailOperationsRevokeCalendarFeedErrors, ThrowOnError>({
540
- security: [{ name: 'Authorization', type: 'apiKey' }],
541
- url: '/calendars/{calendarId}/feed',
542
- ...options
543
- });
544
-
545
- /**
546
- * Read whether this calendar has a feed address. Absent (404) until one is
547
- * minted. The token is not here: it is stored as a hash, so the only
548
- * moment it exists in the clear is the answer to the write below.
549
- */
550
- export const calendarDetailOperationsGetCalendarFeed = <ThrowOnError extends boolean = false>(options: Options<CalendarDetailOperationsGetCalendarFeedData, ThrowOnError>): RequestResult<CalendarDetailOperationsGetCalendarFeedResponses, CalendarDetailOperationsGetCalendarFeedErrors, ThrowOnError> => (options.client ?? client).get<CalendarDetailOperationsGetCalendarFeedResponses, CalendarDetailOperationsGetCalendarFeedErrors, ThrowOnError>({
551
- security: [{ name: 'Authorization', type: 'apiKey' }],
552
- url: '/calendars/{calendarId}/feed',
553
- ...options
554
- });
555
-
556
- /**
557
- * Mint the calendar's feed address, or replace the one it has, and answer
558
- * with the token in the clear. Idempotent in address rather than in value:
559
- * one calendar holds one token, so a second call rotates — the previous
560
- * URL stops resolving, which is how a subscription handed to the wrong
561
- * person is taken back.
562
- *
563
- * This is the only response that ever carries the plaintext. A client that
564
- * does not keep it rotates again.
565
- */
566
- export const calendarDetailOperationsPutCalendarFeed = <ThrowOnError extends boolean = false>(options: Options<CalendarDetailOperationsPutCalendarFeedData, ThrowOnError>): RequestResult<CalendarDetailOperationsPutCalendarFeedResponses, CalendarDetailOperationsPutCalendarFeedErrors, ThrowOnError> => (options.client ?? client).put<CalendarDetailOperationsPutCalendarFeedResponses, CalendarDetailOperationsPutCalendarFeedErrors, ThrowOnError>({
567
- security: [{ name: 'Authorization', type: 'apiKey' }],
568
- url: '/calendars/{calendarId}/feed',
569
- ...options
570
- });
571
-
572
- /**
573
- * Get the current user's configuration including accounts and addresses
574
- */
575
- export const configOperationsGetConfig = <ThrowOnError extends boolean = false>(options?: Options<ConfigOperationsGetConfigData, ThrowOnError>): RequestResult<ConfigOperationsGetConfigResponses, ConfigOperationsGetConfigErrors, ThrowOnError> => (options?.client ?? client).get<ConfigOperationsGetConfigResponses, ConfigOperationsGetConfigErrors, ThrowOnError>({
576
- security: [{ name: 'Authorization', type: 'apiKey' }],
577
- url: '/config',
578
- ...options
579
- });
580
-
581
- /**
582
- * Export every configured setting for the caller as one versioned JSON document. Contains no credentials: no IMAP/SMTP password and no OAuth token, encrypted or otherwise, and the credential fields are structurally absent rather than blank. The document's own shape is not defined here - it is defined by the published JSON Schema for its `schemaVersion` (build/config-schema/reader-config.v<N>.schema.json), so a file keeps validating independent of this API's models.
583
- */
584
- export const configOperationsExportConfig = <ThrowOnError extends boolean = false>(options?: Options<ConfigOperationsExportConfigData, ThrowOnError>): RequestResult<ConfigOperationsExportConfigResponses, ConfigOperationsExportConfigErrors, ThrowOnError> => (options?.client ?? client).get<ConfigOperationsExportConfigResponses, ConfigOperationsExportConfigErrors, ThrowOnError>({
585
- security: [{ name: 'Authorization', type: 'apiKey' }],
586
- url: '/config/export',
587
- ...options
588
- });
589
-
590
- /**
591
- * Validate, or validate and apply, a config document. `mode: validate` (the default) writes nothing and returns the same report an apply would. `onExisting: abort` (the default) refuses with 409 when this configuration already holds accounts, labels, filters or address flags. Nothing is written until the whole document has validated; a write failure after that aborts the remainder and the report names exactly what landed. Imported accounts arrive inactive with `connectionState: credentials_missing` (or `reauth_required` for OAuth) - the credentials the file deliberately omits are re-entered per account afterwards.
592
- */
593
- export const configOperationsImportConfig = <ThrowOnError extends boolean = false>(options: Options<ConfigOperationsImportConfigData, ThrowOnError>): RequestResult<ConfigOperationsImportConfigResponses, ConfigOperationsImportConfigErrors, ThrowOnError> => (options.client ?? client).post<ConfigOperationsImportConfigResponses, ConfigOperationsImportConfigErrors, ThrowOnError>({
594
- security: [{ name: 'Authorization', type: 'apiKey' }],
595
- url: '/config/import',
596
- ...options,
597
- headers: {
598
- 'Content-Type': 'application/json',
599
- ...options.headers
600
- }
601
- });
602
-
603
- /**
604
- * Serve a calendar as iCalendar text to whoever holds its secret address
605
- * (issue #1067).
606
- *
607
- * Outside the session-auth surface on purpose: Apple Calendar, Google
608
- * Calendar, Outlook and Thunderbird subscribe to a URL and never sign in,
609
- * so the token in the path is the credential and the only one. It is
610
- * compared against the stored hash rather than looked up in the clear, and
611
- * an unknown, revoked or malformed token is the same 404 with the same body
612
- * — a subscriber learns whether it still has access, and nothing else.
613
- */
614
- export const calendarFeedOperationsGetCalendarFeedIcal = <ThrowOnError extends boolean = false>(options: Options<CalendarFeedOperationsGetCalendarFeedIcalData, ThrowOnError>): RequestResult<CalendarFeedOperationsGetCalendarFeedIcalResponses, CalendarFeedOperationsGetCalendarFeedIcalErrors, ThrowOnError> => (options.client ?? client).get<CalendarFeedOperationsGetCalendarFeedIcalResponses, CalendarFeedOperationsGetCalendarFeedIcalErrors, ThrowOnError>({ url: '/feeds/calendar/{feedToken}.ics', ...options });
615
-
616
- export const threadOperationsListThreads = <ThrowOnError extends boolean = false>(options: Options<ThreadOperationsListThreadsData, ThrowOnError>): RequestResult<ThreadOperationsListThreadsResponses, ThreadOperationsListThreadsErrors, ThrowOnError> => (options.client ?? client).get<ThreadOperationsListThreadsResponses, ThreadOperationsListThreadsErrors, ThrowOnError>({
617
- security: [{ name: 'Authorization', type: 'apiKey' }],
618
- url: '/mailboxes/{mailboxId}/threads',
619
- ...options
620
- });
621
-
622
- export const threadOperationsSearchThreads = <ThrowOnError extends boolean = false>(options: Options<ThreadOperationsSearchThreadsData, ThrowOnError>): RequestResult<ThreadOperationsSearchThreadsResponses, ThreadOperationsSearchThreadsErrors, ThrowOnError> => (options.client ?? client).get<ThreadOperationsSearchThreadsResponses, ThreadOperationsSearchThreadsErrors, ThrowOnError>({
623
- security: [{ name: 'Authorization', type: 'apiKey' }],
624
- url: '/mailboxes/{mailboxId}/threads/search',
625
- ...options
626
- });
627
-
628
- /**
629
- * Request full erasure of the current user's account and all associated data
630
- */
631
- export const meOperationsDeleteMe = <ThrowOnError extends boolean = false>(options: Options<MeOperationsDeleteMeData, ThrowOnError>): RequestResult<MeOperationsDeleteMeResponses, MeOperationsDeleteMeErrors, ThrowOnError> => (options.client ?? client).delete<MeOperationsDeleteMeResponses, MeOperationsDeleteMeErrors, ThrowOnError>({
632
- security: [{ name: 'Authorization', type: 'apiKey' }],
633
- url: '/me',
634
- ...options,
635
- headers: {
636
- 'Content-Type': 'application/json',
637
- ...options.headers
638
- }
639
- });
640
-
641
- /**
642
- * Request an export of all account data as a ZIP archive of .eml files. Returns immediately with an exportId; check GET /me/export/{exportId} for status and downloadUrl.
643
- */
644
- export const meOperationsCreateExport = <ThrowOnError extends boolean = false>(options?: Options<MeOperationsCreateExportData, ThrowOnError>): RequestResult<MeOperationsCreateExportResponses, MeOperationsCreateExportErrors, ThrowOnError> => (options?.client ?? client).post<MeOperationsCreateExportResponses, MeOperationsCreateExportErrors, ThrowOnError>({
645
- security: [{ name: 'Authorization', type: 'apiKey' }],
646
- url: '/me/export',
647
- ...options
648
- });
649
-
650
- /**
651
- * Get the status of a previously requested data export. When state is Ready, downloadUrl holds a 30-day presigned S3 URL.
652
- */
653
- export const meOperationsGetExport = <ThrowOnError extends boolean = false>(options: Options<MeOperationsGetExportData, ThrowOnError>): RequestResult<MeOperationsGetExportResponses, MeOperationsGetExportErrors, ThrowOnError> => (options.client ?? client).get<MeOperationsGetExportResponses, MeOperationsGetExportErrors, ThrowOnError>({
654
- security: [{ name: 'Authorization', type: 'apiKey' }],
655
- url: '/me/export/{exportId}',
656
- ...options
657
- });
658
-
659
- /**
660
- * List every message the sync path could not read, for the current user across all of their mail accounts (issue #72). Backs the quarantine section in settings. Unpaginated: the list is small by design, and an entry is a defect waiting to be reported rather than a page of mail.
661
- */
662
- export const meOperationsListQuarantine = <ThrowOnError extends boolean = false>(options?: Options<MeOperationsListQuarantineData, ThrowOnError>): RequestResult<MeOperationsListQuarantineResponses, MeOperationsListQuarantineErrors, ThrowOnError> => (options?.client ?? client).get<MeOperationsListQuarantineResponses, MeOperationsListQuarantineErrors, ThrowOnError>({
663
- security: [{ name: 'Authorization', type: 'apiKey' }],
664
- url: '/me/quarantine',
665
- ...options
666
- });
667
-
668
- /**
669
- * List wellknown senders the user has not yet promoted to VIP. Ranked by `replyCount + inboundCount` desc with `lastInboundAt` desc as the tie-breaker. Capped at 10.
670
- */
671
- export const meOperationsListVipSuggestions = <ThrowOnError extends boolean = false>(options?: Options<MeOperationsListVipSuggestionsData, ThrowOnError>): RequestResult<MeOperationsListVipSuggestionsResponses, MeOperationsListVipSuggestionsErrors, ThrowOnError> => (options?.client ?? client).get<MeOperationsListVipSuggestionsResponses, MeOperationsListVipSuggestionsErrors, ThrowOnError>({
672
- security: [{ name: 'Authorization', type: 'apiKey' }],
673
- url: '/me/vip-suggestions',
674
- ...options
675
- });
676
-
677
- /**
678
- * Copy messages to a destination mailbox
679
- */
680
- export const messageBulkOperationsCopyMessages = <ThrowOnError extends boolean = false>(options: Options<MessageBulkOperationsCopyMessagesData, ThrowOnError>): RequestResult<MessageBulkOperationsCopyMessagesResponses, MessageBulkOperationsCopyMessagesErrors, ThrowOnError> => (options.client ?? client).post<MessageBulkOperationsCopyMessagesResponses, MessageBulkOperationsCopyMessagesErrors, ThrowOnError>({
681
- security: [{ name: 'Authorization', type: 'apiKey' }],
682
- url: '/messages/copy',
683
- ...options,
684
- headers: {
685
- 'Content-Type': 'application/json',
686
- ...options.headers
687
- }
688
- });
689
-
690
- /**
691
- * Delete messages (move to Trash or permanent delete)
692
- */
693
- export const messageBulkOperationsDeleteMessages = <ThrowOnError extends boolean = false>(options: Options<MessageBulkOperationsDeleteMessagesData, ThrowOnError>): RequestResult<MessageBulkOperationsDeleteMessagesResponses, MessageBulkOperationsDeleteMessagesErrors, ThrowOnError> => (options.client ?? client).post<MessageBulkOperationsDeleteMessagesResponses, MessageBulkOperationsDeleteMessagesErrors, ThrowOnError>({
694
- security: [{ name: 'Authorization', type: 'apiKey' }],
695
- url: '/messages/delete',
696
- ...options,
697
- headers: {
698
- 'Content-Type': 'application/json',
699
- ...options.headers
700
- }
701
- });
702
-
703
- /**
704
- * Update flags on multiple messages
705
- */
706
- export const messageBulkOperationsUpdateFlags = <ThrowOnError extends boolean = false>(options: Options<MessageBulkOperationsUpdateFlagsData, ThrowOnError>): RequestResult<MessageBulkOperationsUpdateFlagsResponses, MessageBulkOperationsUpdateFlagsErrors, ThrowOnError> => (options.client ?? client).post<MessageBulkOperationsUpdateFlagsResponses, MessageBulkOperationsUpdateFlagsErrors, ThrowOnError>({
707
- security: [{ name: 'Authorization', type: 'apiKey' }],
708
- url: '/messages/flags',
709
- ...options,
710
- headers: {
711
- 'Content-Type': 'application/json',
712
- ...options.headers
713
- }
714
- });
715
-
716
- /**
717
- * Apply or remove a label on multiple messages — the manual "just these" scope (RFC 034 recap, issue #26). `appliedByFilterId` stays absent on the resulting `MessageLabel` rows; that provenance is reserved for filter/organize applies.
718
- */
719
- export const messageBulkOperationsUpdateMessageLabels = <ThrowOnError extends boolean = false>(options: Options<MessageBulkOperationsUpdateMessageLabelsData, ThrowOnError>): RequestResult<MessageBulkOperationsUpdateMessageLabelsResponses, MessageBulkOperationsUpdateMessageLabelsErrors, ThrowOnError> => (options.client ?? client).post<MessageBulkOperationsUpdateMessageLabelsResponses, MessageBulkOperationsUpdateMessageLabelsErrors, ThrowOnError>({
720
- security: [{ name: 'Authorization', type: 'apiKey' }],
721
- url: '/messages/labels',
722
- ...options,
723
- headers: {
724
- 'Content-Type': 'application/json',
725
- ...options.headers
726
- }
727
- });
728
-
729
- export const messageBulkOperationsMoveMessages = <ThrowOnError extends boolean = false>(options: Options<MessageBulkOperationsMoveMessagesData, ThrowOnError>): RequestResult<MessageBulkOperationsMoveMessagesResponses, MessageBulkOperationsMoveMessagesErrors, ThrowOnError> => (options.client ?? client).post<MessageBulkOperationsMoveMessagesResponses, MessageBulkOperationsMoveMessagesErrors, ThrowOnError>({
730
- security: [{ name: 'Authorization', type: 'apiKey' }],
731
- url: '/messages/move',
732
- ...options,
733
- headers: {
734
- 'Content-Type': 'application/json',
735
- ...options.headers
736
- }
737
- });
738
-
739
- /**
740
- * Undo a spam report: clear the sender's `blocked` flag (never promotes to trusted/wellknown) and move each message back to `Message.originalMailboxId`. Idempotent under a repeated call. Each message is processed independently and concurrently, so the request's total wait is bounded by one message's settle timeout rather than accumulating across the batch.
741
- */
742
- export const messageBulkOperationsNotSpam = <ThrowOnError extends boolean = false>(options: Options<MessageBulkOperationsNotSpamData, ThrowOnError>): RequestResult<MessageBulkOperationsNotSpamResponses, MessageBulkOperationsNotSpamErrors, ThrowOnError> => (options.client ?? client).post<MessageBulkOperationsNotSpamResponses, MessageBulkOperationsNotSpamErrors, ThrowOnError>({
743
- security: [{ name: 'Authorization', type: 'apiKey' }],
744
- url: '/messages/not-spam',
745
- ...options,
746
- headers: {
747
- 'Content-Type': 'application/json',
748
- ...options.headers
749
- }
750
- });
751
-
752
- /**
753
- * Report messages as spam: block the sender (Address.flags.blocked) and move each message to the account's Junk folder. Skips the block (but still moves the message) when the sender is the account's own address. One call replaces composing the old separate `Block` and `Mark spam` actions — a single user intent, a single failure story. The sender block is written first and does not wait on the move; a failed move never rolls it back. Idempotent under a repeated call.
754
- */
755
- export const messageBulkOperationsReportSpam = <ThrowOnError extends boolean = false>(options: Options<MessageBulkOperationsReportSpamData, ThrowOnError>): RequestResult<MessageBulkOperationsReportSpamResponses, MessageBulkOperationsReportSpamErrors, ThrowOnError> => (options.client ?? client).post<MessageBulkOperationsReportSpamResponses, MessageBulkOperationsReportSpamErrors, ThrowOnError>({
756
- security: [{ name: 'Authorization', type: 'apiKey' }],
757
- url: '/messages/report-spam',
758
- ...options,
759
- headers: {
760
- 'Content-Type': 'application/json',
761
- ...options.headers
762
- }
763
- });
764
-
765
- export const messageOperationsDescribeMessage = <ThrowOnError extends boolean = false>(options: Options<MessageOperationsDescribeMessageData, ThrowOnError>): RequestResult<MessageOperationsDescribeMessageResponses, MessageOperationsDescribeMessageErrors, ThrowOnError> => (options.client ?? client).get<MessageOperationsDescribeMessageResponses, MessageOperationsDescribeMessageErrors, ThrowOnError>({
766
- security: [{ name: 'Authorization', type: 'apiKey' }],
767
- url: '/messages/{messageId}',
768
- ...options
769
- });
770
-
771
- /**
772
- * Every suggestion read out of one message, in whatever state each has reached — a superseded revision included, so the card can say which revision replaced it.
773
- */
774
- export const messageCalendarSuggestionOperationsListMessageCalendarSuggestions = <ThrowOnError extends boolean = false>(options: Options<MessageCalendarSuggestionOperationsListMessageCalendarSuggestionsData, ThrowOnError>): RequestResult<MessageCalendarSuggestionOperationsListMessageCalendarSuggestionsResponses, MessageCalendarSuggestionOperationsListMessageCalendarSuggestionsErrors, ThrowOnError> => (options.client ?? client).get<MessageCalendarSuggestionOperationsListMessageCalendarSuggestionsResponses, MessageCalendarSuggestionOperationsListMessageCalendarSuggestionsErrors, ThrowOnError>({
775
- security: [{ name: 'Authorization', type: 'apiKey' }],
776
- url: '/messages/{messageId}/calendar-suggestions',
777
- ...options
778
- });
779
-
780
- export const messageOperationsUpdateMessageFlags = <ThrowOnError extends boolean = false>(options: Options<MessageOperationsUpdateMessageFlagsData, ThrowOnError>): RequestResult<MessageOperationsUpdateMessageFlagsResponses, MessageOperationsUpdateMessageFlagsErrors, ThrowOnError> => (options.client ?? client).patch<MessageOperationsUpdateMessageFlagsResponses, MessageOperationsUpdateMessageFlagsErrors, ThrowOnError>({
781
- security: [{ name: 'Authorization', type: 'apiKey' }],
782
- url: '/messages/{messageId}/flags',
783
- ...options,
784
- headers: {
785
- 'Content-Type': 'application/json',
786
- ...options.headers
787
- }
788
- });
789
-
790
- /**
791
- * Get the raw RFC822/MIME source of a message (headers and body) for inspection.
792
- */
793
- export const messageOperationsGetRawMessage = <ThrowOnError extends boolean = false>(options: Options<MessageOperationsGetRawMessageData, ThrowOnError>): RequestResult<MessageOperationsGetRawMessageResponses, MessageOperationsGetRawMessageErrors, ThrowOnError> => (options.client ?? client).get<MessageOperationsGetRawMessageResponses, MessageOperationsGetRawMessageErrors, ThrowOnError>({
794
- security: [{ name: 'Authorization', type: 'apiKey' }],
795
- url: '/messages/{messageId}/raw',
796
- ...options
797
- });
798
-
799
- /**
800
- * List outbox messages for the current account
801
- */
802
- export const outboxOperationsListOutboxMessages = <ThrowOnError extends boolean = false>(options?: Options<OutboxOperationsListOutboxMessagesData, ThrowOnError>): RequestResult<OutboxOperationsListOutboxMessagesResponses, OutboxOperationsListOutboxMessagesErrors, ThrowOnError> => (options?.client ?? client).get<OutboxOperationsListOutboxMessagesResponses, OutboxOperationsListOutboxMessagesErrors, ThrowOnError>({
803
- security: [{ name: 'Authorization', type: 'apiKey' }],
804
- url: '/outbox',
805
- ...options
806
- });
807
-
808
- /**
809
- * Create a new outbox message (draft or send immediately). A send-immediately create from an account whose syncedServices leave out Mail is refused with 400 `mail_sync_off`.
810
- */
811
- export const outboxOperationsCreateOutboxMessage = <ThrowOnError extends boolean = false>(options: Options<OutboxOperationsCreateOutboxMessageData, ThrowOnError>): RequestResult<OutboxOperationsCreateOutboxMessageResponses, OutboxOperationsCreateOutboxMessageErrors, ThrowOnError> => (options.client ?? client).post<OutboxOperationsCreateOutboxMessageResponses, OutboxOperationsCreateOutboxMessageErrors, ThrowOnError>({
812
- security: [{ name: 'Authorization', type: 'apiKey' }],
813
- url: '/outbox',
814
- ...options,
815
- headers: {
816
- 'Content-Type': 'application/json',
817
- ...options.headers
818
- }
819
- });
820
-
821
- /**
822
- * Delete a draft or failed outbox message
823
- */
824
- export const outboxDetailOperationsDeleteOutboxMessage = <ThrowOnError extends boolean = false>(options: Options<OutboxDetailOperationsDeleteOutboxMessageData, ThrowOnError>): RequestResult<OutboxDetailOperationsDeleteOutboxMessageResponses, OutboxDetailOperationsDeleteOutboxMessageErrors, ThrowOnError> => (options.client ?? client).delete<OutboxDetailOperationsDeleteOutboxMessageResponses, OutboxDetailOperationsDeleteOutboxMessageErrors, ThrowOnError>({
825
- security: [{ name: 'Authorization', type: 'apiKey' }],
826
- url: '/outbox/{outboxMessageId}',
827
- ...options
828
- });
829
-
830
- /**
831
- * Get an outbox message by ID
832
- */
833
- export const outboxDetailOperationsGetOutboxMessage = <ThrowOnError extends boolean = false>(options: Options<OutboxDetailOperationsGetOutboxMessageData, ThrowOnError>): RequestResult<OutboxDetailOperationsGetOutboxMessageResponses, OutboxDetailOperationsGetOutboxMessageErrors, ThrowOnError> => (options.client ?? client).get<OutboxDetailOperationsGetOutboxMessageResponses, OutboxDetailOperationsGetOutboxMessageErrors, ThrowOnError>({
834
- security: [{ name: 'Authorization', type: 'apiKey' }],
835
- url: '/outbox/{outboxMessageId}',
836
- ...options
837
- });
838
-
839
- /**
840
- * Update a draft outbox message
841
- */
842
- export const outboxDetailOperationsUpdateOutboxMessage = <ThrowOnError extends boolean = false>(options: Options<OutboxDetailOperationsUpdateOutboxMessageData, ThrowOnError>): RequestResult<OutboxDetailOperationsUpdateOutboxMessageResponses, OutboxDetailOperationsUpdateOutboxMessageErrors, ThrowOnError> => (options.client ?? client).patch<OutboxDetailOperationsUpdateOutboxMessageResponses, OutboxDetailOperationsUpdateOutboxMessageErrors, ThrowOnError>({
843
- security: [{ name: 'Authorization', type: 'apiKey' }],
844
- url: '/outbox/{outboxMessageId}',
845
- ...options,
846
- headers: {
847
- 'Content-Type': 'application/json',
848
- ...options.headers
849
- }
850
- });
851
-
852
- /**
853
- * Reserve room on a draft for a file, and get somewhere to put it
854
- */
855
- export const outboxDetailOperationsMintOutboxAttachment = <ThrowOnError extends boolean = false>(options: Options<OutboxDetailOperationsMintOutboxAttachmentData, ThrowOnError>): RequestResult<OutboxDetailOperationsMintOutboxAttachmentResponses, OutboxDetailOperationsMintOutboxAttachmentErrors, ThrowOnError> => (options.client ?? client).post<OutboxDetailOperationsMintOutboxAttachmentResponses, OutboxDetailOperationsMintOutboxAttachmentErrors, ThrowOnError>({
856
- security: [{ name: 'Authorization', type: 'apiKey' }],
857
- url: '/outbox/{outboxMessageId}/attachments',
858
- ...options,
859
- headers: {
860
- 'Content-Type': 'application/json',
861
- ...options.headers
862
- }
863
- });
864
-
865
- /**
866
- * Confirm an uploaded file against the object storage now holds
867
- */
868
- export const outboxAttachmentOperationsCompleteOutboxAttachment = <ThrowOnError extends boolean = false>(options: Options<OutboxAttachmentOperationsCompleteOutboxAttachmentData, ThrowOnError>): RequestResult<OutboxAttachmentOperationsCompleteOutboxAttachmentResponses, OutboxAttachmentOperationsCompleteOutboxAttachmentErrors, ThrowOnError> => (options.client ?? client).post<OutboxAttachmentOperationsCompleteOutboxAttachmentResponses, OutboxAttachmentOperationsCompleteOutboxAttachmentErrors, ThrowOnError>({
869
- security: [{ name: 'Authorization', type: 'apiKey' }],
870
- url: '/outbox/{outboxMessageId}/attachments/{outboxAttachmentId}/complete',
871
- ...options
872
- });
873
-
874
- /**
875
- * Queue a draft message for sending. A draft on an account whose syncedServices leave out Mail is refused with 400 `mail_sync_off`, and stays a draft.
876
- */
877
- export const outboxDetailOperationsSendOutboxMessage = <ThrowOnError extends boolean = false>(options: Options<OutboxDetailOperationsSendOutboxMessageData, ThrowOnError>): RequestResult<OutboxDetailOperationsSendOutboxMessageResponses, OutboxDetailOperationsSendOutboxMessageErrors, ThrowOnError> => (options.client ?? client).post<OutboxDetailOperationsSendOutboxMessageResponses, OutboxDetailOperationsSendOutboxMessageErrors, ThrowOnError>({
878
- security: [{ name: 'Authorization', type: 'apiKey' }],
879
- url: '/outbox/{outboxMessageId}/send',
880
- ...options
881
- });
882
-
883
- /**
884
- * Read the self-update resource: the running version, the outcome of the most recent manifest check, and the state of the current or last run. With `refresh=true`, records a check request on the control volume for the updater to pick up and answers with the stored state as it stands; the caller watches `check.lastCheckedAt` for the updater's answer. Owner-only, and absent (404) unless a manifest URL is configured (RFC 037 D7, D8).
885
- */
886
- export const systemOperationsGetSystemUpdate = <ThrowOnError extends boolean = false>(options?: Options<SystemOperationsGetSystemUpdateData, ThrowOnError>): RequestResult<SystemOperationsGetSystemUpdateResponses, SystemOperationsGetSystemUpdateErrors, ThrowOnError> => (options?.client ?? client).get<SystemOperationsGetSystemUpdateResponses, SystemOperationsGetSystemUpdateErrors, ThrowOnError>({
887
- security: [{ name: 'Authorization', type: 'apiKey' }],
888
- url: '/system/update',
889
- ...options
890
- });
891
-
892
- /**
893
- * Request installation of a specific release. Writes the request to the control seam and returns 202 with the same resource, including a runId. 409 when a run is in flight, 422 when the target is not the manifest's version. Owner-only, and absent (404) unless a manifest URL is configured (RFC 037 D7, D8).
894
- */
895
- export const systemOperationsApplySystemUpdate = <ThrowOnError extends boolean = false>(options: Options<SystemOperationsApplySystemUpdateData, ThrowOnError>): RequestResult<SystemOperationsApplySystemUpdateResponses, SystemOperationsApplySystemUpdateErrors, ThrowOnError> => (options.client ?? client).post<SystemOperationsApplySystemUpdateResponses, SystemOperationsApplySystemUpdateErrors, ThrowOnError>({
896
- security: [{ name: 'Authorization', type: 'apiKey' }],
897
- url: '/system/update',
898
- ...options,
899
- headers: {
900
- 'Content-Type': 'application/json',
901
- ...options.headers
902
- }
903
- });
904
-
905
- /**
906
- * 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.
907
- *
908
- * 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.
909
- *
910
- * Mute exclusion: muted accounts and muted mailboxes are excluded. The inbox/mute filter set is rebuilt per page from live state, so muting/unmuting a mailbox mid-pagination takes effect on the next page (never retroactively).
911
- *
912
- * Pagination: pass the returned `continuationToken` to fetch the next page; keep paging until it is absent. In the default (INBOX) mode the INBOX/deleted filter is applied after the index read with a bounded read window per request, so a page may return FEWER than `limit` rows while still carrying a `continuationToken` — treat the presence of the token (not a full page) as the "more results" signal. No rows are skipped or duplicated across pages.
913
- *
914
- * 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.
915
- *
916
- * 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.
917
- *
918
- * 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.
919
- *
920
- * Search scope: every non-muted mailbox EXCEPT Trash. The scope is defined by what it excludes, so anything a server offers that is not on that list is searched — Spam, Drafts and Gmail's virtual folders (All Mail, Starred, Important) included. Spam is deliberately in scope: the point of an unscoped search is that it reaches the folders the user did not think to look in. Combining `query` with `starred=true` searches the starred scope instead.
921
- *
922
- * Duplicates: a virtual folder holds a second copy of mail that also lives in a real folder, so a backend keying a row by its mailbox returns the same message several times — a starred, Important Gmail inbox message four times. The extras are dropped from the response by message identity, keeping the copy in a real folder, so one message is one row. This is done after the read rather than by barring those folders from the scope, because a message whose only stored row sits in one of them would otherwise become unfindable. De-duplication is per page: a duplicate split across a page boundary survives, the same caveat that applies to collapsing by `threadId`. A page may therefore return fewer rows than `limit` while still carrying a `continuationToken`.
923
- *
924
- * Search mode and pagination: `limit` is a page size over MATCHES, capped server-side at 500. A page may be shorter than `limit` for two reasons — the matches ran out, or duplicates were dropped from it — so treat the presence of a `continuationToken` as the "more results" signal rather than a full page. There is no total match count; page until the token is absent.
925
- *
926
- * 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.
927
- *
928
- * Callers that omit `query` are unaffected: the INBOX (and starred) listings behave exactly as before.
929
- *
930
- * 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).
931
- *
932
- * Field filters: `from` and `subject` each match one field, which the single `query` cannot express — it matches both at once. They compose with `query` and with each other as further AND terms.
933
- *
934
- * Account scope: `accountId` narrows every mode to the mailboxes of one account. The scope is built from the account's own mailboxes, so the listing, the count and the search all answer over the same set. Without it the listing is the cross-account aggregate.
935
- *
936
- * Folder scope: `mailboxId` narrows the same scope to one folder, and composes with `accountId` as a further AND — a folder of another account leaves the scope empty and matches nothing. It is how a caller asks what one folder holds of a cross-account search, counted in the same conversations the unscoped listing renders. A folder the scope already excludes — Trash, a muted one, one of a muted account — stays excluded.
937
- *
938
- * Muted senders: `muted=false` excludes rows whose From address is muted, `muted=true` returns only those, and omitting it filters nothing. Muting is a property of the address rather than a column on the row, so this is the one predicate that reaches outside the ThreadMessage table; it applies to the listing and the `count` alike, which is what lets a caller that hides muted mail state a number that is the size of what it renders.
939
- *
940
- * 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.
941
- */
942
- export const unifiedThreadOperationsListAllThreads = <ThrowOnError extends boolean = false>(options?: Options<UnifiedThreadOperationsListAllThreadsData, ThrowOnError>): RequestResult<UnifiedThreadOperationsListAllThreadsResponses, UnifiedThreadOperationsListAllThreadsErrors, ThrowOnError> => (options?.client ?? client).get<UnifiedThreadOperationsListAllThreadsResponses, UnifiedThreadOperationsListAllThreadsErrors, ThrowOnError>({
943
- security: [{ name: 'Authorization', type: 'apiKey' }],
944
- url: '/threads',
945
- ...options
946
- });
947
-
948
- /**
949
- * Get all messages in a thread, across every mailbox of the account — a conversation spans INBOX, Sent, Archive and any folder the user filed a message in, so it is never scoped to one mailbox. Soft-deleted messages (including anything moved to Trash) are excluded.
950
- *
951
- * One entry per piece of mail. A message synced from several folders is stored once, and where a second row exists for the same Message-ID — a copy taken with `copyMessages`, which gives its copy a fresh message id — the oldest is returned and the rest are dropped.
952
- *
953
- * Ordering: oldest first, by the date the message was sent, with `threadMessageId` breaking ties. A conversation is read in the order it happened, so a reply always follows the message it answers. Pass `order=desc` for the reverse.
954
- */
955
- export const threadDetailOperationsListThreadMessages = <ThrowOnError extends boolean = false>(options: Options<ThreadDetailOperationsListThreadMessagesData, ThrowOnError>): RequestResult<ThreadDetailOperationsListThreadMessagesResponses, ThreadDetailOperationsListThreadMessagesErrors, ThrowOnError> => (options.client ?? client).get<ThreadDetailOperationsListThreadMessagesResponses, ThreadDetailOperationsListThreadMessagesErrors, ThrowOnError>({
956
- security: [{ name: 'Authorization', type: 'apiKey' }],
957
- url: '/threads/{threadId}/messages',
958
- ...options
959
- });