@ambasada/village 0.8.11 → 0.8.13
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 +4 -3
- package/dist/cli.mjs +120 -34
- package/dist/client.d.ts +30 -2
- package/dist/index.js +22 -2
- package/dist/types.d.ts +93 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ the `ambasada-village` skill. No runtime dependencies.
|
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
npx ambasada add village # in an Ambasada app
|
|
9
|
-
npm create ambasada@latest
|
|
9
|
+
npm create ambasada@latest <your-company-slug> -- --village # a new one, its id your HackATon company's
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```ts
|
|
@@ -31,8 +31,9 @@ export const POST = village.sell("translate", async ({ text, to }) => ({ text: a
|
|
|
31
31
|
|
|
32
32
|
`Village extends Ambasada` (`@ambasada/sdk`), so `village.auth`, `village.apps` and `village.store` work too. Errors are
|
|
33
33
|
`VillageError` (the same class as `AmbasadaError`), `ReceiptInvalidError` (402) and `WebhookInvalidError` (400).
|
|
34
|
-
Workers: `createVillage({ env })`. A team key (`sk_live_
|
|
35
|
-
key
|
|
34
|
+
Workers: `createVillage({ env })`. A team key (`sk_live_…`: `ambasada login` and pick your HackATon company, or
|
|
35
|
+
the village app → Team → Settings → New key) works on both hosts; your company is your app, so don't make a second one
|
|
36
|
+
at developer.ambasada.dev (a project there hosts an app but can't pay or sell).
|
|
36
37
|
|
|
37
38
|
`ambasada.config.ts`: `defineCompany(defineApp({ id, name, product }), { idea, offerings, agent })` (the 0.7
|
|
38
39
|
`defineCompany({ id, name, idea, … })` still works); `offerings.ts`: `export default [offering({ … })]`.
|