@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 +7 -2
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +7 -2
- package/llms.txt +14 -10
- package/package.json +1 -1
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
|
|
246
|
-
*
|
|
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
|
|
246
|
-
*
|
|
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
|
|
246
|
-
*
|
|
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
|
|
235
|
-
*
|
|
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
|
|
190
|
-
|
|
191
|
-
|
|
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
|
|
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
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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.
|
|
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",
|