@myronsi/messenger-api 2.1.0-alpha.54.next.186 → 2.1.0-alpha.55.next.189

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,11 @@
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.55
6
+
7
+ - `import_id` of `POST /attachments` moves from the form to the query (`POST /attachments?import_id=…`), so the
8
+ upload rate (`upload` or `import_upload`) is checked before the body is read. The form field is removed.
9
+
5
10
  ## 2.1.0-alpha.54
6
11
 
7
12
  - `UploadAttachmentRequest` gains `import_id`: uploads of the caller's own running import get their own rate limit
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.54. Do not edit. */
2
- export declare const API_VERSION: "2.1.0-alpha.54";
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.55. Do not edit. */
2
+ export declare const API_VERSION: "2.1.0-alpha.55";
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.54";
1
+ export const API_VERSION = "2.1.0-alpha.55";
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.54
4
+ version: 2.1.0-alpha.55
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
@@ -1666,10 +1666,18 @@ paths:
1666
1666
  returned `attachment_id` is used in messages (`type: file` or `voice`) or for
1667
1667
  avatars. Attachments that are not used within 24 hours are deleted.
1668
1668
 
1669
- At most 60 uploads per minute per user (`429` with `Retry-After`). Uploads with the `import_id` of the caller's
1670
- own running import have their own limit of 300 per minute (burst 50). For them a JPEG, PNG or still WebP
1671
- image is stored with its metadata removed and its size read from the header; the thumbnail, display copy and
1672
- placeholder follow in the background (`processing`, then `attachment_updated`).
1669
+ At most 60 uploads per minute per user (`429` with `Retry-After`, before the body is read). Uploads with the
1670
+ `import_id` of the caller's own running import have their own limit of 300 per minute (burst 50). For them a
1671
+ JPEG, PNG or still WebP image is stored with its metadata removed and its size read from the header; the
1672
+ thumbnail, display copy and placeholder follow in the background (`processing`, then `attachment_updated`).
1673
+ parameters:
1674
+ - name: import_id
1675
+ in: query
1676
+ required: false
1677
+ description: |
1678
+ `message` uploads of a history import: the id of the caller's own running import. Other ids are ignored
1679
+ (the upload is handled like any other).
1680
+ schema: { $ref: "#/components/schemas/Id" }
1673
1681
  requestBody:
1674
1682
  required: true
1675
1683
  content:
@@ -8236,11 +8244,6 @@ components:
8236
8244
  description: |
8237
8245
  `sticker` from a video or GIF: side of the square crop, as a fraction of the shorter side. Send all three
8238
8246
  crop fields or none; the square must lie inside the frame.
8239
- import_id:
8240
- description: |
8241
- `message` uploads of a history import: the id of the caller's own running import. Other ids are ignored
8242
- (the upload is handled like any other).
8243
- allOf: [{ $ref: "#/components/schemas/Id" }]
8244
8247
  Attachment:
8245
8248
  type: object
8246
8249
  required: [id, kind, filename, content_type, size, url]
package/dist/schema.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.54. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.55. Do not edit. */
2
2
  export interface paths {
3
3
  "/meta": {
4
4
  parameters: {
@@ -1511,10 +1511,10 @@ export interface paths {
1511
1511
  * returned `attachment_id` is used in messages (`type: file` or `voice`) or for
1512
1512
  * avatars. Attachments that are not used within 24 hours are deleted.
1513
1513
  *
1514
- * At most 60 uploads per minute per user (`429` with `Retry-After`). Uploads with the `import_id` of the caller's
1515
- * own running import have their own limit of 300 per minute (burst 50). For them a JPEG, PNG or still WebP
1516
- * image is stored with its metadata removed and its size read from the header; the thumbnail, display copy and
1517
- * placeholder follow in the background (`processing`, then `attachment_updated`).
1514
+ * At most 60 uploads per minute per user (`429` with `Retry-After`, before the body is read). Uploads with the
1515
+ * `import_id` of the caller's own running import have their own limit of 300 per minute (burst 50). For them a
1516
+ * JPEG, PNG or still WebP image is stored with its metadata removed and its size read from the header; the
1517
+ * thumbnail, display copy and placeholder follow in the background (`processing`, then `attachment_updated`).
1518
1518
  */
1519
1519
  post: operations["uploadAttachment"];
1520
1520
  delete?: never;
@@ -6157,11 +6157,6 @@ export interface components {
6157
6157
  * crop fields or none; the square must lie inside the frame.
6158
6158
  */
6159
6159
  crop_size?: number;
6160
- /**
6161
- * @description `message` uploads of a history import: the id of the caller's own running import. Other ids are ignored
6162
- * (the upload is handled like any other).
6163
- */
6164
- import_id?: components["schemas"]["Id"];
6165
6160
  };
6166
6161
  Attachment: {
6167
6162
  id: components["schemas"]["AttachmentRef"];
@@ -10009,7 +10004,13 @@ export interface operations {
10009
10004
  };
10010
10005
  uploadAttachment: {
10011
10006
  parameters: {
10012
- query?: never;
10007
+ query?: {
10008
+ /**
10009
+ * @description `message` uploads of a history import: the id of the caller's own running import. Other ids are ignored
10010
+ * (the upload is handled like any other).
10011
+ */
10012
+ import_id?: components["schemas"]["Id"];
10013
+ };
10013
10014
  header?: {
10014
10015
  /** @description Version of the client app, for logs and the per-client metric. */
10015
10016
  "X-Client-Version"?: components["parameters"]["ClientVersion"];
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.54. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.55. Do not edit. */
2
2
 
3
3
  /**
4
4
  * Any WebSocket event, in either direction.
@@ -2550,14 +2550,6 @@
2550
2550
  "exclusiveMinimum": 0,
2551
2551
  "maximum": 1,
2552
2552
  "description": "`sticker` from a video or GIF: side of the square crop, as a fraction of the shorter side. Send all three\ncrop fields or none; the square must lie inside the frame.\n"
2553
- },
2554
- "import_id": {
2555
- "description": "`message` uploads of a history import: the id of the caller's own running import. Other ids are ignored\n(the upload is handled like any other).\n",
2556
- "allOf": [
2557
- {
2558
- "$ref": "#/$defs/Id"
2559
- }
2560
- ]
2561
2553
  }
2562
2554
  }
2563
2555
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myronsi/messenger-api",
3
- "version": "2.1.0-alpha.54.next.186",
3
+ "version": "2.1.0-alpha.55.next.189",
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": {