@civitai/app-sdk 0.56.0 → 0.56.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/app-sdk",
3
- "version": "0.56.0",
3
+ "version": "0.56.1",
4
4
  "description": "OAuth + PKCE, encrypted-cookie sessions, scopes, and orchestrator helpers for building third-party Civitai apps.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -252,15 +252,21 @@
252
252
  },
253
253
  "priceBuzz": {
254
254
  "type": "integer",
255
- "description": "Price in whole Buzz. Buzz has no sub-unit, so this must be a whole number, and the minimum is 2 rather than 1 because the app owner's 70% share is floored — a 1 Buzz item would earn its owner nothing, permanently. Capped so a single purchase can never drain an account; a viewer also has a daily ceiling across every app they have installed, so a purchase can be refused with a clean 4xx even at a legal price. Both bounds are kept in lockstep with BLOCK_GOOD_MIN_PRICE_BUZZ / BLOCK_GOOD_MAX_PRICE_BUZZ in src/shared/constants/block-goods.constants.ts by a drift-guard test.",
255
+ "description": "Price in whole Buzz. Buzz has no sub-unit, so this must be a whole number, and the minimum is 2 rather than 1 because the app owner's 70% share is floored — a 1 Buzz item would earn its owner nothing, permanently. Capped so a single purchase can never drain an account; a viewer also has a daily ceiling across every app they have installed, so a purchase can be refused with a clean 4xx even at a legal price. Both bounds are kept in lockstep with BLOCK_GOOD_MIN_PRICE_BUZZ / BLOCK_GOOD_MAX_PRICE_BUZZ in src/shared/constants/block-goods.constants.ts by a drift-guard test. \u26a0\ufe0f THE MAXIMUM HERE IS THE WIDEST ANY KIND MAY CHARGE, NOT THE LIMIT FOR YOUR GOOD: a good with kind \"app_unlock\" is capped at 5000 Buzz by the platform validator, which this schema deliberately does not restate (it declares that validator authoritative). See the `kind` description. A value above that validates offline and is rejected at submit.",
256
256
  "minimum": 2,
257
257
  "maximum": 50000
258
258
  },
259
259
  "kind": {
260
260
  "type": "string",
261
- "description": "What the entitlement grants, from the platform's point of view. \"good\" (the default) is an ordinary in-app purchase the platform records and does not interpret. \"app_unlock\" marks a one-time unlock of the app itself; it is RECORDED IDENTICALLY today and the platform does NOT yet act on it — the paid-app access gate is a later change that reads this value. Declaring it now buys nothing, so leave it unset unless you intend that later behaviour.",
261
+ "description": "What the entitlement grants, from the platform's point of view. \"good\" (the default) is an ordinary in-app purchase the platform records and does not interpret. \"app_unlock\" marks a one-time unlock of the app itself; the ACCESS GATE is a later change that will read this value, so today an app_unlock entitlement is recorded like any other and the platform does not yet refuse entry on it. Declaring it is NOT free, however, and it is not merely a label: set it only when you intend to charge for access. THREE EXTRA RULES APPLY TO \"app_unlock\" AND ARE ENFORCED BY THE PLATFORM VALIDATOR, NOT BY THIS SCHEMA (which declares that validator authoritative): priceBuzz may be at most 5000 Buzz, not the 50000 the priceBuzz bound below allows — an unlock is bought before the viewer has used the app, so it is capped at the same ceiling as a single Buzz tip and at the smallest Buzz top-up ($5); at most ONE app_unlock good may be declared per manifest, so \"is this viewer admitted?\" has exactly one answer; and the good MUST carry a `justification`, because adding one turns a free app into a paid app and a moderator has to be told why.",
262
262
  "enum": ["good", "app_unlock"]
263
263
  },
264
+ "justification": {
265
+ "type": "string",
266
+ "description": "Why this good exists, shown to the moderator at review and never to the viewer. REQUIRED when kind is \"app_unlock\", because adding an unlock means your app starts charging for access and a moderator has to be told why. Note that declaring any `goods` catalog ALSO requires the `goods:purchase:self` scope — including a catalog whose only entry is an app_unlock — so do not read this field as a substitute for that scope. It exists because the scope is declared once and does not change when a later version adds an unlock: an app that already sells ordinary items can start charging for admission without its permission set moving at all, and this is what makes that visible at review. Optional for an ordinary good. Review metadata only: unlike `payload` it is never copied onto an entitlement, and the platform records your claim without verifying it. The server measures the TRIMMED length, so this maxLength is never more permissive than the server.",
267
+ "minLength": 1,
268
+ "maxLength": 500
269
+ },
264
270
  "payload": {
265
271
  "type": "object",
266
272
  "description": "Optional OPAQUE payload copied verbatim onto the entitlement at purchase and handed back to your app unchanged. The platform never reads or interprets it. It is manifest-sourced rather than client-supplied precisely so that what an entitlement carries is something a moderator saw. Must serialize to at most 2048 bytes."