Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break proto #57

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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://[email protected]:gabledata/tutorial:typescript:segment:Create order
doc: "PLACEHOLDER: Add documentation"
name: Create order
namespace: typescript
owner: [email protected]
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://[email protected]:gabledata/tutorial/event_schemas/OrderCreated.proto:tutorial.OrderCreated
doc: "PLACEHOLDER: Add documentation"
name: OrderCreated
namespace: tutorial
owner: [email protected]
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
Loading