https://github.com/proxima-one/stream-schemas
TS schemas reused across streaming applications
https://github.com/proxima-one/stream-schemas
library
Last synced: 5 months ago
JSON representation
TS schemas reused across streaming applications
- Host: GitHub
- URL: https://github.com/proxima-one/stream-schemas
- Owner: proxima-one
- Created: 2022-02-09T14:17:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-25T08:51:23.000Z (about 3 years ago)
- Last Synced: 2025-11-30T11:36:23.141Z (7 months ago)
- Topics: library
- Language: TypeScript
- Homepage:
- Size: 548 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stream Schema
Stream processes are defined as in the following schema.
## Schema
### Stream Process
- id: unique stream identifier
- name: descriptive stream name
- version: string that describes current version of stream
- input_streams: list of input stream ids
- output_streams: list of output stream ids
- container_id: identitifier for stream process
- build: string location for build files
```typescript
interface EventStreamProcess {
id: string;
name: string;
owner: string;
version: string;
input_streams: Array;
output_streams: Array;
container_id: string;
build: string;
}
```
### Event Stream
- id: unique stream identifier
- process_id: unique identifier for process that creates the stream
- name: descriptive stream name
- version: string that describes current version of stream
- serdes: serialization of the current stream
- type: represents an enum for StreamType [SOURCE, STATELESS, STATEFUL, QUERY]
```typescript
interface EventStream {
id: string;
process_id: string;
name: string;
type: StreamType;
schema_uri: string;
}
```
### Schema URI
```typescript
interface SchemaMeta {
type: string;
name: string;
uri: string;
version: string;
}
```
### Event Stream Schema
- name: descriptive stream name
- version: string that describes current version of schema
- serdes: serialization of the current stream
```typescript
interface Schema {
name: string;
version: string;
serdes: Serdes;
}
```
### Example
```typescript
export type FungibleTokenDiscoveryStreamEvent =
| events.NewToken & {
ref?: BlockchainReference
};
export const fungibleTokenDiscovery: EventStreamSchema = {
name: "fungible-token-discovery.streams.proxima.one",
serdes: serializers.json(),
version: "0.1.0",
}