@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/README.md +1 -0
- package/dist/index.d.ts +173 -16
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/ledewire.min.js +1 -1
- package/dist/ledewire.min.js.map +1 -1
- package/llms.txt +10 -5
- package/package.json +1 -1
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`
|
|
121
|
-
invitation
|
|
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
|
```
|