@gemmein/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/dist/index.cjs CHANGED
@@ -242,8 +242,13 @@ exports.PurchasesClient = PurchasesClient;
242
242
  * are, what the collection's rule says, whether the file is yours, and whether
243
243
  * you still hold whatever the collection requires.
244
244
  *
245
- * That is why the same app code keeps working when a collection later changes
246
- * from public to private and why a refund actually takes a download away.
245
+ * That is why the same app code keeps working across collections, and why a
246
+ * refund takes away a download the buyer had not yet resolved. Two honest
247
+ * bounds: an already-issued link keeps working until it expires (minutes),
248
+ * and a file uploaded while its collection was public keeps its permanent
249
+ * URL even if the rule is later tightened — new uploads seal, old ones are
250
+ * moved only by an owner reseal. Sell access with the rule set from the
251
+ * start, not tightened afterwards.
247
252
  *
248
253
  * Don't store what this returns. Store the reference and call this again.
249
254
  */
package/dist/index.d.cts CHANGED
@@ -242,8 +242,13 @@ export type FileRef = string & {
242
242
  * are, what the collection's rule says, whether the file is yours, and whether
243
243
  * you still hold whatever the collection requires.
244
244
  *
245
- * That is why the same app code keeps working when a collection later changes
246
- * from public to private and why a refund actually takes a download away.
245
+ * That is why the same app code keeps working across collections, and why a
246
+ * refund takes away a download the buyer had not yet resolved. Two honest
247
+ * bounds: an already-issued link keeps working until it expires (minutes),
248
+ * and a file uploaded while its collection was public keeps its permanent
249
+ * URL even if the rule is later tightened — new uploads seal, old ones are
250
+ * moved only by an owner reseal. Sell access with the rule set from the
251
+ * start, not tightened afterwards.
247
252
  *
248
253
  * Don't store what this returns. Store the reference and call this again.
249
254
  */
package/dist/index.d.ts CHANGED
@@ -242,8 +242,13 @@ export type FileRef = string & {
242
242
  * are, what the collection's rule says, whether the file is yours, and whether
243
243
  * you still hold whatever the collection requires.
244
244
  *
245
- * That is why the same app code keeps working when a collection later changes
246
- * from public to private and why a refund actually takes a download away.
245
+ * That is why the same app code keeps working across collections, and why a
246
+ * refund takes away a download the buyer had not yet resolved. Two honest
247
+ * bounds: an already-issued link keeps working until it expires (minutes),
248
+ * and a file uploaded while its collection was public keeps its permanent
249
+ * URL even if the rule is later tightened — new uploads seal, old ones are
250
+ * moved only by an owner reseal. Sell access with the rule set from the
251
+ * start, not tightened afterwards.
247
252
  *
248
253
  * Don't store what this returns. Store the reference and call this again.
249
254
  */
package/dist/index.js CHANGED
@@ -231,8 +231,13 @@ export class PurchasesClient {
231
231
  * are, what the collection's rule says, whether the file is yours, and whether
232
232
  * you still hold whatever the collection requires.
233
233
  *
234
- * That is why the same app code keeps working when a collection later changes
235
- * from public to private and why a refund actually takes a download away.
234
+ * That is why the same app code keeps working across collections, and why a
235
+ * refund takes away a download the buyer had not yet resolved. Two honest
236
+ * bounds: an already-issued link keeps working until it expires (minutes),
237
+ * and a file uploaded while its collection was public keeps its permanent
238
+ * URL even if the rule is later tightened — new uploads seal, old ones are
239
+ * moved only by an owner reseal. Sell access with the rule set from the
240
+ * start, not tightened afterwards.
236
241
  *
237
242
  * Don't store what this returns. Store the reference and call this again.
238
243
  */
package/llms.txt CHANGED
@@ -186,11 +186,14 @@
186
186
  `await g.subscriptions.mine()` → `{ plan, status }` or null, and gates features
187
187
  with `sub?.plan === "pro"`.
188
188
  - Paid ACCESS (entitlements): a collection can require a key — your human
189
- sets `requires: "access:pro"` in its settings and the engine refuses
190
- anyone without it, on every operation, under all seven rules. Keys are
191
- granted by money: a plan or product lists what it unlocks (e.g.
189
+ sets `requires: "access:pro"` in the "Unlocked by" row on its Collections
190
+ card and the engine refuses customers without it, under all seven
191
+ rules. (Server secret keys and the owner's console are exempt by design;
192
+ link/expand silently hide gated records rather than naming them.) Keys
193
+ are granted by money: a plan or product lists what it unlocks (e.g.
192
194
  `access:pro, access:exports`), the paid webhook grants those keys, and a
193
- refund or cancellation revokes exactly what it granted — nothing else.
195
+ FULL refund or a cancellation revokes exactly what it granted — nothing
196
+ else. A partial refund leaves access in place.
194
197
  Owners also grant and revoke by hand (trials, comps, support). Effective
195
198
  access is the UNION of a customer's live grants. A signed-in customer
196
199
  without the key gets `403 entitlement_required` naming it — show your
@@ -211,12 +214,13 @@
211
214
  payment itself — `await g.purchases.mine()` is the buyer's proof:
212
215
  { item, kind, status: "paid"|"part_refunded"|"refunded", amountMinor,
213
216
  currency, refundedMinor, grants, paidAt }. A receipts collection (rule
214
- `addressed`) is OPTIONAL add one when you want receipts as records the
215
- app renders; only the buyer and the owner read them. Delivery: attach
216
- the thing to the product — a sealed Gemmein file (the receipt carries a
217
- `file:` ref; resolve it per reader with `g.files.link`, which re-checks
218
- access on every mint) or an external `deliveryUrl` (a plain handover:
219
- Gemmein controls who is TOLD, not who can use it). Gate fulfilment on
217
+ `addressed`) is OPTIONAL for proof but TODAY it is REQUIRED for file
218
+ delivery: the file reference only reaches the buyer on the receipt
219
+ record (its `deliveryFile` field, a `file:` ref resolve it per reader
220
+ with `g.files.link`, which re-checks access on every mint). Selling a
221
+ file? Configure a receipts collection, or the buyer has no way to reach
222
+ their download. External `deliveryUrl` is a plain handover: Gemmein
223
+ controls who is TOLD, not who can use it. Gate fulfilment on
220
224
  the purchase or the entitlement it granted, never on the redirect coming
221
225
  back — redirects can be faked; the record comes from Stripe's signed
222
226
  webhook. NO carts, NO quantities — one product per checkout by design; a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gemmein/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Gemmein SDK — passwordless auth, safe storage, and Stripe-driven record flips for AI-built apps. Small enough that one prompt teaches the whole API.",
5
5
  "license": "MIT",
6
6
  "type": "module",