@omelhorsite/sdk 0.5.1 → 0.11.0

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.
@@ -1,13 +1,14 @@
1
1
  /**
2
2
  * The `account` namespace: the signed-in user, other users' public profiles,
3
- * the usage report behind the quota bars, and the sessions a credential can
4
- * see.
3
+ * the usage report behind the quota bars, the sessions a credential can see,
4
+ * and which notifications reach the app and the mailbox.
5
5
  *
6
6
  * `GET /account` is the canonical "who am I" call and the cheapest way to check
7
7
  * that a stored credential is still alive.
8
8
  */
9
9
  import { type ApiClient, Resource } from "../http";
10
10
  import type { ListParams } from "../listing";
11
+ import type { NotificationCategory, NotificationKind } from "./content/notifications";
11
12
  import type { BaseRecord, FileInput, Id, Paginated, RequestOptions, Timestamp } from "../types";
12
13
  /**
13
14
  * A user as the API renders them.
@@ -240,10 +241,75 @@ export declare class AccountSessionsNamespace extends Resource {
240
241
  */
241
242
  revoke(id: Id, options?: RequestOptions): Promise<void>;
242
243
  }
244
+ /** How one notification kind reaches the user. */
245
+ export interface NotificationPreferenceEntry {
246
+ readonly kind: NotificationKind;
247
+ readonly category: NotificationCategory;
248
+ /** Whether the kind shows in the inbox and counts as unread. */
249
+ readonly in_app: boolean;
250
+ /** Whether the kind is also emailed, subject to the master switch. */
251
+ readonly email: boolean;
252
+ /** `true` for the security kinds: `email` cannot be turned off, and asking is a 422. */
253
+ readonly email_locked: boolean;
254
+ /**
255
+ * Minutes the server waits so that several notifications of this kind
256
+ * become one email. `null` sends each one on its own.
257
+ */
258
+ readonly coalesce_minutes: number | null;
259
+ }
260
+ /** The whole notification setup of the signed-in user. */
261
+ export interface NotificationPreferences {
262
+ /**
263
+ * The master switch. `false` stops every notification email, locked kinds
264
+ * included; it is what the unsubscribe link in an email flips.
265
+ */
266
+ readonly emails_enabled: boolean;
267
+ /** Every kind the server knows, in presentation order, defaults filled in. */
268
+ readonly kinds: NotificationPreferenceEntry[];
269
+ }
270
+ /**
271
+ * Changes to {@link NotificationPreferences}. Everything is optional: pass
272
+ * only what moves, and only the kinds that move.
273
+ */
274
+ export interface UpdateNotificationPreferencesInput {
275
+ readonly emailsEnabled?: boolean;
276
+ readonly kinds?: Partial<Record<NotificationKind, {
277
+ readonly inApp?: boolean;
278
+ readonly email?: boolean;
279
+ }>>;
280
+ }
281
+ /**
282
+ * Notification preferences of the signed-in user, reachable as
283
+ * `oms.account.notificationPreferences`.
284
+ *
285
+ * A notification is always recorded; these settings decide where it goes.
286
+ * `in_app: false` keeps a kind out of the inbox, the unread count and the
287
+ * live feed. `email: true` sends it by email as well, provided the master
288
+ * switch is on and the account's address is verified.
289
+ *
290
+ * Needs a session.
291
+ */
292
+ export declare class NotificationPreferencesNamespace extends Resource {
293
+ /**
294
+ * `GET /notification_preferences` - every kind, in presentation order,
295
+ * with the server's defaults where nothing was set yet.
296
+ */
297
+ get(options?: RequestOptions): Promise<NotificationPreferences>;
298
+ /**
299
+ * `PATCH /notification_preferences` - flips the master switch and/or the
300
+ * settings of single kinds, and answers the full set like {@link get}.
301
+ *
302
+ * @throws {OmsApiError} 422 for `email: false` on a kind whose
303
+ * `email_locked` is `true`, and for a kind the server does not know.
304
+ */
305
+ update(input: UpdateNotificationPreferencesInput, options?: RequestOptions): Promise<NotificationPreferences>;
306
+ }
243
307
  /** The `account` namespace, reachable as `oms.account`. */
