@zernio/node 0.2.1522 → 0.2.1523
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/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +12 -2
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@zernio/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.1523",
|
|
40
40
|
description: "The official Node.js library for the Zernio API",
|
|
41
41
|
main: "dist/index.js",
|
|
42
42
|
module: "dist/index.mjs",
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@zernio/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.1523",
|
|
9
9
|
description: "The official Node.js library for the Zernio API",
|
|
10
10
|
main: "dist/index.js",
|
|
11
11
|
module: "dist/index.mjs",
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -45,7 +45,11 @@ export const validatePostLength = <ThrowOnError extends boolean = false>(options
|
|
|
45
45
|
*
|
|
46
46
|
* Accepts the same body as POST /v1/posts. Does NOT validate accounts, transform media, or track usage. Account lookups are limit-only: a twitter accountId is resolved, scoped to the caller, only to pick the 280 vs 25000 character limit. Missing, foreign, or invalid ids fall back to 280 and never error.
|
|
47
47
|
*
|
|
48
|
-
* Every image, gif and video URL in `mediaItems` and `customMedia` is fetched and checked:
|
|
48
|
+
* Every image, gif and video URL in `mediaItems` and `customMedia` is fetched and checked:
|
|
49
|
+
*
|
|
50
|
+
* - A file that is not a real image, video or PDF (wrong bytes, truncated, corrupt) is an error with code `MEDIA_UNDECODABLE`.
|
|
51
|
+
* - Images are checked at header level. The full file is decoded only when the header is not enough. Use POST /v1/tools/validate/media for a full pixel decode.
|
|
52
|
+
* - A URL our servers cannot fetch is a warning, not an error, because the platform may still reach it.
|
|
49
53
|
*
|
|
50
54
|
* Returns errors for failures and warnings for near-limit content (>90% of character limit).
|
|
51
55
|
*
|
|
@@ -61,7 +65,13 @@ export const validatePost = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
61
65
|
* Validate media URL
|
|
62
66
|
* Check that a media URL is reachable and that its bytes are a real image, video or PDF, then return metadata (detected format, file size, dimensions) plus per-platform size limit comparisons.
|
|
63
67
|
*
|
|
64
|
-
* `valid: true` means the content was verified, not just the extension or Content-Type
|
|
68
|
+
* `valid: true` means the content was verified, not just the extension or Content-Type:
|
|
69
|
+
*
|
|
70
|
+
* - Images up to 32 MB are fully decoded (`inspection: decoded`).
|
|
71
|
+
* - Videos, PDFs and larger images are verified by their file signature and header (`inspection: header`).
|
|
72
|
+
* - The type and format come from the bytes, not the Content-Type header.
|
|
73
|
+
* - Corrupt, truncated or non-media files return `valid: false` with code `MEDIA_UNDECODABLE`.
|
|
74
|
+
* - Private/localhost URLs are rejected for SSRF protection.
|
|
65
75
|
*
|
|
66
76
|
* Platform limits are sourced from each platform's actual upload constraints.
|
|
67
77
|
*
|