Skip to content

Commit

Permalink
fix: corrected type dict for States in MapState (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
babayacotono authored Mar 21, 2024
1 parent f423d68 commit 55b8b12
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/types/schemas/state-machine.schema.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/types/sfn.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const processConfig = $object({
export const itemProcessor = $object({
ProcessorConfig: $optional($ref(processConfig)),
StartAt: $string(),
States: $ref(taskState),
States: $dict($ref(taskState)),
})

export const readerConfig = $object({
Expand All @@ -96,8 +96,8 @@ export const itemReader = $object({
})

export const itemBatcher = $object({
MaxItemsPerBatchPath: $optional($dict($string)),
MaxInputBytesPerBatchPath: $optional($dict($string)),
MaxItemsPerBatchPath: $optional($dict($number)),
MaxInputBytesPerBatchPath: $optional($dict($number)),
})

export const mapState = $union(
Expand Down
8 changes: 5 additions & 3 deletions src/types/sfn.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@ export interface FailState {

export interface ItemBatcher {
MaxItemsPerBatchPath?: {
[k: string]: string | undefined
[k: string]: number | undefined
}
MaxInputBytesPerBatchPath?: {
[k: string]: string | undefined
[k: string]: number | undefined
}
}

export interface ItemProcessor {
ProcessorConfig?: ProcessConfig
StartAt: string
States: TaskState
States: {
[k: string]: TaskState | undefined
}
}

export interface ItemReader {
Expand Down

0 comments on commit 55b8b12

Please sign in to comment.