244
308
  export declare class AccountNamespace extends Resource {
245
309
  /** Sessions: listing, relabelling, and ending the current one. */
246
310
  readonly sessions: AccountSessionsNamespace;
311
+ /** Which notification kinds reach the inbox, and which are emailed. */
312
+ readonly notificationPreferences: NotificationPreferencesNamespace;
247
313
  constructor(http: ApiClient);
248
314
  /**
249
315
  * `GET /account` - the user the current credential belongs to.
@@ -5,6 +5,7 @@ import { AdminChestsNamespace } from "./chests";
5
5
  import { AdminEventAlertsNamespace } from "./eventAlerts";
6
6
  import { LinkedIdentitiesNamespace } from "./identities";
7
7
  import { AdminJobsNamespace } from "./jobs";
8
+ import { AdminLlmAssignmentsNamespace, AdminLlmModelsNamespace, AdminLlmProvidersNamespace, AdminLlmUsageNamespace } from "./llm";
8
9
  import { MyOauthApplicationsNamespace } from "./myOauthApplications";
9
10
  import { AdminNotepadsNamespace } from "./notepads";
10
11
  import { AdminOauthApplicationsNamespace } from "./oauthApplications";
@@ -17,6 +18,7 @@ export * from "./chests";
17
18
  export * from "./eventAlerts";
18
19
  export * from "./identities";
19
20
  export * from "./jobs";
21
+ export * from "./llm";
20
22
  export * from "./myOauthApplications";
21
23
  export * from "./notepads";
22
24
  export * from "./oauthApplications";
@@ -77,5 +79,13 @@ export declare class AdminNamespace extends Resource {
77
79
  readonly eventAlerts: AdminEventAlertsNamespace;
78
80
  /** Any account, admin-only fields included. */
79
81
  readonly users: AdminUsersNamespace;
82
+ /** Language-model providers and their keys. **Administrators only.** */
83
+ readonly llmProviders: AdminLlmProvidersNamespace;
84
+ /** The models of every provider: prices, ceilings, visibility. **Administrators only.** */
85
+ readonly llmModels: AdminLlmModelsNamespace;
86
+ /** Which models answer each feature of the site, in fallback order. **Administrators only.** */
87
+ readonly llmAssignments: AdminLlmAssignmentsNamespace;
88
+ /** Everybody's language-model usage and cost. **Administrators only.** */
89
+ readonly llmUsage: AdminLlmUsageNamespace;
80
90
  constructor(http: ConstructorParameters<typeof Resource>[0]);
81
91
  }
