@literary-universe/sdk 0.3.1 → 0.3.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 +10 -9
- package/dist/cjs/imagePolicy.d.ts +9 -0
- package/dist/cjs/imagePolicy.js +13 -0
- package/dist/esm/imagePolicy.d.ts +9 -0
- package/dist/esm/imagePolicy.js +13 -0
- package/image-policy.json +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -243,11 +243,11 @@ The version covers the whole chapter, including its translations. A translation
|
|
|
243
243
|
body save can therefore conflict with an original-language edit. Title-only and
|
|
244
244
|
settings-only edits do not advance it.
|
|
245
245
|
|
|
246
|
-
The
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
246
|
+
The write ceiling is 900,000 serialized UTF-8 bytes. Writing requires the key's
|
|
247
|
+
write scope and the author's current permissions on the resource. Organization
|
|
248
|
+
keys also require the organization's API feature and plan. Publication requires
|
|
249
|
+
`story:publish` and the work's publication permission. No deployment settings or
|
|
250
|
+
actor allowlist is required.
|
|
251
251
|
|
|
252
252
|
## Chapter lifecycle
|
|
253
253
|
|
|
@@ -417,7 +417,8 @@ decoders per server process. Body transfer has a twenty-second deadline; decodin
|
|
|
417
417
|
has a killable ten-second deadline. Unavailable enforcement/storage fails closed.
|
|
418
418
|
Transfer and intent leases renew while work is active; renewal calls are bounded
|
|
419
419
|
to ten seconds and the final asset/result transaction to twenty-five seconds.
|
|
420
|
-
|
|
420
|
+
Uploads require the purpose's write scope and current resource permissions.
|
|
421
|
+
Organization keys also require their organization's API feature and plan.
|
|
421
422
|
|
|
422
423
|
Keep the prepared bytes and operation ID for retry. Changed input yields
|
|
423
424
|
IDEMPOTENCY_CONFLICT; committed replay returns the original asset after current
|
|
@@ -431,7 +432,7 @@ collection. Storage remains public; protected comic/audio files use other contra
|
|
|
431
432
|
For live image checks, configure an isolated local S3-compatible test endpoint in
|
|
432
433
|
the test server's Backblaze settings, then run `node app/scripts/testApiImageContract.mjs` from the monorepo root with the same
|
|
433
434
|
local _test database variables as test:integration. Real Backblaze verification
|
|
434
|
-
remains a separate
|
|
435
|
+
remains a separate integration check.
|
|
435
436
|
|
|
436
437
|
Platform CI runs the package checks on Windows and macOS, including both Intel
|
|
437
438
|
and Apple Silicon Macs. These checks cover extracted builds, packed consumers,
|
|
@@ -498,8 +499,8 @@ They require `blog:read` and management access to that blog.
|
|
|
498
499
|
menu and the latest returned version for edits. Keep the full request unchanged
|
|
499
500
|
when retrying a lost response; the SDK preserves it on transport retries.
|
|
500
501
|
Organization keys may manage only their own enabled organization blog. Restricted
|
|
501
|
-
story/universe keys cannot access blogs.
|
|
502
|
-
|
|
502
|
+
story/universe keys cannot access blogs. Writes use these permissions without
|
|
503
|
+
deployment settings or an actor allowlist.
|
|
503
504
|
|
|
504
505
|
```ts
|
|
505
506
|
const page = await client.mutateBlog({
|
|
@@ -5,6 +5,15 @@ export declare const IMAGE_POLICY: {
|
|
|
5
5
|
readonly maxUploadPixels: 16000000;
|
|
6
6
|
readonly processingSeconds: 10;
|
|
7
7
|
readonly purposes: {
|
|
8
|
+
readonly "oauth-app-logo": {
|
|
9
|
+
readonly maxBytes: 2097152;
|
|
10
|
+
readonly allowedTypes: readonly ["image/jpeg", "image/png", "image/webp"];
|
|
11
|
+
readonly maxWidth: 512;
|
|
12
|
+
readonly maxHeight: 512;
|
|
13
|
+
readonly aspectRatio: 1;
|
|
14
|
+
readonly recommendedWidth: 512;
|
|
15
|
+
readonly recommendedHeight: 512;
|
|
16
|
+
};
|
|
8
17
|
readonly "story-cover": {
|
|
9
18
|
readonly maxBytes: 5242880;
|
|
10
19
|
readonly allowedTypes: readonly ["image/jpeg", "image/png", "image/webp"];
|
package/dist/cjs/imagePolicy.js
CHANGED
|
@@ -9,6 +9,19 @@ exports.IMAGE_POLICY = {
|
|
|
9
9
|
"maxUploadPixels": 16000000,
|
|
10
10
|
"processingSeconds": 10,
|
|
11
11
|
"purposes": {
|
|
12
|
+
"oauth-app-logo": {
|
|
13
|
+
"maxBytes": 2097152,
|
|
14
|
+
"allowedTypes": [
|
|
15
|
+
"image/jpeg",
|
|
16
|
+
"image/png",
|
|
17
|
+
"image/webp"
|
|
18
|
+
],
|
|
19
|
+
"maxWidth": 512,
|
|
20
|
+
"maxHeight": 512,
|
|
21
|
+
"aspectRatio": 1,
|
|
22
|
+
"recommendedWidth": 512,
|
|
23
|
+
"recommendedHeight": 512
|
|
24
|
+
},
|
|
12
25
|
"story-cover": {
|
|
13
26
|
"maxBytes": 5242880,
|
|
14
27
|
"allowedTypes": [
|
|
@@ -5,6 +5,15 @@ export declare const IMAGE_POLICY: {
|
|
|
5
5
|
readonly maxUploadPixels: 16000000;
|
|
6
6
|
readonly processingSeconds: 10;
|
|
7
7
|
readonly purposes: {
|
|
8
|
+
readonly "oauth-app-logo": {
|
|
9
|
+
readonly maxBytes: 2097152;
|
|
10
|
+
readonly allowedTypes: readonly ["image/jpeg", "image/png", "image/webp"];
|
|
11
|
+
readonly maxWidth: 512;
|
|
12
|
+
readonly maxHeight: 512;
|
|
13
|
+
readonly aspectRatio: 1;
|
|
14
|
+
readonly recommendedWidth: 512;
|
|
15
|
+
readonly recommendedHeight: 512;
|
|
16
|
+
};
|
|
8
17
|
readonly "story-cover": {
|
|
9
18
|
readonly maxBytes: 5242880;
|
|
10
19
|
readonly allowedTypes: readonly ["image/jpeg", "image/png", "image/webp"];
|
package/dist/esm/imagePolicy.js
CHANGED
|
@@ -6,6 +6,19 @@ export const IMAGE_POLICY = {
|
|
|
6
6
|
"maxUploadPixels": 16000000,
|
|
7
7
|
"processingSeconds": 10,
|
|
8
8
|
"purposes": {
|
|
9
|
+
"oauth-app-logo": {
|
|
10
|
+
"maxBytes": 2097152,
|
|
11
|
+
"allowedTypes": [
|
|
12
|
+
"image/jpeg",
|
|
13
|
+
"image/png",
|
|
14
|
+
"image/webp"
|
|
15
|
+
],
|
|
16
|
+
"maxWidth": 512,
|
|
17
|
+
"maxHeight": 512,
|
|
18
|
+
"aspectRatio": 1,
|
|
19
|
+
"recommendedWidth": 512,
|
|
20
|
+
"recommendedHeight": 512
|
|
21
|
+
},
|
|
9
22
|
"story-cover": {
|
|
10
23
|
"maxBytes": 5242880,
|
|
11
24
|
"allowedTypes": [
|
package/image-policy.json
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
"maxUploadPixels": 16000000,
|
|
6
6
|
"processingSeconds": 10,
|
|
7
7
|
"purposes": {
|
|
8
|
+
"oauth-app-logo": {
|
|
9
|
+
"maxBytes": 2097152,
|
|
10
|
+
"allowedTypes": ["image/jpeg", "image/png", "image/webp"],
|
|
11
|
+
"maxWidth": 512,
|
|
12
|
+
"maxHeight": 512,
|
|
13
|
+
"aspectRatio": 1,
|
|
14
|
+
"recommendedWidth": 512,
|
|
15
|
+
"recommendedHeight": 512
|
|
16
|
+
},
|
|
8
17
|
"story-cover": {
|
|
9
18
|
"maxBytes": 5242880,
|
|
10
19
|
"allowedTypes": ["image/jpeg", "image/png", "image/webp"],
|