Skip to content

Commit

Permalink
Merge pull request #87 from nginformatica/fix/add-type-property
Browse files Browse the repository at this point in the history
fix: add type property
  • Loading branch information
renanponick authored Mar 29, 2023
2 parents ec16f4f + 3d6ab3a commit 9d14d93
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quirons-broker",
"version": "0.0.1-alpha.104",
"version": "0.0.1-alpha.105",
"description": "A small library to expose the broker types",
"main": "index.ts",
"typings": "index.d.ts",
Expand Down
14 changes: 10 additions & 4 deletions src/ttalk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,16 @@ export const WorkingShift = t.intersection([

export type WorkingShift = t.TypeOf<typeof WorkingShift>

export const Department = t.type({
id: t.string,
description: t.string
})
export const Department = t.intersection([
t.type({
id: t.string,
description: t.string
}),
t.partial({
companyId: nullable(t.string),
branchId: t.union([t.string, t.null, t.literal(false)])
})
])

export type Department = t.TypeOf<typeof Department>

Expand Down
3 changes: 2 additions & 1 deletion src/ttalk/internal/occupation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const Positions = t.intersection([
cbo: nullable(cbo),
activityDetails: nullable(t.string),
created_at: nullable(datetime),
updated_at: nullable(datetime)
updated_at: nullable(datetime),
observation: nullable(t.string)
})
])
export type Positions = t.TypeOf<typeof Positions>
Expand Down

0 comments on commit 9d14d93

Please sign in to comment.