@autonoma-ai/server-express 0.2.2 → 0.2.3

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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,7 +5,7 @@ Express/Fastify server adapter for the Autonoma SDK.
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- pnpm add @autonoma-ai/sdk @autonoma-ai/sdk-prisma @autonoma-ai/server-express
8
+ pnpm add @autonoma-ai/sdk @autonoma-ai/server-express zod
9
9
  ```
10
10
 
11
11
  ## Usage
@@ -15,16 +15,16 @@ pnpm add @autonoma-ai/sdk @autonoma-ai/sdk-prisma @autonoma-ai/server-express
15
15
  ```typescript
16
16
  import express from 'express'
17
17
  import { createExpressHandler } from '@autonoma-ai/server-express'
18
- import { prismaExecutor } from '@autonoma-ai/sdk-prisma'
19
- import { prisma } from './db'
18
+ import { defineFactory } from '@autonoma-ai/sdk'
19
+ import { z } from 'zod'
20
20
 
21
21
  const app = express()
22
22
 
23
23
  app.post('/api/autonoma', createExpressHandler({
24
- executor: prismaExecutor(prisma),
25
24
  scopeField: 'organizationId',
26
25
  sharedSecret: process.env.AUTONOMA_SHARED_SECRET!,
27
26
  signingSecret: process.env.AUTONOMA_SIGNING_SECRET!,
27
+ factories: { Organization, User },
28
28
  auth: async (user, context) => {
29
29
  const session = await createSession(user.id as string)
30
30
  return { headers: { Authorization: `Bearer ${session.token}` } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autonoma-ai/server-express",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Express/Fastify server adapter for Autonoma SDK",
5
5
  "type": "module",
6
6
  "exports": {
@@ -16,7 +16,7 @@
16
16
  "access": "public"
17
17
  },
18
18
  "dependencies": {
19
- "@autonoma-ai/sdk": "0.2.2"
19
+ "@autonoma-ai/sdk": "0.2.3"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^22.0.0",