@ironfang/render 3.0.1 → 3.0.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/README.md +5 -0
- package/dist/types.d.ts +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,6 +18,11 @@ the HMAC key, while a Render secret is the hex of the 32-byte key deliveries
|
|
|
18
18
|
are signed with, so it rejected every genuine delivery. Upgrade if you
|
|
19
19
|
verify Render webhooks with it.
|
|
20
20
|
|
|
21
|
+
3.0.2 types a template's `vars` as `Record<string, string>` in `image()` and
|
|
22
|
+
`sign()`, as the API has always required: a number, boolean or object passed
|
|
23
|
+
the type check and then came back as a 400. Code that passed one no longer
|
|
24
|
+
compiles; pass it as text (`String(n)`).
|
|
25
|
+
|
|
21
26
|
```sh
|
|
22
27
|
npm install @ironfang/render
|
|
23
28
|
```
|
package/dist/types.d.ts
CHANGED
|
@@ -85,7 +85,9 @@ export interface QrRequest {
|
|
|
85
85
|
logo_pad?: boolean;
|
|
86
86
|
}
|
|
87
87
|
export interface ImageRequest {
|
|
88
|
-
|
|
88
|
+
/** The template's placeholder values. Text only: the API refuses a number,
|
|
89
|
+
* boolean or object with 400, so pass `String(n)` for a number. */
|
|
90
|
+
vars?: Record<string, string>;
|
|
89
91
|
format?: 'png' | 'jpeg' | 'webp';
|
|
90
92
|
}
|
|
91
93
|
export interface ClipRequest {
|
|
@@ -168,7 +170,8 @@ export interface SignRequest {
|
|
|
168
170
|
kind: 'screenshot' | 'image';
|
|
169
171
|
url?: string;
|
|
170
172
|
template?: string;
|
|
171
|
-
|
|
173
|
+
/** Placeholder values for an `image` URL: text only, as for `image()`. */
|
|
174
|
+
vars?: Record<string, string>;
|
|
172
175
|
width?: number;
|
|
173
176
|
height?: number;
|
|
174
177
|
full_page?: boolean;
|
package/package.json
CHANGED