@@ -0,0 +1,247 @@
1
+ /**
2
+ * `oms.admin.llmProviders`, `oms.admin.llmModels`, `oms.admin.llmAssignments`
3
+ * and `oms.admin.llmUsage` - the language-model configuration. Administrators
4
+ * only; everything below answers `403` to anybody else.
5
+ *
6
+ * A provider is an OpenAI-compatible endpoint plus its key. A model belongs to
7
+ * one provider. An assignment says which models, in order, answer a named
8
+ * feature of the site (`"chat"`, `"translate"`, ...): the second model is the
9
+ * fallback of the first, and may sit on another provider. Usage is one record
10
+ * per call, aggregated here.
11
+ */
12
+ import { Resource } from "../../http";
13
+ import type { ListParams } from "../../listing";
14
+ import type { Id, JsonObject, Paginated, RequestOptions, Timestamp } from "../../types";
15
+ import type { LlmCapabilities, LlmLimits, LlmUsageByUser, LlmUsageQuery, LlmUsageSummary } from "../llm";
16
+ /**
17
+ * `openai_compatible` is any server speaking the OpenAI chat API (vLLM, LM
18
+ * Studio, Ollama's `/v1`, a self-hosted sidecar); `openrouter` and `ollama`
19
+ * get provider-specific error and model-list handling.
20
+ */
21
+ export declare const LLM_PROVIDER_KINDS: readonly ["openai_compatible", "openrouter", "ollama"];
22
+ export type LlmProviderKind = (typeof LLM_PROVIDER_KINDS)[number];
23
+ /**
24
+ * Provider switches. `models_param` sends the ordered fallback list in one
25
+ * request so the provider falls back itself (at most three models per
26
+ * request) - what OpenRouter expects; a local server wants it off.
27
+ */
28
+ export interface LlmProviderOptions {
29
+ readonly models_param?: boolean;
30
+ }
31
+ /** The key never comes back: `api_key_set` says whether one is stored. */
32
+ export interface LlmProvider {
33
+ readonly id: Id;
34
+ readonly created_at: Timestamp;
35
+ readonly updated_at: Timestamp;
36
+ /** Lowercase letters, digits and dashes; unique. */
37
+ readonly slug: string;
38
+ readonly name: string;
39
+ readonly kind: LlmProviderKind | string;
40
+ /** Root of the OpenAI-compatible API, without a trailing slash: `/chat/completions` is appended. */
41
+ readonly base_url: string;
42
+ /** Extra request headers, sent with every call. */
43
+ readonly headers: Record<string, string>;
44
+ readonly options: LlmProviderOptions;
45
+ readonly enabled: boolean;
46
+ /** Calls allowed in flight at once on this provider; the next one answers `503`. */
47
+ readonly max_concurrency: number;
48
+ /** Seconds. */
49
+ readonly open_timeout: number;
50
+ /** Seconds, per read: a long generation is fine while tokens keep arriving. */
51
+ readonly read_timeout: number;
52
+ readonly api_key_set: boolean;
53
+ readonly models_count: number;
54
+ }
55
+ export interface CreateLlmProviderInput {
56
+ readonly slug: string;
57
+ readonly name: string;
58
+ readonly baseUrl: string;
59
+ /** Stored encrypted; never readable again through the API. */
60
+ readonly apiKey?: string;
61
+ readonly kind?: LlmProviderKind;
62
+ readonly headers?: Record<string, string>;
63
+ readonly options?: LlmProviderOptions;
64
+ readonly enabled?: boolean;
65
+ /** 1 to 64. */
66
+ readonly maxConcurrency?: number;
67
+ /** 1 to 60 seconds. */
68
+ readonly openTimeout?: number;
69
+ /** 5 to 600 seconds. */
70
+ readonly readTimeout?: number;
71
+ }
72
+ /** Omitting `apiKey`, or sending an empty string, keeps the stored key. */
73
+ export type UpdateLlmProviderInput = Partial<CreateLlmProviderInput>;
74
+ /** Filter columns of `GET /admin/llm_providers`. */
75
+ export declare const ADMIN_LLM_PROVIDER_FILTER_COLUMNS: readonly ["slug", "name", "kind", "enabled"];
76
+ export interface ListAdminLlmProvidersParams extends ListParams<(typeof ADMIN_LLM_PROVIDER_FILTER_COLUMNS)[number]> {
77
+ }
78
+ /**
79
+ * One model the provider offers, shaped like the record it would become.
80
+ * `free` is `null` when the provider publishes no prices; `added` says whether
81
+ * it is already in the list.
82
+ */
83
+ export interface LlmAvailableModel {
84
+ readonly model_id: string;
85
+ readonly name: string;
86
+ readonly context_window: number | null;
87
+ readonly max_output_tokens: number | null;
88
+ readonly input_price_per_million: number | null;
89
+ readonly output_price_per_million: number | null;
90
+ readonly free: boolean | null;
91
+ readonly capabilities: LlmCapabilities;
92
+ readonly description: string | null;
93
+ readonly added: boolean;
94
+ }
95
+ /** Always `200`: a failed probe is `ok: false` with the reason, not an error. */
96
+ export interface LlmProviderTestResult {
97
+ readonly ok: boolean;
98
+ readonly model_id: string | null;
99
+ readonly reply?: string;
100
+ readonly latency_ms?: number;
101
+ readonly error?: string;
102
+ }
103
+ export interface TestLlmProviderInput {
104
+ /** A `model_id` of that provider; defaults to its first enabled model. */
105
+ readonly modelId?: string;
106
+ }
107
+ /** Prices are per million tokens, `null` when unknown. */
108
+ export interface LlmModel {
109
+ readonly id: Id;
110
+ readonly created_at: Timestamp;
111
+ readonly updated_at: Timestamp;
112
+ readonly llm_provider_id: Id;
113
+ readonly provider_slug: string | null;
114
+ /** The provider's own identifier; unique per provider. */
115
+ readonly model_id: string;
116
+ readonly name: string;
117
+ readonly enabled: boolean;
118
+ /** Whether signed-in people may pick it (see `oms.llm.models`). */
119
+ readonly visible_in_chat: boolean;
120
+ readonly context_window: number | null;
121
+ readonly max_output_tokens: number | null;
122
+ readonly input_price_per_million: number | null;
123
+ readonly output_price_per_million: number | null;
124
+ readonly free: boolean;
125
+ readonly capabilities: LlmCapabilities;
126
+ readonly limits: LlmLimits;
127
+ readonly metadata: JsonObject;
128
+ /** Enabled, on an enabled provider. */
129
+ readonly usable: boolean;
130
+ }
131
+ export interface CreateLlmModelInput {
132
+ readonly llmProviderId: Id;
133
+ readonly modelId: string;
134
+ readonly name: string;
135
+ readonly enabled?: boolean;
136
+ readonly visibleInChat?: boolean;
137
+ readonly contextWindow?: number | null;
138
+ readonly maxOutputTokens?: number | null;
139
+ readonly inputPricePerMillion?: number | null;
140
+ readonly outputPricePerMillion?: number | null;
141
+ readonly free?: boolean;
142
+ readonly capabilities?: LlmCapabilities;
143
+ readonly limits?: LlmLimits;
144
+ }
145
+ /** The provider and the `model_id` are fixed after creation. */
146
+ export type UpdateLlmModelInput = Partial<Omit<CreateLlmModelInput, "llmProviderId" | "modelId">>;
147
+ /** Filter columns of `GET /admin/llm_models`. */
148
+ export declare const ADMIN_LLM_MODEL_FILTER_COLUMNS: readonly ["llm_provider_id", "model_id", "name", "enabled", "visible_in_chat", "free"];
149
+ export interface ListAdminLlmModelsParams extends ListParams<(typeof ADMIN_LLM_MODEL_FILTER_COLUMNS)[number]> {
150
+ }
151
+ /**
152
+ * Defaults a feature applies when the call does not say otherwise.
153
+ * `reasoning` is the request's `reasoning` object (e.g. `{ enabled: false }`:
154
+ * a reasoning model otherwise spends the whole token budget thinking and
155
+ * answers nothing). `num_ctx` goes to the provider verbatim (Ollama's context
156
+ * size). `prefer_free` puts the provider's free models in front of the list.
157
+ */
158
+ export interface LlmAssignmentOptions {
159
+ readonly temperature?: number;
160
+ readonly max_tokens?: number;
161
+ readonly reasoning?: JsonObject;
162
+ readonly num_ctx?: number;
163
+ readonly prefer_free?: boolean;
164
+ }
165
+ export interface LlmAssignmentModelRef {
166
+ readonly id: Id;
167
+ readonly model_id: string;
168
+ readonly name: string;
169
+ readonly provider_slug: string | null;
170
+ readonly usable: boolean;
171
+ readonly free: boolean;
172
+ }
173
+ /** A feature of the site and the ordered models that answer it. */
174
+ export interface LlmAssignment {
175
+ readonly id: Id;
176
+ readonly created_at: Timestamp;
177
+ readonly updated_at: Timestamp;
178
+ /** Lowercase letters, digits and underscores; unique. `"default"` answers features without one of their own. */
179
+ readonly feature: string;
180
+ /** Ordered: the second is the fallback of the first. */
181
+ readonly llm_model_ids: Id[];
182
+ readonly options: LlmAssignmentOptions;
183
+ /** Human description for the features the site knows; `null` for a custom one. */
184
+ readonly description: string | null;
185
+ /** `llm_model_ids` resolved, in the same order. */
186
+ readonly models: LlmAssignmentModelRef[];
187
+ }
188
+ /** One feature the site calls by name. */
189
+ export interface LlmFeature {
190
+ readonly feature: string;
191
+ readonly description: string;
192
+ }
193
+ export interface CreateLlmAssignmentInput {
194
+ readonly feature: string;
195
+ readonly llmModelIds: readonly Id[];
196
+ readonly options?: LlmAssignmentOptions;
197
+ }
198
+ export interface UpdateLlmAssignmentInput {
199
+ readonly llmModelIds?: readonly Id[];
200
+ readonly options?: LlmAssignmentOptions;
201
+ }
202
+ /** Filter columns of `GET /admin/llm_assignments`. */
203
+ export declare const ADMIN_LLM_ASSIGNMENT_FILTER_COLUMNS: readonly ["feature"];
204
+ export interface ListAdminLlmAssignmentsParams extends ListParams<(typeof ADMIN_LLM_ASSIGNMENT_FILTER_COLUMNS)[number]> {
205
+ }
206
+ /** Everybody's usage: {@link LlmUsageSummary} plus the top twenty people by cost. */
207
+ export interface LlmAdminUsageSummary extends LlmUsageSummary {
208
+ readonly by_user: LlmUsageByUser[];
209
+ }
210
+ export declare class AdminLlmProvidersNamespace extends Resource {
211
+ list(params?: ListAdminLlmProvidersParams, options?: RequestOptions): Promise<Paginated<LlmProvider>>;
212
+ get(id: Id, options?: RequestOptions): Promise<LlmProvider>;
213
+ create(input: CreateLlmProviderInput, options?: RequestOptions): Promise<LlmProvider>;
214
+ update(id: Id, input: UpdateLlmProviderInput, options?: RequestOptions): Promise<LlmProvider>;
215
+ /** Also deletes its models and drops it from every assignment. */
216
+ delete(id: Id, options?: RequestOptions): Promise<void>;
217
+ /**
218
+ * What the provider lists in its `/models`, without storing any of it: the
219
+ * model list is curated by hand and this is the menu to pick from. Cached
220
+ * for ten minutes; `fresh` skips the cache. `502` when the provider does
221
+ * not answer.
222
+ */
223
+ availableModels(id: Id, input?: {
224
+ fresh?: boolean;
225
+ }, options?: RequestOptions): Promise<LlmAvailableModel[]>;
226
+ /** One tiny completion, to check the key, the URL and a model. */
227
+ test(id: Id, input?: TestLlmProviderInput, options?: RequestOptions): Promise<LlmProviderTestResult>;
228
+ }
229
+ export declare class AdminLlmModelsNamespace extends Resource {
230
+ list(params?: ListAdminLlmModelsParams, options?: RequestOptions): Promise<Paginated<LlmModel>>;
231
+ get(id: Id, options?: RequestOptions): Promise<LlmModel>;
232
+ create(input: CreateLlmModelInput, options?: RequestOptions): Promise<LlmModel>;
233
+ update(id: Id, input: UpdateLlmModelInput, options?: RequestOptions): Promise<LlmModel>;
234
+ delete(id: Id, options?: RequestOptions): Promise<void>;
235
+ }
236
+ export declare class AdminLlmAssignmentsNamespace extends Resource {
237
+ list(params?: ListAdminLlmAssignmentsParams, options?: RequestOptions): Promise<Paginated<LlmAssignment>>;
238
+ get(id: Id, options?: RequestOptions): Promise<LlmAssignment>;
239
+ create(input: CreateLlmAssignmentInput, options?: RequestOptions): Promise<LlmAssignment>;
240
+ update(id: Id, input: UpdateLlmAssignmentInput, options?: RequestOptions): Promise<LlmAssignment>;
241
+ delete(id: Id, options?: RequestOptions): Promise<void>;
242
+ /** The features the site calls by name, with a description each. Any other slug is accepted too. */
243
+ features(options?: RequestOptions): Promise<LlmFeature[]>;
244
+ }
245
+ export declare class AdminLlmUsageNamespace extends Resource {
246
+ summary(input?: LlmUsageQuery, options?: RequestOptions): Promise<LlmAdminUsageSummary>;
247
+ }
@@ -90,8 +90,8 @@ export interface CreateOauthApplicationInput {
90
90
  * and a redirect URI pointing at something an attacker controls IS account
91
91
  * takeover - PKCE does not help, it binds the code to the client that started
92
92
  * the flow, not to where the code is delivered. The server refuses anything
93
- * that is not `https`, not loopback `http`, carries userinfo, carries a
94
- * wildcard host or has no host at all, and it does so with a `422`
93
+ * that is not `http` or `https`, carries userinfo, carries a wildcard host
94
+ * or has no host at all, and it does so with a `422`
95
95
  * (`validation_failed`) rather than by quietly rewriting your value.
96
96
  */
97
97
  readonly redirect_uri?: string;
@@ -8,19 +8,29 @@ export declare const NOTIFICATION_FILTER_COLUMNS: readonly ["user_id"];
8
8
  export type ListNotificationsParams = ListParams<(typeof NOTIFICATION_FILTER_COLUMNS)[number]>;
9
9
  /** Primary key of a notification. An INTEGER. */
10
10
  export type NotificationId = number;
11
+ /** Every notification category, in presentation order. */
12
+ export declare const NOTIFICATION_CATEGORIES: readonly ["security", "social", "storage", "tools", "music", "library", "forms", "tickets", "intel", "oauth", "admin"];
13
+ /** One of {@link NOTIFICATION_CATEGORIES}. */
14
+ export type NotificationCategory = (typeof NOTIFICATION_CATEGORIES)[number];
11
15
  /**
12
- * The `kind` strings the backend emits today.
16
+ * Every notification kind the server emits, grouped by category and in the
17
+ * order a preferences screen shows them (the same order
18
+ * {@link NotificationPreferences.kinds} comes back in).
13
19
  *
14
- * NOT a closed set and not validated anywhere - `Notification` only requires
15
- * `kind` to be present, so a new feature can add one without a migration. The
16
- * union is here so the kinds you handle autocomplete; keep a default branch
17
- * for the ones you do not, and never let an unknown kind break the inbox.
20
+ * `admin_*` kinds only ever reach administrators. The `_done` / `_failed`
21
+ * pairs of the media tools only reach the account that started the job.
22
+ */
23
+ export declare const NOTIFICATION_KINDS: readonly ["security_new_session", "security_password_changed", "security_email_changed", "security_passkey_added", "security_app_authorized", "friendship_request", "friendship_accepted", "user_followed", "message_received", "group_chat_message", "jam_invite", "fs_grant_received", "chest_expires_soon", "vocal_separation_done", "vocal_separation_failed", "transcription_done", "transcription_failed", "upscale_done", "upscale_failed", "background_removal_done", "background_removal_failed", "caption_job_done", "caption_job_failed", "jumpstyle_job_done", "jumpstyle_job_failed", "song_import_done", "song_import_failed", "spotify_sync_done", "spotify_sync_failed", "artist_import_done", "blog_new_post", "form_submission_received", "ticket_reply", "ticket_status_changed", "intel_report_ready", "intel_source_failing", "oauth_application_approved", "oauth_application_rejected", "admin_oauth_application_submitted", "admin_ticket_created", "admin_feedback_received"];
24
+ /**
25
+ * One of {@link NOTIFICATION_KINDS}.
18
26
  *
19
27
  * Each kind implies a different {@link Notification.context} shape, which is
20
- * why `context` is typed as an open record rather than a discriminated union:
21
- * the backend guarantees a JSON object and nothing about its keys.
28
+ * why `context` is typed as an open record rather than a discriminated union.
29
+ * A server newer than this package may emit a kind that is not listed here,
30
+ * so keep a default branch when switching on it and never let an unknown
31
+ * kind break the inbox.
22
32
  */
23
- export type NotificationKind = "friendship_request" | "friendship_accepted" | "user_followed" | "message_received" | "fs_grant_received" | "jam_invite" | "vocal_separation_done" | "vocal_separation_failed" | (string & {});
33
+ export type NotificationKind = (typeof NOTIFICATION_KINDS)[number];
24
34
  /**
25
35
  * One notification in a user's inbox.
26
36
  *
@@ -34,6 +44,8 @@ export interface Notification {
34
44
  readonly id: NotificationId;
35
45
  /** What happened. See {@link NotificationKind}. */
36
46
  readonly kind: NotificationKind;
47
+ /** The group `kind` belongs to. */
48
+ readonly category: NotificationCategory;
37
49
  /**
38
50
  * Free-form JSON payload, whose keys depend entirely on `kind` - these are
39
51
  * the i18n interpolation values the client renders the sentence with.
@@ -55,6 +67,12 @@ export interface Notification {
55
67
  readonly created_at: Timestamp;
56
68
  readonly updated_at: Timestamp;
57
69
  }
70
+ /** What {@link NotificationsNamespace.unsubscribe} answers. */
71
+ export interface NotificationUnsubscribeResult {
72
+ readonly ok: true;
73
+ /** The address that stops receiving notification emails, masked: `a***@b.pt`. */
74
+ readonly email: string;
75
+ }
58
76
  /**
59
77
  * The `notifications` namespace: the per-user inbox.
60
78
  *
@@ -144,4 +162,19 @@ export declare class NotificationsNamespace extends Resource {
144
162
  * else's id is `404 "Resource not found"` rather than a 401.
145
163
  */
146
164
  dismiss(id: NotificationId, options?: RequestOptions): Promise<void>;
165
+ /**
166
+ * `POST /notifications/unsubscribe` - turns every notification email off
167
+ * for the account behind `token`: the one-click unsubscribe at the foot of
168
+ * each notification email.
169
+ *
170
+ * Needs no credential; the token is the proof, and it is good for a year
171
+ * from the email it came in. The inbox itself is untouched, and the emails
172
+ * come back by turning `emailsEnabled` on again through
173
+ * `oms.account.notificationPreferences`.
174
+ *
175
+ * Throttled like the other anonymous endpoints.
176
+ *
177
+ * @throws {OmsApiError} 404 for a token that is invalid or expired.
178
+ */
179
+ unsubscribe(token: string, options?: RequestOptions): Promise<NotificationUnsubscribeResult>;
147
180
  }
