@curviate/sdk 0.20.0 → 0.20.2
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 +110 -0
- package/dist/index.d.ts +236 -203
- package/dist/index.js +138 -94
- package/package.json +3 -2
- package/src/generated/types.ts +222 -202
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,116 @@ Versioning: semantic. Minor for additive changes, patch for bug fixes; no stabil
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.20.2] - 2026-08-10
|
|
13
|
+
|
|
14
|
+
Published as a patch, not a minor, for the same reason 0.20.1 was: it satisfies
|
|
15
|
+
the `^0.20.1` range already declared by installed consumers, including
|
|
16
|
+
`@curviate/cli`, so it reaches them on the next install with no consumer-side
|
|
17
|
+
version bump. A `0.21.0` would have reached nobody, because a caret on a `0.x`
|
|
18
|
+
version never resolves the next minor.
|
|
19
|
+
|
|
20
|
+
The generated types are a mirror of the served OpenAPI document. This release
|
|
21
|
+
is a regeneration against that document at server commit `686b70f4`; nothing
|
|
22
|
+
was hand-edited.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **Typographic characters no longer ship in the published types.** The API
|
|
27
|
+
document was swept clean of ellipsis, arrow, comparison and multiplication
|
|
28
|
+
glyphs, but the SDK's generated mirror of it was not regenerated afterwards,
|
|
29
|
+
so `src/generated/types.ts` and `dist/index.d.ts` each still carried 195 of
|
|
30
|
+
them. They ship directly to consumers, where they surface in editor tooltips
|
|
31
|
+
and IntelliSense on every documented field. Both files are now free of them.
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **`urn` on posts.** A post's `id` is the identifier for the surface that
|
|
36
|
+
returned it and can differ between two responses describing the same post,
|
|
37
|
+
which made "have I already seen this one?" unanswerable from the types.
|
|
38
|
+
`urn` is stable however you reached the post, so two responses can be
|
|
39
|
+
compared directly. It is `null` when the post carries no resolvable
|
|
40
|
+
identity, and two nulls are never a match.
|
|
41
|
+
|
|
42
|
+
- **`urn` and `created_at` on a comment's `parent_post`**, so a comment can be
|
|
43
|
+
joined to the post it was made on without a second request.
|
|
44
|
+
|
|
45
|
+
- **A reaction's `parent_post` is now a described shape** rather than an opaque
|
|
46
|
+
empty object. It carries `object`, `id`, `urn` and `created_at`, which makes
|
|
47
|
+
"have I already reacted to this post?" answerable from the response.
|
|
48
|
+
|
|
49
|
+
All four are optional and nothing was removed, narrowed, or renamed, so a
|
|
50
|
+
consumer that compiled against 0.20.1 still compiles.
|
|
51
|
+
|
|
52
|
+
## [0.20.1] - 2026-08-10
|
|
53
|
+
|
|
54
|
+
Published as a patch, not a minor: it satisfies the `^0.20.0` range already
|
|
55
|
+
declared by installed consumers, including `@curviate/cli`, so it reaches them
|
|
56
|
+
on the next install with no consumer-side version bump.
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- **Path parameters are percent-encoded, and a few unusable values are now
|
|
61
|
+
rejected.** Every id you pass to a method was interpolated into the request
|
|
62
|
+
path verbatim, so any character that means something to a URL parser changed
|
|
63
|
+
which endpoint the call reached. A share URL passed as a post id turned one
|
|
64
|
+
path segment into eight (and `https://` collapsed to `https:/` on the way),
|
|
65
|
+
producing a 404 on a value the API accepts; a `?` moved the rest of the id
|
|
66
|
+
into the query string; and a value containing `../` was resolved away by the
|
|
67
|
+
URL parser before the request was sent, retargeting the call at a different
|
|
68
|
+
endpoint entirely. That last one is a security defect: if any part of an id
|
|
69
|
+
reaches your code from model output, end-user input, or a scraped page, it
|
|
70
|
+
could redirect the request. All 117 path parameters across every namespace
|
|
71
|
+
are now encoded at the point they enter the path, including the account id
|
|
72
|
+
bound by `account(id)`.
|
|
73
|
+
|
|
74
|
+
Encoding closes that on its own for every value except one class. `.` and
|
|
75
|
+
`..` are not encoded by `encodeURIComponent`, and a URL parser decodes a
|
|
76
|
+
segment before deciding whether it is a dot segment, so percent-encoding
|
|
77
|
+
them changes nothing. A path parameter that is exactly `.`, `..`, or the
|
|
78
|
+
empty string is therefore **rejected** with `INVALID_REQUEST` before any
|
|
79
|
+
network call, as a rejected promise like every other error here. No id, URN,
|
|
80
|
+
or slug is ever one of those three values. A value that merely contains a
|
|
81
|
+
dot (`1.2.3`, `.hidden`, `...`, `a..b`) is untouched, and so is a literal
|
|
82
|
+
`%2e`, which encoding already makes inert.
|
|
83
|
+
|
|
84
|
+
What changes for you, concretely:
|
|
85
|
+
|
|
86
|
+
- Ids made only of letters, digits, `-`, `_`, `.`, and `~` produce a
|
|
87
|
+
byte-identical request. Numeric post ids, `acc_...` ids, and public slugs
|
|
88
|
+
are in this group, so most calls are unaffected.
|
|
89
|
+
- Ids containing reserved characters (URN colons and commas, base64 `+` and
|
|
90
|
+
`/`, chat-id `=`) now travel percent-encoded. The API decodes them back to
|
|
91
|
+
the same value, so the call behaves as before; only the bytes on the wire
|
|
92
|
+
differ. Snapshot tests that assert on a literal request path will need
|
|
93
|
+
updating.
|
|
94
|
+
- Ids that never worked start working: a share URL, or any id containing `/`,
|
|
95
|
+
`?`, or `#`, now reaches the API intact.
|
|
96
|
+
- **One breaking case.** If you were working around this by percent-encoding
|
|
97
|
+
an id yourself before passing it in, stop: pass the decoded value. The SDK
|
|
98
|
+
owns the encoding now, so a pre-encoded id is treated as a literal value
|
|
99
|
+
containing percent signs and is encoded again.
|
|
100
|
+
- Every call made through an `account(id)` scope changes on the wire if that
|
|
101
|
+
id contains a reserved character, not just calls to one method. The bound
|
|
102
|
+
selector is encoded like any other path parameter.
|
|
103
|
+
- A whitespace or control character inside an id is no longer silently
|
|
104
|
+
dropped. Tab, carriage return, and line feed were deleted outright by the
|
|
105
|
+
URL parser, so an id with a stray one could accidentally match the intended
|
|
106
|
+
resource; it is now sent encoded and will simply not be found. If you were
|
|
107
|
+
relying on that accidental cleanup, trim your ids.
|
|
108
|
+
- An id containing the literal text `{account_id}` is no longer substituted.
|
|
109
|
+
That placeholder is how an account-scoped path is built internally, and a
|
|
110
|
+
raw id containing it used to be rewritten mid-flight. It is now encoded and
|
|
111
|
+
passed through as the value you supplied.
|
|
112
|
+
- Values that are not strings are stringified before encoding, so a JS
|
|
113
|
+
consumer passing an array now sends `a%2Cb` where it previously sent `a,b`.
|
|
114
|
+
Both decode to the same thing; only the bytes differ.
|
|
115
|
+
|
|
116
|
+
One deployment note: the encoded form of `/` is `%2F`, and while the Curviate
|
|
117
|
+
API accepts it, some infrastructure in front of your own code may not. Apache
|
|
118
|
+
with `AllowEncodedSlashes Off`, certain reverse proxies, and some web
|
|
119
|
+
application firewalls reject `%2F` in a path outright. This only affects ids
|
|
120
|
+
that genuinely contain a slash, share URLs above all.
|
|
121
|
+
|
|
12
122
|
## [0.20.0] - 2026-08-07
|
|
13
123
|
|
|
14
124
|
Generated types are rebuilt from the **served** OpenAPI document rather than a
|