refactor(server): plural endpoints (#9667)

This commit is contained in:
Jason Rasmussen 2024-05-22 13:24:57 -04:00 committed by GitHub
parent 6a4c2e97c0
commit 202745f14b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
36 changed files with 589 additions and 584 deletions

View File

@ -14,7 +14,7 @@ import { app, asBearerAuth, utils } from 'src/utils';
import request from 'supertest';
import { beforeAll, beforeEach, describe, expect, it } from 'vitest';
describe('/activity', () => {
describe('/activities', () => {
let admin: LoginResponseDto;
let nonOwner: LoginResponseDto;
let asset: AssetFileUploadResponseDto;
@ -45,22 +45,24 @@ describe('/activity', () => {
await utils.resetDatabase(['activity']);
});
describe('GET /activity', () => {
describe('GET /activities', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get('/activity');
const { status, body } = await request(app).get('/activities');
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should require an albumId', async () => {
const { status, body } = await request(app).get('/activity').set('Authorization', `Bearer ${admin.accessToken}`);
const { status, body } = await request(app)
.get('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(400);
expect(body).toEqual(errorDto.badRequest(expect.arrayContaining(['albumId must be a UUID'])));
});
it('should reject an invalid albumId', async () => {
const { status, body } = await request(app)
.get('/activity')
.get('/activities')
.query({ albumId: uuidDto.invalid })
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(400);
@ -69,7 +71,7 @@ describe('/activity', () => {
it('should reject an invalid assetId', async () => {
const { status, body } = await request(app)
.get('/activity')
.get('/activities')
.query({ albumId: uuidDto.notFound, assetId: uuidDto.invalid })
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(400);
@ -78,7 +80,7 @@ describe('/activity', () => {
it('should start off empty', async () => {
const { status, body } = await request(app)
.get('/activity')
.get('/activities')
.query({ albumId: album.id })
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(body).toEqual([]);
@ -102,7 +104,7 @@ describe('/activity', () => {
]);
const { status, body } = await request(app)
.get('/activity')
.get('/activities')
.query({ albumId: album.id })
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(200);
@ -121,7 +123,7 @@ describe('/activity', () => {
]);
const { status, body } = await request(app)
.get('/activity')
.get('/activities')
.query({ albumId: album.id, type: 'comment' })
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(200);
@ -140,7 +142,7 @@ describe('/activity', () => {
]);
const { status, body } = await request(app)
.get('/activity')
.get('/activities')
.query({ albumId: album.id, type: 'like' })
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(200);
@ -152,7 +154,7 @@ describe('/activity', () => {
const reaction = await createActivity({ albumId: album.id, type: ReactionType.Like });
const response1 = await request(app)
.get('/activity')
.get('/activities')
.query({ albumId: album.id, userId: uuidDto.notFound })
.set('Authorization', `Bearer ${admin.accessToken}`);
@ -160,7 +162,7 @@ describe('/activity', () => {
expect(response1.body.length).toBe(0);
const response2 = await request(app)
.get('/activity')
.get('/activities')
.query({ albumId: album.id, userId: admin.userId })
.set('Authorization', `Bearer ${admin.accessToken}`);
@ -180,7 +182,7 @@ describe('/activity', () => {
]);
const { status, body } = await request(app)
.get('/activity')
.get('/activities')
.query({ albumId: album.id, assetId: asset.id })
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(200);
@ -189,16 +191,16 @@ describe('/activity', () => {
});
});
describe('POST /activity', () => {
describe('POST /activities', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).post('/activity');
const { status, body } = await request(app).post('/activities');
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should require an albumId', async () => {
const { status, body } = await request(app)
.post('/activity')
.post('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ albumId: uuidDto.invalid });
expect(status).toEqual(400);
@ -207,7 +209,7 @@ describe('/activity', () => {
it('should require a comment when type is comment', async () => {
const { status, body } = await request(app)
.post('/activity')
.post('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ albumId: uuidDto.notFound, type: 'comment', comment: null });
expect(status).toEqual(400);
@ -216,7 +218,7 @@ describe('/activity', () => {
it('should add a comment to an album', async () => {
const { status, body } = await request(app)
.post('/activity')
.post('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({
albumId: album.id,
@ -236,7 +238,7 @@ describe('/activity', () => {
it('should add a like to an album', async () => {
const { status, body } = await request(app)
.post('/activity')
.post('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ albumId: album.id, type: 'like' });
expect(status).toEqual(201);
@ -253,7 +255,7 @@ describe('/activity', () => {
it('should return a 200 for a duplicate like on the album', async () => {
const reaction = await createActivity({ albumId: album.id, type: ReactionType.Like });
const { status, body } = await request(app)
.post('/activity')
.post('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ albumId: album.id, type: 'like' });
expect(status).toEqual(200);
@ -267,7 +269,7 @@ describe('/activity', () => {
type: ReactionType.Like,
});
const { status, body } = await request(app)
.post('/activity')
.post('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ albumId: album.id, type: 'like' });
expect(status).toEqual(201);
@ -276,7 +278,7 @@ describe('/activity', () => {
it('should add a comment to an asset', async () => {
const { status, body } = await request(app)
.post('/activity')
.post('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({
albumId: album.id,
@ -297,7 +299,7 @@ describe('/activity', () => {
it('should add a like to an asset', async () => {
const { status, body } = await request(app)
.post('/activity')
.post('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ albumId: album.id, assetId: asset.id, type: 'like' });
expect(status).toEqual(201);
@ -319,7 +321,7 @@ describe('/activity', () => {
});
const { status, body } = await request(app)
.post('/activity')
.post('/activities')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ albumId: album.id, assetId: asset.id, type: 'like' });
expect(status).toEqual(200);
@ -327,16 +329,16 @@ describe('/activity', () => {
});
});
describe('DELETE /activity/:id', () => {
describe('DELETE /activities/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).delete(`/activity/${uuidDto.notFound}`);
const { status, body } = await request(app).delete(`/activities/${uuidDto.notFound}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should require a valid uuid', async () => {
const { status, body } = await request(app)
.delete(`/activity/${uuidDto.invalid}`)
.delete(`/activities/${uuidDto.invalid}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(400);
expect(body).toEqual(errorDto.badRequest(['id must be a UUID']));
@ -349,7 +351,7 @@ describe('/activity', () => {
comment: 'This is a test comment',
});
const { status } = await request(app)
.delete(`/activity/${reaction.id}`)
.delete(`/activities/${reaction.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(204);
});
@ -360,7 +362,7 @@ describe('/activity', () => {
type: ReactionType.Like,
});
const { status } = await request(app)
.delete(`/activity/${reaction.id}`)
.delete(`/activities/${reaction.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(204);
});
@ -373,7 +375,7 @@ describe('/activity', () => {
});
const { status } = await request(app)
.delete(`/activity/${reaction.id}`)
.delete(`/activities/${reaction.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(204);
@ -387,7 +389,7 @@ describe('/activity', () => {
});
const { status, body } = await request(app)
.delete(`/activity/${reaction.id}`)
.delete(`/activities/${reaction.id}`)
.set('Authorization', `Bearer ${nonOwner.accessToken}`);
expect(status).toBe(400);
@ -405,7 +407,7 @@ describe('/activity', () => {
);
const { status } = await request(app)
.delete(`/activity/${reaction.id}`)
.delete(`/activities/${reaction.id}`)
.set('Authorization', `Bearer ${nonOwner.accessToken}`);
expect(status).toBe(204);

View File

@ -23,7 +23,7 @@ const user2SharedUser = 'user2SharedUser';
const user2SharedLink = 'user2SharedLink';
const user2NotShared = 'user2NotShared';
describe('/album', () => {
describe('/albums', () => {
let admin: LoginResponseDto;
let user1: LoginResponseDto;
let user1Asset1: AssetFileUploadResponseDto;
@ -110,16 +110,16 @@ describe('/album', () => {
await deleteUser({ id: user3.userId, deleteUserDto: {} }, { headers: asBearerAuth(admin.accessToken) });
});
describe('GET /album', () => {
describe('GET /albums', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get('/album');
const { status, body } = await request(app).get('/albums');
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should reject an invalid shared param', async () => {
const { status, body } = await request(app)
.get('/album?shared=invalid')
.get('/albums?shared=invalid')
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toEqual(400);
expect(body).toEqual(errorDto.badRequest(['shared must be a boolean value']));
@ -127,7 +127,7 @@ describe('/album', () => {
it('should reject an invalid assetId param', async () => {
const { status, body } = await request(app)
.get('/album?assetId=invalid')
.get('/albums?assetId=invalid')
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toEqual(400);
expect(body).toEqual(errorDto.badRequest(['assetId must be a UUID']));
@ -135,7 +135,7 @@ describe('/album', () => {
it("should not show other users' favorites", async () => {
const { status, body } = await request(app)
.get(`/album/${user1Albums[0].id}?withoutAssets=false`)
.get(`/albums/${user1Albums[0].id}?withoutAssets=false`)
.set('Authorization', `Bearer ${user2.accessToken}`);
expect(status).toEqual(200);
expect(body).toEqual({
@ -146,7 +146,7 @@ describe('/album', () => {
it('should not return shared albums with a deleted owner', async () => {
const { status, body } = await request(app)
.get('/album?shared=true')
.get('/albums?shared=true')
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
@ -178,7 +178,7 @@ describe('/album', () => {
});
it('should return the album collection including owned and shared', async () => {
const { status, body } = await request(app).get('/album').set('Authorization', `Bearer ${user1.accessToken}`);
const { status, body } = await request(app).get('/albums').set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
expect(body).toHaveLength(4);
expect(body).toEqual(
@ -209,7 +209,7 @@ describe('/album', () => {
it('should return the album collection filtered by shared', async () => {
const { status, body } = await request(app)
.get('/album?shared=true')
.get('/albums?shared=true')
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
expect(body).toHaveLength(4);
@ -241,7 +241,7 @@ describe('/album', () => {
it('should return the album collection filtered by NOT shared', async () => {
const { status, body } = await request(app)
.get('/album?shared=false')
.get('/albums?shared=false')
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
expect(body).toHaveLength(1);
@ -258,7 +258,7 @@ describe('/album', () => {
it('should return the album collection filtered by assetId', async () => {
const { status, body } = await request(app)
.get(`/album?assetId=${user1Asset2.id}`)
.get(`/albums?assetId=${user1Asset2.id}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
expect(body).toHaveLength(1);
@ -266,7 +266,7 @@ describe('/album', () => {
it('should return the album collection filtered by assetId and ignores shared=true', async () => {
const { status, body } = await request(app)
.get(`/album?shared=true&assetId=${user1Asset1.id}`)
.get(`/albums?shared=true&assetId=${user1Asset1.id}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
expect(body).toHaveLength(5);
@ -274,23 +274,23 @@ describe('/album', () => {
it('should return the album collection filtered by assetId and ignores shared=false', async () => {
const { status, body } = await request(app)
.get(`/album?shared=false&assetId=${user1Asset1.id}`)
.get(`/albums?shared=false&assetId=${user1Asset1.id}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
expect(body).toHaveLength(5);
});
});
describe('GET /album/:id', () => {
describe('GET /albums/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get(`/album/${user1Albums[0].id}`);
const { status, body } = await request(app).get(`/albums/${user1Albums[0].id}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should return album info for own album', async () => {
const { status, body } = await request(app)
.get(`/album/${user1Albums[0].id}?withoutAssets=false`)
.get(`/albums/${user1Albums[0].id}?withoutAssets=false`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
@ -302,7 +302,7 @@ describe('/album', () => {
it('should return album info for shared album (editor)', async () => {
const { status, body } = await request(app)
.get(`/album/${user2Albums[0].id}?withoutAssets=false`)
.get(`/albums/${user2Albums[0].id}?withoutAssets=false`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
@ -311,7 +311,7 @@ describe('/album', () => {
it('should return album info for shared album (viewer)', async () => {
const { status, body } = await request(app)
.get(`/album/${user1Albums[3].id}?withoutAssets=false`)
.get(`/albums/${user1Albums[3].id}?withoutAssets=false`)
.set('Authorization', `Bearer ${user2.accessToken}`);
expect(status).toBe(200);
@ -320,7 +320,7 @@ describe('/album', () => {
it('should return album info with assets when withoutAssets is undefined', async () => {
const { status, body } = await request(app)
.get(`/album/${user1Albums[0].id}`)
.get(`/albums/${user1Albums[0].id}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
@ -332,7 +332,7 @@ describe('/album', () => {
it('should return album info without assets when withoutAssets is true', async () => {
const { status, body } = await request(app)
.get(`/album/${user1Albums[0].id}?withoutAssets=true`)
.get(`/albums/${user1Albums[0].id}?withoutAssets=true`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
@ -344,16 +344,16 @@ describe('/album', () => {
});
});
describe('GET /album/count', () => {
describe('GET /albums/count', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get('/album/count');
const { status, body } = await request(app).get('/albums/count');
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should return total count of albums the user has access to', async () => {
const { status, body } = await request(app)
.get('/album/count')
.get('/albums/count')
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
@ -361,16 +361,16 @@ describe('/album', () => {
});
});
describe('POST /album', () => {
describe('POST /albums', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).post('/album').send({ albumName: 'New album' });
const { status, body } = await request(app).post('/albums').send({ albumName: 'New album' });
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should create an album', async () => {
const { status, body } = await request(app)
.post('/album')
.post('/albums')
.send({ albumName: 'New album' })
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(201);
@ -395,9 +395,9 @@ describe('/album', () => {
});
});
describe('PUT /album/:id/assets', () => {
describe('PUT /albums/:id/assets', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).put(`/album/${user1Albums[0].id}/assets`);
const { status, body } = await request(app).put(`/albums/${user1Albums[0].id}/assets`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
@ -405,7 +405,7 @@ describe('/album', () => {
it('should be able to add own asset to own album', async () => {
const asset = await utils.createAsset(user1.accessToken);
const { status, body } = await request(app)
.put(`/album/${user1Albums[0].id}/assets`)
.put(`/albums/${user1Albums[0].id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ ids: [asset.id] });
@ -416,7 +416,7 @@ describe('/album', () => {
it('should be able to add own asset to shared album', async () => {
const asset = await utils.createAsset(user1.accessToken);
const { status, body } = await request(app)
.put(`/album/${user2Albums[0].id}/assets`)
.put(`/albums/${user2Albums[0].id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ ids: [asset.id] });
@ -427,7 +427,7 @@ describe('/album', () => {
it('should not be able to add assets to album as a viewer', async () => {
const asset = await utils.createAsset(user2.accessToken);
const { status, body } = await request(app)
.put(`/album/${user1Albums[3].id}/assets`)
.put(`/albums/${user1Albums[3].id}/assets`)
.set('Authorization', `Bearer ${user2.accessToken}`)
.send({ ids: [asset.id] });
@ -438,7 +438,7 @@ describe('/album', () => {
it('should add duplicate assets only once', async () => {
const asset = await utils.createAsset(user1.accessToken);
const { status, body } = await request(app)
.put(`/album/${user1Albums[0].id}/assets`)
.put(`/albums/${user1Albums[0].id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ ids: [asset.id, asset.id] });
@ -450,10 +450,10 @@ describe('/album', () => {
});
});
describe('PATCH /album/:id', () => {
describe('PATCH /albums/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app)
.patch(`/album/${uuidDto.notFound}`)
.patch(`/albums/${uuidDto.notFound}`)
.send({ albumName: 'New album name' });
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -464,7 +464,7 @@ describe('/album', () => {
albumName: 'New album',
});
const { status, body } = await request(app)
.patch(`/album/${album.id}`)
.patch(`/albums/${album.id}`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({
albumName: 'New album name',
@ -481,7 +481,7 @@ describe('/album', () => {
it('should not be able to update as a viewer', async () => {
const { status, body } = await request(app)
.patch(`/album/${user1Albums[3].id}`)
.patch(`/albums/${user1Albums[3].id}`)
.set('Authorization', `Bearer ${user2.accessToken}`)
.send({ albumName: 'New album name' });
@ -491,7 +491,7 @@ describe('/album', () => {
it('should not be able to update as an editor', async () => {
const { status, body } = await request(app)
.patch(`/album/${user1Albums[0].id}`)
.patch(`/albums/${user1Albums[0].id}`)
.set('Authorization', `Bearer ${user2.accessToken}`)
.send({ albumName: 'New album name' });
@ -500,10 +500,10 @@ describe('/album', () => {
});
});
describe('DELETE /album/:id/assets', () => {
describe('DELETE /albums/:id/assets', () => {
it('should require authentication', async () => {
const { status, body } = await request(app)
.delete(`/album/${user1Albums[0].id}/assets`)
.delete(`/albums/${user1Albums[0].id}/assets`)
.send({ ids: [user1Asset1.id] });
expect(status).toBe(401);
@ -512,7 +512,7 @@ describe('/album', () => {
it('should not be able to remove foreign asset from own album', async () => {
const { status, body } = await request(app)
.delete(`/album/${user2Albums[0].id}/assets`)
.delete(`/albums/${user2Albums[0].id}/assets`)
.set('Authorization', `Bearer ${user2.accessToken}`)
.send({ ids: [user1Asset1.id] });
@ -528,7 +528,7 @@ describe('/album', () => {
it('should not be able to remove foreign asset from foreign album', async () => {
const { status, body } = await request(app)
.delete(`/album/${user1Albums[0].id}/assets`)
.delete(`/albums/${user1Albums[0].id}/assets`)
.set('Authorization', `Bearer ${user2.accessToken}`)
.send({ ids: [user1Asset1.id] });
@ -544,7 +544,7 @@ describe('/album', () => {
it('should be able to remove own asset from own album', async () => {
const { status, body } = await request(app)
.delete(`/album/${user1Albums[0].id}/assets`)
.delete(`/albums/${user1Albums[0].id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ ids: [user1Asset1.id] });
@ -554,7 +554,7 @@ describe('/album', () => {
it('should be able to remove own asset from shared album', async () => {
const { status, body } = await request(app)
.delete(`/album/${user2Albums[0].id}/assets`)
.delete(`/albums/${user2Albums[0].id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ ids: [user1Asset1.id] });
@ -564,7 +564,7 @@ describe('/album', () => {
it('should not be able to remove assets from album as a viewer', async () => {
const { status, body } = await request(app)
.delete(`/album/${user1Albums[3].id}/assets`)
.delete(`/albums/${user1Albums[3].id}/assets`)
.set('Authorization', `Bearer ${user2.accessToken}`)
.send({ ids: [user1Asset1.id] });
@ -574,7 +574,7 @@ describe('/album', () => {
it('should remove duplicate assets only once', async () => {
const { status, body } = await request(app)
.delete(`/album/${user1Albums[1].id}/assets`)
.delete(`/albums/${user1Albums[1].id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ ids: [user1Asset1.id, user1Asset1.id] });
@ -596,7 +596,7 @@ describe('/album', () => {
});
it('should require authentication', async () => {
const { status, body } = await request(app).put(`/album/${user1Albums[0].id}/users`).send({ sharedUserIds: [] });
const { status, body } = await request(app).put(`/albums/${user1Albums[0].id}/users`).send({ sharedUserIds: [] });
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -604,7 +604,7 @@ describe('/album', () => {
it('should be able to add user to own album', async () => {
const { status, body } = await request(app)
.put(`/album/${album.id}/users`)
.put(`/albums/${album.id}/users`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ albumUsers: [{ userId: user2.userId, role: AlbumUserRole.Editor }] });
@ -618,7 +618,7 @@ describe('/album', () => {
it('should not be able to share album with owner', async () => {
const { status, body } = await request(app)
.put(`/album/${album.id}/users`)
.put(`/albums/${album.id}/users`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ albumUsers: [{ userId: user1.userId, role: AlbumUserRole.Editor }] });
@ -628,12 +628,12 @@ describe('/album', () => {
it('should not be able to add existing user to shared album', async () => {
await request(app)
.put(`/album/${album.id}/users`)
.put(`/albums/${album.id}/users`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ albumUsers: [{ userId: user2.userId, role: AlbumUserRole.Editor }] });
const { status, body } = await request(app)
.put(`/album/${album.id}/users`)
.put(`/albums/${album.id}/users`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ albumUsers: [{ userId: user2.userId, role: AlbumUserRole.Editor }] });
@ -652,14 +652,16 @@ describe('/album', () => {
expect(album.albumUsers[0].role).toEqual(AlbumUserRole.Viewer);
const { status } = await request(app)
.put(`/album/${album.id}/user/${user2.userId}`)
.put(`/albums/${album.id}/user/${user2.userId}`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ role: AlbumUserRole.Editor });
expect(status).toBe(200);
// Get album to verify the role change
const { body } = await request(app).get(`/album/${album.id}`).set('Authorization', `Bearer ${user1.accessToken}`);
const { body } = await request(app)
.get(`/albums/${album.id}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(body).toEqual(
expect.objectContaining({
albumUsers: [expect.objectContaining({ role: AlbumUserRole.Editor })],
@ -676,7 +678,7 @@ describe('/album', () => {
expect(album.albumUsers[0].role).toEqual(AlbumUserRole.Viewer);
const { status, body } = await request(app)
.put(`/album/${album.id}/user/${user2.userId}`)
.put(`/albums/${album.id}/user/${user2.userId}`)
.set('Authorization', `Bearer ${user2.accessToken}`)
.send({ role: AlbumUserRole.Editor });

View File

@ -5,6 +5,7 @@ import {
LoginResponseDto,
SharedLinkType,
getAssetInfo,
getMyUserInfo,
updateAssets,
} from '@immich/sdk';
import { exiftool } from 'exiftool-vendored';
@ -830,7 +831,7 @@ describe('/asset', () => {
expect(body).toEqual({ id: expect.any(String), duplicate: false });
expect(status).toBe(201);
const { body: user } = await request(app).get('/user/me').set('Authorization', `Bearer ${quotaUser.accessToken}`);
const user = await getMyUserInfo({ headers: asBearerAuth(quotaUser.accessToken) });
expect(user).toEqual(expect.objectContaining({ quotaUsageInBytes: 70 }));
});

View File

@ -2,7 +2,7 @@ import { deleteAssets, getAuditFiles, updateAsset, type LoginResponseDto } from
import { asBearerAuth, utils } from 'src/utils';
import { beforeAll, describe, expect, it } from 'vitest';
describe('/audit', () => {
describe('/audits', () => {
let admin: LoginResponseDto;
beforeAll(async () => {

View File

@ -11,7 +11,7 @@ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest';
const scan = async (accessToken: string, id: string, dto: ScanLibraryDto = {}) =>
scanLibrary({ id, scanLibraryDto: dto }, { headers: asBearerAuth(accessToken) });
describe('/library', () => {
describe('/libraries', () => {
let admin: LoginResponseDto;
let user: LoginResponseDto;
let library: LibraryResponseDto;
@ -37,24 +37,24 @@ describe('/library', () => {
utils.resetEvents();
});
describe('GET /library', () => {
describe('GET /libraries', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get('/library');
const { status, body } = await request(app).get('/libraries');
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
});
describe('POST /library', () => {
describe('POST /libraries', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).post('/library').send({});
const { status, body } = await request(app).post('/libraries').send({});
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should require admin authentication', async () => {
const { status, body } = await request(app)
.post('/library')
.post('/libraries')
.set('Authorization', `Bearer ${user.accessToken}`)
.send({ ownerId: admin.userId });
@ -64,7 +64,7 @@ describe('/library', () => {
it('should create an external library with defaults', async () => {
const { status, body } = await request(app)
.post('/library')
.post('/libraries')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ ownerId: admin.userId });
@ -83,7 +83,7 @@ describe('/library', () => {
it('should create an external library with options', async () => {
const { status, body } = await request(app)
.post('/library')
.post('/libraries')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({
ownerId: admin.userId,
@ -103,7 +103,7 @@ describe('/library', () => {
it('should not create an external library with duplicate import paths', async () => {
const { status, body } = await request(app)
.post('/library')
.post('/libraries')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({
ownerId: admin.userId,
@ -118,7 +118,7 @@ describe('/library', () => {
it('should not create an external library with duplicate exclusion patterns', async () => {
const { status, body } = await request(app)
.post('/library')
.post('/libraries')
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({
ownerId: admin.userId,
@ -132,16 +132,16 @@ describe('/library', () => {
});
});
describe('PUT /library/:id', () => {
describe('PUT /libraries/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).put(`/library/${uuidDto.notFound}`).send({});
const { status, body } = await request(app).put(`/libraries/${uuidDto.notFound}`).send({});
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should change the library name', async () => {
const { status, body } = await request(app)
.put(`/library/${library.id}`)
.put(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ name: 'New Library Name' });
@ -155,7 +155,7 @@ describe('/library', () => {
it('should not set an empty name', async () => {
const { status, body } = await request(app)
.put(`/library/${library.id}`)
.put(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ name: '' });
@ -165,7 +165,7 @@ describe('/library', () => {
it('should change the import paths', async () => {
const { status, body } = await request(app)
.put(`/library/${library.id}`)
.put(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ importPaths: [testAssetDirInternal] });
@ -179,7 +179,7 @@ describe('/library', () => {
it('should reject an empty import path', async () => {
const { status, body } = await request(app)
.put(`/library/${library.id}`)
.put(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ importPaths: [''] });
@ -189,7 +189,7 @@ describe('/library', () => {
it('should reject duplicate import paths', async () => {
const { status, body } = await request(app)
.put(`/library/${library.id}`)
.put(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ importPaths: ['/path', '/path'] });
@ -199,7 +199,7 @@ describe('/library', () => {
it('should change the exclusion pattern', async () => {
const { status, body } = await request(app)
.put(`/library/${library.id}`)
.put(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ exclusionPatterns: ['**/Raw/**'] });
@ -213,7 +213,7 @@ describe('/library', () => {
it('should reject duplicate exclusion patterns', async () => {
const { status, body } = await request(app)
.put(`/library/${library.id}`)
.put(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ exclusionPatterns: ['**/*.jpg', '**/*.jpg'] });
@ -223,7 +223,7 @@ describe('/library', () => {
it('should reject an empty exclusion pattern', async () => {
const { status, body } = await request(app)
.put(`/library/${library.id}`)
.put(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ exclusionPatterns: [''] });
@ -232,9 +232,9 @@ describe('/library', () => {
});
});
describe('GET /library/:id', () => {
describe('GET /libraries/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get(`/library/${uuidDto.notFound}`);
const { status, body } = await request(app).get(`/libraries/${uuidDto.notFound}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -242,7 +242,7 @@ describe('/library', () => {
it('should require admin access', async () => {
const { status, body } = await request(app)
.get(`/library/${uuidDto.notFound}`)
.get(`/libraries/${uuidDto.notFound}`)
.set('Authorization', `Bearer ${user.accessToken}`);
expect(status).toBe(403);
expect(body).toEqual(errorDto.forbidden);
@ -252,7 +252,7 @@ describe('/library', () => {
const library = await utils.createLibrary(admin.accessToken, { ownerId: admin.userId });
const { status, body } = await request(app)
.get(`/library/${library.id}`)
.get(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200);
@ -269,18 +269,18 @@ describe('/library', () => {
});
});
describe('GET /library/:id/statistics', () => {
describe('GET /libraries/:id/statistics', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get(`/library/${uuidDto.notFound}/statistics`);
const { status, body } = await request(app).get(`/libraries/${uuidDto.notFound}/statistics`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
});
describe('POST /library/:id/scan', () => {
describe('POST /libraries/:id/scan', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).post(`/library/${uuidDto.notFound}/scan`).send({});
const { status, body } = await request(app).post(`/libraries/${uuidDto.notFound}/scan`).send({});
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -496,9 +496,9 @@ describe('/library', () => {
});
});
describe('POST /library/:id/removeOffline', () => {
describe('POST /libraries/:id/removeOffline', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).post(`/library/${uuidDto.notFound}/removeOffline`).send({});
const { status, body } = await request(app).post(`/libraries/${uuidDto.notFound}/removeOffline`).send({});
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -532,7 +532,7 @@ describe('/library', () => {
expect(offlineAssets.count).toBe(1);
const { status } = await request(app)
.post(`/library/${library.id}/removeOffline`)
.post(`/libraries/${library.id}/removeOffline`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send();
expect(status).toBe(204);
@ -557,7 +557,7 @@ describe('/library', () => {
expect(assetsBefore.count).toBeGreaterThan(1);
const { status } = await request(app)
.post(`/library/${library.id}/removeOffline`)
.post(`/libraries/${library.id}/removeOffline`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send();
expect(status).toBe(204);
@ -569,9 +569,9 @@ describe('/library', () => {
});
});
describe('POST /library/:id/validate', () => {
describe('POST /libraries/:id/validate', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).post(`/library/${uuidDto.notFound}/validate`).send({});
const { status, body } = await request(app).post(`/libraries/${uuidDto.notFound}/validate`).send({});
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -617,9 +617,9 @@ describe('/library', () => {
});
});
describe('DELETE /library/:id', () => {
describe('DELETE /libraries/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).delete(`/library/${uuidDto.notFound}`);
const { status, body } = await request(app).delete(`/libraries/${uuidDto.notFound}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -629,7 +629,7 @@ describe('/library', () => {
const library = await utils.createLibrary(admin.accessToken, { ownerId: admin.userId });
const { status, body } = await request(app)
.delete(`/library/${library.id}`)
.delete(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(204);
@ -655,7 +655,7 @@ describe('/library', () => {
await utils.waitForWebsocketEvent({ event: 'assetUpload', total: 2 });
const { status, body } = await request(app)
.delete(`/library/${library.id}`)
.delete(`/libraries/${library.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(204);

View File

@ -5,7 +5,7 @@ import { app, asBearerAuth, utils } from 'src/utils';
import request from 'supertest';
import { beforeAll, describe, expect, it } from 'vitest';
describe('/partner', () => {
describe('/partners', () => {
let admin: LoginResponseDto;
let user1: LoginResponseDto;
let user2: LoginResponseDto;
@ -28,9 +28,9 @@ describe('/partner', () => {
]);
});
describe('GET /partner', () => {
describe('GET /partners', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get('/partner');
const { status, body } = await request(app).get('/partners');
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -38,7 +38,7 @@ describe('/partner', () => {
it('should get all partners shared by user', async () => {
const { status, body } = await request(app)
.get('/partner')
.get('/partners')
.set('Authorization', `Bearer ${user1.accessToken}`)
.query({ direction: 'shared-by' });
@ -48,7 +48,7 @@ describe('/partner', () => {
it('should get all partners that share with user', async () => {
const { status, body } = await request(app)
.get('/partner')
.get('/partners')
.set('Authorization', `Bearer ${user1.accessToken}`)
.query({ direction: 'shared-with' });
@ -57,9 +57,9 @@ describe('/partner', () => {
});
});
describe('POST /partner/:id', () => {
describe('POST /partners/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).post(`/partner/${user3.userId}`);
const { status, body } = await request(app).post(`/partners/${user3.userId}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -67,7 +67,7 @@ describe('/partner', () => {
it('should share with new partner', async () => {
const { status, body } = await request(app)
.post(`/partner/${user3.userId}`)
.post(`/partners/${user3.userId}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(201);
@ -76,7 +76,7 @@ describe('/partner', () => {
it('should not share with new partner if already sharing with this partner', async () => {
const { status, body } = await request(app)
.post(`/partner/${user2.userId}`)
.post(`/partners/${user2.userId}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(400);
@ -84,9 +84,9 @@ describe('/partner', () => {
});
});
describe('PUT /partner/:id', () => {
describe('PUT /partners/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).put(`/partner/${user2.userId}`);
const { status, body } = await request(app).put(`/partners/${user2.userId}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -94,7 +94,7 @@ describe('/partner', () => {
it('should update partner', async () => {
const { status, body } = await request(app)
.put(`/partner/${user2.userId}`)
.put(`/partners/${user2.userId}`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ inTimeline: false });
@ -103,9 +103,9 @@ describe('/partner', () => {
});
});
describe('DELETE /partner/:id', () => {
describe('DELETE /partners/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).delete(`/partner/${user3.userId}`);
const { status, body } = await request(app).delete(`/partners/${user3.userId}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -113,7 +113,7 @@ describe('/partner', () => {
it('should delete partner', async () => {
const { status } = await request(app)
.delete(`/partner/${user3.userId}`)
.delete(`/partners/${user3.userId}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
@ -121,7 +121,7 @@ describe('/partner', () => {
it('should throw a bad request if partner not found', async () => {
const { status, body } = await request(app)
.delete(`/partner/${user3.userId}`)
.delete(`/partners/${user3.userId}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(400);

View File

@ -12,7 +12,7 @@ const invalidBirthday = [
{ birthDate: new Date(9999, 0, 0).toISOString(), response: ['Birth date cannot be in the future'] },
];
describe('/person', () => {
describe('/people', () => {
let admin: LoginResponseDto;
let visiblePerson: PersonResponseDto;
let hiddenPerson: PersonResponseDto;
@ -47,11 +47,11 @@ describe('/person', () => {
]);
});
describe('GET /person', () => {
describe('GET /people', () => {
beforeEach(async () => {});
it('should require authentication', async () => {
const { status, body } = await request(app).get('/person');
const { status, body } = await request(app).get('/people');
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -59,7 +59,7 @@ describe('/person', () => {
it('should return all people (including hidden)', async () => {
const { status, body } = await request(app)
.get('/person')
.get('/people')
.set('Authorization', `Bearer ${admin.accessToken}`)
.query({ withHidden: true });
@ -76,7 +76,7 @@ describe('/person', () => {
});
it('should return only visible people', async () => {
const { status, body } = await request(app).get('/person').set('Authorization', `Bearer ${admin.accessToken}`);
const { status, body } = await request(app).get('/people').set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200);
expect(body).toEqual({
@ -90,9 +90,9 @@ describe('/person', () => {
});
});
describe('GET /person/:id', () => {
describe('GET /people/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get(`/person/${uuidDto.notFound}`);
const { status, body } = await request(app).get(`/people/${uuidDto.notFound}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -100,7 +100,7 @@ describe('/person', () => {
it('should throw error if person with id does not exist', async () => {
const { status, body } = await request(app)
.get(`/person/${uuidDto.notFound}`)
.get(`/people/${uuidDto.notFound}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(400);
@ -109,7 +109,7 @@ describe('/person', () => {
it('should return person information', async () => {
const { status, body } = await request(app)
.get(`/person/${visiblePerson.id}`)
.get(`/people/${visiblePerson.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200);
@ -117,9 +117,9 @@ describe('/person', () => {
});
});
describe('GET /person/:id/statistics', () => {
describe('GET /people/:id/statistics', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get(`/person/${multipleAssetsPerson.id}/statistics`);
const { status, body } = await request(app).get(`/people/${multipleAssetsPerson.id}/statistics`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -127,7 +127,7 @@ describe('/person', () => {
it('should throw error if person with id does not exist', async () => {
const { status, body } = await request(app)
.get(`/person/${uuidDto.notFound}/statistics`)
.get(`/people/${uuidDto.notFound}/statistics`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(400);
@ -136,7 +136,7 @@ describe('/person', () => {
it('should return the correct number of assets', async () => {
const { status, body } = await request(app)
.get(`/person/${multipleAssetsPerson.id}/statistics`)
.get(`/people/${multipleAssetsPerson.id}/statistics`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200);
@ -144,9 +144,9 @@ describe('/person', () => {
});
});
describe('POST /person', () => {
describe('POST /people', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).post(`/person`);
const { status, body } = await request(app).post(`/people`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
@ -154,7 +154,7 @@ describe('/person', () => {
for (const { birthDate, response } of invalidBirthday) {
it(`should not accept an invalid birth date [${birthDate}]`, async () => {
const { status, body } = await request(app)
.post(`/person`)
.post(`/people`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ birthDate });
expect(status).toBe(400);
@ -164,7 +164,7 @@ describe('/person', () => {
it('should create a person', async () => {
const { status, body } = await request(app)
.post(`/person`)
.post(`/people`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({
name: 'New Person',
@ -179,9 +179,9 @@ describe('/person', () => {
});
});
describe('PUT /person/:id', () => {
describe('PUT /people/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).put(`/person/${uuidDto.notFound}`);
const { status, body } = await request(app).put(`/people/${uuidDto.notFound}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
@ -193,7 +193,7 @@ describe('/person', () => {
]) {
it(`should not allow null ${key}`, async () => {
const { status, body } = await request(app)
.put(`/person/${visiblePerson.id}`)
.put(`/people/${visiblePerson.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ [key]: null });
expect(status).toBe(400);
@ -204,7 +204,7 @@ describe('/person', () => {
for (const { birthDate, response } of invalidBirthday) {
it(`should not accept an invalid birth date [${birthDate}]`, async () => {
const { status, body } = await request(app)
.put(`/person/${visiblePerson.id}`)
.put(`/people/${visiblePerson.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ birthDate });
expect(status).toBe(400);
@ -214,7 +214,7 @@ describe('/person', () => {
it('should update a date of birth', async () => {
const { status, body } = await request(app)
.put(`/person/${visiblePerson.id}`)
.put(`/people/${visiblePerson.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ birthDate: '1990-01-01T05:00:00.000Z' });
expect(status).toBe(200);
@ -223,7 +223,7 @@ describe('/person', () => {
it('should clear a date of birth', async () => {
const { status, body } = await request(app)
.put(`/person/${visiblePerson.id}`)
.put(`/people/${visiblePerson.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ birthDate: null });
expect(status).toBe(200);

View File

@ -13,7 +13,7 @@ import { app, asBearerAuth, shareUrl, utils } from 'src/utils';
import request from 'supertest';
import { beforeAll, describe, expect, it } from 'vitest';
describe('/shared-link', () => {
describe('/shared-links', () => {
let admin: LoginResponseDto;
let asset1: AssetFileUploadResponseDto;
let asset2: AssetFileUploadResponseDto;
@ -114,9 +114,9 @@ describe('/shared-link', () => {
});
});
describe('GET /shared-link', () => {
describe('GET /shared-links', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get('/shared-link');
const { status, body } = await request(app).get('/shared-links');
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -124,7 +124,7 @@ describe('/shared-link', () => {
it('should get all shared links created by user', async () => {
const { status, body } = await request(app)
.get('/shared-link')
.get('/shared-links')
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
@ -142,7 +142,7 @@ describe('/shared-link', () => {
it('should not get shared links created by other users', async () => {
const { status, body } = await request(app)
.get('/shared-link')
.get('/shared-links')
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200);
@ -150,15 +150,15 @@ describe('/shared-link', () => {
});
});
describe('GET /shared-link/me', () => {
describe('GET /shared-links/me', () => {
it('should not require admin authentication', async () => {
const { status } = await request(app).get('/shared-link/me').set('Authorization', `Bearer ${admin.accessToken}`);
const { status } = await request(app).get('/shared-links/me').set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(403);
});
it('should get data for correct shared link', async () => {
const { status, body } = await request(app).get('/shared-link/me').query({ key: linkWithAlbum.key });
const { status, body } = await request(app).get('/shared-links/me').query({ key: linkWithAlbum.key });
expect(status).toBe(200);
expect(body).toEqual(
@ -172,7 +172,7 @@ describe('/shared-link', () => {
it('should return unauthorized for incorrect shared link', async () => {
const { status, body } = await request(app)
.get('/shared-link/me')
.get('/shared-links/me')
.query({ key: linkWithAlbum.key + 'foo' });
expect(status).toBe(401);
@ -180,14 +180,14 @@ describe('/shared-link', () => {
});
it('should return unauthorized if target has been soft deleted', async () => {
const { status, body } = await request(app).get('/shared-link/me').query({ key: linkWithDeletedAlbum.key });
const { status, body } = await request(app).get('/shared-links/me').query({ key: linkWithDeletedAlbum.key });
expect(status).toBe(401);
expect(body).toEqual(errorDto.invalidShareKey);
});
it('should return unauthorized for password protected link', async () => {
const { status, body } = await request(app).get('/shared-link/me').query({ key: linkWithPassword.key });
const { status, body } = await request(app).get('/shared-links/me').query({ key: linkWithPassword.key });
expect(status).toBe(401);
expect(body).toEqual(errorDto.invalidSharePassword);
@ -195,7 +195,7 @@ describe('/shared-link', () => {
it('should get data for correct password protected link', async () => {
const { status, body } = await request(app)
.get('/shared-link/me')
.get('/shared-links/me')
.query({ key: linkWithPassword.key, password: 'foo' });
expect(status).toBe(200);
@ -209,7 +209,7 @@ describe('/shared-link', () => {
});
it('should return metadata for album shared link', async () => {
const { status, body } = await request(app).get('/shared-link/me').query({ key: linkWithMetadata.key });
const { status, body } = await request(app).get('/shared-links/me').query({ key: linkWithMetadata.key });
expect(status).toBe(200);
expect(body.assets).toHaveLength(1);
@ -225,7 +225,7 @@ describe('/shared-link', () => {
});
it('should not return metadata for album shared link without metadata', async () => {
const { status, body } = await request(app).get('/shared-link/me').query({ key: linkWithoutMetadata.key });
const { status, body } = await request(app).get('/shared-links/me').query({ key: linkWithoutMetadata.key });
expect(status).toBe(200);
expect(body.assets).toHaveLength(1);
@ -239,9 +239,9 @@ describe('/shared-link', () => {
});
});
describe('GET /shared-link/:id', () => {
describe('GET /shared-links/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get(`/shared-link/${linkWithAlbum.id}`);
const { status, body } = await request(app).get(`/shared-links/${linkWithAlbum.id}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -249,7 +249,7 @@ describe('/shared-link', () => {
it('should get shared link by id', async () => {
const { status, body } = await request(app)
.get(`/shared-link/${linkWithAlbum.id}`)
.get(`/shared-links/${linkWithAlbum.id}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
@ -264,7 +264,7 @@ describe('/shared-link', () => {
it('should not get shared link by id if user has not created the link or it does not exist', async () => {
const { status, body } = await request(app)
.get(`/shared-link/${linkWithAlbum.id}`)
.get(`/shared-links/${linkWithAlbum.id}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(400);
@ -272,10 +272,10 @@ describe('/shared-link', () => {
});
});
describe('POST /shared-link', () => {
describe('POST /shared-links', () => {
it('should require authentication', async () => {
const { status, body } = await request(app)
.post('/shared-link')
.post('/shared-links')
.send({ type: SharedLinkType.Album, albumId: uuidDto.notFound });
expect(status).toBe(401);
@ -284,7 +284,7 @@ describe('/shared-link', () => {
it('should require a type and the correspondent asset/album id', async () => {
const { status, body } = await request(app)
.post('/shared-link')
.post('/shared-links')
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(400);
@ -293,7 +293,7 @@ describe('/shared-link', () => {
it('should require an asset/album id', async () => {
const { status, body } = await request(app)
.post('/shared-link')
.post('/shared-links')
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ type: SharedLinkType.Album });
@ -303,7 +303,7 @@ describe('/shared-link', () => {
it('should require a valid asset id', async () => {
const { status, body } = await request(app)
.post('/shared-link')
.post('/shared-links')
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ type: SharedLinkType.Individual, assetId: uuidDto.notFound });
@ -313,7 +313,7 @@ describe('/shared-link', () => {
it('should create a shared link', async () => {
const { status, body } = await request(app)
.post('/shared-link')
.post('/shared-links')
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ type: SharedLinkType.Album, albumId: album.id });
@ -327,10 +327,10 @@ describe('/shared-link', () => {
});
});
describe('PATCH /shared-link/:id', () => {
describe('PATCH /shared-links/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app)
.patch(`/shared-link/${linkWithAlbum.id}`)
.patch(`/shared-links/${linkWithAlbum.id}`)
.send({ description: 'foo' });
expect(status).toBe(401);
@ -339,7 +339,7 @@ describe('/shared-link', () => {
it('should fail if invalid link', async () => {
const { status, body } = await request(app)
.patch(`/shared-link/${uuidDto.notFound}`)
.patch(`/shared-links/${uuidDto.notFound}`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ description: 'foo' });
@ -349,7 +349,7 @@ describe('/shared-link', () => {
it('should update shared link', async () => {
const { status, body } = await request(app)
.patch(`/shared-link/${linkWithAlbum.id}`)
.patch(`/shared-links/${linkWithAlbum.id}`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ description: 'foo' });
@ -364,10 +364,10 @@ describe('/shared-link', () => {
});
});
describe('PUT /shared-link/:id/assets', () => {
describe('PUT /shared-links/:id/assets', () => {
it('should not add assets to shared link (album)', async () => {
const { status, body } = await request(app)
.put(`/shared-link/${linkWithAlbum.id}/assets`)
.put(`/shared-links/${linkWithAlbum.id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ assetIds: [asset2.id] });
@ -377,7 +377,7 @@ describe('/shared-link', () => {
it('should add an assets to a shared link (individual)', async () => {
const { status, body } = await request(app)
.put(`/shared-link/${linkWithAssets.id}/assets`)
.put(`/shared-links/${linkWithAssets.id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ assetIds: [asset2.id] });
@ -386,10 +386,10 @@ describe('/shared-link', () => {
});
});
describe('DELETE /shared-link/:id/assets', () => {
describe('DELETE /shared-links/:id/assets', () => {
it('should not remove assets from a shared link (album)', async () => {
const { status, body } = await request(app)
.delete(`/shared-link/${linkWithAlbum.id}/assets`)
.delete(`/shared-links/${linkWithAlbum.id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ assetIds: [asset2.id] });
@ -399,7 +399,7 @@ describe('/shared-link', () => {
it('should remove assets from a shared link (individual)', async () => {
const { status, body } = await request(app)
.delete(`/shared-link/${linkWithAssets.id}/assets`)
.delete(`/shared-links/${linkWithAssets.id}/assets`)
.set('Authorization', `Bearer ${user1.accessToken}`)
.send({ assetIds: [asset2.id] });
@ -408,9 +408,9 @@ describe('/shared-link', () => {
});
});
describe('DELETE /shared-link/:id', () => {
describe('DELETE /shared-links/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).delete(`/shared-link/${linkWithAlbum.id}`);
const { status, body } = await request(app).delete(`/shared-links/${linkWithAlbum.id}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
@ -418,7 +418,7 @@ describe('/shared-link', () => {
it('should fail if invalid link', async () => {
const { status, body } = await request(app)
.delete(`/shared-link/${uuidDto.notFound}`)
.delete(`/shared-links/${uuidDto.notFound}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(400);
@ -427,7 +427,7 @@ describe('/shared-link', () => {
it('should delete a shared link', async () => {
const { status } = await request(app)
.delete(`/shared-link/${linkWithAlbum.id}`)
.delete(`/shared-links/${linkWithAlbum.id}`)
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);

View File

@ -6,7 +6,7 @@ import { app, asBearerAuth, utils } from 'src/utils';
import request from 'supertest';
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
describe('/user', () => {
describe('/users', () => {
let websocket: Socket;
let admin: LoginResponseDto;
@ -34,15 +34,15 @@ describe('/user', () => {
utils.disconnectWebsocket(websocket);
});
describe('GET /user', () => {
describe('GET /users', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get('/user');
const { status, body } = await request(app).get('/users');
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should get users', async () => {
const { status, body } = await request(app).get('/user').set('Authorization', `Bearer ${admin.accessToken}`);
const { status, body } = await request(app).get('/users').set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toEqual(200);
expect(body).toHaveLength(5);
expect(body).toEqual(
@ -58,7 +58,7 @@ describe('/user', () => {
it('should hide deleted users', async () => {
const { status, body } = await request(app)
.get(`/user`)
.get(`/users`)
.query({ isAll: true })
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200);
@ -75,7 +75,7 @@ describe('/user', () => {
it('should include deleted users', async () => {
const { status, body } = await request(app)
.get(`/user`)
.get(`/users`)
.query({ isAll: false })
.set('Authorization', `Bearer ${admin.accessToken}`);
@ -93,15 +93,15 @@ describe('/user', () => {
});
});
describe('GET /user/info/:id', () => {
describe('GET /users/info/:id', () => {
it('should require authentication', async () => {
const { status } = await request(app).get(`/user/info/${admin.userId}`);
const { status } = await request(app).get(`/users/info/${admin.userId}`);
expect(status).toEqual(401);
});
it('should get the user info', async () => {
const { status, body } = await request(app)
.get(`/user/info/${admin.userId}`)
.get(`/users/info/${admin.userId}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200);
expect(body).toMatchObject({
@ -111,15 +111,15 @@ describe('/user', () => {
});
});
describe('GET /user/me', () => {
describe('GET /users/me', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get(`/user/me`);
const { status, body } = await request(app).get(`/users/me`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should get my info', async () => {
const { status, body } = await request(app).get(`/user/me`).set('Authorization', `Bearer ${admin.accessToken}`);
const { status, body } = await request(app).get(`/users/me`).set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200);
expect(body).toMatchObject({
id: admin.userId,
@ -128,9 +128,9 @@ describe('/user', () => {
});
});
describe('POST /user', () => {
describe('POST /users', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).post(`/user`).send(createUserDto.user1);
const { status, body } = await request(app).post(`/users`).send(createUserDto.user1);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
@ -138,7 +138,7 @@ describe('/user', () => {
for (const key of Object.keys(createUserDto.user1)) {
it(`should not allow null ${key}`, async () => {
const { status, body } = await request(app)
.post(`/user`)
.post(`/users`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ ...createUserDto.user1, [key]: null });
expect(status).toBe(400);
@ -148,7 +148,7 @@ describe('/user', () => {
it('should ignore `isAdmin`', async () => {
const { status, body } = await request(app)
.post(`/user`)
.post(`/users`)
.send({
isAdmin: true,
email: 'user5@immich.cloud',
@ -166,7 +166,7 @@ describe('/user', () => {
it('should create a user without memories enabled', async () => {
const { status, body } = await request(app)
.post(`/user`)
.post(`/users`)
.send({
email: 'no-memories@immich.cloud',
password: 'Password123',
@ -182,16 +182,16 @@ describe('/user', () => {
});
});
describe('DELETE /user/:id', () => {
describe('DELETE /users/:id', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).delete(`/user/${userToDelete.userId}`);
const { status, body } = await request(app).delete(`/users/${userToDelete.userId}`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
it('should delete user', async () => {
const { status, body } = await request(app)
.delete(`/user/${userToDelete.userId}`)
.delete(`/users/${userToDelete.userId}`)
.set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200);
@ -204,7 +204,7 @@ describe('/user', () => {
it('should hard delete user', async () => {
const { status, body } = await request(app)
.delete(`/user/${userToHardDelete.userId}`)
.delete(`/users/${userToHardDelete.userId}`)
.send({ force: true })
.set('Authorization', `Bearer ${admin.accessToken}`);
@ -219,9 +219,9 @@ describe('/user', () => {
});
});
describe('PUT /user', () => {
describe('PUT /users', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).put(`/user`);
const { status, body } = await request(app).put(`/users`);
expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized);
});
@ -229,7 +229,7 @@ describe('/user', () => {
for (const key of Object.keys(userDto.admin)) {
it(`should not allow null ${key}`, async () => {
const { status, body } = await request(app)
.put(`/user`)
.put(`/users`)
.set('Authorization', `Bearer ${admin.accessToken}`)
.send({ ...userDto.admin, [key]: null });
expect(status).toBe(400);
@ -239,7 +239,7 @@ describe('/user', () => {
it('should not allow a non-admin to become an admin', async () => {
const { status, body } = await request(app)
.put(`/user`)
.put(`/users`)
.send({ isAdmin: true, id: nonAdmin.userId })
.set('Authorization', `Bearer ${admin.accessToken}`);
@ -249,7 +249,7 @@ describe('/user', () => {
it('ignores updates to profileImagePath', async () => {
const { status, body } = await request(app)
.put(`/user`)
.put(`/users`)
.send({ id: admin.userId, profileImagePath: 'invalid.jpg' })
.set('Authorization', `Bearer ${admin.accessToken}`);
@ -261,7 +261,7 @@ describe('/user', () => {
const before = await getUserById({ id: admin.userId }, { headers: asBearerAuth(admin.accessToken) });
const { status, body } = await request(app)
.put(`/user`)
.put(`/users`)
.send({
id: admin.userId,
name: 'Name',
@ -280,7 +280,7 @@ describe('/user', () => {
it('should update memories enabled', async () => {
const before = await getUserById({ id: admin.userId }, { headers: asBearerAuth(admin.accessToken) });
const { status, body } = await request(app)
.put(`/user`)
.put(`/users`)
.send({
id: admin.userId,
memoriesEnabled: false,

View File

@ -77,5 +77,5 @@ String getThumbnailUrlForRemoteId(
}
String getFaceThumbnailUrl(final String personId) {
return '${Store.get(StoreKey.serverEndpoint)}/person/$personId/thumbnail';
return '${Store.get(StoreKey.serverEndpoint)}/people/$personId/thumbnail';
}

148
mobile/openapi/README.md generated
View File

@ -73,26 +73,26 @@ All URIs are relative to */api*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*APIKeyApi* | [**createApiKey**](doc//APIKeyApi.md#createapikey) | **POST** /api-key |
*APIKeyApi* | [**deleteApiKey**](doc//APIKeyApi.md#deleteapikey) | **DELETE** /api-key/{id} |
*APIKeyApi* | [**getApiKey**](doc//APIKeyApi.md#getapikey) | **GET** /api-key/{id} |
*APIKeyApi* | [**getApiKeys**](doc//APIKeyApi.md#getapikeys) | **GET** /api-key |
*APIKeyApi* | [**updateApiKey**](doc//APIKeyApi.md#updateapikey) | **PUT** /api-key/{id} |
*ActivityApi* | [**createActivity**](doc//ActivityApi.md#createactivity) | **POST** /activity |
*ActivityApi* | [**deleteActivity**](doc//ActivityApi.md#deleteactivity) | **DELETE** /activity/{id} |
*ActivityApi* | [**getActivities**](doc//ActivityApi.md#getactivities) | **GET** /activity |
*ActivityApi* | [**getActivityStatistics**](doc//ActivityApi.md#getactivitystatistics) | **GET** /activity/statistics |
*AlbumApi* | [**addAssetsToAlbum**](doc//AlbumApi.md#addassetstoalbum) | **PUT** /album/{id}/assets |
*AlbumApi* | [**addUsersToAlbum**](doc//AlbumApi.md#adduserstoalbum) | **PUT** /album/{id}/users |
*AlbumApi* | [**createAlbum**](doc//AlbumApi.md#createalbum) | **POST** /album |
*AlbumApi* | [**deleteAlbum**](doc//AlbumApi.md#deletealbum) | **DELETE** /album/{id} |
*AlbumApi* | [**getAlbumCount**](doc//AlbumApi.md#getalbumcount) | **GET** /album/count |
*AlbumApi* | [**getAlbumInfo**](doc//AlbumApi.md#getalbuminfo) | **GET** /album/{id} |
*AlbumApi* | [**getAllAlbums**](doc//AlbumApi.md#getallalbums) | **GET** /album |
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
*AlbumApi* | [**updateAlbumUser**](doc//AlbumApi.md#updatealbumuser) | **PUT** /album/{id}/user/{userId} |
*APIKeyApi* | [**createApiKey**](doc//APIKeyApi.md#createapikey) | **POST** /api-keys |
*APIKeyApi* | [**deleteApiKey**](doc//APIKeyApi.md#deleteapikey) | **DELETE** /api-keys/{id} |
*APIKeyApi* | [**getApiKey**](doc//APIKeyApi.md#getapikey) | **GET** /api-keys/{id} |
*APIKeyApi* | [**getApiKeys**](doc//APIKeyApi.md#getapikeys) | **GET** /api-keys |
*APIKeyApi* | [**updateApiKey**](doc//APIKeyApi.md#updateapikey) | **PUT** /api-keys/{id} |
*ActivityApi* | [**createActivity**](doc//ActivityApi.md#createactivity) | **POST** /activities |
*ActivityApi* | [**deleteActivity**](doc//ActivityApi.md#deleteactivity) | **DELETE** /activities/{id} |
*ActivityApi* | [**getActivities**](doc//ActivityApi.md#getactivities) | **GET** /activities |
*ActivityApi* | [**getActivityStatistics**](doc//ActivityApi.md#getactivitystatistics) | **GET** /activities/statistics |
*AlbumApi* | [**addAssetsToAlbum**](doc//AlbumApi.md#addassetstoalbum) | **PUT** /albums/{id}/assets |
*AlbumApi* | [**addUsersToAlbum**](doc//AlbumApi.md#adduserstoalbum) | **PUT** /albums/{id}/users |
*AlbumApi* | [**createAlbum**](doc//AlbumApi.md#createalbum) | **POST** /albums |
*AlbumApi* | [**deleteAlbum**](doc//AlbumApi.md#deletealbum) | **DELETE** /albums/{id} |
*AlbumApi* | [**getAlbumCount**](doc//AlbumApi.md#getalbumcount) | **GET** /albums/count |
*AlbumApi* | [**getAlbumInfo**](doc//AlbumApi.md#getalbuminfo) | **GET** /albums/{id} |
*AlbumApi* | [**getAllAlbums**](doc//AlbumApi.md#getallalbums) | **GET** /albums |
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets |
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} |
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /albums/{id} |
*AlbumApi* | [**updateAlbumUser**](doc//AlbumApi.md#updatealbumuser) | **PUT** /albums/{id}/user/{userId} |
*AssetApi* | [**checkBulkUpload**](doc//AssetApi.md#checkbulkupload) | **POST** /asset/bulk-upload-check |
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
*AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset |
@ -121,22 +121,22 @@ Class | Method | HTTP request | Description
*DownloadApi* | [**downloadFile**](doc//DownloadApi.md#downloadfile) | **POST** /download/asset/{id} |
*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info |
*DuplicateApi* | [**getAssetDuplicates**](doc//DuplicateApi.md#getassetduplicates) | **GET** /duplicates |
*FaceApi* | [**getFaces**](doc//FaceApi.md#getfaces) | **GET** /face |
*FaceApi* | [**reassignFacesById**](doc//FaceApi.md#reassignfacesbyid) | **PUT** /face/{id} |
*FileReportApi* | [**fixAuditFiles**](doc//FileReportApi.md#fixauditfiles) | **POST** /report/fix |
*FileReportApi* | [**getAuditFiles**](doc//FileReportApi.md#getauditfiles) | **GET** /report |
*FileReportApi* | [**getFileChecksums**](doc//FileReportApi.md#getfilechecksums) | **POST** /report/checksum |
*FaceApi* | [**getFaces**](doc//FaceApi.md#getfaces) | **GET** /faces |
*FaceApi* | [**reassignFacesById**](doc//FaceApi.md#reassignfacesbyid) | **PUT** /faces/{id} |
*FileReportApi* | [**fixAuditFiles**](doc//FileReportApi.md#fixauditfiles) | **POST** /reports/fix |
*FileReportApi* | [**getAuditFiles**](doc//FileReportApi.md#getauditfiles) | **GET** /reports |
*FileReportApi* | [**getFileChecksums**](doc//FileReportApi.md#getfilechecksums) | **POST** /reports/checksum |
*JobApi* | [**getAllJobsStatus**](doc//JobApi.md#getalljobsstatus) | **GET** /jobs |
*JobApi* | [**sendJobCommand**](doc//JobApi.md#sendjobcommand) | **PUT** /jobs/{id} |
*LibraryApi* | [**createLibrary**](doc//LibraryApi.md#createlibrary) | **POST** /library |
*LibraryApi* | [**deleteLibrary**](doc//LibraryApi.md#deletelibrary) | **DELETE** /library/{id} |
*LibraryApi* | [**getAllLibraries**](doc//LibraryApi.md#getalllibraries) | **GET** /library |
*LibraryApi* | [**getLibrary**](doc//LibraryApi.md#getlibrary) | **GET** /library/{id} |
*LibraryApi* | [**getLibraryStatistics**](doc//LibraryApi.md#getlibrarystatistics) | **GET** /library/{id}/statistics |
*LibraryApi* | [**removeOfflineFiles**](doc//LibraryApi.md#removeofflinefiles) | **POST** /library/{id}/removeOffline |
*LibraryApi* | [**scanLibrary**](doc//LibraryApi.md#scanlibrary) | **POST** /library/{id}/scan |
*LibraryApi* | [**updateLibrary**](doc//LibraryApi.md#updatelibrary) | **PUT** /library/{id} |
*LibraryApi* | [**validate**](doc//LibraryApi.md#validate) | **POST** /library/{id}/validate |
*LibraryApi* | [**createLibrary**](doc//LibraryApi.md#createlibrary) | **POST** /libraries |
*LibraryApi* | [**deleteLibrary**](doc//LibraryApi.md#deletelibrary) | **DELETE** /libraries/{id} |
*LibraryApi* | [**getAllLibraries**](doc//LibraryApi.md#getalllibraries) | **GET** /libraries |
*LibraryApi* | [**getLibrary**](doc//LibraryApi.md#getlibrary) | **GET** /libraries/{id} |
*LibraryApi* | [**getLibraryStatistics**](doc//LibraryApi.md#getlibrarystatistics) | **GET** /libraries/{id}/statistics |
*LibraryApi* | [**removeOfflineFiles**](doc//LibraryApi.md#removeofflinefiles) | **POST** /libraries/{id}/removeOffline |
*LibraryApi* | [**scanLibrary**](doc//LibraryApi.md#scanlibrary) | **POST** /libraries/{id}/scan |
*LibraryApi* | [**updateLibrary**](doc//LibraryApi.md#updatelibrary) | **PUT** /libraries/{id} |
*LibraryApi* | [**validate**](doc//LibraryApi.md#validate) | **POST** /libraries/{id}/validate |
*MemoryApi* | [**addMemoryAssets**](doc//MemoryApi.md#addmemoryassets) | **PUT** /memories/{id}/assets |
*MemoryApi* | [**createMemory**](doc//MemoryApi.md#creatememory) | **POST** /memories |
*MemoryApi* | [**deleteMemory**](doc//MemoryApi.md#deletememory) | **DELETE** /memories/{id} |
@ -149,20 +149,20 @@ Class | Method | HTTP request | Description
*OAuthApi* | [**redirectOAuthToMobile**](doc//OAuthApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect |
*OAuthApi* | [**startOAuth**](doc//OAuthApi.md#startoauth) | **POST** /oauth/authorize |
*OAuthApi* | [**unlinkOAuthAccount**](doc//OAuthApi.md#unlinkoauthaccount) | **POST** /oauth/unlink |
*PartnerApi* | [**createPartner**](doc//PartnerApi.md#createpartner) | **POST** /partner/{id} |
*PartnerApi* | [**getPartners**](doc//PartnerApi.md#getpartners) | **GET** /partner |
*PartnerApi* | [**removePartner**](doc//PartnerApi.md#removepartner) | **DELETE** /partner/{id} |
*PartnerApi* | [**updatePartner**](doc//PartnerApi.md#updatepartner) | **PUT** /partner/{id} |
*PersonApi* | [**createPerson**](doc//PersonApi.md#createperson) | **POST** /person |
*PersonApi* | [**getAllPeople**](doc//PersonApi.md#getallpeople) | **GET** /person |
*PersonApi* | [**getPerson**](doc//PersonApi.md#getperson) | **GET** /person/{id} |
*PersonApi* | [**getPersonAssets**](doc//PersonApi.md#getpersonassets) | **GET** /person/{id}/assets |
*PersonApi* | [**getPersonStatistics**](doc//PersonApi.md#getpersonstatistics) | **GET** /person/{id}/statistics |
*PersonApi* | [**getPersonThumbnail**](doc//PersonApi.md#getpersonthumbnail) | **GET** /person/{id}/thumbnail |
*PersonApi* | [**mergePerson**](doc//PersonApi.md#mergeperson) | **POST** /person/{id}/merge |
*PersonApi* | [**reassignFaces**](doc//PersonApi.md#reassignfaces) | **PUT** /person/{id}/reassign |
*PersonApi* | [**updatePeople**](doc//PersonApi.md#updatepeople) | **PUT** /person |
*PersonApi* | [**updatePerson**](doc//PersonApi.md#updateperson) | **PUT** /person/{id} |
*PartnerApi* | [**createPartner**](doc//PartnerApi.md#createpartner) | **POST** /partners/{id} |
*PartnerApi* | [**getPartners**](doc//PartnerApi.md#getpartners) | **GET** /partners |
*PartnerApi* | [**removePartner**](doc//PartnerApi.md#removepartner) | **DELETE** /partners/{id} |
*PartnerApi* | [**updatePartner**](doc//PartnerApi.md#updatepartner) | **PUT** /partners/{id} |
*PersonApi* | [**createPerson**](doc//PersonApi.md#createperson) | **POST** /people |
*PersonApi* | [**getAllPeople**](doc//PersonApi.md#getallpeople) | **GET** /people |
*PersonApi* | [**getPerson**](doc//PersonApi.md#getperson) | **GET** /people/{id} |
*PersonApi* | [**getPersonAssets**](doc//PersonApi.md#getpersonassets) | **GET** /people/{id}/assets |
*PersonApi* | [**getPersonStatistics**](doc//PersonApi.md#getpersonstatistics) | **GET** /people/{id}/statistics |
*PersonApi* | [**getPersonThumbnail**](doc//PersonApi.md#getpersonthumbnail) | **GET** /people/{id}/thumbnail |
*PersonApi* | [**mergePerson**](doc//PersonApi.md#mergeperson) | **POST** /people/{id}/merge |
*PersonApi* | [**reassignFaces**](doc//PersonApi.md#reassignfaces) | **PUT** /people/{id}/reassign |
*PersonApi* | [**updatePeople**](doc//PersonApi.md#updatepeople) | **PUT** /people |
*PersonApi* | [**updatePerson**](doc//PersonApi.md#updateperson) | **PUT** /people/{id} |
*SearchApi* | [**getAssetsByCity**](doc//SearchApi.md#getassetsbycity) | **GET** /search/cities |
*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore |
*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions |
@ -182,14 +182,14 @@ Class | Method | HTTP request | Description
*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions |
*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} |
*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions |
*SharedLinkApi* | [**addSharedLinkAssets**](doc//SharedLinkApi.md#addsharedlinkassets) | **PUT** /shared-link/{id}/assets |
*SharedLinkApi* | [**createSharedLink**](doc//SharedLinkApi.md#createsharedlink) | **POST** /shared-link |
*SharedLinkApi* | [**getAllSharedLinks**](doc//SharedLinkApi.md#getallsharedlinks) | **GET** /shared-link |
*SharedLinkApi* | [**getMySharedLink**](doc//SharedLinkApi.md#getmysharedlink) | **GET** /shared-link/me |
*SharedLinkApi* | [**getSharedLinkById**](doc//SharedLinkApi.md#getsharedlinkbyid) | **GET** /shared-link/{id} |
*SharedLinkApi* | [**removeSharedLink**](doc//SharedLinkApi.md#removesharedlink) | **DELETE** /shared-link/{id} |
*SharedLinkApi* | [**removeSharedLinkAssets**](doc//SharedLinkApi.md#removesharedlinkassets) | **DELETE** /shared-link/{id}/assets |
*SharedLinkApi* | [**updateSharedLink**](doc//SharedLinkApi.md#updatesharedlink) | **PATCH** /shared-link/{id} |
*SharedLinkApi* | [**addSharedLinkAssets**](doc//SharedLinkApi.md#addsharedlinkassets) | **PUT** /shared-links/{id}/assets |
*SharedLinkApi* | [**createSharedLink**](doc//SharedLinkApi.md#createsharedlink) | **POST** /shared-links |
*SharedLinkApi* | [**getAllSharedLinks**](doc//SharedLinkApi.md#getallsharedlinks) | **GET** /shared-links |
*SharedLinkApi* | [**getMySharedLink**](doc//SharedLinkApi.md#getmysharedlink) | **GET** /shared-links/me |
*SharedLinkApi* | [**getSharedLinkById**](doc//SharedLinkApi.md#getsharedlinkbyid) | **GET** /shared-links/{id} |
*SharedLinkApi* | [**removeSharedLink**](doc//SharedLinkApi.md#removesharedlink) | **DELETE** /shared-links/{id} |
*SharedLinkApi* | [**removeSharedLinkAssets**](doc//SharedLinkApi.md#removesharedlinkassets) | **DELETE** /shared-links/{id}/assets |
*SharedLinkApi* | [**updateSharedLink**](doc//SharedLinkApi.md#updatesharedlink) | **PATCH** /shared-links/{id} |
*SyncApi* | [**getDeltaSync**](doc//SyncApi.md#getdeltasync) | **POST** /sync/delta-sync |
*SyncApi* | [**getFullSyncForUser**](doc//SyncApi.md#getfullsyncforuser) | **POST** /sync/full-sync |
*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config |
@ -200,29 +200,29 @@ Class | Method | HTTP request | Description
*SystemMetadataApi* | [**getAdminOnboarding**](doc//SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding |
*SystemMetadataApi* | [**getReverseGeocodingState**](doc//SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state |
*SystemMetadataApi* | [**updateAdminOnboarding**](doc//SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding |
*TagApi* | [**createTag**](doc//TagApi.md#createtag) | **POST** /tag |
*TagApi* | [**deleteTag**](doc//TagApi.md#deletetag) | **DELETE** /tag/{id} |
*TagApi* | [**getAllTags**](doc//TagApi.md#getalltags) | **GET** /tag |
*TagApi* | [**getTagAssets**](doc//TagApi.md#gettagassets) | **GET** /tag/{id}/assets |
*TagApi* | [**getTagById**](doc//TagApi.md#gettagbyid) | **GET** /tag/{id} |
*TagApi* | [**tagAssets**](doc//TagApi.md#tagassets) | **PUT** /tag/{id}/assets |
*TagApi* | [**untagAssets**](doc//TagApi.md#untagassets) | **DELETE** /tag/{id}/assets |
*TagApi* | [**updateTag**](doc//TagApi.md#updatetag) | **PATCH** /tag/{id} |
*TagApi* | [**createTag**](doc//TagApi.md#createtag) | **POST** /tags |
*TagApi* | [**deleteTag**](doc//TagApi.md#deletetag) | **DELETE** /tags/{id} |
*TagApi* | [**getAllTags**](doc//TagApi.md#getalltags) | **GET** /tags |
*TagApi* | [**getTagAssets**](doc//TagApi.md#gettagassets) | **GET** /tags/{id}/assets |
*TagApi* | [**getTagById**](doc//TagApi.md#gettagbyid) | **GET** /tags/{id} |
*TagApi* | [**tagAssets**](doc//TagApi.md#tagassets) | **PUT** /tags/{id}/assets |
*TagApi* | [**untagAssets**](doc//TagApi.md#untagassets) | **DELETE** /tags/{id}/assets |
*TagApi* | [**updateTag**](doc//TagApi.md#updatetag) | **PATCH** /tags/{id} |
*TimelineApi* | [**getTimeBucket**](doc//TimelineApi.md#gettimebucket) | **GET** /timeline/bucket |
*TimelineApi* | [**getTimeBuckets**](doc//TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets |
*TrashApi* | [**emptyTrash**](doc//TrashApi.md#emptytrash) | **POST** /trash/empty |
*TrashApi* | [**restoreAssets**](doc//TrashApi.md#restoreassets) | **POST** /trash/restore/assets |
*TrashApi* | [**restoreTrash**](doc//TrashApi.md#restoretrash) | **POST** /trash/restore |
*UserApi* | [**createProfileImage**](doc//UserApi.md#createprofileimage) | **POST** /user/profile-image |
*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user |
*UserApi* | [**deleteProfileImage**](doc//UserApi.md#deleteprofileimage) | **DELETE** /user/profile-image |
*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /user/{id} |
*UserApi* | [**getAllUsers**](doc//UserApi.md#getallusers) | **GET** /user |
*UserApi* | [**getMyUserInfo**](doc//UserApi.md#getmyuserinfo) | **GET** /user/me |
*UserApi* | [**getProfileImage**](doc//UserApi.md#getprofileimage) | **GET** /user/profile-image/{id} |
*UserApi* | [**getUserById**](doc//UserApi.md#getuserbyid) | **GET** /user/info/{id} |
*UserApi* | [**restoreUser**](doc//UserApi.md#restoreuser) | **POST** /user/{id}/restore |
*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /user |
*UserApi* | [**createProfileImage**](doc//UserApi.md#createprofileimage) | **POST** /users/profile-image |
*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /users |
*UserApi* | [**deleteProfileImage**](doc//UserApi.md#deleteprofileimage) | **DELETE** /users/profile-image |
*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /users/{id} |
*UserApi* | [**getAllUsers**](doc//UserApi.md#getallusers) | **GET** /users |
*UserApi* | [**getMyUserInfo**](doc//UserApi.md#getmyuserinfo) | **GET** /users/me |
*UserApi* | [**getProfileImage**](doc//UserApi.md#getprofileimage) | **GET** /users/profile-image/{id} |
*UserApi* | [**getUserById**](doc//UserApi.md#getuserbyid) | **GET** /users/info/{id} |
*UserApi* | [**restoreUser**](doc//UserApi.md#restoreuser) | **POST** /users/{id}/restore |
*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /users |
## Documentation For Models

View File

@ -16,13 +16,13 @@ class ActivityApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /activity' operation and returns the [Response].
/// Performs an HTTP 'POST /activities' operation and returns the [Response].
/// Parameters:
///
/// * [ActivityCreateDto] activityCreateDto (required):
Future<Response> createActivityWithHttpInfo(ActivityCreateDto activityCreateDto,) async {
// ignore: prefer_const_declarations
final path = r'/activity';
final path = r'/activities';
// ignore: prefer_final_locals
Object? postBody = activityCreateDto;
@ -63,13 +63,13 @@ class ActivityApi {
return null;
}
/// Performs an HTTP 'DELETE /activity/{id}' operation and returns the [Response].
/// Performs an HTTP 'DELETE /activities/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> deleteActivityWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/activity/{id}'
final path = r'/activities/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -103,7 +103,7 @@ class ActivityApi {
}
}
/// Performs an HTTP 'GET /activity' operation and returns the [Response].
/// Performs an HTTP 'GET /activities' operation and returns the [Response].
/// Parameters:
///
/// * [String] albumId (required):
@ -117,7 +117,7 @@ class ActivityApi {
/// * [String] userId:
Future<Response> getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, }) async {
// ignore: prefer_const_declarations
final path = r'/activity';
final path = r'/activities';
// ignore: prefer_final_locals
Object? postBody;
@ -183,7 +183,7 @@ class ActivityApi {
return null;
}
/// Performs an HTTP 'GET /activity/statistics' operation and returns the [Response].
/// Performs an HTTP 'GET /activities/statistics' operation and returns the [Response].
/// Parameters:
///
/// * [String] albumId (required):
@ -191,7 +191,7 @@ class ActivityApi {
/// * [String] assetId:
Future<Response> getActivityStatisticsWithHttpInfo(String albumId, { String? assetId, }) async {
// ignore: prefer_const_declarations
final path = r'/activity/statistics';
final path = r'/activities/statistics';
// ignore: prefer_final_locals
Object? postBody;

View File

@ -16,7 +16,7 @@ class AlbumApi {
final ApiClient apiClient;
/// Performs an HTTP 'PUT /album/{id}/assets' operation and returns the [Response].
/// Performs an HTTP 'PUT /albums/{id}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -26,7 +26,7 @@ class AlbumApi {
/// * [String] key:
Future<Response> addAssetsToAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { String? key, }) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}/assets'
final path = r'/albums/{id}/assets'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -79,7 +79,7 @@ class AlbumApi {
return null;
}
/// Performs an HTTP 'PUT /album/{id}/users' operation and returns the [Response].
/// Performs an HTTP 'PUT /albums/{id}/users' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -87,7 +87,7 @@ class AlbumApi {
/// * [AddUsersDto] addUsersDto (required):
Future<Response> addUsersToAlbumWithHttpInfo(String id, AddUsersDto addUsersDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}/users'
final path = r'/albums/{id}/users'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -131,13 +131,13 @@ class AlbumApi {
return null;
}
/// Performs an HTTP 'POST /album' operation and returns the [Response].
/// Performs an HTTP 'POST /albums' operation and returns the [Response].
/// Parameters:
///
/// * [CreateAlbumDto] createAlbumDto (required):
Future<Response> createAlbumWithHttpInfo(CreateAlbumDto createAlbumDto,) async {
// ignore: prefer_const_declarations
final path = r'/album';
final path = r'/albums';
// ignore: prefer_final_locals
Object? postBody = createAlbumDto;
@ -178,13 +178,13 @@ class AlbumApi {
return null;
}
/// Performs an HTTP 'DELETE /album/{id}' operation and returns the [Response].
/// Performs an HTTP 'DELETE /albums/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> deleteAlbumWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}'
final path = r'/albums/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -218,10 +218,10 @@ class AlbumApi {
}
}
/// Performs an HTTP 'GET /album/count' operation and returns the [Response].
/// Performs an HTTP 'GET /albums/count' operation and returns the [Response].
Future<Response> getAlbumCountWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/album/count';
final path = r'/albums/count';
// ignore: prefer_final_locals
Object? postBody;
@ -259,7 +259,7 @@ class AlbumApi {
return null;
}
/// Performs an HTTP 'GET /album/{id}' operation and returns the [Response].
/// Performs an HTTP 'GET /albums/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -269,7 +269,7 @@ class AlbumApi {
/// * [bool] withoutAssets:
Future<Response> getAlbumInfoWithHttpInfo(String id, { String? key, bool? withoutAssets, }) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}'
final path = r'/albums/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -322,7 +322,7 @@ class AlbumApi {
return null;
}
/// Performs an HTTP 'GET /album' operation and returns the [Response].
/// Performs an HTTP 'GET /albums' operation and returns the [Response].
/// Parameters:
///
/// * [String] assetId:
@ -331,7 +331,7 @@ class AlbumApi {
/// * [bool] shared:
Future<Response> getAllAlbumsWithHttpInfo({ String? assetId, bool? shared, }) async {
// ignore: prefer_const_declarations
final path = r'/album';
final path = r'/albums';
// ignore: prefer_final_locals
Object? postBody;
@ -385,7 +385,7 @@ class AlbumApi {
return null;
}
/// Performs an HTTP 'DELETE /album/{id}/assets' operation and returns the [Response].
/// Performs an HTTP 'DELETE /albums/{id}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -393,7 +393,7 @@ class AlbumApi {
/// * [BulkIdsDto] bulkIdsDto (required):
Future<Response> removeAssetFromAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}/assets'
final path = r'/albums/{id}/assets'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -440,7 +440,7 @@ class AlbumApi {
return null;
}
/// Performs an HTTP 'DELETE /album/{id}/user/{userId}' operation and returns the [Response].
/// Performs an HTTP 'DELETE /albums/{id}/user/{userId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -448,7 +448,7 @@ class AlbumApi {
/// * [String] userId (required):
Future<Response> removeUserFromAlbumWithHttpInfo(String id, String userId,) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}/user/{userId}'
final path = r'/albums/{id}/user/{userId}'
.replaceAll('{id}', id)
.replaceAll('{userId}', userId);
@ -485,7 +485,7 @@ class AlbumApi {
}
}
/// Performs an HTTP 'PATCH /album/{id}' operation and returns the [Response].
/// Performs an HTTP 'PATCH /albums/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -493,7 +493,7 @@ class AlbumApi {
/// * [UpdateAlbumDto] updateAlbumDto (required):
Future<Response> updateAlbumInfoWithHttpInfo(String id, UpdateAlbumDto updateAlbumDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}'
final path = r'/albums/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -537,7 +537,7 @@ class AlbumApi {
return null;
}
/// Performs an HTTP 'PUT /album/{id}/user/{userId}' operation and returns the [Response].
/// Performs an HTTP 'PUT /albums/{id}/user/{userId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -547,7 +547,7 @@ class AlbumApi {
/// * [UpdateAlbumUserDto] updateAlbumUserDto (required):
Future<Response> updateAlbumUserWithHttpInfo(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}/user/{userId}'
final path = r'/albums/{id}/user/{userId}'
.replaceAll('{id}', id)
.replaceAll('{userId}', userId);

View File

@ -16,13 +16,13 @@ class APIKeyApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /api-key' operation and returns the [Response].
/// Performs an HTTP 'POST /api-keys' operation and returns the [Response].
/// Parameters:
///
/// * [APIKeyCreateDto] aPIKeyCreateDto (required):
Future<Response> createApiKeyWithHttpInfo(APIKeyCreateDto aPIKeyCreateDto,) async {
// ignore: prefer_const_declarations
final path = r'/api-key';
final path = r'/api-keys';
// ignore: prefer_final_locals
Object? postBody = aPIKeyCreateDto;
@ -63,13 +63,13 @@ class APIKeyApi {
return null;
}
/// Performs an HTTP 'DELETE /api-key/{id}' operation and returns the [Response].
/// Performs an HTTP 'DELETE /api-keys/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> deleteApiKeyWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/api-key/{id}'
final path = r'/api-keys/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -103,13 +103,13 @@ class APIKeyApi {
}
}
/// Performs an HTTP 'GET /api-key/{id}' operation and returns the [Response].
/// Performs an HTTP 'GET /api-keys/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getApiKeyWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/api-key/{id}'
final path = r'/api-keys/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -151,10 +151,10 @@ class APIKeyApi {
return null;
}
/// Performs an HTTP 'GET /api-key' operation and returns the [Response].
/// Performs an HTTP 'GET /api-keys' operation and returns the [Response].
Future<Response> getApiKeysWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api-key';
final path = r'/api-keys';
// ignore: prefer_final_locals
Object? postBody;
@ -195,7 +195,7 @@ class APIKeyApi {
return null;
}
/// Performs an HTTP 'PUT /api-key/{id}' operation and returns the [Response].
/// Performs an HTTP 'PUT /api-keys/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -203,7 +203,7 @@ class APIKeyApi {
/// * [APIKeyUpdateDto] aPIKeyUpdateDto (required):
Future<Response> updateApiKeyWithHttpInfo(String id, APIKeyUpdateDto aPIKeyUpdateDto,) async {
// ignore: prefer_const_declarations
final path = r'/api-key/{id}'
final path = r'/api-keys/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals

View File

@ -16,13 +16,13 @@ class FaceApi {
final ApiClient apiClient;
/// Performs an HTTP 'GET /face' operation and returns the [Response].
/// Performs an HTTP 'GET /faces' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getFacesWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/face';
final path = r'/faces';
// ignore: prefer_final_locals
Object? postBody;
@ -68,7 +68,7 @@ class FaceApi {
return null;
}
/// Performs an HTTP 'PUT /face/{id}' operation and returns the [Response].
/// Performs an HTTP 'PUT /faces/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -76,7 +76,7 @@ class FaceApi {
/// * [FaceDto] faceDto (required):
Future<Response> reassignFacesByIdWithHttpInfo(String id, FaceDto faceDto,) async {
// ignore: prefer_const_declarations
final path = r'/face/{id}'
final path = r'/faces/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals

View File

@ -16,13 +16,13 @@ class FileReportApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /report/fix' operation and returns the [Response].
/// Performs an HTTP 'POST /reports/fix' operation and returns the [Response].
/// Parameters:
///
/// * [FileReportFixDto] fileReportFixDto (required):
Future<Response> fixAuditFilesWithHttpInfo(FileReportFixDto fileReportFixDto,) async {
// ignore: prefer_const_declarations
final path = r'/report/fix';
final path = r'/reports/fix';
// ignore: prefer_final_locals
Object? postBody = fileReportFixDto;
@ -55,10 +55,10 @@ class FileReportApi {
}
}
/// Performs an HTTP 'GET /report' operation and returns the [Response].
/// Performs an HTTP 'GET /reports' operation and returns the [Response].
Future<Response> getAuditFilesWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/report';
final path = r'/reports';
// ignore: prefer_final_locals
Object? postBody;
@ -96,13 +96,13 @@ class FileReportApi {
return null;
}
/// Performs an HTTP 'POST /report/checksum' operation and returns the [Response].
/// Performs an HTTP 'POST /reports/checksum' operation and returns the [Response].
/// Parameters:
///
/// * [FileChecksumDto] fileChecksumDto (required):
Future<Response> getFileChecksumsWithHttpInfo(FileChecksumDto fileChecksumDto,) async {
// ignore: prefer_const_declarations
final path = r'/report/checksum';
final path = r'/reports/checksum';
// ignore: prefer_final_locals
Object? postBody = fileChecksumDto;

View File

@ -16,13 +16,13 @@ class LibraryApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /library' operation and returns the [Response].
/// Performs an HTTP 'POST /libraries' operation and returns the [Response].
/// Parameters:
///
/// * [CreateLibraryDto] createLibraryDto (required):
Future<Response> createLibraryWithHttpInfo(CreateLibraryDto createLibraryDto,) async {
// ignore: prefer_const_declarations
final path = r'/library';
final path = r'/libraries';
// ignore: prefer_final_locals
Object? postBody = createLibraryDto;
@ -63,13 +63,13 @@ class LibraryApi {
return null;
}
/// Performs an HTTP 'DELETE /library/{id}' operation and returns the [Response].
/// Performs an HTTP 'DELETE /libraries/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> deleteLibraryWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/library/{id}'
final path = r'/libraries/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -103,10 +103,10 @@ class LibraryApi {
}
}
/// Performs an HTTP 'GET /library' operation and returns the [Response].
/// Performs an HTTP 'GET /libraries' operation and returns the [Response].
Future<Response> getAllLibrariesWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/library';
final path = r'/libraries';
// ignore: prefer_final_locals
Object? postBody;
@ -147,13 +147,13 @@ class LibraryApi {
return null;
}
/// Performs an HTTP 'GET /library/{id}' operation and returns the [Response].
/// Performs an HTTP 'GET /libraries/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getLibraryWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/library/{id}'
final path = r'/libraries/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -195,13 +195,13 @@ class LibraryApi {
return null;
}
/// Performs an HTTP 'GET /library/{id}/statistics' operation and returns the [Response].
/// Performs an HTTP 'GET /libraries/{id}/statistics' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getLibraryStatisticsWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/library/{id}/statistics'
final path = r'/libraries/{id}/statistics'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -243,13 +243,13 @@ class LibraryApi {
return null;
}
/// Performs an HTTP 'POST /library/{id}/removeOffline' operation and returns the [Response].
/// Performs an HTTP 'POST /libraries/{id}/removeOffline' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> removeOfflineFilesWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/library/{id}/removeOffline'
final path = r'/libraries/{id}/removeOffline'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -283,7 +283,7 @@ class LibraryApi {
}
}
/// Performs an HTTP 'POST /library/{id}/scan' operation and returns the [Response].
/// Performs an HTTP 'POST /libraries/{id}/scan' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -291,7 +291,7 @@ class LibraryApi {
/// * [ScanLibraryDto] scanLibraryDto (required):
Future<Response> scanLibraryWithHttpInfo(String id, ScanLibraryDto scanLibraryDto,) async {
// ignore: prefer_const_declarations
final path = r'/library/{id}/scan'
final path = r'/libraries/{id}/scan'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -327,7 +327,7 @@ class LibraryApi {
}
}
/// Performs an HTTP 'PUT /library/{id}' operation and returns the [Response].
/// Performs an HTTP 'PUT /libraries/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -335,7 +335,7 @@ class LibraryApi {
/// * [UpdateLibraryDto] updateLibraryDto (required):
Future<Response> updateLibraryWithHttpInfo(String id, UpdateLibraryDto updateLibraryDto,) async {
// ignore: prefer_const_declarations
final path = r'/library/{id}'
final path = r'/libraries/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -379,7 +379,7 @@ class LibraryApi {
return null;
}
/// Performs an HTTP 'POST /library/{id}/validate' operation and returns the [Response].
/// Performs an HTTP 'POST /libraries/{id}/validate' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -387,7 +387,7 @@ class LibraryApi {
/// * [ValidateLibraryDto] validateLibraryDto (required):
Future<Response> validateWithHttpInfo(String id, ValidateLibraryDto validateLibraryDto,) async {
// ignore: prefer_const_declarations
final path = r'/library/{id}/validate'
final path = r'/libraries/{id}/validate'
.replaceAll('{id}', id);
// ignore: prefer_final_locals

View File

@ -16,13 +16,13 @@ class PartnerApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /partner/{id}' operation and returns the [Response].
/// Performs an HTTP 'POST /partners/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> createPartnerWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/partner/{id}'
final path = r'/partners/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -64,13 +64,13 @@ class PartnerApi {
return null;
}
/// Performs an HTTP 'GET /partner' operation and returns the [Response].
/// Performs an HTTP 'GET /partners' operation and returns the [Response].
/// Parameters:
///
/// * [String] direction (required):
Future<Response> getPartnersWithHttpInfo(String direction,) async {
// ignore: prefer_const_declarations
final path = r'/partner';
final path = r'/partners';
// ignore: prefer_final_locals
Object? postBody;
@ -116,13 +116,13 @@ class PartnerApi {
return null;
}
/// Performs an HTTP 'DELETE /partner/{id}' operation and returns the [Response].
/// Performs an HTTP 'DELETE /partners/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> removePartnerWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/partner/{id}'
final path = r'/partners/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -156,7 +156,7 @@ class PartnerApi {
}
}
/// Performs an HTTP 'PUT /partner/{id}' operation and returns the [Response].
/// Performs an HTTP 'PUT /partners/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -164,7 +164,7 @@ class PartnerApi {
/// * [UpdatePartnerDto] updatePartnerDto (required):
Future<Response> updatePartnerWithHttpInfo(String id, UpdatePartnerDto updatePartnerDto,) async {
// ignore: prefer_const_declarations
final path = r'/partner/{id}'
final path = r'/partners/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals

View File

@ -16,13 +16,13 @@ class PersonApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /person' operation and returns the [Response].
/// Performs an HTTP 'POST /people' operation and returns the [Response].
/// Parameters:
///
/// * [PersonCreateDto] personCreateDto (required):
Future<Response> createPersonWithHttpInfo(PersonCreateDto personCreateDto,) async {
// ignore: prefer_const_declarations
final path = r'/person';
final path = r'/people';
// ignore: prefer_final_locals
Object? postBody = personCreateDto;
@ -63,13 +63,13 @@ class PersonApi {
return null;
}
/// Performs an HTTP 'GET /person' operation and returns the [Response].
/// Performs an HTTP 'GET /people' operation and returns the [Response].
/// Parameters:
///
/// * [bool] withHidden:
Future<Response> getAllPeopleWithHttpInfo({ bool? withHidden, }) async {
// ignore: prefer_const_declarations
final path = r'/person';
final path = r'/people';
// ignore: prefer_final_locals
Object? postBody;
@ -114,13 +114,13 @@ class PersonApi {
return null;
}
/// Performs an HTTP 'GET /person/{id}' operation and returns the [Response].
/// Performs an HTTP 'GET /people/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getPersonWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/person/{id}'
final path = r'/people/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -162,13 +162,13 @@ class PersonApi {
return null;
}
/// Performs an HTTP 'GET /person/{id}/assets' operation and returns the [Response].
/// Performs an HTTP 'GET /people/{id}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getPersonAssetsWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/person/{id}/assets'
final path = r'/people/{id}/assets'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -213,13 +213,13 @@ class PersonApi {
return null;
}
/// Performs an HTTP 'GET /person/{id}/statistics' operation and returns the [Response].
/// Performs an HTTP 'GET /people/{id}/statistics' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getPersonStatisticsWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/person/{id}/statistics'
final path = r'/people/{id}/statistics'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -261,13 +261,13 @@ class PersonApi {
return null;
}
/// Performs an HTTP 'GET /person/{id}/thumbnail' operation and returns the [Response].
/// Performs an HTTP 'GET /people/{id}/thumbnail' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getPersonThumbnailWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/person/{id}/thumbnail'
final path = r'/people/{id}/thumbnail'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -309,7 +309,7 @@ class PersonApi {
return null;
}
/// Performs an HTTP 'POST /person/{id}/merge' operation and returns the [Response].
/// Performs an HTTP 'POST /people/{id}/merge' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -317,7 +317,7 @@ class PersonApi {
/// * [MergePersonDto] mergePersonDto (required):
Future<Response> mergePersonWithHttpInfo(String id, MergePersonDto mergePersonDto,) async {
// ignore: prefer_const_declarations
final path = r'/person/{id}/merge'
final path = r'/people/{id}/merge'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -364,7 +364,7 @@ class PersonApi {
return null;
}
/// Performs an HTTP 'PUT /person/{id}/reassign' operation and returns the [Response].
/// Performs an HTTP 'PUT /people/{id}/reassign' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -372,7 +372,7 @@ class PersonApi {
/// * [AssetFaceUpdateDto] assetFaceUpdateDto (required):
Future<Response> reassignFacesWithHttpInfo(String id, AssetFaceUpdateDto assetFaceUpdateDto,) async {
// ignore: prefer_const_declarations
final path = r'/person/{id}/reassign'
final path = r'/people/{id}/reassign'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -419,13 +419,13 @@ class PersonApi {
return null;
}
/// Performs an HTTP 'PUT /person' operation and returns the [Response].
/// Performs an HTTP 'PUT /people' operation and returns the [Response].
/// Parameters:
///
/// * [PeopleUpdateDto] peopleUpdateDto (required):
Future<Response> updatePeopleWithHttpInfo(PeopleUpdateDto peopleUpdateDto,) async {
// ignore: prefer_const_declarations
final path = r'/person';
final path = r'/people';
// ignore: prefer_final_locals
Object? postBody = peopleUpdateDto;
@ -469,7 +469,7 @@ class PersonApi {
return null;
}
/// Performs an HTTP 'PUT /person/{id}' operation and returns the [Response].
/// Performs an HTTP 'PUT /people/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -477,7 +477,7 @@ class PersonApi {
/// * [PersonUpdateDto] personUpdateDto (required):
Future<Response> updatePersonWithHttpInfo(String id, PersonUpdateDto personUpdateDto,) async {
// ignore: prefer_const_declarations
final path = r'/person/{id}'
final path = r'/people/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals

View File

@ -16,7 +16,7 @@ class SharedLinkApi {
final ApiClient apiClient;
/// Performs an HTTP 'PUT /shared-link/{id}/assets' operation and returns the [Response].
/// Performs an HTTP 'PUT /shared-links/{id}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -26,7 +26,7 @@ class SharedLinkApi {
/// * [String] key:
Future<Response> addSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { String? key, }) async {
// ignore: prefer_const_declarations
final path = r'/shared-link/{id}/assets'
final path = r'/shared-links/{id}/assets'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -79,13 +79,13 @@ class SharedLinkApi {
return null;
}
/// Performs an HTTP 'POST /shared-link' operation and returns the [Response].
/// Performs an HTTP 'POST /shared-links' operation and returns the [Response].
/// Parameters:
///
/// * [SharedLinkCreateDto] sharedLinkCreateDto (required):
Future<Response> createSharedLinkWithHttpInfo(SharedLinkCreateDto sharedLinkCreateDto,) async {
// ignore: prefer_const_declarations
final path = r'/shared-link';
final path = r'/shared-links';
// ignore: prefer_final_locals
Object? postBody = sharedLinkCreateDto;
@ -126,10 +126,10 @@ class SharedLinkApi {
return null;
}
/// Performs an HTTP 'GET /shared-link' operation and returns the [Response].
/// Performs an HTTP 'GET /shared-links' operation and returns the [Response].
Future<Response> getAllSharedLinksWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/shared-link';
final path = r'/shared-links';
// ignore: prefer_final_locals
Object? postBody;
@ -170,7 +170,7 @@ class SharedLinkApi {
return null;
}
/// Performs an HTTP 'GET /shared-link/me' operation and returns the [Response].
/// Performs an HTTP 'GET /shared-links/me' operation and returns the [Response].
/// Parameters:
///
/// * [String] key:
@ -180,7 +180,7 @@ class SharedLinkApi {
/// * [String] token:
Future<Response> getMySharedLinkWithHttpInfo({ String? key, String? password, String? token, }) async {
// ignore: prefer_const_declarations
final path = r'/shared-link/me';
final path = r'/shared-links/me';
// ignore: prefer_final_locals
Object? postBody;
@ -235,13 +235,13 @@ class SharedLinkApi {
return null;
}
/// Performs an HTTP 'GET /shared-link/{id}' operation and returns the [Response].
/// Performs an HTTP 'GET /shared-links/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getSharedLinkByIdWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/shared-link/{id}'
final path = r'/shared-links/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -283,13 +283,13 @@ class SharedLinkApi {
return null;
}
/// Performs an HTTP 'DELETE /shared-link/{id}' operation and returns the [Response].
/// Performs an HTTP 'DELETE /shared-links/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> removeSharedLinkWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/shared-link/{id}'
final path = r'/shared-links/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -323,7 +323,7 @@ class SharedLinkApi {
}
}
/// Performs an HTTP 'DELETE /shared-link/{id}/assets' operation and returns the [Response].
/// Performs an HTTP 'DELETE /shared-links/{id}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -333,7 +333,7 @@ class SharedLinkApi {
/// * [String] key:
Future<Response> removeSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { String? key, }) async {
// ignore: prefer_const_declarations
final path = r'/shared-link/{id}/assets'
final path = r'/shared-links/{id}/assets'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -386,7 +386,7 @@ class SharedLinkApi {
return null;
}
/// Performs an HTTP 'PATCH /shared-link/{id}' operation and returns the [Response].
/// Performs an HTTP 'PATCH /shared-links/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -394,7 +394,7 @@ class SharedLinkApi {
/// * [SharedLinkEditDto] sharedLinkEditDto (required):
Future<Response> updateSharedLinkWithHttpInfo(String id, SharedLinkEditDto sharedLinkEditDto,) async {
// ignore: prefer_const_declarations
final path = r'/shared-link/{id}'
final path = r'/shared-links/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals

View File

@ -16,13 +16,13 @@ class TagApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /tag' operation and returns the [Response].
/// Performs an HTTP 'POST /tags' operation and returns the [Response].
/// Parameters:
///
/// * [CreateTagDto] createTagDto (required):
Future<Response> createTagWithHttpInfo(CreateTagDto createTagDto,) async {
// ignore: prefer_const_declarations
final path = r'/tag';
final path = r'/tags';
// ignore: prefer_final_locals
Object? postBody = createTagDto;
@ -63,13 +63,13 @@ class TagApi {
return null;
}
/// Performs an HTTP 'DELETE /tag/{id}' operation and returns the [Response].
/// Performs an HTTP 'DELETE /tags/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> deleteTagWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/tag/{id}'
final path = r'/tags/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -103,10 +103,10 @@ class TagApi {
}
}
/// Performs an HTTP 'GET /tag' operation and returns the [Response].
/// Performs an HTTP 'GET /tags' operation and returns the [Response].
Future<Response> getAllTagsWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/tag';
final path = r'/tags';
// ignore: prefer_final_locals
Object? postBody;
@ -147,13 +147,13 @@ class TagApi {
return null;
}
/// Performs an HTTP 'GET /tag/{id}/assets' operation and returns the [Response].
/// Performs an HTTP 'GET /tags/{id}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getTagAssetsWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/tag/{id}/assets'
final path = r'/tags/{id}/assets'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -198,13 +198,13 @@ class TagApi {
return null;
}
/// Performs an HTTP 'GET /tag/{id}' operation and returns the [Response].
/// Performs an HTTP 'GET /tags/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getTagByIdWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/tag/{id}'
final path = r'/tags/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -246,7 +246,7 @@ class TagApi {
return null;
}
/// Performs an HTTP 'PUT /tag/{id}/assets' operation and returns the [Response].
/// Performs an HTTP 'PUT /tags/{id}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -254,7 +254,7 @@ class TagApi {
/// * [AssetIdsDto] assetIdsDto (required):
Future<Response> tagAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto,) async {
// ignore: prefer_const_declarations
final path = r'/tag/{id}/assets'
final path = r'/tags/{id}/assets'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -301,7 +301,7 @@ class TagApi {
return null;
}
/// Performs an HTTP 'DELETE /tag/{id}/assets' operation and returns the [Response].
/// Performs an HTTP 'DELETE /tags/{id}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -309,7 +309,7 @@ class TagApi {
/// * [AssetIdsDto] assetIdsDto (required):
Future<Response> untagAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto,) async {
// ignore: prefer_const_declarations
final path = r'/tag/{id}/assets'
final path = r'/tags/{id}/assets'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -356,7 +356,7 @@ class TagApi {
return null;
}
/// Performs an HTTP 'PATCH /tag/{id}' operation and returns the [Response].
/// Performs an HTTP 'PATCH /tags/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -364,7 +364,7 @@ class TagApi {
/// * [UpdateTagDto] updateTagDto (required):
Future<Response> updateTagWithHttpInfo(String id, UpdateTagDto updateTagDto,) async {
// ignore: prefer_const_declarations
final path = r'/tag/{id}'
final path = r'/tags/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals

View File

@ -16,13 +16,13 @@ class UserApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /user/profile-image' operation and returns the [Response].
/// Performs an HTTP 'POST /users/profile-image' operation and returns the [Response].
/// Parameters:
///
/// * [MultipartFile] file (required):
Future<Response> createProfileImageWithHttpInfo(MultipartFile file,) async {
// ignore: prefer_const_declarations
final path = r'/user/profile-image';
final path = r'/users/profile-image';
// ignore: prefer_final_locals
Object? postBody;
@ -73,13 +73,13 @@ class UserApi {
return null;
}
/// Performs an HTTP 'POST /user' operation and returns the [Response].
/// Performs an HTTP 'POST /users' operation and returns the [Response].
/// Parameters:
///
/// * [CreateUserDto] createUserDto (required):
Future<Response> createUserWithHttpInfo(CreateUserDto createUserDto,) async {
// ignore: prefer_const_declarations
final path = r'/user';
final path = r'/users';
// ignore: prefer_final_locals
Object? postBody = createUserDto;
@ -120,10 +120,10 @@ class UserApi {
return null;
}
/// Performs an HTTP 'DELETE /user/profile-image' operation and returns the [Response].
/// Performs an HTTP 'DELETE /users/profile-image' operation and returns the [Response].
Future<Response> deleteProfileImageWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/user/profile-image';
final path = r'/users/profile-image';
// ignore: prefer_final_locals
Object? postBody;
@ -153,7 +153,7 @@ class UserApi {
}
}
/// Performs an HTTP 'DELETE /user/{id}' operation and returns the [Response].
/// Performs an HTTP 'DELETE /users/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@ -161,7 +161,7 @@ class UserApi {
/// * [DeleteUserDto] deleteUserDto (required):
Future<Response> deleteUserWithHttpInfo(String id, DeleteUserDto deleteUserDto,) async {
// ignore: prefer_const_declarations
final path = r'/user/{id}'
final path = r'/users/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -205,13 +205,13 @@ class UserApi {
return null;
}
/// Performs an HTTP 'GET /user' operation and returns the [Response].
/// Performs an HTTP 'GET /users' operation and returns the [Response].
/// Parameters:
///
/// * [bool] isAll (required):
Future<Response> getAllUsersWithHttpInfo(bool isAll,) async {
// ignore: prefer_const_declarations
final path = r'/user';
final path = r'/users';
// ignore: prefer_final_locals
Object? postBody;
@ -257,10 +257,10 @@ class UserApi {
return null;
}
/// Performs an HTTP 'GET /user/me' operation and returns the [Response].
/// Performs an HTTP 'GET /users/me' operation and returns the [Response].
Future<Response> getMyUserInfoWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/user/me';
final path = r'/users/me';
// ignore: prefer_final_locals
Object? postBody;
@ -298,13 +298,13 @@ class UserApi {
return null;
}
/// Performs an HTTP 'GET /user/profile-image/{id}' operation and returns the [Response].
/// Performs an HTTP 'GET /users/profile-image/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getProfileImageWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/user/profile-image/{id}'
final path = r'/users/profile-image/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -346,13 +346,13 @@ class UserApi {
return null;
}
/// Performs an HTTP 'GET /user/info/{id}' operation and returns the [Response].
/// Performs an HTTP 'GET /users/info/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getUserByIdWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/user/info/{id}'
final path = r'/users/info/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -394,13 +394,13 @@ class UserApi {
return null;
}
/// Performs an HTTP 'POST /user/{id}/restore' operation and returns the [Response].
/// Performs an HTTP 'POST /users/{id}/restore' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> restoreUserWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/user/{id}/restore'
final path = r'/users/{id}/restore'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
@ -442,13 +442,13 @@ class UserApi {
return null;
}
/// Performs an HTTP 'PUT /user' operation and returns the [Response].
/// Performs an HTTP 'PUT /users' operation and returns the [Response].
/// Parameters:
///
/// * [UpdateUserDto] updateUserDto (required):
Future<Response> updateUserWithHttpInfo(UpdateUserDto updateUserDto,) async {
// ignore: prefer_const_declarations
final path = r'/user';
final path = r'/users';
// ignore: prefer_final_locals
Object? postBody = updateUserDto;

View File

@ -1,7 +1,7 @@
{
"openapi": "3.0.0",
"paths": {
"/activity": {
"/activities": {
"get": {
"operationId": "getActivities",
"parameters": [
@ -120,7 +120,7 @@
]
}
},
"/activity/statistics": {
"/activities/statistics": {
"get": {
"operationId": "getActivityStatistics",
"parameters": [
@ -171,7 +171,7 @@
]
}
},
"/activity/{id}": {
"/activities/{id}": {
"delete": {
"operationId": "deleteActivity",
"parameters": [
@ -206,7 +206,7 @@
]
}
},
"/album": {
"/albums": {
"get": {
"operationId": "getAllAlbums",
"parameters": [
@ -300,7 +300,7 @@
]
}
},
"/album/count": {
"/albums/count": {
"get": {
"operationId": "getAlbumCount",
"parameters": [],
@ -332,7 +332,7 @@
]
}
},
"/album/{id}": {
"/albums/{id}": {
"delete": {
"operationId": "deleteAlbum",
"parameters": [
@ -473,7 +473,7 @@
]
}
},
"/album/{id}/assets": {
"/albums/{id}/assets": {
"delete": {
"operationId": "removeAssetFromAlbum",
"parameters": [
@ -589,7 +589,7 @@
]
}
},
"/album/{id}/user/{userId}": {
"/albums/{id}/user/{userId}": {
"delete": {
"operationId": "removeUserFromAlbum",
"parameters": [
@ -683,7 +683,7 @@
]
}
},
"/album/{id}/users": {
"/albums/{id}/users": {
"put": {
"operationId": "addUsersToAlbum",
"parameters": [
@ -735,7 +735,7 @@
]
}
},
"/api-key": {
"/api-keys": {
"get": {
"operationId": "getApiKeys",
"parameters": [],
@ -810,7 +810,7 @@
]
}
},
"/api-key/{id}": {
"/api-keys/{id}": {
"delete": {
"operationId": "deleteApiKey",
"parameters": [
@ -2256,7 +2256,7 @@
]
}
},
"/face": {
"/faces": {
"get": {
"operationId": "getFaces",
"parameters": [
@ -2301,7 +2301,7 @@
]
}
},
"/face/{id}": {
"/faces/{id}": {
"put": {
"operationId": "reassignFacesById",
"parameters": [
@ -2436,7 +2436,7 @@
]
}
},
"/library": {
"/libraries": {
"get": {
"operationId": "getAllLibraries",
"parameters": [],
@ -2511,7 +2511,7 @@
]
}
},
"/library/{id}": {
"/libraries/{id}": {
"delete": {
"operationId": "deleteLibrary",
"parameters": [
@ -2636,7 +2636,7 @@
]
}
},
"/library/{id}/removeOffline": {
"/libraries/{id}/removeOffline": {
"post": {
"operationId": "removeOfflineFiles",
"parameters": [
@ -2671,7 +2671,7 @@
]
}
},
"/library/{id}/scan": {
"/libraries/{id}/scan": {
"post": {
"operationId": "scanLibrary",
"parameters": [
@ -2716,7 +2716,7 @@
]
}
},
"/library/{id}/statistics": {
"/libraries/{id}/statistics": {
"get": {
"operationId": "getLibraryStatistics",
"parameters": [
@ -2758,7 +2758,7 @@
]
}
},
"/library/{id}/validate": {
"/libraries/{id}/validate": {
"post": {
"operationId": "validate",
"parameters": [
@ -3268,7 +3268,7 @@
]
}
},
"/partner": {
"/partners": {
"get": {
"operationId": "getPartners",
"parameters": [
@ -3316,7 +3316,7 @@
]
}
},
"/partner/{id}": {
"/partners/{id}": {
"delete": {
"operationId": "removePartner",
"parameters": [
@ -3441,7 +3441,7 @@
]
}
},
"/person": {
"/people": {
"get": {
"operationId": "getAllPeople",
"parameters": [
@ -3565,7 +3565,7 @@
]
}
},
"/person/{id}": {
"/people/{id}": {
"get": {
"operationId": "getPerson",
"parameters": [
@ -3657,7 +3657,7 @@
]
}
},
"/person/{id}/assets": {
"/people/{id}/assets": {
"get": {
"operationId": "getPersonAssets",
"parameters": [
@ -3702,7 +3702,7 @@
]
}
},
"/person/{id}/merge": {
"/people/{id}/merge": {
"post": {
"operationId": "mergePerson",
"parameters": [
@ -3757,7 +3757,7 @@
]
}
},
"/person/{id}/reassign": {
"/people/{id}/reassign": {
"put": {
"operationId": "reassignFaces",
"parameters": [
@ -3812,7 +3812,7 @@
]
}
},
"/person/{id}/statistics": {
"/people/{id}/statistics": {
"get": {
"operationId": "getPersonStatistics",
"parameters": [
@ -3854,7 +3854,7 @@
]
}
},
"/person/{id}/thumbnail": {
"/people/{id}/thumbnail": {
"get": {
"operationId": "getPersonThumbnail",
"parameters": [
@ -3897,7 +3897,7 @@
]
}
},
"/report": {
"/reports": {
"get": {
"operationId": "getAuditFiles",
"parameters": [],
@ -3929,7 +3929,7 @@
]
}
},
"/report/checksum": {
"/reports/checksum": {
"post": {
"operationId": "getFileChecksums",
"parameters": [],
@ -3974,7 +3974,7 @@
]
}
},
"/report/fix": {
"/reports/fix": {
"post": {
"operationId": "fixAuditFiles",
"parameters": [],
@ -4656,7 +4656,7 @@
]
}
},
"/shared-link": {
"/shared-links": {
"get": {
"operationId": "getAllSharedLinks",
"parameters": [],
@ -4731,7 +4731,7 @@
]
}
},
"/shared-link/me": {
"/shared-links/me": {
"get": {
"operationId": "getMySharedLink",
"parameters": [
@ -4789,7 +4789,7 @@
]
}
},
"/shared-link/{id}": {
"/shared-links/{id}": {
"delete": {
"operationId": "removeSharedLink",
"parameters": [
@ -4914,7 +4914,7 @@
]
}
},
"/shared-link/{id}/assets": {
"/shared-links/{id}/assets": {
"delete": {
"operationId": "removeSharedLinkAssets",
"parameters": [
@ -5407,7 +5407,7 @@
]
}
},
"/tag": {
"/tags": {
"get": {
"operationId": "getAllTags",
"parameters": [],
@ -5482,7 +5482,7 @@
]
}
},
"/tag/{id}": {
"/tags/{id}": {
"delete": {
"operationId": "deleteTag",
"parameters": [
@ -5607,7 +5607,7 @@
]
}
},
"/tag/{id}/assets": {
"/tags/{id}/assets": {
"delete": {
"operationId": "untagAssets",
"parameters": [
@ -6105,7 +6105,7 @@
]
}
},
"/user": {
"/users": {
"get": {
"operationId": "getAllUsers",
"parameters": [
@ -6229,7 +6229,7 @@
]
}
},
"/user/info/{id}": {
"/users/info/{id}": {
"get": {
"operationId": "getUserById",
"parameters": [
@ -6271,7 +6271,7 @@
]
}
},
"/user/me": {
"/users/me": {
"get": {
"operationId": "getMyUserInfo",
"parameters": [],
@ -6303,7 +6303,7 @@
]
}
},
"/user/profile-image": {
"/users/profile-image": {
"delete": {
"operationId": "deleteProfileImage",
"parameters": [],
@ -6369,7 +6369,7 @@
]
}
},
"/user/profile-image/{id}": {
"/users/profile-image/{id}": {
"get": {
"operationId": "getProfileImage",
"parameters": [
@ -6412,7 +6412,7 @@
]
}
},
"/user/{id}": {
"/users/{id}": {
"delete": {
"operationId": "deleteUser",
"parameters": [
@ -6464,7 +6464,7 @@
]
}
},
"/user/{id}/restore": {
"/users/{id}/restore": {
"post": {
"operationId": "restoreUser",
"parameters": [

View File

@ -1106,7 +1106,7 @@ export function getActivities({ albumId, assetId, level, $type, userId }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ActivityResponseDto[];
}>(`/activity${QS.query(QS.explode({
}>(`/activities${QS.query(QS.explode({
albumId,
assetId,
level,
@ -1122,7 +1122,7 @@ export function createActivity({ activityCreateDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: ActivityResponseDto;
}>("/activity", oazapfts.json({
}>("/activities", oazapfts.json({
...opts,
method: "POST",
body: activityCreateDto
@ -1135,7 +1135,7 @@ export function getActivityStatistics({ albumId, assetId }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ActivityStatisticsResponseDto;
}>(`/activity/statistics${QS.query(QS.explode({
}>(`/activities/statistics${QS.query(QS.explode({
albumId,
assetId
}))}`, {
@ -1145,7 +1145,7 @@ export function getActivityStatistics({ albumId, assetId }: {
export function deleteActivity({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/activity/${encodeURIComponent(id)}`, {
return oazapfts.ok(oazapfts.fetchText(`/activities/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
@ -1157,7 +1157,7 @@ export function getAllAlbums({ assetId, shared }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AlbumResponseDto[];
}>(`/album${QS.query(QS.explode({
}>(`/albums${QS.query(QS.explode({
assetId,
shared
}))}`, {
@ -1170,7 +1170,7 @@ export function createAlbum({ createAlbumDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: AlbumResponseDto;
}>("/album", oazapfts.json({
}>("/albums", oazapfts.json({
...opts,
method: "POST",
body: createAlbumDto
@ -1180,14 +1180,14 @@ export function getAlbumCount(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AlbumCountResponseDto;
}>("/album/count", {
}>("/albums/count", {
...opts
}));
}
export function deleteAlbum({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/album/${encodeURIComponent(id)}`, {
return oazapfts.ok(oazapfts.fetchText(`/albums/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
@ -1200,7 +1200,7 @@ export function getAlbumInfo({ id, key, withoutAssets }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AlbumResponseDto;
}>(`/album/${encodeURIComponent(id)}${QS.query(QS.explode({
}>(`/albums/${encodeURIComponent(id)}${QS.query(QS.explode({
key,
withoutAssets
}))}`, {
@ -1214,7 +1214,7 @@ export function updateAlbumInfo({ id, updateAlbumDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AlbumResponseDto;
}>(`/album/${encodeURIComponent(id)}`, oazapfts.json({
}>(`/albums/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PATCH",
body: updateAlbumDto
@ -1227,7 +1227,7 @@ export function removeAssetFromAlbum({ id, bulkIdsDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: BulkIdResponseDto[];
}>(`/album/${encodeURIComponent(id)}/assets`, oazapfts.json({
}>(`/albums/${encodeURIComponent(id)}/assets`, oazapfts.json({
...opts,
method: "DELETE",
body: bulkIdsDto
@ -1241,7 +1241,7 @@ export function addAssetsToAlbum({ id, key, bulkIdsDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: BulkIdResponseDto[];
}>(`/album/${encodeURIComponent(id)}/assets${QS.query(QS.explode({
}>(`/albums/${encodeURIComponent(id)}/assets${QS.query(QS.explode({
key
}))}`, oazapfts.json({
...opts,
@ -1253,7 +1253,7 @@ export function removeUserFromAlbum({ id, userId }: {
id: string;
userId: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/album/${encodeURIComponent(id)}/user/${encodeURIComponent(userId)}`, {
return oazapfts.ok(oazapfts.fetchText(`/albums/${encodeURIComponent(id)}/user/${encodeURIComponent(userId)}`, {
...opts,
method: "DELETE"
}));
@ -1263,7 +1263,7 @@ export function updateAlbumUser({ id, userId, updateAlbumUserDto }: {
userId: string;
updateAlbumUserDto: UpdateAlbumUserDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/album/${encodeURIComponent(id)}/user/${encodeURIComponent(userId)}`, oazapfts.json({
return oazapfts.ok(oazapfts.fetchText(`/albums/${encodeURIComponent(id)}/user/${encodeURIComponent(userId)}`, oazapfts.json({
...opts,
method: "PUT",
body: updateAlbumUserDto
@ -1276,7 +1276,7 @@ export function addUsersToAlbum({ id, addUsersDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AlbumResponseDto;
}>(`/album/${encodeURIComponent(id)}/users`, oazapfts.json({
}>(`/albums/${encodeURIComponent(id)}/users`, oazapfts.json({
...opts,
method: "PUT",
body: addUsersDto
@ -1286,7 +1286,7 @@ export function getApiKeys(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ApiKeyResponseDto[];
}>("/api-key", {
}>("/api-keys", {
...opts
}));
}
@ -1296,7 +1296,7 @@ export function createApiKey({ apiKeyCreateDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: ApiKeyCreateResponseDto;
}>("/api-key", oazapfts.json({
}>("/api-keys", oazapfts.json({
...opts,
method: "POST",
body: apiKeyCreateDto
@ -1305,7 +1305,7 @@ export function createApiKey({ apiKeyCreateDto }: {
export function deleteApiKey({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/api-key/${encodeURIComponent(id)}`, {
return oazapfts.ok(oazapfts.fetchText(`/api-keys/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
@ -1316,7 +1316,7 @@ export function getApiKey({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ApiKeyResponseDto;
}>(`/api-key/${encodeURIComponent(id)}`, {
}>(`/api-keys/${encodeURIComponent(id)}`, {
...opts
}));
}
@ -1327,7 +1327,7 @@ export function updateApiKey({ id, apiKeyUpdateDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ApiKeyResponseDto;
}>(`/api-key/${encodeURIComponent(id)}`, oazapfts.json({
}>(`/api-keys/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PUT",
body: apiKeyUpdateDto
@ -1712,7 +1712,7 @@ export function getFaces({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetFaceResponseDto[];
}>(`/face${QS.query(QS.explode({
}>(`/faces${QS.query(QS.explode({
id
}))}`, {
...opts
@ -1725,7 +1725,7 @@ export function reassignFacesById({ id, faceDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: PersonResponseDto;
}>(`/face/${encodeURIComponent(id)}`, oazapfts.json({
}>(`/faces/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PUT",
body: faceDto
@ -1756,7 +1756,7 @@ export function getAllLibraries(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LibraryResponseDto[];
}>("/library", {
}>("/libraries", {
...opts
}));
}
@ -1766,7 +1766,7 @@ export function createLibrary({ createLibraryDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: LibraryResponseDto;
}>("/library", oazapfts.json({
}>("/libraries", oazapfts.json({
...opts,
method: "POST",
body: createLibraryDto
@ -1775,7 +1775,7 @@ export function createLibrary({ createLibraryDto }: {
export function deleteLibrary({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/library/${encodeURIComponent(id)}`, {
return oazapfts.ok(oazapfts.fetchText(`/libraries/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
@ -1786,7 +1786,7 @@ export function getLibrary({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LibraryResponseDto;
}>(`/library/${encodeURIComponent(id)}`, {
}>(`/libraries/${encodeURIComponent(id)}`, {
...opts
}));
}
@ -1797,7 +1797,7 @@ export function updateLibrary({ id, updateLibraryDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LibraryResponseDto;
}>(`/library/${encodeURIComponent(id)}`, oazapfts.json({
}>(`/libraries/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PUT",
body: updateLibraryDto
@ -1806,7 +1806,7 @@ export function updateLibrary({ id, updateLibraryDto }: {
export function removeOfflineFiles({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/library/${encodeURIComponent(id)}/removeOffline`, {
return oazapfts.ok(oazapfts.fetchText(`/libraries/${encodeURIComponent(id)}/removeOffline`, {
...opts,
method: "POST"
}));
@ -1815,7 +1815,7 @@ export function scanLibrary({ id, scanLibraryDto }: {
id: string;
scanLibraryDto: ScanLibraryDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/library/${encodeURIComponent(id)}/scan`, oazapfts.json({
return oazapfts.ok(oazapfts.fetchText(`/libraries/${encodeURIComponent(id)}/scan`, oazapfts.json({
...opts,
method: "POST",
body: scanLibraryDto
@ -1827,7 +1827,7 @@ export function getLibraryStatistics({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LibraryStatsResponseDto;
}>(`/library/${encodeURIComponent(id)}/statistics`, {
}>(`/libraries/${encodeURIComponent(id)}/statistics`, {
...opts
}));
}
@ -1838,7 +1838,7 @@ export function validate({ id, validateLibraryDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ValidateLibraryResponseDto;
}>(`/library/${encodeURIComponent(id)}/validate`, oazapfts.json({
}>(`/libraries/${encodeURIComponent(id)}/validate`, oazapfts.json({
...opts,
method: "POST",
body: validateLibraryDto
@ -1977,7 +1977,7 @@ export function getPartners({ direction }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: PartnerResponseDto[];
}>(`/partner${QS.query(QS.explode({
}>(`/partners${QS.query(QS.explode({
direction
}))}`, {
...opts
@ -1986,7 +1986,7 @@ export function getPartners({ direction }: {
export function removePartner({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/partner/${encodeURIComponent(id)}`, {
return oazapfts.ok(oazapfts.fetchText(`/partners/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
@ -1997,7 +1997,7 @@ export function createPartner({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: PartnerResponseDto;
}>(`/partner/${encodeURIComponent(id)}`, {
}>(`/partners/${encodeURIComponent(id)}`, {
...opts,
method: "POST"
}));
@ -2009,7 +2009,7 @@ export function updatePartner({ id, updatePartnerDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: PartnerResponseDto;
}>(`/partner/${encodeURIComponent(id)}`, oazapfts.json({
}>(`/partners/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PUT",
body: updatePartnerDto
@ -2021,7 +2021,7 @@ export function getAllPeople({ withHidden }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: PeopleResponseDto;
}>(`/person${QS.query(QS.explode({
}>(`/people${QS.query(QS.explode({
withHidden
}))}`, {
...opts
@ -2033,7 +2033,7 @@ export function createPerson({ personCreateDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: PersonResponseDto;
}>("/person", oazapfts.json({
}>("/people", oazapfts.json({
...opts,
method: "POST",
body: personCreateDto
@ -2045,7 +2045,7 @@ export function updatePeople({ peopleUpdateDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: BulkIdResponseDto[];
}>("/person", oazapfts.json({
}>("/people", oazapfts.json({
...opts,
method: "PUT",
body: peopleUpdateDto
@ -2057,7 +2057,7 @@ export function getPerson({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: PersonResponseDto;
}>(`/person/${encodeURIComponent(id)}`, {
}>(`/people/${encodeURIComponent(id)}`, {
...opts
}));
}
@ -2068,7 +2068,7 @@ export function updatePerson({ id, personUpdateDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: PersonResponseDto;
}>(`/person/${encodeURIComponent(id)}`, oazapfts.json({
}>(`/people/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PUT",
body: personUpdateDto
@ -2080,7 +2080,7 @@ export function getPersonAssets({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetResponseDto[];
}>(`/person/${encodeURIComponent(id)}/assets`, {
}>(`/people/${encodeURIComponent(id)}/assets`, {
...opts
}));
}
@ -2091,7 +2091,7 @@ export function mergePerson({ id, mergePersonDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: BulkIdResponseDto[];
}>(`/person/${encodeURIComponent(id)}/merge`, oazapfts.json({
}>(`/people/${encodeURIComponent(id)}/merge`, oazapfts.json({
...opts,
method: "POST",
body: mergePersonDto
@ -2104,7 +2104,7 @@ export function reassignFaces({ id, assetFaceUpdateDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: PersonResponseDto[];
}>(`/person/${encodeURIComponent(id)}/reassign`, oazapfts.json({
}>(`/people/${encodeURIComponent(id)}/reassign`, oazapfts.json({
...opts,
method: "PUT",
body: assetFaceUpdateDto
@ -2116,7 +2116,7 @@ export function getPersonStatistics({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: PersonStatisticsResponseDto;
}>(`/person/${encodeURIComponent(id)}/statistics`, {
}>(`/people/${encodeURIComponent(id)}/statistics`, {
...opts
}));
}
@ -2126,7 +2126,7 @@ export function getPersonThumbnail({ id }: {
return oazapfts.ok(oazapfts.fetchBlob<{
status: 200;
data: Blob;
}>(`/person/${encodeURIComponent(id)}/thumbnail`, {
}>(`/people/${encodeURIComponent(id)}/thumbnail`, {
...opts
}));
}
@ -2134,7 +2134,7 @@ export function getAuditFiles(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: FileReportDto;
}>("/report", {
}>("/reports", {
...opts
}));
}
@ -2144,7 +2144,7 @@ export function getFileChecksums({ fileChecksumDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: FileChecksumResponseDto[];
}>("/report/checksum", oazapfts.json({
}>("/reports/checksum", oazapfts.json({
...opts,
method: "POST",
body: fileChecksumDto
@ -2153,7 +2153,7 @@ export function getFileChecksums({ fileChecksumDto }: {
export function fixAuditFiles({ fileReportFixDto }: {
fileReportFixDto: FileReportFixDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/report/fix", oazapfts.json({
return oazapfts.ok(oazapfts.fetchText("/reports/fix", oazapfts.json({
...opts,
method: "POST",
body: fileReportFixDto
@ -2346,7 +2346,7 @@ export function getAllSharedLinks(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: SharedLinkResponseDto[];
}>("/shared-link", {
}>("/shared-links", {
...opts
}));
}
@ -2356,7 +2356,7 @@ export function createSharedLink({ sharedLinkCreateDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: SharedLinkResponseDto;
}>("/shared-link", oazapfts.json({
}>("/shared-links", oazapfts.json({
...opts,
method: "POST",
body: sharedLinkCreateDto
@ -2370,7 +2370,7 @@ export function getMySharedLink({ key, password, token }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: SharedLinkResponseDto;
}>(`/shared-link/me${QS.query(QS.explode({
}>(`/shared-links/me${QS.query(QS.explode({
key,
password,
token
@ -2381,7 +2381,7 @@ export function getMySharedLink({ key, password, token }: {
export function removeSharedLink({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/shared-link/${encodeURIComponent(id)}`, {
return oazapfts.ok(oazapfts.fetchText(`/shared-links/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
@ -2392,7 +2392,7 @@ export function getSharedLinkById({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: SharedLinkResponseDto;
}>(`/shared-link/${encodeURIComponent(id)}`, {
}>(`/shared-links/${encodeURIComponent(id)}`, {
...opts
}));
}
@ -2403,7 +2403,7 @@ export function updateSharedLink({ id, sharedLinkEditDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: SharedLinkResponseDto;
}>(`/shared-link/${encodeURIComponent(id)}`, oazapfts.json({
}>(`/shared-links/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PATCH",
body: sharedLinkEditDto
@ -2417,7 +2417,7 @@ export function removeSharedLinkAssets({ id, key, assetIdsDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetIdsResponseDto[];
}>(`/shared-link/${encodeURIComponent(id)}/assets${QS.query(QS.explode({
}>(`/shared-links/${encodeURIComponent(id)}/assets${QS.query(QS.explode({
key
}))}`, oazapfts.json({
...opts,
@ -2433,7 +2433,7 @@ export function addSharedLinkAssets({ id, key, assetIdsDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetIdsResponseDto[];
}>(`/shared-link/${encodeURIComponent(id)}/assets${QS.query(QS.explode({
}>(`/shared-links/${encodeURIComponent(id)}/assets${QS.query(QS.explode({
key
}))}`, oazapfts.json({
...opts,
@ -2544,7 +2544,7 @@ export function getAllTags(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: TagResponseDto[];
}>("/tag", {
}>("/tags", {
...opts
}));
}
@ -2554,7 +2554,7 @@ export function createTag({ createTagDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: TagResponseDto;
}>("/tag", oazapfts.json({
}>("/tags", oazapfts.json({
...opts,
method: "POST",
body: createTagDto
@ -2563,7 +2563,7 @@ export function createTag({ createTagDto }: {
export function deleteTag({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/tag/${encodeURIComponent(id)}`, {
return oazapfts.ok(oazapfts.fetchText(`/tags/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
@ -2574,7 +2574,7 @@ export function getTagById({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: TagResponseDto;
}>(`/tag/${encodeURIComponent(id)}`, {
}>(`/tags/${encodeURIComponent(id)}`, {
...opts
}));
}
@ -2585,7 +2585,7 @@ export function updateTag({ id, updateTagDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: TagResponseDto;
}>(`/tag/${encodeURIComponent(id)}`, oazapfts.json({
}>(`/tags/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PATCH",
body: updateTagDto
@ -2598,7 +2598,7 @@ export function untagAssets({ id, assetIdsDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetIdsResponseDto[];
}>(`/tag/${encodeURIComponent(id)}/assets`, oazapfts.json({
}>(`/tags/${encodeURIComponent(id)}/assets`, oazapfts.json({
...opts,
method: "DELETE",
body: assetIdsDto
@ -2610,7 +2610,7 @@ export function getTagAssets({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetResponseDto[];
}>(`/tag/${encodeURIComponent(id)}/assets`, {
}>(`/tags/${encodeURIComponent(id)}/assets`, {
...opts
}));
}
@ -2621,7 +2621,7 @@ export function tagAssets({ id, assetIdsDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetIdsResponseDto[];
}>(`/tag/${encodeURIComponent(id)}/assets`, oazapfts.json({
}>(`/tags/${encodeURIComponent(id)}/assets`, oazapfts.json({
...opts,
method: "PUT",
body: assetIdsDto
@ -2720,7 +2720,7 @@ export function getAllUsers({ isAll }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: UserResponseDto[];
}>(`/user${QS.query(QS.explode({
}>(`/users${QS.query(QS.explode({
isAll
}))}`, {
...opts
@ -2732,7 +2732,7 @@ export function createUser({ createUserDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: UserResponseDto;
}>("/user", oazapfts.json({
}>("/users", oazapfts.json({
...opts,
method: "POST",
body: createUserDto
@ -2744,7 +2744,7 @@ export function updateUser({ updateUserDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: UserResponseDto;
}>("/user", oazapfts.json({
}>("/users", oazapfts.json({
...opts,
method: "PUT",
body: updateUserDto
@ -2756,7 +2756,7 @@ export function getUserById({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: UserResponseDto;
}>(`/user/info/${encodeURIComponent(id)}`, {
}>(`/users/info/${encodeURIComponent(id)}`, {
...opts
}));
}
@ -2764,12 +2764,12 @@ export function getMyUserInfo(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: UserResponseDto;
}>("/user/me", {
}>("/users/me", {
...opts
}));
}
export function deleteProfileImage(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/user/profile-image", {
return oazapfts.ok(oazapfts.fetchText("/users/profile-image", {
...opts,
method: "DELETE"
}));
@ -2780,7 +2780,7 @@ export function createProfileImage({ createProfileImageDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: CreateProfileImageResponseDto;
}>("/user/profile-image", oazapfts.multipart({
}>("/users/profile-image", oazapfts.multipart({
...opts,
method: "POST",
body: createProfileImageDto
@ -2792,7 +2792,7 @@ export function getProfileImage({ id }: {
return oazapfts.ok(oazapfts.fetchBlob<{
status: 200;
data: Blob;
}>(`/user/profile-image/${encodeURIComponent(id)}`, {
}>(`/users/profile-image/${encodeURIComponent(id)}`, {
...opts
}));
}
@ -2803,7 +2803,7 @@ export function deleteUser({ id, deleteUserDto }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: UserResponseDto;
}>(`/user/${encodeURIComponent(id)}`, oazapfts.json({
}>(`/users/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "DELETE",
body: deleteUserDto
@ -2815,7 +2815,7 @@ export function restoreUser({ id }: {
return oazapfts.ok(oazapfts.fetchJson<{
status: 201;
data: UserResponseDto;
}>(`/user/${encodeURIComponent(id)}/restore`, {
}>(`/users/${encodeURIComponent(id)}/restore`, {
...opts,
method: "POST"
}));

View File

@ -14,7 +14,7 @@ import { ActivityService } from 'src/services/activity.service';
import { UUIDParamDto } from 'src/validation';
@ApiTags('Activity')
@Controller('activity')
@Controller('activities')
export class ActivityController {
constructor(private service: ActivityService) {}

View File

@ -17,7 +17,7 @@ import { AlbumService } from 'src/services/album.service';
import { ParseMeUUIDPipe, UUIDParamDto } from 'src/validation';
@ApiTags('Album')
@Controller('album')
@Controller('albums')
export class AlbumController {
constructor(private service: AlbumService) {}

View File

@ -7,7 +7,7 @@ import { APIKeyService } from 'src/services/api-key.service';
import { UUIDParamDto } from 'src/validation';
@ApiTags('API Key')
@Controller('api-key')
@Controller('api-keys')
export class APIKeyController {
constructor(private service: APIKeyService) {}

View File

@ -7,7 +7,7 @@ import { PersonService } from 'src/services/person.service';
import { UUIDParamDto } from 'src/validation';
@ApiTags('Face')
@Controller('face')
@Controller('faces')
export class FaceController {
constructor(private service: PersonService) {}

View File

@ -5,7 +5,7 @@ import { Authenticated } from 'src/middleware/auth.guard';
import { AuditService } from 'src/services/audit.service';
@ApiTags('File Report')
@Controller('report')
@Controller('reports')
export class ReportController {
constructor(private service: AuditService) {}

View File

@ -14,7 +14,7 @@ import { LibraryService } from 'src/services/library.service';
import { UUIDParamDto } from 'src/validation';
@ApiTags('Library')
@Controller('library')
@Controller('libraries')
export class LibraryController {
constructor(private service: LibraryService) {}

View File

@ -8,7 +8,7 @@ import { PartnerService } from 'src/services/partner.service';
import { UUIDParamDto } from 'src/validation';
@ApiTags('Partner')
@Controller('partner')
@Controller('partners')
export class PartnerController {
constructor(private service: PartnerService) {}

View File

@ -22,7 +22,7 @@ import { sendFile } from 'src/utils/file';
import { UUIDParamDto } from 'src/validation';
@ApiTags('Person')
@Controller('person')
@Controller('people')
export class PersonController {
constructor(
private service: PersonService,

View File

@ -17,7 +17,7 @@ import { respondWithCookie } from 'src/utils/response';
import { UUIDParamDto } from 'src/validation';
@ApiTags('Shared Link')
@Controller('shared-link')
@Controller('shared-links')
export class SharedLinkController {
constructor(private service: SharedLinkService) {}

View File

@ -10,7 +10,7 @@ import { TagService } from 'src/services/tag.service';
import { UUIDParamDto } from 'src/validation';
@ApiTags('Tag')
@Controller('tag')
@Controller('tags')
export class TagController {
constructor(private service: TagService) {}

View File

@ -13,7 +13,7 @@ import { AssetService, UploadFile } from 'src/services/asset.service';
export enum Route {
ASSET = 'asset',
USER = 'user',
USER = 'users',
}
export interface ImmichFile extends Express.Multer.File {

View File

@ -174,7 +174,7 @@ export const getProfileImageUrl = (...[userId]: [string]) => {
};
export const getPeopleThumbnailUrl = (personId: string) => {
const path = `/person/${personId}/thumbnail`;
const path = `/people/${personId}/thumbnail`;
return createUrl(path);
};