Skip to content
Draft
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/change-discovery.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export type ChangeDiscoveryActivity = Prettify<
| {
type: Exclude<ChangeDiscoveryActivityType, 'Move'>;
object: ChangeDiscoveryBaseObject;
target: never;
}
| {
type: 'Move';
Expand Down
2 changes: 1 addition & 1 deletion src/services/search-2.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export type Search2AnnotationPage = Prettify<
>;

export type Search2ContextualizingAnnotation = Prettify<
Annotation & {
Omit<Annotation, 'motivation' | 'target'> & {
motivation: 'contextualizing';
target: {
type: 'SpecificResource';
Expand Down
22 changes: 19 additions & 3 deletions tests/manifest.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Manifest } from '../src/resources/manifest';
import { Service } from '../src/resources/service';
import { AuthProbeService2 } from '../src/services/auth-2';
import { ImageService, ImageService3 } from '../src/services/image-service';
import { ContentResource } from '../src/resources/contentResource';

const cookbook1: Manifest = {
'@context': 'http://iiif.io/api/presentation/3/context.json',
Expand Down Expand Up @@ -153,7 +154,7 @@ const cookbook5: Manifest = {
id: 'https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen',
profile: 'level1',
type: 'ImageService3',
} as ImageService,
},
],
},
target: 'https://iiif.io/api/cookbook/recipe/0005-image-service/canvas/p1',
Expand All @@ -165,6 +166,21 @@ const cookbook5: Manifest = {
],
};

const contentResourceWithService: ContentResource = {
id: 'https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen/full/max/0/default.jpg',
type: 'Image',
format: 'image/jpeg',
height: 3024,
width: 4032,
service: [
{
id: 'https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen',
profile: 'level1',
type: 'ImageService3',
},
],
};

const imageService1: ImageService3 = {
'@context': 'http://iiif.io/api/image/3/context.json',
extraFormats: ['jpg', 'png'],
Expand Down Expand Up @@ -357,7 +373,7 @@ const auth2_4_kiosk: AuthProbeService2 = {
},
{
id: 'https://iiif-auth2-server.herokuapp.com/auth/logout/kiosk/04_gene_cernan.jpg',
type: 'AuthLogoutService2' as const,
type: 'AuthLogoutService2',
label: {
en: ['Log out'],
},
Expand Down Expand Up @@ -391,7 +407,7 @@ const auth2_5_external: AuthProbeService2 = {
},
{
id: 'https://iiif-auth2-server.herokuapp.com/auth/logout/external/05_cader_idris.jpg',
type: 'AuthLogoutService2' as const,
type: 'AuthLogoutService2',
label: {
en: ['Log out'],
},
Expand Down
Loading