-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: re-order folder structure for types
- Loading branch information
Showing
7 changed files
with
445 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import type { FixMe } from '../util/types'; | ||
import type { UserTransformationInput } from './userTransformationContracts'; | ||
|
||
export type DestinationDefinition = { | ||
ID: string; | ||
Name: string; | ||
DisplayName: string; | ||
Config: FixMe; | ||
}; | ||
|
||
export type Destination<DestinationConfig = FixMe> = { | ||
ID: string; | ||
Name: string; | ||
DestinationDefinition: DestinationDefinition; | ||
Config: DestinationConfig; | ||
Enabled: boolean; | ||
WorkspaceID: string; | ||
Transformations: UserTransformationInput[]; | ||
RevisionID?: string; | ||
IsProcessorEnabled?: boolean; | ||
IsConnectionEnabled?: boolean; | ||
}; | ||
|
||
export type Connection = { | ||
sourceId: string; | ||
destinationId: string; | ||
enabled: boolean; | ||
config: Record<string, unknown>; | ||
processorEnabled?: boolean; | ||
}; | ||
|
||
export type SourceDefinition = { | ||
ID: string; | ||
Name: string; | ||
Category: string; | ||
Type: string; | ||
}; | ||
|
||
export type Source = { | ||
ID: string; | ||
OriginalID: string; | ||
Name: string; | ||
SourceDefinition: SourceDefinition; | ||
Config: object; | ||
Enabled: boolean; | ||
WorkspaceID: string; | ||
WriteKey: string; | ||
Transformations?: UserTransformationInput[]; | ||
RevisionID?: string; | ||
Destinations?: Destination[]; | ||
Transient: boolean; | ||
EventSchemasEnabled: boolean; | ||
DgSourceTrackingPlanConfig: object; | ||
}; | ||
|
||
export type UserTransformationLibrary = { | ||
VersionID: string; | ||
}; | ||
|
||
export type Credential = { | ||
id: string; | ||
key: string; | ||
value: string; | ||
isSecret: boolean; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/** | ||
* Supported message types in the event specification | ||
*/ | ||
export enum MessageType { | ||
IDENTIFY = 'identify', | ||
TRACK = 'track', | ||
PAGE = 'page', | ||
SCREEN = 'screen', | ||
GROUP = 'group', | ||
ALIAS = 'alias', | ||
AUDIENCE_LIST = 'audiencelist', | ||
} | ||
|
||
/** | ||
* Core event message structure following Rudder event spec | ||
*/ | ||
export type RudderMessage = { | ||
userId?: string; | ||
anonymousId: string; | ||
type: MessageType; | ||
channel: string; | ||
context: object; | ||
originalTimestamp: Date; | ||
sentAt: Date; | ||
timestamp: Date; | ||
event?: string; | ||
integrations?: object; | ||
messageId: string; | ||
properties?: object; | ||
traits?: object; | ||
}; | ||
|
||
/** | ||
* Metadata structure for messages | ||
*/ | ||
export type Metadata = { | ||
sourceId: string; | ||
workspaceId: string; | ||
namespace: string; | ||
instanceId: string; | ||
sourceType: string; | ||
sourceCategory: string; | ||
trackingPlanId: string; | ||
trackingPlanVersion: number; | ||
sourceTpConfig: object; | ||
mergedTpConfig: object; | ||
destinationId: string; | ||
jobRunId: string; | ||
jobId: number; | ||
sourceBatchId: string; | ||
sourceJobId: string; | ||
sourceJobRunId: string; | ||
sourceTaskId: string; | ||
sourceTaskRunId: string; | ||
recordId: object; | ||
destinationType: string; | ||
messageId: string; | ||
oauthAccessToken: string; | ||
messageIds: string[]; | ||
rudderId: string; | ||
receivedAt: string; | ||
eventName: string; | ||
eventType: string; | ||
sourceDefinitionId: string; | ||
destinationDefinitionId: string; | ||
transformationId: string; | ||
dontBatch?: boolean; | ||
}; | ||
|
||
export type MessageIdMetadataMap = { | ||
[key: string]: Metadata; | ||
}; |
Oops, something went wrong.