Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added field authorizedScopes to Fragment #497

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/fragmentarium/domain/Fragment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const config: Parameters<typeof Fragment['create']>[0] = {
philadelphiaNumber: '123',
},
projects: [],
authorizedScopes: ['CAIC'],
}

describe('Fragment', () => {
Expand Down
1 change: 1 addition & 0 deletions src/fragmentarium/domain/FragmentDtos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ export default interface FragmentDto {
excavationNumber?: MuseumNumber
}
colophon?: ColophonDto
authorziedScopes?: string[]
}
7 changes: 5 additions & 2 deletions src/fragmentarium/domain/fragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ interface FragmentProps {
datesInText?: ReadonlyArray<MesopotamianDate>
archaeology?: Archaeology
colophon?: Colophon
authorizedScopes?: string[]
}

export class Fragment {
Expand Down Expand Up @@ -137,7 +138,8 @@ export class Fragment {
readonly date?: MesopotamianDate,
readonly datesInText?: ReadonlyArray<MesopotamianDate>,
readonly archaeology?: Archaeology,
readonly colophon?: Colophon
readonly colophon?: Colophon,
readonly authorizedScopes?: string[]
) {}

static create(props: FragmentProps): Fragment {
Expand Down Expand Up @@ -168,7 +170,8 @@ export class Fragment {
props.date,
props.datesInText,
props.archaeology,
props.colophon
props.colophon,
props.authorizedScopes
)
}

Expand Down
Loading