@ledewire/browser 0.9.0 → 0.10.0

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/llms.txt CHANGED
@@ -117,8 +117,13 @@ lw.auth.resetPassword({ email, reset_code, password }) → Promise<AuthP
117
117
  Tokens are stored automatically after every successful login.
118
118
  `loginWithBuyerApiKey` is useful in buyer dashboards where the user has created a
119
119
  named API key and wants to authenticate headlessly (without email/password).
120
- `signup` accepts an optional `company_invitation_token` (from a Company
121
- invitation email) to sign up and join that Company in one step.
120
+ `signup` and `loginWithGoogle` accept an optional `company_invitation_token`
121
+ (Company invitation) and `invitation_token` (store invitation) to create the
122
+ account and join in one step. If an invitation can't be accepted, nothing is
123
+ created and the call throws a 422 `LedewireError` with
124
+ `type === 'invitation_not_accepted'` and `details.reason`. For a Google account
125
+ that already exists the sign-in succeeds and `res.invitations` reports each
126
+ outcome.
122
127
 
123
128
  ### lw.checkout
124
129
 
@@ -269,12 +274,12 @@ not in a Company). List methods return `{ data }`.
269
274
 
270
275
  ```ts
271
276
  lw.company.membership.get() / .leave()
272
- lw.company.invitations.list() / .create({ email, role? }) / .accept({ token })
277
+ lw.company.invitations.list() / .create({ email, role? }) / .revoke(id) / .accept({ token })
273
278
  lw.company.members.list() / .update(membershipId, { role?, daily_spend_limit_cents? }) / .remove(membershipId)
274
- lw.company.machineUsers.list() / .create({ name, description? }) / .deactivate(id) // deactivate is permanent
279
+ lw.company.machineUsers.list() / .create({ name, description? }) / .update(id, { name?, description? }) / .deactivate(id) // deactivate is permanent
275
280
  lw.company.machineUsers.buyerKeys.list(muId) / .create(muId, { name }) / .revoke(muId, keyId)
276
281
  lw.company.machineUsers.mcpKeys.list(muId) / .create(muId, { label, scopes }) / .revoke(muId, keyId)
277
- lw.company.wallet.createPaymentSession({ amount_cents, currency? }) / .listPendingTopUps()
282
+ lw.company.wallet.get() / .createPaymentSession({ amount_cents, currency? }) / .listPendingTopUps() // get(): the Company balance, admin only
278
283
  lw.company.purchases.list({ member?, from?, to?, kind?, page?, per_page? }) // paginated
279
284
  lw.company.spend.list({ member?, from?, to? })
280
285
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledewire/browser",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "LedeWire SDK for browsers — embed a paywall with a single script tag",
5
5
  "type": "module",
6
6
  "exports": {