@@ -5,7 +5,7 @@ import type { RequestOptions } from "../../types";
5
5
  * The twelve service ids the counter accepts. A closed set: anything else is
6
6
  * `400 "Unknown service_id"`.
7
7
  */
8
- export declare const SERVICE_USAGE_IDS: readonly ["storage", "tools", "games", "music", "movies", "ai", "account", "tickets", "messages", "blogs", "status", "administration"];
8
+ export declare const SERVICE_USAGE_IDS: readonly ["storage", "tools", "games", "music", "movies", "ai", "account", "tickets", "messages", "blogs", "status", "administration", "search"];
9
9
  /** One of {@link SERVICE_USAGE_IDS}. */
10
10
  export type ServiceUsageId = (typeof SERVICE_USAGE_IDS)[number];
11
11
  /**
@@ -28,12 +28,14 @@ export * from "./ipLookup";
28
28
  export * from "./jobs";
29
29
  export * from "./library";
30
30
  export * from "./linkTrees";
31
+ export * from "./llm";
31
32
  export * from "./media";
32
33
  export * from "./movies";
33
34
  export * from "./music/index";
34
35
  export * from "./notepads";
35
36
  export * from "./quotas";
36
37
  export * from "./realtime";
38
+ export * from "./search";
37
39
  export * from "./shortLinks";
38
40
  export * from "./social";
39
41
  export * from "./storage";