Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions contracts/create_order.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
id: a82ddfa5-c7a6-4179-bf30-2d50e6e57bad
dataAssetResourceName: typescript://git@github.com:gabledata/tutorial:typescript:segment:Create order
doc: "PLACEHOLDER: Add documentation"
name: Create order
namespace: typescript
owner: suzanne@gable.ai
schema:
- name: orderId
type: string
doc: "PLACEHOLDER: Add documentation"
- name: numOfProducts
type: string
doc: "PLACEHOLDER: Add documentation"
30 changes: 30 additions & 0 deletions contracts/order_created.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
id: a1e6540d-bf91-423a-8b4e-a2cafc497782
dataAssetResourceName: protobuf://git@github.com:gabledata/tutorial/event_schemas/OrderCreated.proto:tutorial.OrderCreated
doc: "PLACEHOLDER: Add documentation"
name: OrderCreated
namespace: tutorial
owner: eng@gable.ai
schema:
- name: order_id
type: string
bytes: 2147483648
doc: "PLACEHOLDER: Add documentation"
- name: user_id
type: string
bytes: 2147483648
doc: "PLACEHOLDER: Add documentation"
- name: total_amount
type: float
bits: 32
doc: "PLACEHOLDER: Add documentation"
- name: created_at
type: int
logical: Timestamp
unit: nanosecond
timezone: UTC
bits: 64
doc: "PLACEHOLDER: Add documentation"
- name: total_items
type: int
bits: 32
doc: "PLACEHOLDER: Add documentation"
2 changes: 1 addition & 1 deletion typescript/server/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ app.post('/createorder', (req, res) => {
analytics.track({
userId: req.body.userId,
event: 'Create order',
properties: { orderId: '99482', numOfProducts: '5' }
properties: { orderId: '99482', numOfProducts: 123 }
})
res.sendStatus(201)
});
Expand Down