@myronsi/messenger-api 2.1.0-alpha.44.next.153 → 2.1.0-alpha.45.next.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Contract changes only. The backend changelog is `CHANGELOG.md` in the repository root. Rules: `docs/api-compatibility.md`.
4
4
 
5
+ ## 2.1.0-alpha.45
6
+
7
+ - `GET /search/messages` gains the query parameter `kind` (`MediaKind`: `image`, `visual`, `audio`, `voice`, `file`,
8
+ `link`) to find only messages with that kind of attachment or with a web link. `q` is now optional when `kind` is
9
+ given, which lists those messages newest first.
10
+
5
11
  ## 2.1.0-alpha.44
6
12
 
7
13
  - `GET /sync/changes` (`listSyncChanges`): edits, reaction changes, deletions, pin changes, cleared histories and
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.44. Do not edit. */
2
- export declare const API_VERSION: "2.1.0-alpha.44";
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.45. Do not edit. */
2
+ export declare const API_VERSION: "2.1.0-alpha.45";
3
3
  export type { paths, components, operations } from "./schema.js";
4
4
  export * from "./ws-events.js";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export const API_VERSION = "2.1.0-alpha.44";
1
+ export const API_VERSION = "2.1.0-alpha.45";
package/dist/openapi.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  openapi: 3.1.0
2
2
  info:
3
3
  title: Messenger API
4
- version: 2.1.0-alpha.44
4
+ version: 2.1.0-alpha.45
5
5
  summary: REST contract of the Messenger backend (v2).
6
6
  description: |
7
7
  Contract for the Go backend. The WebSocket protocol is described in `websocket/` and
@@ -2435,11 +2435,18 @@ paths:
2435
2435
  hit is checked against the message store before it is returned (a deleted message never
2436
2436
  shows, even when the index lags behind). Edits and deletions reach the results within a
2437
2437
  few seconds.
2438
+
2439
+ With `kind`, only messages with that kind of attachment or with a web link are found, and `q` may be
2440
+ left out to list them newest first. Without `kind`, `q` is required (`422` otherwise).
2438
2441
  parameters:
2439
2442
  - name: q
2440
2443
  in: query
2441
- required: true
2444
+ description: Words to find; optional with `kind`
2442
2445
  schema: { type: string, minLength: 2, maxLength: 256 }
2446
+ - name: kind
2447
+ in: query
2448
+ description: Only messages with this kind of attachment, or with a web link (`link`)
2449
+ schema: { $ref: "#/components/schemas/MediaKind" }
2443
2450
  - name: chat_id
2444
2451
  in: query
2445
2452
  description: Only this chat
package/dist/schema.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.44. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.45. Do not edit. */
2
2
  export interface paths {
3
3
  "/meta": {
4
4
  parameters: {
@@ -2152,6 +2152,9 @@ export interface paths {
2152
2152
  * hit is checked against the message store before it is returned (a deleted message never
2153
2153
  * shows, even when the index lags behind). Edits and deletions reach the results within a
2154
2154
  * few seconds.
2155
+ *
2156
+ * With `kind`, only messages with that kind of attachment or with a web link are found, and `q` may be
2157
+ * left out to list them newest first. Without `kind`, `q` is required (`422` otherwise).
2155
2158
  */
2156
2159
  get: operations["searchAllMessages"];
2157
2160
  put?: never;
@@ -9930,8 +9933,11 @@ export interface operations {
9930
9933
  };
9931
9934
  searchAllMessages: {
9932
9935
  parameters: {
9933
- query: {
9934
- q: string;
9936
+ query?: {
9937
+ /** @description Words to find; optional with `kind` */
9938
+ q?: string;
9939
+ /** @description Only messages with this kind of attachment, or with a web link (`link`) */
9940
+ kind?: components["schemas"]["MediaKind"];
9935
9941
  /** @description Only this chat */
9936
9942
  chat_id?: components["schemas"]["Id"];
9937
9943
  /** @description Only messages of this user */
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.44. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.45. Do not edit. */
2
2
 
3
3
  /**
4
4
  * Any WebSocket event, in either direction.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myronsi/messenger-api",
3
- "version": "2.1.0-alpha.44.next.153",
3
+ "version": "2.1.0-alpha.45.next.154",
4
4
  "description": "API contract of the Messenger backend: OpenAPI document, WebSocket event schemas and generated TypeScript types",
5
5
  "license": "MIT",
6
6
  "repository": {