@myronsi/messenger-api 2.1.0-alpha.10 → 2.1.0-alpha.11.next.81

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.11
6
+
7
+ - Attachments have `display_url`: a JPEG of at most 1600 px (`GET /attachments/{attachment_id}/content?variant=display`)
8
+ for showing a large still image in a viewer, much smaller than the original. It is `null` for small images and
9
+ GIFs. Older images get their display copy on the first request.
10
+
5
11
  ## 2.1.0-alpha.10
6
12
 
7
13
  - `GET /attachments/{attachment_id}/content` is cached for an hour again (`private, max-age=3600`) instead of a
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.10. Do not edit. */
2
- export declare const API_VERSION: "2.1.0-alpha.10";
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.11. Do not edit. */
2
+ export declare const API_VERSION: "2.1.0-alpha.11";
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.10";
1
+ export const API_VERSION = "2.1.0-alpha.11";
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.10
4
+ version: 2.1.0-alpha.11
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
@@ -1011,10 +1011,13 @@ paths:
1011
1011
  parameters:
1012
1012
  - name: variant
1013
1013
  in: query
1014
- description: "`thumbnail`: a JPEG of at most 320 px (images only; `thumbnail_url` of the attachment)."
1014
+ description: |
1015
+ `thumbnail`: a JPEG of at most 320 px (images only; `thumbnail_url` of the attachment).
1016
+ `display`: a JPEG of at most 1600 px for viewing a large still image (`display_url` of the attachment);
1017
+ the original for any other attachment.
1015
1018
  schema:
1016
1019
  type: string
1017
- enum: [thumbnail]
1020
+ enum: [thumbnail, display]
1018
1021
  responses:
1019
1022
  "426": { $ref: "#/components/responses/ClientOutdated" }
1020
1023
  "400": { $ref: "#/components/responses/BadRequest" }
@@ -2714,6 +2717,10 @@ components:
2714
2717
  width: { type: [integer, "null"], minimum: 1 }
2715
2718
  height: { type: [integer, "null"], minimum: 1 }
2716
2719
  thumbnail_url: { type: [string, "null"], readOnly: true }
2720
+ display_url:
2721
+ type: [string, "null"]
2722
+ readOnly: true
2723
+ description: A JPEG of at most 1600 px to show in an image viewer instead of the original; `null` for small images and GIFs, which are shown as they are.
2717
2724
  duration_ms: { type: [integer, "null"], minimum: 0 }
2718
2725
  waveform:
2719
2726
  type: [array, "null"]
package/dist/schema.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.10. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.11. Do not edit. */
2
2
  export interface paths {
3
3
  "/meta": {
4
4
  parameters: {
@@ -1911,6 +1911,8 @@ export interface components {
1911
1911
  width?: number | null;
1912
1912
  height?: number | null;
1913
1913
  readonly thumbnail_url?: string | null;
1914
+ /** @description A JPEG of at most 1600 px to show in an image viewer instead of the original; `null` for small images and GIFs, which are shown as they are. */
1915
+ readonly display_url?: string | null;
1914
1916
  duration_ms?: number | null;
1915
1917
  waveform?: number[] | null;
1916
1918
  };
@@ -3555,8 +3557,12 @@ export interface operations {
3555
3557
  getAttachmentContent: {
3556
3558
  parameters: {
3557
3559
  query?: {
3558
- /** @description `thumbnail`: a JPEG of at most 320 px (images only; `thumbnail_url` of the attachment). */
3559
- variant?: "thumbnail";
3560
+ /**
3561
+ * @description `thumbnail`: a JPEG of at most 320 px (images only; `thumbnail_url` of the attachment).
3562
+ * `display`: a JPEG of at most 1600 px for viewing a large still image (`display_url` of the attachment);
3563
+ * the original for any other attachment.
3564
+ */
3565
+ variant?: "thumbnail" | "display";
3560
3566
  };
3561
3567
  header?: {
3562
3568
  /** @description Version of the client app, for logs and the per-client metric. */
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.10. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.11. Do not edit. */
2
2
 
3
3
  /**
4
4
  * Any WebSocket event, in either direction.
@@ -335,6 +335,10 @@ export interface Attachment {
335
335
  width?: number | null;
336
336
  height?: number | null;
337
337
  thumbnail_url?: string | null;
338
+ /**
339
+ * A JPEG of at most 1600 px to show in an image viewer instead of the original; `null` for small images and GIFs, which are shown as they are.
340
+ */
341
+ display_url?: string | null;
338
342
  duration_ms?: number | null;
339
343
  waveform?: number[] | null;
340
344
  }
@@ -1182,6 +1182,14 @@
1182
1182
  ],
1183
1183
  "readOnly": true
1184
1184
  },
1185
+ "display_url": {
1186
+ "type": [
1187
+ "string",
1188
+ "null"
1189
+ ],
1190
+ "readOnly": true,
1191
+ "description": "A JPEG of at most 1600 px to show in an image viewer instead of the original; `null` for small images and GIFs, which are shown as they are."
1192
+ },
1185
1193
  "duration_ms": {
1186
1194
  "type": [
1187
1195
  "integer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myronsi/messenger-api",
3
- "version": "2.1.0-alpha.10",
3
+ "version": "2.1.0-alpha.11.next.81",
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": {