@crossdelta/platform-sdk 0.16.2 → 0.16.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.
package/README.md
CHANGED
|
@@ -394,10 +394,17 @@ See [@crossdelta/infrastructure](https://www.npmjs.com/package/@crossdelta/infra
|
|
|
394
394
|
import { createContract } from '@crossdelta/cloudevents'
|
|
395
395
|
import { z } from 'zod'
|
|
396
396
|
|
|
397
|
+
export const OrdersCreatedSchema = z.object({
|
|
398
|
+
orderId: z.string(),
|
|
399
|
+
total: z.number(),
|
|
400
|
+
})
|
|
401
|
+
|
|
402
|
+
export type OrdersCreatedData = z.infer<typeof OrdersCreatedSchema>
|
|
403
|
+
|
|
397
404
|
export const OrdersCreatedContract = createContract({
|
|
398
405
|
type: 'orders.created',
|
|
399
406
|
channel: { stream: 'ORDERS' },
|
|
400
|
-
schema:
|
|
407
|
+
schema: OrdersCreatedSchema,
|
|
401
408
|
})
|
|
402
409
|
```
|
|
403
410
|
|