motia 0.5.11-beta.120-777374 → 0.5.11-beta.120-011950
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/cjs/create/templates/python/steps/api_step.py.txt +4 -4
- package/dist/cjs/create/templates/python/steps/services/pet_store.py.txt +1 -1
- package/dist/cjs/create/templates/python/tutorial.tsx.txt +4 -4
- package/dist/esm/create/templates/python/steps/api_step.py.txt +4 -4
- package/dist/esm/create/templates/python/steps/services/pet_store.py.txt +1 -1
- package/dist/esm/create/templates/python/tutorial.tsx.txt +4 -4
- package/package.json +4 -4
|
@@ -5,7 +5,7 @@ from .services.types import Pet
|
|
|
5
5
|
|
|
6
6
|
class PetRequest(BaseModel):
|
|
7
7
|
name: str
|
|
8
|
-
|
|
8
|
+
photoUrl: str
|
|
9
9
|
|
|
10
10
|
class FoodOrder(BaseModel):
|
|
11
11
|
id: str
|
|
@@ -13,13 +13,13 @@ class FoodOrder(BaseModel):
|
|
|
13
13
|
|
|
14
14
|
class RequestBody(BaseModel):
|
|
15
15
|
pet: PetRequest
|
|
16
|
-
|
|
16
|
+
foodOrder: Optional[FoodOrder] = None
|
|
17
17
|
|
|
18
18
|
config = {
|
|
19
19
|
"type": "api",
|
|
20
20
|
"name": "ApiTrigger",
|
|
21
21
|
"description": "basic-tutorial api trigger",
|
|
22
|
-
"flows": [basic-tutorial"],
|
|
22
|
+
"flows": ["basic-tutorial"],
|
|
23
23
|
"method": "POST",
|
|
24
24
|
"path": "/basic-tutorial",
|
|
25
25
|
"bodySchema": RequestBody.model_json_schema(),
|
|
@@ -34,7 +34,7 @@ async def handler(req, context):
|
|
|
34
34
|
context.logger.info("Step 01 – Processing API Step", {"body": body})
|
|
35
35
|
|
|
36
36
|
pet = body.get("pet", {})
|
|
37
|
-
food_order = body.get("
|
|
37
|
+
food_order = body.get("foodOrder", {})
|
|
38
38
|
|
|
39
39
|
new_pet_record = await pet_store_service.create_pet(pet)
|
|
40
40
|
|
|
@@ -410,8 +410,8 @@ export const steps: TutorialStep[] = [
|
|
|
410
410
|
{' '}-H "Content-Type: application/json" \<br />
|
|
411
411
|
{' '}-d '
|
|
412
412
|
{JSON.stringify({
|
|
413
|
-
pet: { name: 'Jack',
|
|
414
|
-
|
|
413
|
+
pet: { name: 'Jack', photoUrl: 'https://images.dog.ceo/breeds/pug/n02110958_13560.jpg' },
|
|
414
|
+
foodOrder: { id: 'food-order-1', quantity: 0 },
|
|
415
415
|
})}
|
|
416
416
|
'
|
|
417
417
|
</code>
|
|
@@ -433,8 +433,8 @@ export const steps: TutorialStep[] = [
|
|
|
433
433
|
{
|
|
434
434
|
type: 'fill-editor',
|
|
435
435
|
content: {
|
|
436
|
-
pet: { name: 'Jack',
|
|
437
|
-
|
|
436
|
+
pet: { name: 'Jack', photoUrl: 'https://images.dog.ceo/breeds/pug/n02110958_13560.jpg' },
|
|
437
|
+
foodOrder: { id: 'food-order-1', quantity: 0 },
|
|
438
438
|
},
|
|
439
439
|
},
|
|
440
440
|
],
|
|
@@ -5,7 +5,7 @@ from .services.types import Pet
|
|
|
5
5
|
|
|
6
6
|
class PetRequest(BaseModel):
|
|
7
7
|
name: str
|
|
8
|
-
|
|
8
|
+
photoUrl: str
|
|
9
9
|
|
|
10
10
|
class FoodOrder(BaseModel):
|
|
11
11
|
id: str
|
|
@@ -13,13 +13,13 @@ class FoodOrder(BaseModel):
|
|
|
13
13
|
|
|
14
14
|
class RequestBody(BaseModel):
|
|
15
15
|
pet: PetRequest
|
|
16
|
-
|
|
16
|
+
foodOrder: Optional[FoodOrder] = None
|
|
17
17
|
|
|
18
18
|
config = {
|
|
19
19
|
"type": "api",
|
|
20
20
|
"name": "ApiTrigger",
|
|
21
21
|
"description": "basic-tutorial api trigger",
|
|
22
|
-
"flows": [basic-tutorial"],
|
|
22
|
+
"flows": ["basic-tutorial"],
|
|
23
23
|
"method": "POST",
|
|
24
24
|
"path": "/basic-tutorial",
|
|
25
25
|
"bodySchema": RequestBody.model_json_schema(),
|
|
@@ -34,7 +34,7 @@ async def handler(req, context):
|
|
|
34
34
|
context.logger.info("Step 01 – Processing API Step", {"body": body})
|
|
35
35
|
|
|
36
36
|
pet = body.get("pet", {})
|
|
37
|
-
food_order = body.get("
|
|
37
|
+
food_order = body.get("foodOrder", {})
|
|
38
38
|
|
|
39
39
|
new_pet_record = await pet_store_service.create_pet(pet)
|
|
40
40
|
|
|
@@ -410,8 +410,8 @@ export const steps: TutorialStep[] = [
|
|
|
410
410
|
{' '}-H "Content-Type: application/json" \<br />
|
|
411
411
|
{' '}-d '
|
|
412
412
|
{JSON.stringify({
|
|
413
|
-
pet: { name: 'Jack',
|
|
414
|
-
|
|
413
|
+
pet: { name: 'Jack', photoUrl: 'https://images.dog.ceo/breeds/pug/n02110958_13560.jpg' },
|
|
414
|
+
foodOrder: { id: 'food-order-1', quantity: 0 },
|
|
415
415
|
})}
|
|
416
416
|
'
|
|
417
417
|
</code>
|
|
@@ -433,8 +433,8 @@ export const steps: TutorialStep[] = [
|
|
|
433
433
|
{
|
|
434
434
|
type: 'fill-editor',
|
|
435
435
|
content: {
|
|
436
|
-
pet: { name: 'Jack',
|
|
437
|
-
|
|
436
|
+
pet: { name: 'Jack', photoUrl: 'https://images.dog.ceo/breeds/pug/n02110958_13560.jpg' },
|
|
437
|
+
foodOrder: { id: 'food-order-1', quantity: 0 },
|
|
438
438
|
},
|
|
439
439
|
},
|
|
440
440
|
],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motia",
|
|
3
3
|
"description": "A Modern Unified Backend Framework for APIs, Events and Agents",
|
|
4
|
-
"version": "0.5.11-beta.120-
|
|
4
|
+
"version": "0.5.11-beta.120-011950",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"inquirer": "^8.2.5",
|
|
44
44
|
"table": "^6.9.0",
|
|
45
45
|
"ts-node": "^10.9.2",
|
|
46
|
-
"@motiadev/core": "0.5.11-beta.120-
|
|
47
|
-
"@motiadev/
|
|
48
|
-
"@motiadev/
|
|
46
|
+
"@motiadev/core": "0.5.11-beta.120-011950",
|
|
47
|
+
"@motiadev/stream-client-node": "0.5.11-beta.120-011950",
|
|
48
|
+
"@motiadev/workbench": "0.5.11-beta.120-011950"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@amplitude/analytics-types": "^2.9.2",
|