@curviate/sdk 0.2.0 → 0.2.1

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
@@ -7,6 +7,14 @@ Versioning: semantic — minor for additive changes, patch for bug fixes; no sta
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.2.1] — 2026-06-29
11
+
12
+ ### Fixed
13
+
14
+ - `deleteMessage` and `addReaction` no longer inject `account_id` into the request. The server resolves the owning account from the message id — sending a client-supplied `account_id` was rejected by the server's strict schema, making both methods unusable via `client.account(id)`. The server's schemas are also relaxed (patch on the server side) so existing SDK installs continue to work without updating.
15
+
16
+ ---
17
+
10
18
  ## [0.2.0] — 2026-06-28
11
19
 
12
20
  ### Added
package/dist/index.d.ts CHANGED
@@ -76,10 +76,14 @@ type HttpMethod = "GET" | "HEAD" | "POST" | "PATCH" | "PUT" | "DELETE";
76
76
  * - `"query"` — GET reads, body-less destructive verbs (DELETE), and
77
77
  * filter-search POSTs (whose body is the filter set, with `account_id` in
78
78
  * the query string) all carry it as a query parameter.
79
+ * - `"none"` — the endpoint resolves the owning account server-side; the
80
+ * SDK sends no `account_id` in the query or body. Use for id-scoped
81
+ * operations where the server infers ownership from the resource id
82
+ * (e.g. `deleteMessage`, `addReaction`).
79
83
  *
80
84
  * Defaults to `"query"` so a method that omits it keeps the read-style location.
81
85
  */
82
- type AccountIdLocation = "body" | "query";
86
+ type AccountIdLocation = "body" | "query" | "none";
83
87
  /** Per-call request shape passed by a resource method. */
84
88
  interface RequestArgs {
85
89
  method: HttpMethod;
package/dist/index.js CHANGED
@@ -267,6 +267,7 @@ function createContext(config, accountId) {
267
267
  if (accountId !== void 0) {
268
268
  if (target === "body") {
269
269
  body = injectAccountIdIntoBody(body, accountId);
270
+ } else if (target === "none") {
270
271
  } else {
271
272
  query = { account_id: accountId, ...args.query };
272
273
  }
@@ -527,7 +528,9 @@ var MessagingResource = class {
527
528
  deleteMessage(messageId) {
528
529
  return this.ctx.request({
529
530
  method: "DELETE",
530
- path: `/v1/messages/${messageId}`
531
+ path: `/v1/messages/${messageId}`,
532
+ accountIdIn: "none"
533
+ // server resolves owning account from message id
531
534
  });
532
535
  }
533
536
  /**
@@ -547,7 +550,8 @@ var MessagingResource = class {
547
550
  method: "POST",
548
551
  path: `/v1/messages/${messageId}/reactions`,
549
552
  body,
550
- accountIdIn: "body"
553
+ accountIdIn: "none"
554
+ // server resolves owning account from message id
551
555
  });
552
556
  }
553
557
  /** Send an InMail. `POST /v1/messages/inmail` */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK for the Curviate API.",
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "homepage": "https://docs.curviate.com",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/curviate/sdk.git"
11
+ "url": "git+https://github.com/curviate/sdk.git"
12
12
  },
13
13
  "bugs": {
14
14
  "url": "https://github.com/curviate/sdk/issues"